Skip to content

kiosk hotplug: udev RUN keyed on HOTPLUG=1, start-limit raised, journal logging - #62

Merged
ThinkOffApp merged 1 commit into
mainfrom
fix/kiosk-needs-a-panel
Sep 16, 2026
Merged

ThinkOffApp merged 1 commit into
mainfrom
fix/kiosk-needs-a-panel

Conversation

@ThinkOffApp

Copy link
Copy Markdown
Owner

Follow-up to #60, which was merged before @codexmb's review landed; this is the commit that answers it (560b985).

  • SYSTEMD_WANTS replaced by a udev RUN calling carwatch-kiosk-hotplug.sh, which reset-faileds and starts the unit with --no-block (Wants= on the device unit fires once; card0 stays active across unplug/replug).
  • ENV{HOTPLUG}=="1" is load-bearing: measured on the VTA, a rule keyed on any DRM change event restarts the kiosk from its own start (the VT switch emits a change event): 517 starts in a minute. With the guard, three synthetic triggers plus one manual start gave exactly one start. The kernel sets HOTPLUG=1 only on real connector hotplug (drm_sysfs.c), which also means udevadm trigger cannot exercise the rule; a real plug does.
  • Unit: StartLimitIntervalSec=30, StartLimitBurst=20 so a plug burst cannot leave the unit failed.
  • Launcher: no-panel and unplug messages also go to the journal via logger (stderr under a TTY-bound unit does not reach it).
  • 5/5 launcher tests pass. On the VTA the rule, helper, unit and launcher from this commit are installed by hand and the unit is enabled and inactive (exit 78); the real-plug test waits for the panel.

🤖 Generated with Claude Code

…al logging

codexmb, #60 review: SYSTEMD_WANTS on a device unit fires once when the
device becomes active; card0 stays active across unplug/replug, so the
kiosk would not restart on the next plug. Now a udev RUN calls
carwatch-kiosk-hotplug.sh, which reset-fails and starts the unit
(--no-block).

Measured on the VTA while getting there: a rule keyed on any DRM change
event restarts the kiosk from its own start, because the VT switch of the
start emits a change event too: 517 starts in a minute. ENV{HOTPLUG}=="1"
is what separates a real plug (kernel drm_sysfs_hotplug_event) from that;
with it, three synthetic triggers plus a manual start produced exactly one
start. The unit's start-rate limit is raised (a plug can be a burst) so a
burst cannot leave the unit 'failed'. The launcher's no-panel and unplug
messages now also go to the journal via logger, since stderr under a
TTY-bound unit does not.

Verified: 5/5 launcher tests; on the VTA: launcher exit 78 with no panel,
rule listed by udevadm test, no feedback with the HOTPLUG guard. Not yet
verified: a real plug event (needs the panel on the VTA).

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@vercel

vercel Bot commented Sep 15, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
carwatch-dev Ready Ready Preview Sep 15, 2026 6:19pm UTC

Request Review

@chatgpt-codex-connector

Copy link
Copy Markdown

To use Codex here, create an environment for this repo.

@ThinkOffApp
ThinkOffApp merged commit a6a7f80 into main Sep 16, 2026
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant