kiosk hotplug: udev RUN keyed on HOTPLUG=1, start-limit raised, journal logging - #62
Merged
Merged
Conversation
…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>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
To use Codex here, create an environment for this repo. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #60, which was merged before @codexmb's review landed; this is the commit that answers it (560b985).
SYSTEMD_WANTSreplaced by a udevRUNcallingcarwatch-kiosk-hotplug.sh, whichreset-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 meansudevadm triggercannot exercise the rule; a real plug does.StartLimitIntervalSec=30,StartLimitBurst=20so a plug burst cannot leave the unit failed.logger(stderr under a TTY-bound unit does not reach it).🤖 Generated with Claude Code