Repository navigation
Leave the fingerprint reader alone while the lock has the displays off - #15294
Conversation
The lock kept a fingerprint verify running for the whole lock, starting a new one a quarter-second after each ended, plus a 1-second timer to notice sleep. That held the reader and fprintd awake all night. Blanking the displays now closes the attempt without counting it as a miss, stops the retry and sleep-watch timers, and any wake starts the reader again. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
…ep its backoff Aborting the attempt at the blank cut short a slow reader's claim, and starting one straight away on wake skipped the backoff that gives a wedged fprintd its idle exit. Blanking now only holds back the next attempt: one in flight finishes under its own timeouts with the sleep watch covering it, a wake re-arms the retry with whatever backoff was set, and the lock request made before every suspend marks a sleep so the wake recovers at once. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…lay arriving A resume can light the panel with no input, which left the reader paused under a visible lock. The lock request made before every suspend now arms a one-shot that fires once the machine runs again, resuming the reader and restarting the blank countdown. A screen change resumes it only when an output arrives, so unplugging a monitor while blank keeps it paused. Co-Authored-By: Claude Opus 5.5 <[email protected]>
The idle service repeats the lock request while already locked, and that was taken for a suspend, waking the reader under a blank display. After a lock request the lock now watches the wall clock for the few seconds a suspend takes to begin, and resumes the reader only on the jump a sleep leaves. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ogind's delay A wake restarted the full backoff, so a reader whose wait ran out while blank could be paused again by the next blank before any attempt. The retry now resumes with whatever is left of its deadline. The sleep watch after a lock request runs 20 seconds, past logind's 15-second inhibitor delay, so a suspend that waits on another inhibitor is still seen. Co-Authored-By: Claude Opus 5.5 <[email protected]>
| noteFingerprintResumed() | ||
| fingerprintRetryTimer.interval = FingerprintModel.MATCH_RETRY_MS | ||
| } else { | ||
| fingerprintRetryTimer.interval = Math.max(FingerprintModel.MATCH_RETRY_MS, fingerprintRetryDueMs - Date.now()) |
There was a problem hiding this comment.
Waking interrupts reader recovery
When the user wakes the screen during a capped 40-second retry, resumeFingerprint() replaces the interval with the remaining wait. That value is below ERROR_RETRY_CAP_MS, so the following nudgeFingerprint() skips the 32-second idle guard and starts another attempt after 250ms. A wedged fprintd can lose the quiet time it needs to exit and recover.
Keep the backoff tier separate from the remaining timer interval, and use that tier for the idle guard.
There was a problem hiding this comment.
Fixed in 87e9c0c: the armed retry's backoff is now kept in its own fingerprintRetryBackoffMs, and the input guard reads that instead of the timer interval, so a wake that shortens the timer to the remaining wait still leaves a capped retry's 32s idle window intact. New check in the service fixture (wake mid-cap, then input) fails with the old guard.
…e idle window Co-Authored-By: Claude Opus 5.5 <[email protected]>
What changed
The lock kept a fingerprint verify running for the whole time the session was locked: each
pam_fprintdattempt waits for a finger until its own timeout, then the lock started the next one 250ms later. A 1-second timer also ran throughout to notice sleep. That kept the reader and fprintd awake all night, even with the displays off.Now, once the lock blanks the displays (
runBlank), it holds back the next attempt:runWake: a key, the touchpad, a password attempt) or a display arriving re-arms the retry with whatever backoff was set, so a failing reader keeps the idle window that lets a wedged fprintd exit.omarchy-system-sleep-lockmakes one before every suspend), a 1s timer watches for at most 15 ticks for the wall-clock jump a suspend leaves. If it sees one, the reader comes back with the resume grace, and the blank countdown pauses it again if nothing happens. The idle service's repeat lock request lapses with the reader still paused.Trade-off: while the display is off, a finger alone no longer unlocks; wake the screen first. In the first few seconds after locking, after waking it, or after a resume, a finger works as before. The manual's fingerprint section says so.
Known gap: a display woken by something the lock never sees (a
locked = truevolume or brightness bind) keeps the reader paused until a key or pointer move reaches the lock.Tests
lock-fingerprint-service-test.shdrives the realService.qml: a claim in progress survives the blank; nothing runs after it; a wake re-arms; a capped backoff and the miss streak survive pause and wake; a repeated lock with no sleep leaves the reader paused; a seen sleep resumes it with the grace; unlock reset clears everything. Each check was mutation-checked.lock-blank-fingerprint-test.shchecks thatrunBlankpauses,runWakeresumes, the pre-suspend lock request starts the sleep watch, and only an arriving display resumes (those paths drive the real displays, so the fixture can't call them).lock-fingerprint-retry,lock-fingerprint-indicatorandlock-stranded-recoverypass.Merge after #15289; both change
runBlank/runWake, and this rebases on top.Human check
On a laptop with a fingerprint enrolled: lock, wait for the blank, press a key, unlock with a finger. Lock and unlock with a finger right away. Lock, let it blank, suspend, resume without touching anything, and unlock with a finger.
🤖 Generated with Claude Code