Skip to content

Keep fingerprint unlock alive when the probe cannot reach fprintd - #9456

Closed
osborng wants to merge 1 commit into
omacom:quattrofrom
osborng:lock-fingerprint-probe-unknown
Closed

osborng wants to merge 1 commit into
omacom:quattrofrom
osborng:lock-fingerprint-probe-unknown

Conversation

@osborng

@osborng osborng commented Aug 31, 2026

Copy link
Copy Markdown

Fixes #9453.

The problem

fingerprintCheckProc decides whether fingerprint unlock is available by shelling out to fprintd-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:

Impossible to get devices: GDBus.Error:org.freedesktop.DBus.Error.NameHasNoOwner:
Could not activate remote peer 'net.reactivated.Fprint': activation request failed

That reads as "not configured", and it is terminal: fingerprintConfigured gates the retry in handleFingerprintFinished, and nothing re-probes until the next beginLock(). 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 on unknown hold 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-list returns 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 flaky 1 — 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. Distinguishing unknown from no requires 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 fingerprintConfigured true across an unknown keeps startFingerprint() 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.sh extracts the probe expression from Service.qml and runs it against a stubbed fprintd-list in a sandboxed PATH, 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, missing fprintd-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:

before   fprintd restored, 24.3s locked with a healthy daemon
         0 fingerprint prompts, 0 D-Bus activations, 0 PAM sessions
         (fingerprint dead until the next lock)

after    fprintd restored at +3s
         Starting Fingerprint Authentication Daemon...
         Relaying pam message: "Place your right index finger on the fingerprint reader"
         unlocked by fingerprint inside the same lock

./test/all: the new file passes. Four files fail — bar-icon-geometry, config, snapper, unowned-system-paths — and all four fail identically on a clean quattro checkout 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 adds fingerprintRetryTimer.stop() on the unconfigured branch and gates its new fingerprintSleepWatch on running: 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.

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
@omarchybot omarchybot added the bug Something isn't working label Sep 27, 2026
@omarchybot omarchybot added the verified Omarchy Triage has verified that this issue is ready for final review label Oct 1, 2026
@omarchybot

Copy link
Copy Markdown
Collaborator

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, fprintd-list prints the Impossible to get devices: ... NameHasNoOwner ... activation request failed line on stdout and exits 1, as #9453 describes. With fprintd-list stubbed to give that real output while fprintd is down and an enrolled listing once it is back, and a fingerprint PAM step that fails while it is down, I locked the worker's screen and brought fprintd back 3s later:

  • Current quattro (c05d901), and this branch with Service.qml reverted: one probe, fingerprint: false, and the screen stays locked after fprintd is back until something re-probes.
  • This head (4aaf437), and this head merged into current quattro: it re-probes once a second, and fingerprint unlocks the screen as soon as fprintd answers. During the outage there was one PAM attempt, not a 250ms retry loop.
  • With fprintd down for 15s, the probe gives up after 10 retries and fingerprint is off for the rest of that lock, as it is today. That is the bound working as written; whether about 11 seconds is long enough for a slow resume is for the maintainer to judge.

All six test/shell.d/lock-* files pass on this head merged into quattro, and the new lock-fingerprint-probe-test.sh fails against quattro's Service.qml. ./test/cli has one failure, vscode generated theme references current theme file, which comes from quattro and has nothing to do with this change.

Related. #7158's current head also fixes #9453: its classifyProbe / applyFingerprintProbe treat an unreachable fprintd as unknown and re-probe with backoff and no bound. So the description's point that #7158 leaves this hole open no longer holds for that branch. The two edit the same probe, as do #9551, #13918 and #12690, so whichever lands second will conflict. This one is the proportionate fix for #9453 on its own; choosing between them is the maintainer's call.

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.

@omarchybot

Copy link
Copy Markdown
Collaborator

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.

@omarchybot

Copy link
Copy Markdown
Collaborator

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.

@omarchybot omarchybot closed this Oct 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working verified Omarchy Triage has verified that this issue is ready for final review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Lock screen: one unreachable fprintd-list probe disables fingerprint for the rest of the lock

2 participants