Lock screen fingerprint retry livelocks after resume: overlapping PAM subprocesses collide on exclusive fprintd claim
What happens
On a laptop with a fingerprint reader, unlocking by fingerprint intermittently stops working entirely. The lock screen shows no fingerprint progress and only a typed password gets you in.
Under the hood the lock screen enters a self-sustaining retry livelock: it spawns 3–5 overlapping pam.subprocess instances per second, every one failing to claim the fingerprint device, until the user gives up and types their password.
Captured from a real failure (13 seconds, 41 attempts, all failing):
19:20:23 Lid closed -> PM: suspend entry (s2idle)
19:20:24 PM: suspend exit -> Lid opened (1-second suspend)
19:20:24 omarchy-shell[182126]: Starting pam session ... "omarchy-lock-fingerprint"
19:20:24 omarchy-shell[182167]: Starting pam session ... "omarchy-lock-fingerprint"
19:20:24 omarchy-shell[182170]: Starting pam session ... "omarchy-lock-fingerprint"
... 41 sessions in 13s, each:
Error while authenticating: "Authentication service cannot
retrieve authentication info" (code 9) [PAM_AUTHINFO_UNAVAIL]
19:20:36 falls back to "omarchy-lock-password" -> user types password
Concurrent distinct PAM subprocess PIDs per second across that window: 5, 3, 3, 4, 3, 3, 3, 4, 3, 3, 4, 4, 3.
A healthy locked session sits at ~2 attempts/minute by comparison. Over one day: 116 fingerprint PAM sessions vs 5 password fallbacks.
Root cause
shell/plugins/lock/Service.qml:209-228:
function startFingerprint() {
if (!lockRequested || !sessionLock.secure || !fingerprintConfigured) return
if (fingerprintPam.active || fingerprintAuthenticating) return // :211
fingerprintAuthenticating = true
...
}
function handleFingerprintFinished(result) {
fingerprintAuthenticating = false // :220 — cleared on RESULT
if (!lockRequested) return
if (result === PamResult.Success) {
finishUnlock()
} else if (fingerprintConfigured) {
fingerprintRetryTimer.restart() // :226 — fires 250ms later
}
}
with
Timer {
id: fingerprintRetryTimer
interval: 250 // :358 — flat, no backoff
repeat: false
onTriggered: root.startFingerprint()
}
Both guards on line 211 clear as soon as PAM reports a result. Neither tracks whether the forked pam.subprocess has actually exited and released its claim on the fprintd device.
fprintd devices are exclusive-claim. Subprocess teardown takes longer than the 250 ms retry interval, so the retry starts a fresh subprocess that tries to claim a device the previous one still holds. That claim fails, which immediately calls handleFingerprintFinished, which restarts the timer — now with two subprocesses in teardown. The loop feeds itself and never drains.
The failure mode is confirmed directly against fprintd. Running fprintd-verify manually at the moment of the storm returns the underlying error the PAM code 9 is masking:
$ fprintd-verify
Using device /net/reactivated/Fprint/Device/0
failed to claim device: GDBus.Error:net.reactivated.Fprint.Error.Internal:
Open failed with error: The device is still busy with another operation,
please try again later.
The same command before suspend and again 10 s later both succeed with verify-match, exit 0 — so the reader itself is healthy throughout.
The livelock needs one seed failure to enter. Resume from suspend supplies it: the device is genuinely unavailable for a moment as USB re-enumerates (usb 3-7: reset full-speed USB device number 3 using xhci_hcd on every resume). A clean lock succeeds on the first attempt and never enters the loop, which is why this presents as random.
Expected
A transient claim failure should back off and retry, not spin at 4 Hz spawning overlapping subprocesses that guarantee further claim failures.
Steps to reproduce
- Laptop with an enrolled fingerprint and
omarchy-lock-fingerprintin use. - Close the lid and reopen it within about a second, so the machine suspends and resumes immediately.
- Try to unlock by fingerprint.
- Watch
journalctl -f | grep -E 'omarchy-shell\[|code 9'— observe multiple concurrent PAM subprocesses per second, all returning code 9.
Not 100% reproducible per attempt, since it depends on catching the device mid-re-enumeration. Roughly 2 storms per day in normal use here.
Suggested fix
Three things, any of which breaks the loop:
- Give
fingerprintRetryTimerexponential backoff (e.g. 250 ms → 2 s ceiling) instead of a flat 250 ms. - Gate
startFingerprint()on actual subprocess exit rather than on the PAM result, so a still-releasing claim can't be raced. - Distinguish a claim failure (device busy/unavailable — retry with backoff) from a failed match (finger rejected — normal retry cadence). Right now both funnel through the same path.
System details
- Omarchy 4.0.0-1
- Kernel 7.1.8-arch1-3
- Intel Core Ultra X7 358H
- Reader: Goodix MOC
27c6:609c(Framework Laptop) - fprintd 1.94.5-2, libfprint 1.94.100-1
- Suspend type: s2idle
Note: USB autosuspend was ruled out as a factor — the reader was pinned to power/control=on during testing and the livelock still occurred.
Same reader on a Framework 13 AMD (Ryzen AI 9 HX 370), Omarchy 4.0.0-1, fprintd 1.94.5-2 — and I hit this with a different trigger than yours.
You ruled out USB autosuspend because your reader was already pinned to power/control=on. Mine wasn't: it defaults to auto with a 2s delay, so the reader is runtime-suspended when the lock screen tries to read it after resume. fprintd logs Device reported an error during verify: Cannot run while suspended, and in the same second pam_fprintd logs the ReleaseDevice ... still busy error you documented. From there it's your livelock exactly — 41 sessions in 13s, all code 9, password fallback.
So autosuspend looks like a second way into the loop rather than a cause of it. A udev rule pinning the reader awake stopped it here, verified across a suspend/resume: one PAM session, clean unlock, no fallback.
ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="27c6", ATTR{idProduct}=="609c", ATTR{power/control}="on"
Doesn't help anyone already at power/control=on, and doesn't fix the retry logic — your three suggested changes are still the actual fix.
Draft comment for basecamp/omarchy issue #7172
(Lock screen fingerprint retry livelocks after resume)
Post with: gh issue comment 7172 --repo basecamp/omarchy --body-file /tmp/omarchy-issue-comment.md
Addendum: the livelock can physically disable the fingerprint sensor (overheat protection)
Hit this on Omarchy 4.0.0-1 (Dell Latitude 5540, Broadcom BCM58200 ControlVault 3, kernel 7.1.8-arch1-3). Same 250 ms retry livelock as described, but on this hardware the loop has a nastier failure mode.
After the sensor enters its error state, each retry fails instantly (PAM_AUTHINFO_UNAVAIL), so the loop runs at ~400+ PAM sessions/minute. The Broadcom firmware then trips thermal protection:
fprintd[688270]: Device reported an error during verify: Device disabled to prevent overheating.
(~1,000 errors in 7 minutes; ~3,255 PAM sessions in one day)
Worse, the sensor then drops off the USB bus entirely (verify-disconnected), and it does not come back on its own — systemctl restart fprintd is not enough. Recovery required a manual USB re-auth:
echo 0 > /sys/bus/usb/devices/3-8/authorized; sleep 2; echo 1 > /sys/bus/usb/devices/3-8/authorized
systemctl restart fprintd
Two mitigations that help:
- A suspend/resume hook prevents the initial post-resume breakage that kicks off the cascade:
/usr/lib/systemd/system-sleep/restart-fprintd→(sleep 3; systemctl try-restart fprintd.service) & - Beyond fixing the claim-collision race, consider exponential backoff (or aborting retries entirely) on hard errors like
PAM_AUTHINFO_UNAVAIL— a fixed 250 ms retry converts any transient sensor error into a sustained hammer that can disable the hardware until a cold power cycle.
Hit this again with a new wrinkle: the livelock ran for 33 minutes while the machine sat locked, survived a suspend/resume cycle mid-storm, and the machine ended up fully wedged — force power-off required.
Environment
- Omarchy 4.0.2-1, quickshell 0.3.1-1, Hyprland 0.56.2-1, kernel 7.1.9-arch1-2, fprintd 1.94.5-2
- ThinkPad T14s Gen 1, match-on-chip reader
06cb:00bdSynaptics Prometheus MIS (Synaptics Sensorsin fprintd) - NVIDIA dGPU present →
nvidia-utilsdrop-in setsSYSTEMD_SLEEP_FREEZE_USER_SESSIONS=false, so user sessions stay unfrozen across suspend
Timeline (journal of the boot that died)
23:17:57 PM: suspend entry (s2idle) (overnight)
07:19:49 PM: suspend exit
07:19:49 storm begins on resume: 542 fingerprint PAM sessions over the
next 33 min (~1 every 3.7 s) while the machine sits locked;
every one: "Authentication service cannot retrieve
authentication info" (code 9) — same PAM_AUTHINFO_UNAVAIL
07:52:57 last spawn one second before...
07:52:58 PM: suspend entry (s2idle) (3-second suspend)
07:53:01 PM: suspend exit — storm continues without a gap; failures now
instant, cadence jumps to ~3.2/s (336 more sessions in 106 s);
fprintd denying each new DBus connection:
"Authorization denied to :1.10NN to call method 'ListEnrolledFingers'
for device 'Synaptics Sensors': Not Authorized"
07:53:11 / 07:53:42 / 07:54:13
kernel: "usb 4-3: reset full-speed USB device number 4 using xhci_hcd"
— the reader being reset every ~30 s throughout
07:54:45 xremap restart #1246: "No input devices" (input subsystem gone)
07:54:46 journal stops mid-storm; no shutdown sequence, nothing after
07:55:28 next boot — user held the power button
Total: 884 fingerprint PAM sessions in one boot, 878 of them after the 07:19 resume. No quickshell coredump — the shell didn't crash (unlike #7645 / #9822); the whole system became unresponsive ~100 s after the second resume.
What's proven vs inferred: the retry storm is proven and matches this report's signature (same code 9, same spawn cadence up to overlap). The kernel resetting the reader's USB device throughout is proven. What I can't prove is that the PAM storm caused the wedge — the same broken reader/USB state may be producing both the storm and the freeze. But the storm was the last thing running when the machine died.
Two things this adds to the thread:
- The loop crosses suspend/resume. Because user sessions aren't frozen here (
SYSTEMD_SLEEP_FREEZE_USER_SESSIONS=falsefrom the nvidia-utils drop-ins), the retry timer and PAM children keep running through suspend entry — the last pre-suspend spawn is one second beforePM: suspend entry, and spawning resumes the instant tasks restart. That looks like a concrete on-ramp for the overlapping-claims collision in the root cause: a child spawned before suspend still holds (or has just lost) its fprintd claim when the first post-resume spawn lands. - Outcome severity: in the existing reports the user can always fall back to the password. Here the whole laptop locked up ~100 s after the second resume and needed a force power-off.
Happy to attach the full 07:19–07:55 journal slice if useful.
Filed by GLM 5.3 via opencode.
Reviewed against quattro at f99d33a8, with an independent second opinion from codex at xhigh reasoning. Confirmed as a real defect, proven in source. Not reproduced — no VM here has a fingerprint reader, and the seed you describe needs a real device mid-re-enumeration — so the retry policy is confirmed from the code and the claim-collision half is explained rather than reproduced.
What is fully established: the retry is unbounded and has no backoff. handleFingerprintFinished (shell/plugins/lock/Service.qml:226) and PamContext.onError (:352) both restart a non-repeating 250ms timer (:356) that calls startFingerprint (:209), and there is no attempt counter, no cap and no delay growth anywhere in the plugin. Within a single lock the chain ends only on a successful match, on unlock, or if fingerprintConfigured goes false. Yours is the oldest report of this loop by about an hour, ahead of #7176, and #7176, #9905 and #9913 have since arrived with three further seeds — thermal throttling, an orphaned claim with no suspend involved, and libfprint's duty-cycle governor.
What cannot be settled from this repository is your second claim, that the guards clear on the PAM result rather than on subprocess exit. PamContext is quickshell's, its source is not in this tree, and when active goes false relative to pam_end and the helper's exit is not visible here. Your fprintd-verify output showing "The device is still busy with another operation" during the storm is the strongest evidence for it, and it is consistent — but it is inference about quickshell's teardown, not something the Omarchy source proves. Worth flagging for anyone implementing a fix: AdamWorley's note on #7176 that a single failed attempt raises both onError and onCompleted checks out in effect. It does not double the spawn rate, because both handlers restart the same non-repeating timer and the second restart() only resets its deadline — but it will defeat any failure streak counter keyed on one of the two signals.
Two open PRs implement your suggested fixes: #7158 backs off on attempts that never reach the reader and surfaces an unavailable indicator, #7179 adds an exponential backoff plus a duty-cycle-aware arming policy. Neither has landed. simonlearnscoding's comment above also raises a case none of them cover — nothing in shell/ observes logind's PrepareForSleep, so the retry timer and its PAM children run straight through a suspend transition; that gap is #7229, and PR #9919 addresses it. Waiting on the maintainer to choose among the four open PRs here (#7158, #7179, #9868, #9919).
What cannot be settled from this repository is your second claim, that the guards clear on the PAM result rather than on subprocess exit.
Settled now, from quickshell's own source — src/services/pam/ at v0.3.1, the version I'm running. It splits into a confirmation and a retraction, and the retraction is the more useful half, because one of my three suggested fixes turns out to be a no-op.
Confirmed: the guards clear on the PAM result, before any Omarchy handler runs.
PamContext::onCompleted and PamContext::onError both call abortConversation() as their first statement (qml.cpp:198-206). abortConversation() nulls the conversation pointer and emits activeChanged (:96-103), and active is just conversation != nullptr (:136). So by the time error/completed reach QML on the next two lines, fingerprintPam.active is already false. The guard at Service.qml:211 is structurally incapable of blocking the retry path — it cannot be true when startFingerprint() is reached from the timer. Same for fingerprintAuthenticating, cleared at :220 and :351.
Retracted: nothing overlaps. The previous subprocess is always gone.
I claimed subprocess teardown outlasts the 250 ms retry. It doesn't — quickshell is careful about this:
- The child runs
pam_end()before it writes its exit code to the pipe, then_exit(0)(subprocess.cpp:125→:51→:59). pam_fprintd's cleanup has already finished before the parent learns the result. - The parent emits the result and then calls a blocking
waitpidin the same call stack (conversation.cpp:109).abort()and the destructor doSIGKILL+waitpidas well (:54-61,:39).
The retry timer fires on a later event-loop pass, 250 ms after that emit, so the previous child is reaped well before the next spawn. My suggested fix "gate startFingerprint() on actual subprocess exit" is therefore a no-op: the invariant it asks for already holds. Anyone implementing #7158 / #7179 should not build that gate.
My "3–5 concurrent pam.subprocess instances per second" was wrong too, and the wording was my own error: I counted distinct PIDs per second, which is spawn cadence, not overlapping lifetimes. 41 attempts in 13 s is 3.2/s — exactly a serial 4 Hz retry with a slightly slow PAM round trip. There is no concurrency in that data.
So what still holds the claim? fprintd, not us. The child's DBus connection drops at _exit; fprintd then releases the claim and libfprint closes the USB device, and that is asynchronous and out of process. A fresh claim landing inside that window is what produces Open failed with error: The device is still busy with another operation — which is fprintd's Open failing, not evidence of an unexited child. With the reader being USB-reset every ~30 s (simonlearnscoding's log above), that window is open much of the time.
So the loop is simpler than I described, and my title is wrong: an unbounded 4 Hz retry against a device whose owner hasn't finished letting go, with no collision between our own subprocesses needed. Happy to retitle. The retry-policy half of the report — the half both PRs actually address — is unaffected.
And one thing now proven rather than inferred: AdamWorley's double-signal note on #7176 is in the source. PamContext::onError emits error, then completed(PamResult::Error) (qml.cpp:203-206) — same function, every error, no exceptions. So every code-9 failure runs both Service.qml:350 (onError) and :346 (onCompleted → handleFingerprintFinished), in that order. You're right that it doesn't double the spawn rate, since both land on restart() of one non-repeating timer. Two consequences for whoever implements the fix:
- Because
completedalways arrives aftererror, any state written inonErroris immediately overwritten byonCompleted. A streak counter incremented inonErrorand reset inonCompleted— the natural place, since that's where success and failure are handled — reads zero forever. Incrementing in both instead double-counts claim failures while single-counting rejected fingers. - The classification my third suggestion asked for needs no new plumbing. A rejected finger is
PAM_AUTH_ERR→completed(PamResult.Failed)only; a claim failure is code 9 →PamError→completed(PamResult.Error)(subprocess.cpp:111-122,conversation.cpp:101-105). SohandleFingerprintFinishedcan already tell them apart fromresultalone: back off hard onPamResult.Error, keep normal cadence onPamResult.Failed.
Updated fix surface: backoff (#7158 / #7179), plus that result-based split. Drop the subprocess-exit gate. Verified against quickshell v0.3.1 and quattro at f99d33a8.
Verified with Claude Code (Opus 5).
The retry and resume recovery fix is consolidated in #7158 at 56e18dda54f14bd50909cdc326410aaac252bf5a. GPT-6 in Codex and Claude Opus 5.5 Medium checked the source; worker checks covered held-reader backoff, unavailable feedback, once-only PAM settlement, and fingerprint recovery. Continuous input still reaches the retry cap and preserves its idle window. Physical USB hardware was not tested. The PR links this issue for closure when the maintainer merges.
The consolidated retry and resume-recovery fix has now merged in #7158; this issue was closed by the merge.
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.