mirror of
https://github.com/commaai/agnos-builder.git
synced 2026-09-30 19:33:46 +08:00
33 lines
1.0 KiB
Desktop File
33 lines
1.0 KiB
Desktop File
[Unit]
|
|
Description=Weston
|
|
Conflicts=getty@tty1.service
|
|
After=systemd-user-sessions.service getty@tty1.service
|
|
|
|
[Service]
|
|
Type=simple
|
|
Restart=no
|
|
KillSignal=SIGKILL
|
|
Environment="XDG_RUNTIME_DIR=/var/tmp/weston"
|
|
|
|
UtmpIdentifier=tty1
|
|
TTYPath=/dev/tty1
|
|
TTYReset=yes
|
|
TTYVHangup=yes
|
|
TTYVTDisallocate=yes
|
|
|
|
# TODO: DCS commands (e.g. brightness setting) don't work without this on certain panels
|
|
ExecStartPre=/bin/bash -c "if [ -d /sys/kernel/debug/dsi_mate10_lite_video_display ]; then echo modesetting; /usr/comma/modetest -M msm_drm -s 26:1080x2160-60; sleep 1; fi"
|
|
|
|
ExecStartPre=/bin/bash -c "mkdir -p $XDG_RUNTIME_DIR"
|
|
ExecStartPre=/bin/bash -c "chown -R comma: $XDG_RUNTIME_DIR"
|
|
|
|
ExecStartPre=/bin/bash -c "mkdir -p /data/misc/display || true"
|
|
ExecStartPre=/bin/bash -c "echo 0 > /data/misc/display/sdm_dbg_cfg.txt || true"
|
|
ExecStartPre=/bin/bash -c "echo 0 > /data/misc/display/gbm_dbg_cfg.txt || true"
|
|
|
|
ExecStartPre=/bin/chvt 1
|
|
ExecStart=/usr/bin/weston --idle-time=0 --tty=1 --config=/usr/comma/weston.ini
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|