Skip to content

Cancel lock fingerprint verification before suspend - #18030

Draft
DanielJBurbridge wants to merge 2 commits into
omacom:quattrofrom
DanielJBurbridge:cursor/lock-fingerprint-sleep-claim-9bc9
Draft

DanielJBurbridge wants to merge 2 commits into
omacom:quattrofrom
DanielJBurbridge:cursor/lock-fingerprint-sleep-claim-9bc9

Conversation

@DanielJBurbridge

@DanielJBurbridge DanielJBurbridge commented Nov 7, 2026 •

Copy link
Copy Markdown

Draft pending a Wayland service-fixture run and suspend/resume validation on an affected fingerprint reader.

No visible change: this adjusts fingerprint cancellation and retry scheduling around suspend; lock-screen rendering and layout are unchanged.

Cancel the lock's fingerprint verification inside the existing suspend delay inhibitor. omarchy-system-sleep-lock calls lock prepareSleep, then polls the lock and fingerprint paused state instead of dropping the inhibitor as soon as the session is secure. Ordinary lock lock calls keep their normal behaviour. An older shell falls back through the real IPC wrapper.

Preserve a pending enrollment retry before stopping its timer, hold off new claims across unlock/relock during the suspend window, and queue another enrollment refresh if the old probe is still exiting at wake. exec fprintd-list ties the tracked process to the actual probe. Start the wake listener for the suspend window rather than keeping it idle all day. A stuck cancellation reaches the existing bounded deadline and logs a fingerprint warning without incorrectly reporting the session unlocked.

fingerprintSleepReady means the shell is holding new claims, PAM is inactive and the tracked enrollment probe has stopped. PAM inactivity precedes deferred helper destruction: this does not acknowledge fprintd releasing the physical reader after its client disconnects. That remaining hardware behaviour is why this stays draft.

Related: #15619.

Validation on 8 November 2026:

  • bash test/shell.d/sleep-lock-test.sh passed, including held/stuck cancellation and compatibility through the real omarchy-shell wrapper with a stubbed older qs.
  • bash test/shell.d/lock-fingerprint-retry-test.sh passed. Parser/transition tests now extend this existing suite; the new source-string test file was removed.
  • Command metadata (580 commands), Bash syntax and diff checks passed.
  • Structural i18n checks and the embedded-English extraction scan passed locally.
  • The existing QML service fixture has behavioural cases for deferred enrollment, input during the hold, unlock/relock and a probe still exiting at wake. It skipped without Wayland. A separate isolated offscreen attempt failed before any checks because Quickshell had no PanelWindow backend; it is not a service-validation pass.

No real fingerprint authentication, suspend cycle, reader release or GPU/desktop validation was performed. The QML fixture has no active native PAM helper, so even a passing fixture would not prove reader-release timing.

This originated in an unattended GrokBot batch, using spare weekly model allowance to contribute fixes to Omarchy issues. The batch needed more review before submission. Grok 4.7 proposed this follow-up; Codex reviewed and corrected its IPC compatibility and probe-process handling before pushing it. The checks and limits above describe what was actually verified.

The lock kept its pam_fprintd verify running across suspend, so fprintd held a stale device claim and every Claim after resume was denied. Abort that verify when logind prepares to sleep, refuse a new one until wake, then arm a single fresh verify.

Refs omacom#15619

Co-authored-by: Daniel Burbridge <DanielJBurbridge@users.noreply.github.com>
@greptile-apps

greptile-apps Bot commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; all four previous findings are addressed and no new blocking issue was found.

Summary

The PR releases fingerprint authentication before suspend and makes that release part of the work the delay inhibitor waits for.

  • The suspend helper waits for fingerprint work to stop before sleep.
  • Fingerprint claims pause for suspend and restart once after wake.

All four previous findings are addressed. No new actionable issues were found. This review did not run the tests.

Diagram

sequenceDiagram
  participant M as Sleep monitor
  participant H as Sleep-lock helper
  participant L as Lock service
  participant D as logind
  D->>M: PrepareForSleep(true)
  M->>H: Run while inhibitor is held
  H->>L: prepareSleep
  L->>L: Block claims and abort fingerprint PAM
  L->>L: Stop enrollment probe and start wake listener
  H->>L: Poll secure and fingerprintSleepReady
  L-->>H: Ready
  H-->>M: Finish
  M->>D: Release inhibitor
  D->>D: Suspend and resume
  D->>L: PrepareForSleep(false)
  L->>L: Clear hold and restart fingerprint work
Loading

Reviews (2) · Last reviewed commit: "Cancel fingerprint verification within t..." · Reviewed by Greptile

Comment thread shell/plugins/lock/Service.qml Resolved
Comment thread shell/plugins/lock/Service.qml Resolved
Comment thread shell/plugins/lock/Service.qml Resolved
@DanielJBurbridge DanielJBurbridge changed the title Release the lock fingerprint claim before suspend Cancel lock fingerprint verification before suspend Nov 8, 2026
@DanielJBurbridge
DanielJBurbridge marked this pull request as draft November 8, 2026 00:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants