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:
@@ -184,8 +184,10 @@ The receiver is installed and starts automatically at boot.
|
||||
Notes for small boards (e.g. Pi Zero 2 W):
|
||||
- No window manager is required: the receiver renders directly to the
|
||||
kernel display pipeline (SDL KMSDRM). Use Raspberry Pi OS Lite with
|
||||
Console Autologin (raspi-config) and no desktop enabled — a running
|
||||
compositor would own the display and the receiver could not start.
|
||||
NO desktop enabled — a running compositor would own the display and
|
||||
the receiver could not start. No console autologin is needed either.
|
||||
- The service owns tty7 and switches to it at boot (Ctrl+Alt+F1 returns
|
||||
to the console login, Ctrl+Alt+F7 to the screencast).
|
||||
- Disable console blanking so the picture never goes dark: add
|
||||
consoleblank=0 to /boot/firmware/cmdline.txt and reboot.
|
||||
- Decoding is software H.264; expect smooth playback for small streams
|
||||
|
||||
Reference in New Issue
Block a user