Repository navigation
Conversation
The hook restarts fprintd synchronously, while user sessions are still frozen, so whatever the stop costs is added to the thaw. A healthy daemon stops in about 2ms even while holding a claim, but a wedged one does not answer SIGTERM and has to be killed: 5.08s and 5.02s in this machine's journal, against Omarchy's DefaultTimeoutStopSec=5s. That is the case the hook exists for, so uncapped the recovery costs more than the failure it repairs. The hook's 10s bound does not help -- it sits above the 5s, and killing the client leaves the job enqueued anyway. The cap travels with the hook through setup, apply-lock, the migration and removal, for the same reason the hook travels with the PAM file: the pair is only correct together. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018eDjGAT4r43qvHmB58y2tz
Owner
|
Thanks — the cap landed on the branch as d58aa12, with you as co-author, and I took your
Closing this in favour of the branch commit. |
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.
Four lines and a drop-in, offered against your branch rather than as a fifth PR in this area — it only has value once a resume mechanism lands, and yours is the one I would like to see land.
Why
Your hook restarts fprintd synchronously, while
user.sliceis still frozen, so whatever the stop costs is added to the thaw. The hook's comment says a wedged fprintd "is idle and exits on SIGTERM in milliseconds". For the wedge this PR targets that is exactly right — I held the reader withfprintd-verifyand restarted:But there is a second wedge — the stale device handle after a USB re-enumeration (omacom#8818, and the one I closed omacom#8935 over). That instance does not answer SIGTERM. Two of the ten fprintd stops in this machine's journal are it:
The second, at 10:10:15, is 5.02 s — both are
DefaultTimeoutStopSec=5sfrometc/systemd/system.conf.d/10-faster-shutdown.confrunning out. So resume goes from ~0.5 s to ~5.6 s, and it does so precisely when the daemon is wedged, which is the case the hook exists for.timeout 10sdoes not bound it: it sits above the 5 s, and as your own comment notes, killing the client leaves the job enqueued regardless.TimeoutStopSec=3sis well clear of a healthy stop (2 ms measured, 340 ms for the whole restart) and still leaves your 10 s bound room for the start that follows.What this changes
The cap travels with the hook everywhere the hook goes — setup,
omarchy-apply-lock, the migration, and removal — for the reason your own comment inomarchy-apply-lockgives about the hook and the PAM file: the pair is only correct together. Each isdaemon-reloaded after, since a drop-in nobody reloads is a drop-in that does nothing.The migration's guard is restructured so each half is checked on its own. Without that, a machine that took the hook on an earlier run would hit
! -e $hook_dstand exit before ever seeing the cap.Tests
test/shell.d/fprintd-resume-migration-test.shgoes from 4 to 7 assertions: the cap installs from the default source at 0644 and reloads systemd, an existing cap is left alone and reloads nothing, and a machine that already has the hook still gets the cap. All four mutations I tried are caught — dropping thedaemon-reload, dropping the install, installing 0755, and removing the! -eguard.Green here:
fprintd-resume-migration(7),fprintd-resume-hook(4),lock-fingerprint-retry(28),sleep-lock(19).unowned-system-pathsfails on this machine for want of anomarchy-pkgscheckout, unrelated — and the new file lands in/etc, which that test explicitly treats as administrator territory.Verified on hardware
ThinkPad X390 Yoga, Synaptics
06cb:00bd,mem_sleep=deep(S3), fprintd 1.94.5-2, libfprint 1.94.100-1, systemd 261, Omarchy 4.0.1.Your hook itself, tested verbatim on the same machine, is in my comment on omacom#7158 — 9 ms to fire, 455 ms to a fresh daemon, ordered before the lock screen's own resume work.
Take it, rework it, or tell me to drop it — whichever suits the PR best.