weston: cleanup init (#112)

* weston: cleanup init

* rm modetest

* increase that

* ugh, have to go to 5

* cleanup comments
This commit is contained in:
Adeeb Shihadeh
2023-02-23 11:14:13 -08:00
committed by GitHub
parent b87df7ac57
commit c2513093cd
2 changed files with 3 additions and 13 deletions
+2 -12
View File
@@ -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 && \
+1 -1
View File
@@ -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