Repository navigation
Conversation
A lid-close lock starts its fingerprint check a few hundred milliseconds before the machine suspends. fprintd-list and pam_fprintd both D-Bus-activate fprintd, which resets the reader as the USB bus goes down; fprintd cannot delay the sleep because it is starting inside the transition. A Synaptics reader then comes back "unsupported firmware version" and that fprintd ignores it for the rest of its life. The lock plugin checked availability once, at lock time, so a check against that broken daemon left the lock password-only until the next lock. Follow logind's PrepareForSleep from the lock plugin itself, since the sleep monitor exits to release its inhibitor and misses the resume half. On suspend, stop retries and refuse new fprintd calls; on resume, run the check that was held back, or restart the scan. A scan already in flight is left alone. fprintd suspends and resumes the reader itself, and libfprint only lets the kernel re-enumerate the reader after sleep while a scan is running. Aborting the scan at suspend made fprintd close the reader mid-transition: the close blocked until resume, the reader woke with stale firmware state, and every scan failed until the daemon exited a minute later. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015HE2TCjo1j9HnXq83cqsUX
047e95f to
2696e7b
Compare
|
Tested on an HP EliteBook 8 G1i (Lunar Lake) with a Synaptics Prometheus Setup: Baseline on stock With this PR, two lid close/open cycles:
The reader was armed within half a second both times; the rest of the time to unlock was the finger read itself. Tested and written up by Claude Opus 5 via Claude Code. |
|
Reviewed at 2696e7b, merged locally onto current What ran, on a disposable Omarchy VM booted onto the merged tree. The lock tests in
That proves the timing change, not the hardware outcome: whether a Synaptics reader survives the suspend can only be shown on one. One gap, not a regression. Related. The race is the one @knordum describes in #12993 (06cb:0123), and @andershfranzen's results above match it. #9456, #10393, #12420 and #11273 change the same fingerprint start and retry paths for other causes. None of them holds fprintd back across suspend, so they overlap rather than compete, but whichever lands second will need its guards merged with this one. Waiting on a reporter. A hardware fix counts as confirmed by the person who reported the bug or by a maintainer. @efecege, if you can, please test the exact commit on your ThinkPad and say here whether fingerprint still works after several lid-close suspends, naming the commit you ran:
|
|
Merged #7158 supplies post-resume daemon recovery and preserves fingerprint enrollment through failed availability probes. Deferring new fprintd activity during PrepareForSleep remains a distinct pre-suspend change and is not part of that merge. Keeping this open for that remaining mechanism; the shared lock code needs a rebase. 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. |
…orSleep omacom#7158 added a sleep watch that notices resume from a wall-clock gap, restarts fprintd through a resume hook, and aborts a scan that rode through the sleep. Left beside this branch's PrepareForSleep handling, the watch would notice the same resume up to a second later and abort the scan started on resume. Resume now runs the watch's recovery once, from the logind signal, and marks the watch as having seen it. The availability probe is tri-state on quattro: an unknown answer keeps a known enrollment and starts nothing. Resume therefore restarts the scan even when it also runs a held-back check, since suspend stopped the retry that would otherwise have carried it. The lock fingerprint service fixture now drives suspend and resume through the real QML service. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The reach timeout omacom#7158 added aborts an attempt that has not prompted within 20 seconds. Left running after PrepareForSleep(true), it could fire in the window before sleep and abort the scan mid-transition, the close this branch exists to avoid. Stop it with the retry timer; resume already settles a scan that rode through. omacom#7158 also reads an unreachable fprintd as an unknown enrollment rather than none, so the comment no longer claims a failed check leaves the lock password-only. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Co-Authored-By: Codex Medium <noreply@openai.com>
|
#7158 landed on What the merge changes. #7158 detects resume on its own: a sleep watch notices the wall-clock gap, restarts fprintd through a resume hook, and aborts a scan that rode through the sleep. Put next to this branch's resume handling unchanged, that watch would catch the same resume about a second later and abort the scan this branch had just started. Now What Codex found, fixed in c312fc4. #7158's 20-second reach timeout was still running after What ran, on a disposable Omarchy VM running this branch's shell. All 26 lock, sleep and fingerprint tests in
That shows the timing, not the hardware outcome. Still open.
Waiting on a hardware test. Earlier results on real readers were against a tree without #7158. @wulujia, @andershfranzen, @efecege: if you can, please test c312fc4 through several lid-close suspends, and say here whether fingerprint unlock works after each one, naming the commit you ran:
|
[Medium impact] The change affects fingerprint sign-in in the desktop lock workflow. The PR still needs to prevent fingerprint startup from overlapping suspend before it is safe to merge. Findings
SummaryThe PR holds new fingerprint checks and scans while logind prepares to sleep.
|
| if (suspending) { | ||
| fingerprintCheckDeferred = true | ||
| return | ||
| } | ||
| if (!fingerprintCheckProc.running) fingerprintCheckProc.running = true |
There was a problem hiding this comment.
Fingerprint startup still overlaps sleep
omarchy-system-lid-close requests the lock before PrepareForSleep, and beginLock() immediately schedules refreshFingerprintStatus(). If reader initialization is still running when the sleep signal arrives, prepareForSleep(true) leaves that check running. The sleep inhibitor waits only for sessionLock.secure, so sleep can still interrupt the reader reset and leave fingerprint unlock unavailable after waking.
Coordinate fingerprint startup with the lid-close path, or hold sleep until an already-started initialization finishes, without aborting a running scan.
Knowledge Base Used: Shell UI and desktop interactions
|
Checked Greptile's two findings on c312fc4 against the source. Claude Opus 5.5 did the review and Codex Medium gave a second opinion. Codex reached the same reading on both findings, though its independence is not guaranteed. Nothing was pushed and the head is unchanged, so the hardware test requested above still applies to c312fc4.
This is still waiting on a test on a real fingerprint reader. |
|
Hardware report: Dell XPS 15 9500, Goodix This overlaps with a suspend/resume failure we investigated today. Immediately after resume, the journal recorded: The reader worked after interacting with the lock screen, but initially would not unlock on a direct finger touch. A local lock-plugin workaround now pauses new attempts during sleep preparation, retains the known enrollment instead of probing it immediately on resume, and waits 1.5 seconds after This is a combined workaround, not an isolated test of this PR: the display blank timeout was also increased from 5 to 30 seconds, retries are paced at 5 seconds, and fprintd is kept resident with Our local workaround currently aborts the PAM scan during sleep preparation. Your warning about that behavior on Synaptics is valuable: we have only confirmed short lid-close tests on this Goodix so far, not overnight sleep or cold boot. This should not be treated as evidence that aborting active scans is safe across readers. Sharing the hardware result in support of the resume coordination work here; happy for this report to inform testing rather than suggesting these local defaults be copied wholesale. |
…update # Conflicts: # shell/plugins/lock/Service.qml
|
I prepared an updated branch to help move this forward: https://github.com/prabhatCH/omarchy/tree/fix/9919-upstream-update @wulujia: you are welcome to merge this branch into
The earlier lid-close startup race is still unresolved: when the early lid-close lock beats Validation on this machine:
Failures persisting in both trees
@efecege @andershfranzen: if you have time, could you test the exact updated commit The earlier Dell XPS/Goodix report above tested a separate combined local workaround, not this branch. I have not installed this development branch as the laptop's desktop or claimed hardware validation of it. Work and automated verification were performed with Codex. |
The deferred-probe check waits for the service's own startup probe before installing its controlled command, and that probe runs the real fprintd-list. On a machine with a fingerprint reader set up, a slow activation could hold it past the check's two-second deadline and fail the test before it tested anything. Stop the startup probe instead of waiting on it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Co-Authored-By: Codex Medium <noreply@openai.com>
|
This branch conflicted with What landed. @prabhatCH's merge of What Codex found, fixed in 3f9a46f. The new check waited for the service's startup probe first, and that probe runs the real What ran, on a disposable Omarchy VM running this branch's shell. Still open, and not pushed.
Waiting on a hardware test. No real reader has run this code with
|
Problem
On a ThinkPad X1 Carbon (Synaptics reader
06cb:019f), closing the lid and reopening it later often leaves the lock screen with no fingerprint option. Only the password works until the next lock.The journal shows what happens:
fprintd-listandpam_fprintdboth D-Bus-activate fprintd, which resets the reader.OperationInProgress.A scan that is already running when the machine sleeps is a different case, and it already works. fprintd suspends and resumes the reader itself, and while a scan is running libfprint turns off USB
persistfor the reader, so the kernel re-enumerates it after a long sleep. The old device object reportsdevice was disconnected, the PAM verify fails, and the retry timer starts a fresh scan on the new device. Two long sleeps on the same laptop yesterday both unlocked by fingerprint within two seconds of resume through that path.Fix
The lock plugin now follows logind's
PrepareForSleepitself, through adbus-monitorprocess that lives as long as the shell.omarchy-system-sleep-monitorcannot deliver the resume half: it exits to release its delay inhibitor and is restarted after the machine is already awake.PrepareForSleep(true): stop the retry timer and refuse to start a scan or an availability check until resume. A scan already in flight is left alone.PrepareForSleep(false): run the availability check if one was held back, otherwise restart the scan. A check that failed before sleep no longer decides the whole lock.omarchy-shell lock statusreports the newsuspendingflag.An earlier revision of this branch also aborted the in-flight PAM at suspend. That made things worse after a long sleep. Killing the PAM helper makes fprintd cancel the verify and close the reader synchronously, in the same instant it is suspending the reader for logind. The close blocked until resume, the reader had kept
persist=1because no scan was running at suspend time, and it woke with stale firmware state:Every scan failed until that daemon hit its idle timeout a minute later. The current revision leaves the scan running, so libfprint's own suspend path handles the reader.
Testing
test/shell.d/lock-fingerprint-suspend-test.sh(new) pins the monitor, the two gates, the held-back check, and that suspend does not abort a running scan../test/allpasses apart frombar icons share slot and baseline geometry, which fails the same way on a cleanquattrocheckout on this machine.runtime-smoke-test.shtimed out once under the full run and passed four times on its own, before and after the change.dbus-monitorprocess starts, streams lines throughSplitParser, and is reaped under a QuickshellProcess.