fix(systemd): give the receiver service its own VT instead of tty1
The receiver service never started on the Pi: systemd blocks before exec in acquire_terminal(), waiting for a controlling terminal that the console session or getty on tty1 already owns. Symptoms: the status shows the main PID as "(screencast)" with Tasks:1 and ~40ms CPU, a silent journal, and no mDNS announcement — the binary never ran. Reproduced locally with a transient unit (the desktop's Wayland session owns tty1) and diagnosed by gdb-attaching the stuck process. The service now owns a dedicated free VT (tty7) so acquisition is immediate, with a tolerant ExecStartPre chvt to make the screencast the on-screen console at boot. tty1 keeps the console login; Ctrl+Alt+F1/Ctrl+Alt+F7 switch between them. The previous advice to enable Console Autologin actively caused the hang and is removed from the unit, RUNBOOK, and install script notes. Validated locally: the same properties via systemd-run give a running receiver with all ~15 threads alive that announces itself and is found by --discover; verified unit passes systemd-analyze verify; graceful stop withdraws mDNS.
This commit is contained in:
+6
-2
@@ -96,9 +96,13 @@ The receiver does not need X11, Wayland, or any window manager: SDL3's
|
||||
KMSDRM backend renders straight to the kernel display pipeline. This is
|
||||
the recommended setup for small boards (Raspberry Pi OS **Lite**):
|
||||
|
||||
1. `sudo raspi-config` → System Options → Boot → **Console Autologin**.
|
||||
2. No desktop may be enabled — a running compositor holds the DRM master
|
||||
1. No desktop may be enabled — a running compositor holds the DRM master
|
||||
and the receiver cannot take it (the two modes are mutually exclusive).
|
||||
No console autologin is needed either.
|
||||
2. The service renders on its **own VT (tty7)** and switches to it at
|
||||
boot: `Ctrl+Alt+F1` returns to the console login, `Ctrl+Alt+F7` back
|
||||
to the screencast. (A service must not target tty1: acquiring a tty
|
||||
that the console session or getty owns blocks the start forever.)
|
||||
3. Disable console blanking: append `consoleblank=0` to
|
||||
`/boot/firmware/cmdline.txt` and reboot.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user