Lock screen: keep fingerprint idle while the display is blanked - #11273
Lock screen: keep fingerprint idle while the display is blanked#11273niconistal wants to merge 1 commit into
Conversation
Nobody can touch the sensor once the lock has blanked the display, so abort the fingerprint PAM conversation and stop the retry timer until the display comes back. A reader that fails the instant it is asked now backs off to 30s instead of being re-armed at the base interval. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
|
Independent confirmation of both problem halves on a MacBookPro14,2 (Omarchy 4.0.3, T1Bridge Touch ID). We have not run this PR. On this machine the lock screen already blanks after 5 seconds ( Rates from the journal, same
Password unlock still worked. A short Super+Ctrl+L then password-cancel is healthy today (in-flight verify cancelled); the “resume the reader on first keystroke, don’t touch the password” behaviour looks right for that. This would have stopped the blanked-display polling and the post-wedge 250 ms loop. It would not have been a root-cause fix for the SEP/keybag wedge; that remains on the T1Bridge side. Happy to live-test a |
|
Thanks for the independent confirmation. Your two rates match what I saw on a On the target branch: the PR is against To keep the two sides straight, since they are easy to conflate:
One more data point on recovery: on the 14,3 a full shutdown and power-on cleared the wedge. After the boot the relay did its usual single boot-time retry and has been |
|
First live result, on a How it was run on 4.0.3. The lock screen is a plugin, so no packaged file needs editing: Six of the eight Observed, 27 s lock, panel blanked after the 5 s
Not a fix for the relay wedge itself (t1bridge#14), only for the lock screen hammering a reader nobody can reach. |
|
For anyone on a released Omarchy who wants this before it lands: it is now an installable plugin, so no cloning or hand-patching. It does not ship a patched copy. At every shell start it reads the lock screen Omarchy has installed, applies this PR's change as anchored edits and loads the result, so Omarchy updates flow through. If the installed lock screen already contains the change it disables itself and says so; if the file changed shape so the edits no longer apply, it applies nothing, disables itself and the stock lock screen is back in charge. Registered via Verified on 4.0.3 (same 27 s lock test as above: fingerprint PAM suspended from the blank, zero sessions until the first key); the builder is also tested against the current |
Problem
fingerprintRetryTimerre-arms it after every unsuccessful attempt, all night, even though nobody can touch the sensor with the panel dark.omarchy-lock-fingerprintPAM session roughly every 300 ms.Change
runBlank()suspends the fingerprint: it stops the retry timer and aborts the PAM conversation;startFingerprint()refuses to start while suspended.runWake()resumes it, so the prompt is armed again as soon as the display is up and the session is still locked with a fingerprint enrolled. A wake caused by the first keystroke of a password resumes the reader without touching the password in flight, and a panel coming back on its own (onScreensChanged) resumes it too.scheduleFingerprintRetry(). An attempt that ended sooner than a finger could have reached the reader compounds a failure streak and backs the next attempt off from 2 s to a 30 s cap; an attempt that lasted long enough to have been a real touch clears the streak and keeps the existing 250 ms retry. The display waking clears the streak as well.Behaviour
Before:
After:
Motivation
On a MacBook Pro with Touch ID through the t1bridge fingerprint backend, after the laptop sat locked and blanked for hours, the backend was left in a bad state — its keybag relay service restarting continuously, "load biometric keybag failed" — until a power cycle. Password login was never affected. Separately, on 2026-09-10, once the backend started failing instantly ("Device reported an error during verify: fingerprint operation failed"), the journal shows about 180 fprintd verify errors per minute sustained for 12 hours, i.e. the lock screen opening a new PAM session roughly every 300 ms. Those are observations from one machine on one day.
The backend-side fault is being reported separately. This PR is only about the polling on Omarchy's side, which is worth avoiding on any fingerprint hardware.
Testing
test/shell.d/lock-blank-fingerprint-test.shextended to cover the suspend/resume and the backoff; it fails on the unpatchedService.qml../test/shell— 232 of 236 test files pass; the 4 failures (config,locate,snapper,unowned-system-paths) also fail on unmodifiedorigin/quattroon this machine and are unrelated to the lock plugin.qmllint shell/plugins/lock/Service.qml— no new warnings against the pre-change baseline.🤖 Generated with Claude Code