Repository navigation
Conversation
fingerprintCheckProc collapsed every non-matching fprintd-list result into "not configured", but a probe that cannot reach fprintd has not answered the question. fprintd is D-Bus activated, and an activation request made while it is stopping or while systemd is still working through a resume fails outright, which read as "this user has no print enrolled". That is terminal: the flag gates the retry in handleFingerprintFinished and nothing re-probes until the next beginLock, so one transient miss disabled fingerprint for the whole lock. Report three states instead - yes, no, unknown - and on unknown hold the previous answer and re-probe on a bounded 1s timer. Key the decision on fprintd-list's output rather than its exit status, which returns 0 and 1 inconsistently for identical input on fprintd 1.94.5. Match ' - #' for enrolled prints, since both "has no fingers enrolled" and the device name contain "finger". Holding fingerprintConfigured true across an unknown keeps startFingerprint callable, so the 250ms finger retry is held off while a miss is outstanding; without that it storms PAM subprocesses against an absent daemon (7 sessions in two seconds locally, down to 2 with the guard). Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AcuzxdPjgmd2JD5PG1fJjL
|
Reviewed and reproduced; I found nothing to change in the code. What ran, and where. On a disposable Omarchy worker with fprintd 1.94.5 installed and masked,
All six Related. #7158's current head also fixes #9453: its Second opinion. None. The configured reviewer, Codex Medium, answered a ping, but today's review budget was already spent, so this rests on one model's review (Claude Opus 5.5). Waiting on. The second opinion, on a later run, and the maintainer's choice between this and #7158. |
|
The three-state enrollment handling is now consolidated in #7158 at 56e18dd: unknown results preserve known enrollment, initial outages receive paced rechecks, and the PAM loop owns recovery once enrollment is known. GPT-6 in Codex and Claude Opus 5.5 Medium checked the consolidated source; actual QML-service regressions and mutation controls passed on a disposable ISO worker. The enrollment correction from #9551 is included there too. #7158 is awaiting the maintainer’s merge; this PR’s transient-probe fix is covered by that branch. |
|
Closing as superseded by merged #7158. The three-state availability probe and paced recovery are incorporated. 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. |
Fixes #9453.
The problem
fingerprintCheckProcdecides whether fingerprint unlock is available by shelling out tofprintd-list, and collapses every non-matching result into "not configured". But "the probe could not reach fprintd" and "this user has no print enrolled" are different answers, and only one of them should switch fingerprint off.fprintd is D-Bus activated, so an activation request made while it is stopping — or while systemd is still working through a resume — can fail outright:
That reads as "not configured", and it is terminal:
fingerprintConfiguredgates the retry inhandleFingerprintFinished, and nothing re-probes until the nextbeginLock(). One transient miss disables fingerprint for the rest of the lock, with no prompt and no indication why.The change
Report three states —
yes/no/unknown— and onunknownhold the previous answer and re-probe on a bounded 1s timer instead of tearing fingerprint down.Three details worth calling out:
Keyed on output, not exit status.
fprintd-listreturns 0 and 1 inconsistently for identical input (seen on fprintd 1.94.5 for a user with no prints). Trusting the status would strand a working reader on a flaky1— a worse failure than the one being fixed. There is a test for exactly that case.' - #'rather than a looser match on "finger". Both the negative message (has no fingers enrolled) and the device name (Goodix MOC Fingerprint Sensor) contain "finger", so the current expression reports an unenrolled user as configured. Distinguishingunknownfromnorequires getting this right. This matches the change #7158 makes to the same expression, arrived at independently.The 250ms retry is held off while a miss is outstanding. Holding
fingerprintConfiguredtrue across anunknownkeepsstartFingerprint()callable, so without a guard the fast finger retry storms PAM subprocesses against a daemon that is not there — the amplifier behind #7176 and the overlapping-claim crash in #7172. I hit this on the first live run: 7 fingerprint PAM sessions in two seconds, down to 2 with the guard. The probe timer owns the wait; normal retries resume once the daemon answers.Verification
test/shell.d/lock-fingerprint-probe-test.shextracts the probe expression fromService.qmland runs it against a stubbedfprintd-listin a sandboxedPATH, so the fixtures cannot drift from what the lock screen actually executes. Six behavioural cases (enrolled, no prints, unreachable, non-zero exit with valid output, missing PAM config, missingfprintd-list) plus structural assertions on the unknown handling, the bound, and the retry suppression. The test fails against the unpatched file.Verified in the running UI (
agents/skills/visual-verification.md) with this exact file installed as a plugin clone. Mask fprintd, lock, unmask while still locked:./test/all: the new file passes. Four files fail —bar-icon-geometry,config,snapper,unowned-system-paths— and all four fail identically on a cleanquattrocheckout here, so they look environment-dependent rather than related to this change.Relationship to #7158
#7158 covers the same area far more thoroughly (retry pacing, resume detection, an unavailable notice) and I would rather see it land than this. It does not close this particular hole though:
fingerprintConfigured = ... === "yes"is unchanged there, and a miss now costs more, because that PR addsfingerprintRetryTimer.stop()on the unconfigured branch and gates its newfingerprintSleepWatchonrunning: lockRequested && fingerprintConfigured— so one unreachable probe also switches off the resume detector it adds. I have left a note on the PR. This change is small and standalone; if #7158 lands first I am happy to rebase this onto it or close it in favour of folding the three-state probe in there.Environment
Omarchy 4.0.2-1, Quickshell 0.3.1-1, fprintd 1.94.5-2, libfprint 1.94.100-1, kernel 7.1.9-arch1-2, Goodix 27c6:609c.