mirror of
https://github.com/commaai/agnos-builder.git
synced 2026-07-12 18:32:06 +08:00
weston: cleanup init (#112)
* weston: cleanup init * rm modetest * increase that * ugh, have to go to 5 * cleanup comments
This commit is contained in:
@@ -1,22 +1,12 @@
|
||||
[Unit]
|
||||
Description=Weston
|
||||
|
||||
# If we start weston immediately it just exits without an error
|
||||
# TODO: Figure out what we need to wait for (drm?)
|
||||
# TODO: run weston as a non-root user. use weston-launch?
|
||||
[Service]
|
||||
Type=simple
|
||||
Restart=always
|
||||
Environment="XDG_RUNTIME_DIR=/var/tmp/weston"
|
||||
# TODO: detect if display was brought up by bootloader
|
||||
# Setting backlight to 0 while the screen is not initialized will turn off the regulators, 1023 turns it back on
|
||||
ExecStart=/bin/bash -c "sleep 4 && \
|
||||
echo 0 > /sys/class/backlight/panel0-backlight/brightness && \
|
||||
sleep 0.1 && \
|
||||
echo 1023 > /sys/class/backlight/panel0-backlight/brightness && \
|
||||
/usr/comma/modetest -M msm_drm -s 26@111:1080x2160-60 && \
|
||||
/usr/comma/modetest -M msm_drm -s 26@111:1080x2160-60 && \
|
||||
sleep 1 && \
|
||||
mkdir -p $XDG_RUNTIME_DIR && \
|
||||
ExecStart=/bin/bash -c "mkdir -p $XDG_RUNTIME_DIR && \
|
||||
chown -R comma: $XDG_RUNTIME_DIR && \
|
||||
mkdir -p /data/misc/display || true && \
|
||||
echo 0 > /data/misc/display/sdm_dbg_cfg.txt || true && \
|
||||
|
||||
@@ -11,7 +11,7 @@ RESET_TRIGGER="/data/__system_reset__"
|
||||
|
||||
echo "Waiting for wayland"
|
||||
while [ ! -e "$XDG_RUNTIME_DIR/wayland-0" ]; do sleep 0.1; done
|
||||
sleep 0.5 # weston's still starting after the socket's created
|
||||
sleep 5 # weston's still starting after the socket's created
|
||||
echo "wayland ready"
|
||||
sudo chmod -R 770 $XDG_RUNTIME_DIR
|
||||
|
||||
|
||||
Reference in New Issue
Block a user