build: make the receiver service headless-console ready
The receiver does not need a window manager: SDL3's KMSDRM backend renders straight to the kernel display pipeline, which is the right setup for a small-board appliance. But a systemd system service has no controlling terminal, and SDL's KMSDRM backend expects one for its VT handling — so the headless path would have failed at boot. Give the unit StandardInput=tty with TTYPath=/dev/tty1 (harmless in desktop mode), and document the headless recipe in the unit, the install script output, and the RUNBOOK: Raspberry Pi OS Lite with Console Autologin, no desktop enabled (a compositor would hold the DRM master), and consoleblank=0.
This commit is contained in:
@@ -27,6 +27,11 @@ StartLimitBurst=10
|
||||
Type=simple
|
||||
User=__SC_RECEIVER_USER__
|
||||
ExecStart=__SC_RECEIVER_BIN__ --receive
|
||||
# SDL's KMSDRM backend (headless console) expects a controlling terminal
|
||||
# for its VT handling; system services have none by default. Harmless in
|
||||
# desktop mode, where the process never touches the tty.
|
||||
StandardInput=tty
|
||||
TTYPath=/dev/tty1
|
||||
# SIGTERM (systemctl stop) shuts the receiver down gracefully, which
|
||||
# withdraws its mDNS announcement. Never SIGKILL it; the systemd default
|
||||
# KillMode escalates only after the graceful timeout.
|
||||
@@ -43,4 +48,12 @@ PrivateTmp=true
|
||||
#Environment=DISPLAY=:0
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
WantedBy=multi-user.target
|
||||
|
||||
# Headless console recipe (no window manager needed — SDL renders directly
|
||||
# to the kernel via KMSDRM):
|
||||
# * Raspberry Pi OS Lite, no desktop enabled (a running compositor would
|
||||
# hold the DRM master and the receiver could not take it)
|
||||
# * raspi-config → System Options → Boot → Console Autologin
|
||||
# * disable console blanking: add consoleblank=0 to
|
||||
# /boot/firmware/cmdline.txt
|
||||
Reference in New Issue
Block a user