Repository navigation
Conversation
When a lock request stalls after setting lockRequested=true but never reaches sessionLock.locked or sessionLock.secure, the latch stays true forever. Because root.locked derives from lockRequested, the IPC lock() method then short-circuits and returns 'ok' without ever calling beginLock(), making every subsequent lock attempt a silent no-op. This is a security issue: the machine can suspend unlocked because the lid-close lock handler receives 'ok' from a latched-stuck request that never actually locks. The fix detects a stalled lock state in the IPC lock() handler: when lockRequested is true but the session is neither locked nor secure, clear the latch and associated timers before checking root.locked. This ensures beginLock() gets called for a fresh lock attempt. Adds test/shell.d/lock-requested-latch-test.sh to verify the latch is cleared and timers are stopped before retrying the lock. Fixes omacom#10299 Co-authored-by: Kevin Rajan <kvnloo@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes the stalled
lockRequestedlatch described in omacom#10299 by clearing a non-materialized request before a later IPC lock retry.Factory closeout — 2026-09-25
Closed as superseded by active upstream owner.
The defect still exists on current
omacom/omarchy:quattro, but upstream PR omacom#12245 is the canonical lock/sleep consolidation and already includes the bounded acquire-timeout / stalled-request recovery for omacom#10299. Earlier focused PRs omacom#11811, omacom#12064, and omacom#12946 were explicitly folded into omacom#12245.Promoting this two-file fork PR now would create a competing implementation and bypass the broader lock invariants already under review (no-real-screen deferral, involuntary lock loss, overlapping acquire, sleep lifecycle).
Preserve this branch as historical evidence until no worker needs it; then delete the task branch.