Repository navigation
Lock screen: keep fingerprint idle while the display is blanked - #11273
niconistal wants to merge 1 commit into
Conversation
|
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 |
|
Live test of Journal:
On the machine: laptop panel blanked; Touch Bar stayed lit on the media strip (no unlock prompt). Trackpad → unlock prompt on the bar → Touch ID succeeded. That is the healthy-reader path: PAM stops for the blank, re-arms on first input (trackpad, not only a key), password unused. Matches the 14,3 wedged-reader result, different reader state. |
|
Reviewed by Claude Opus 5.5 and run on a disposable Omarchy worker. I found one defect and pushed a fix to this branch as 92b489b. The reproduction holds at that head. Codex Medium, the configured second opinion, did not run: omabot's review budget for today was spent, so nothing here has been checked by a second model yet. Reproduction. On the worker,
Fixed: one failure counted twice. Quickshell's Tests on the worker: every Competing pull requests. This one overlaps with #11918 (the instant-failure backoff only), #12420 (the blank only), #12461 (stop after six attempts, with a paused message), #13819 (capped attempts, with an interval that grows for healthy mismatches too) and #10653 (backoff plus a wake on every attempt, which keeps the panel lit). This is the only one that handles both the blank and the instant-failure loop in one change. #11918 and #12420 together cover the same ground. Which to take is the maintainer's call. One trade-off is theirs to weigh: once the panel is dark, a touch on the reader does nothing until a key or the pointer wakes the display. That is the point of this change, and #12420 does the same after its in-flight scan ends. Not yet labelled. The classification has to be re-asked after a push, and that needs the second opinion too. So this waits for the review budget to come back: then it gets the second opinion, |
|
| root.displaysBlank = true | ||
| root.monitorDpmsKnown = false | ||
| if (!blankProcess.running) blankProcess.running = true | ||
| suspendFingerprint() |
There was a problem hiding this comment.
DPMS wake leaves fingerprint suspended
If a video-wallpaper lock blanks the display and DPMS turns it back on without lock-screen input, the DPMS poll makes the wallpaper visible but does not call resumeFingerprint(). The reader stays suspended, so fingerprint unlock is unavailable on the lit screen until another input calls runWake().
| // for, so the blank state has to be given up here or a visible lock | ||
| // wallpaper stays frozen until the next keypress. | ||
| root.displaysBlank = false | ||
| root.resumeFingerprint() |
There was a problem hiding this comment.
Screen changes resume blanked reader
If a monitor is plugged in or removed while the lock display remains blank, onScreensChanged calls resumeFingerprint() without checking whether the display has turned on. It can rearm PAM while the panel is still dark, and this path does not restart the blank timer to suspend the reader again.
| } | ||
|
|
||
| function resumeFingerprint() { | ||
| resetFingerprintBackoff() |
There was a problem hiding this comment.
Input repeatedly clears retry backoff
Lock-screen pointer movement and password input call runWake() even when the display is already on. Because resumeFingerprint() clears the failure streak before checking whether the reader was suspended, ordinary input can repeatedly restart a failing reader’s pending retry at 250 ms instead of letting its backoff grow.
| assert( | ||
| /function runBlank\(\) \{[\s\S]*?suspendFingerprint\(\)[\s\S]*?\n \}/.test(serviceQml), | ||
| 'blanking the display suspends the fingerprint' | ||
| ) | ||
|
|
||
| assert( | ||
| /function suspendFingerprint\(\) \{[\s\S]*?fingerprintRetryTimer\.stop\(\)[\s\S]*?if \(fingerprintPam\.active\) fingerprintPam\.abort\(\)/.test(serviceQml), | ||
| 'suspending stops the retry timer and aborts the fingerprint PAM' | ||
| ) | ||
|
|
||
| assert( | ||
| /startFingerprint\(\) \{\s*if \(fingerprintSuspended \|\|/.test(serviceQml), | ||
| 'the fingerprint prompt does not start again while suspended' | ||
| ) | ||
|
|
||
| assert( | ||
| /function scheduleFingerprintRetry\(\) \{\s*if \([^)]*fingerprintSuspended\) return/.test(serviceQml), | ||
| 'an aborted conversation does not re-arm the retry timer while suspended' | ||
| ) | ||
|
|
||
| // The display coming back is the only thing that brings the reader back, and | ||
| // it must survive a wake that is itself the first keystroke of a password. | ||
| assert( | ||
| /function runWake\(\) \{[\s\S]*?resumeFingerprint\(\)[\s\S]*?\n \}/.test(serviceQml), | ||
| 'waking the display resumes the fingerprint' | ||
| ) | ||
|
|
||
| assert( | ||
| /function resumeFingerprint\(\) \{[\s\S]*?if \(lockRequested && fingerprintConfigured\) startFingerprint\(\)/.test(serviceQml), |
There was a problem hiding this comment.
Tests miss display transitions
These assertions check the text of Service.qml, not what happens when display state changes. They can pass while a DPMS wake leaves fingerprint authentication suspended or a screen-list change resumes it during blanking, so these regressions remain uncaught.
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
|
The immediate-error backoff half is superseded by merged #7158. Suspending fingerprint scans while the display is blank remains unmerged, including the T1 backend case described here. Keeping this open for that remaining behavior; the retry implementation needs to be reconciled with the landed code. 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. |
|
Useful fix (and the hardware confirmation on MacBookPro14,x is helpful). Note #12420 is another open PR aimed at the same blanked-display fingerprint pause — worth comparing approaches and rebasing, since this branch currently conflicts with |
Nobody can reach the sensor with the panel dark, yet the fingerprint PAM stays armed and the retry timer re-arms it after every attempt for the whole lock. Suspend the fingerprint when the lock blanks the display: stop the retry and reach timers and drop an attempt already in flight without counting it as a miss. Resume it on every route the panel comes back by: runWake(), a screen set change, and a resume from sleep that kept the same outputs and so never reached runWake(). The resume route also re-arms the blank timer, so a dark wake blanks and suspends again. The instant-failure backoff from the earlier revision is dropped; omacom#7158 landed its own. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
92b489b to
4b192ea
Compare
|
Thanks @jandrusk. Rebased onto
The description has a side-by-side with #12420. In short: this PR also aborts a scan already running when the panel blanks. On resume it re-arms the reader and the blank timer without marking the display lit, so a resume with the panel still dark blanks again instead of scanning until the next input. I'm fine with either landing. If maintainers prefer #12420, I'll close this or fold the in-flight abort into it. |
|
Re-reviewed at 4b192ea by Claude Opus 5.5, with Codex Medium as the second opinion. Since this rebase, What What this branch still adds:
These differences are design choices the merged change made the other way, not defects it left open. The branch also conflicts with What was checked. I read this branch against The T1 measurements on this pull request and in the comments (MacBookPro14,2 and 14,3) are still the best field evidence for the problem. A run of current |
Problem
fingerprintRetryTimerre-arms it after every attempt for the whole lock, even though nobody can touch the sensor with the panel dark.Change
runBlank()callssuspendFingerprint(): stops the retry and reach timers and aborts an attempt in flight. The aborted attempt is cleared directly, not settled, so it does not count toward the unreached streak.startFingerprint()andsettleFingerprintAttempt()do nothing while suspended.resumeFingerprint()re-arms the reader on every route the panel comes back by:runWake(), including a wake that is the first keystroke of a password;onScreensChanged, for a panel that comes back on its own;restartFingerprintAfterSleep(), for a resume that keeps the same outputs and never reachesrunWake(). This route also re-arms the blank timer and does not force the panel on, so a lid opened to a lit panel takes a finger and a dark wake blanks and suspends again after the usual 5 s.Compared with #12420
Both pause new scans while blanked and stop the retry timer. The differences:
displaysBlank(the lock treats the panel as lit) and re-arms. This PR re-arms the reader and the blank timer but leaves the display state alone, so a resume with the panel still dark is blanked again rather than scanning until the next input.Either would fix the T1 case. Happy to close this in favor of #12420 if maintainers prefer it, or to fold the in-flight abort into it.
Testing
test/shell.d/lock-blank-fingerprint-test.shcovers the suspend, the in-flight abort, every resume route and the reset at lock start; it fails on unpatchedquattro.test/shell.dpass.qmllint shell/plugins/lock/Service.qml: no new warnings againstquattro.🤖 Generated with Claude Code