mediapi/systemd
Jean-Michel Tremblay 799a5d5467 Fix mpv never starting: drop the PAMName=login hang, tear down old Kodi
The mpv service inherited Kodi's VT-grabbing block (PAMName=login +
StandardInput=tty + TTYPath=/dev/tty1). Opening a "login" PAM session on
tty1 hangs in systemd's pre-exec setup, so mpv was never exec'd at all --
the service sat "running" as systemd-executor with an empty (mpv) cmdline,
no IPC socket, no output.

Two fixes:

1. Simplify the unit. mpv doesn't need a login session or the tty: as the
   sole DRM client on the seat it becomes DRM master implicitly on first
   open, so plain video+render+audio group membership is enough. Removing
   the PAM/tty block lets mpv actually start, initialize the vc4 KMS
   display, and play (verified end-to-end: play/status/next through the
   Flask API, position advancing on screen).

2. install.sh now tears down any leftover Kodi before starting mpv. The
   real trigger this time was an in-place migration: replacing the unit
   files doesn't stop an already-running Kodi, which kept DRM master and
   the tty1 seat and blocked mpv from ever getting the display.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-09 19:04:45 -04:00
..
mediapi-app.service.template Replace Kodi with mpv as the player; drive it over its JSON IPC socket 2026-07-09 18:16:20 -04:00
mediapi-mpv.service.template Fix mpv never starting: drop the PAMName=login hang, tear down old Kodi 2026-07-09 19:04:45 -04:00