Repository navigation
Conversation
Fingerprint authentication dies silently on this ThinkPad after enough
suspend cycles, in a way that looks nothing like a failure. The daemon is
running, holds its sleep inhibitor, logs nothing at all, and answers:
$ fprintd-list "$USER"
No devices available
while the reader is present on the bus the whole time — at a new address:
Bus 001 Device 010: ID 06cb:00bd Synaptics, Inc. Prometheus MIS Touch
libfprint enumerates USB once, at startup, and ships no hotplug support:
$ strings /usr/lib/libfprint-2.so* | grep -ci hotplug
0
So a daemon that outlives a re-enumeration keeps a handle nothing answers
to. `systemctl restart fprintd` clears it immediately and is the only known
cure; this unit applies it on every resume, so the stale state cannot
outlive a single wake.
try-restart rather than restart: when fprintd is not running there is
nothing stale to clear, and starting it here would place its activation
inside a sleep transition, which is where logind refuses it its own delay
inhibitor and poisons it for the rest of its life (omacom#7229).
A unit ordered After=suspend.target rather than a script in
/usr/lib/systemd/system-sleep/ — systemd-sleep(8) calls those hooks "hacks"
and points at inhibitor locks instead, and a hook runs inside the
transition, where asking systemd to restart a service is the wrong moment.
Verified on Omarchy 4.0.1, systemd 261, kernel 7.1.9, Synaptics 06cb:00bd,
mem_sleep=deep: across a systemd suspend/resume the unit runs and the daemon
is replaced (PID 252757 to 253978), the reader is enumerated again, and the
new instance holds the inhibitor.
What this does not claim: the original silent failure takes hours and
several sleep cycles to appear here and could not be provoked on demand —
four attempts, including driver unbind, USB authorized toggling, and short
RTC-timed suspends, all failed to reproduce it. The fix is preventive, in
that it makes the observed stale state impossible to carry across a wake,
rather than demonstrated against a reproduction.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018eDjGAT4r43qvHmB58y2tz
There was a problem hiding this comment.
Copilot wasn't able to review any files in this pull request.
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
Confirming this on a second Synaptics Prometheus, and I have the kernel-side evidence for the re-enumeration you infer from the changed bus address.
The kernel logs the re-enumeration as it happensAt the resume instant, the reader disconnects and comes straight back as a new device, and the surviving daemon keeps talking to the old handle: That is the same "enumerates once at startup, no hotplug" story, caught in the act rather than reconstructed after the fact. Why the daemon never clears itselffprintd is D-Bus activated and normally idle-exits after ~30s, which would resolve this on its own. Counting Nine hours, started immediately before the overnight suspend. 2,391 refused claims across that boot; a single 20-second lock episode accounted for 74: The wedged daemon ignores SIGTERMWorth noting for the stop-bounding discussion on #8818: clearing it is not a polite stop. So whatever lands is worth pairing with a short Independent confirmation on the
|
A wedged fprintd does not answer SIGTERM. At the default 90s stop timeout the restart on resume would cost more than the bug it repairs, so pin it to 3s and let systemd reach for SIGKILL quickly. Reported by xe-nvdk on a second Synaptics Prometheus (06cb:00fc). Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018eDjGAT4r43qvHmB58y2tz
|
@xe-nvdk — this is the kernel-side evidence I could not produce, and it changes what this PR can claim. Thank you. Your trace upgrades my mechanism from inferred to observed. I argued the reader re-enumerates and libfprint never notices because it has no hotplug path ( You corrected the PR, and I have amended it. I wrote that Adopted your # /etc/systemd/system/fprintd.service.d/stop-timeout.conf
[Service]
TimeoutStopSec=3sVerified on my machine: Third data point, and a different sleep mode. ThinkPad X390 Yoga ( And a scope problem I have to raise against my own PR. Since I opened this, two neighbours have surfaced:
systemd runs everything in Concretely: #7158's first layer already does what this PR does, and it does it alongside the retry fix that covers the part neither of us addresses — the storm after the wedge (~4 PAM sessions/second against a reader that cannot answer; on my machine 178 sessions and 88 I am testing #7158 on this hardware now and will report there. |
|
Closing in favour of #7158. Having tested that branch on this hardware, it covers what this PR does and more: its post-resume hook clears the wedged claim (9 ms after resume here, fresh daemon 455 ms later, ordered before the lock screen's own resume work), and it also paces the retry storm afterwards — which is the part that actually put a black screen in front of me, and which this PR never addressed. Two things from here that should not get lost, both already posted on #7158:
Thanks @xe-nvdk for the kernel-level trace and the |
|
The replacement has now merged in #7158, including the three-second fprintd stop timeout discussed here. This alternative remains closed. GPT-6 in Codex and Claude Opus 5.5 Medium checked the coverage against the landed source; Claude's agreement does not guarantee independence. This closure review was read-only and did not rerun runtime tests. |
Problem
Fingerprint authentication dies on this ThinkPad after enough suspend cycles, in a way that looks nothing like a failure. Everything you would check is healthy:
And yet:
The reader was on the bus the entire time — at a new address:
Cause
libfprint enumerates USB once, at startup, and ships no hotplug support:
A daemon that outlives a re-enumeration therefore keeps a handle nothing answers to.
systemctl restart fprintdclears it instantly and is the only cure I found.The daemon reaches this state on its own. @xe-nvdk counted fprintd's idle exits on a second reader (
06cb:00fc): 19 in the cycles before the wedging suspend, 0 in every cycle after it. A wedged instance stops exiting, so it does not need--no-timeoutor any other keep-resident mitigation to become long-lived — those only make the failure easier to notice. (An earlier version of this section claimed the opposite; his counts corrected it.)Fix
A unit ordered after the sleep targets, enabled by
omarchy setup security fingerprintalongside the PAM configuration it already writes.It also caps
fprintd.service's stop timeout at 3s. A wedged fprintd does not answer SIGTERM, so at Omarchy's inherited default the restart would cost more on the wake path than the bug it repairs; the cap lets systemd reach for SIGKILL promptly. This part is orthogonal to the mechanism and worth keeping whichever of the neighbouring PRs lands — none of the others sets it.try-restartrather thanrestart: when fprintd is not running there is nothing stale to clear, and starting it here would place its activation inside a sleep transition, which is precisely where logind refuses it its own delay inhibitor.A unit rather than a script in
/usr/lib/systemd/system-sleep/: systemd-sleep(8) calls those hooks "hacks" and points at inhibitor locks instead, and a hook runs inside the transition, which is the wrong moment to ask systemd to restart a service. I tried the hook first and it does not work — on systemd 261/etc/systemd/system-sleep/is not read at all, and the man page documents only the/usr/libpath.Verified
Omarchy 4.0.1, systemd 261, kernel 7.1.9-arch1-2, ThinkPad X390 Yoga, Synaptics
06cb:00bd,mem_sleep=deep.The same shape is now confirmed on two further readers, both s2idle:
06cb:00fc(X1 Carbon Gen 9, @xe-nvdk, with the kernel trace below) and06cb:0123(X1 Carbon Gen 13, @k7cfo in #8818). Three Synaptics variants and both sleep modes, which points at libfprint rather than at one firmware.@xe-nvdk's kernel-side capture of the re-enumeration this PR is built on — the part I could only infer here:
Stop-timeout cap, on this machine:
What this does not claim
The original silent failure takes hours and several sleep cycles to appear here, and I could not provoke it on demand. Four attempts failed: unbinding and rebinding the USB driver, toggling
authorizedon the device, and short RTC-timed suspends — none of them re-addressed the reader the way an overnight run of suspends did.So this is preventive rather than demonstrated against a reproduction: it makes the observed stale state unable to survive a wake. If someone has a reliable reproducer I would like to run against it.
Overlap with #7158 and #8818
Both opened alongside this one and land on the same unit at resume:
timeout … try-restart fprintd.service— functionally this PR, as a hook rather than a unit — plus retry backoff and an "unavailable" notice in the lock screen.@spencerbull's review of #8818 makes the collision explicit: systemd runs
/usr/lib/systemd/system-sleep/in parallel (he measured two hooks 53 µs apart), so a stop and a restart would race with no ordering to rely on. This PR's unit is orderedAfter=suspend.targetrather than being a hook, so it is outside that parallel set, but it still acts on the same unit at the same moment.I would rather see #7158 land than this: its first layer covers the same failure, and it also fixes the retry storm afterwards, which nothing here addresses. If a unit is preferred over a hook, this is the unit; otherwise the
TimeoutStopSeccap is the piece worth salvaging.Related: #7229 (the inhibitor race), #8531 (the lock-side fix for it), #7158, #8818.