diff --git a/userspace/files/weston.service b/userspace/files/weston.service index 7017e91..bca0217 100644 --- a/userspace/files/weston.service +++ b/userspace/files/weston.service @@ -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 && \ diff --git a/userspace/usr/comma/comma.sh b/userspace/usr/comma/comma.sh index 890b292..9085912 100755 --- a/userspace/usr/comma/comma.sh +++ b/userspace/usr/comma/comma.sh @@ -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