Repository navigation
Stop a wedged blank or wake child from silently disabling the lock screen's display control - #7673
omarchybot wants to merge 11 commits into
Conversation
Quickshell's Process is `running` while its QProcess exists and clears only on `QProcess::finished`, so a child that never exits pins the object true and nothing later can start: `startProcessIfReady()` returns while one exists, and the `if (!process.running)` guard in front of it drops the request outright instead of deferring it to the exit that never comes. `runBlank()` and `runWake()` each drove one such object for the life of the shell, which turns a single wedged blank child into a lock screen that never blanks again, and a single wedged wake child into a display that never comes back on input -- with no timeout, no log line, and nothing in the service's IPC status to see it by. `runWake()` keeps coalescing, because `LockView`'s full-surface `MouseArea` sets `hoverEnabled` and calls it from `onPositionChanged`, but it coalesces on a Timer rather than on a process it can no longer observe, and rather than on wall-clock arithmetic a backwards step would suppress. Unlock and a lost session lock wake unconditionally, since the surface is gone by then and no later input can ask again. `runBlank()` logs, so the next blank that goes missing says so in the journal and in `lastEvent`. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Co-Authored-By: Codex XHigh <noreply@openai.com>
There was a problem hiding this comment.
Pull request overview
Reworks lock-screen blank/wake execution to prevent wedged reusable processes from disabling display control.
Changes:
- Uses detached blank and wake processes.
- Coalesces wake requests and forces wake on unlock.
- Adds blank logging and regression tests.
Tip
If you aren't ready for review, convert to a draft PR.
Click "Convert to draft" or run gh pr ready --undo.
Click "Ready for review" or run gh pr ready to reengage.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
shell/plugins/lock/Service.qml |
Implements stateless display control and wake coalescing. |
test/shell.d/lock-blank-spawn-test.sh |
Adds regression assertions for spawn behavior. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| // ask again for a wake the coalescing window swallowed. | ||
| function forceWake() { | ||
| wakeCoalesceTimer.restart() | ||
| Quickshell.execDetached(["bash", "-c", "omarchy-system-wake"]) |
| ) | ||
|
|
||
| assert( | ||
| /function forceWake\(\) \{[\s\S]*?Quickshell\.execDetached\(\["bash", "-c", "omarchy-system-wake"\]\)/.test(serviceQml), |
quattro gave runWake() and runBlank() the lock's displaysBlank and monitorDpmsKnown bookkeeping for video wallpapers. That state is cheap and must follow every request, coalesced or not, so it stays at the top of runWake(), which now owns the coalesced spawn; forceWake() just clears the window and calls it. That keeps video-background-test's shape for runWake() and runBlank(), and bounds this branch's assertions to one function body each. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A reused Process serialized its children, which is what let one hung child latch every later request. Detached children are not serialized at all, so the same hang now costs a new stuck process tree every coalescing window for as long as the pointer moves. Ten seconds is far past any healthy blank or wake, and timeout kills the child's whole process group, hyprctl included. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A lazy [\s\S]*? runs past the closing brace, so moving the lost-lock forceWake() into onScreensChanged still satisfied the assertion. Neither body has nested braces, so [^}]* holds each match to the function it names. Co-Authored-By: Codex Medium <noreply@openai.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Brought this up to date with What changed on the branch
Verified on a worker (shell linked to each tree,
Not green, and not from this change. Second opinion: Codex Medium reviewed two rounds against this head. The first round found the unbounded assertions above. The second found nothing open, and agreed that wakes can't be swallowed while locked (every No competing fix is open. #7179 and #6642 still touch the lock's blank and wake and will conflict textually. Neither changes how the spawns work. Waiting on the maintainer: the branch is verified, and it stays short of |
quattro taught the lock to pause the fingerprint reader while the displays are off, so runBlank() calls pauseFingerprint() and runWake() calls resumeFingerprint() and nudgeFingerprint(). Those follow every request, coalesced or not, so they stay outside the coalescing window. The coalesced spawn moves to the end of runWake(): lock-blank-fingerprint-test matches the function body with [^}]*, and the spawn's own block closing ahead of resumeFingerprint() would end that match early. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
timeout's SIGTERM reaches the child's whole process group, but bash dies on it, timeout then exits, and any --kill-after never fires: a grandchild that ignores SIGTERM, a wedged hyprctl say, outlives the ten seconds, and pointer motion on the lock screen starts another one every coalescing window. Sending SIGKILL to the group makes the bound unconditional; neither a blank nor a wake has anything to clean up. Co-Authored-By: Codex Medium <noreply@openai.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
This had stopped merging cleanly with What changed on the branch
Verified on a worker (shell linked to each tree, with
Second opinion: Codex Medium reviewed two rounds. The first round found the SIGTERM-only bound, which #7179 and #6642 still edit Waiting on the maintainer. |
quattro dropped the lock's displaysBlank and monitorDpms bookkeeping when the locked video wallpaper became a still frame (#15289), so runWake() keeps only quattro's fingerprint calls ahead of the coalesced spawn. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
It matched the exact execDetached and forceWake lines in Service.qml, so it guarded nothing but their wording. quattro's AGENTS.md now rules such tests out and #16334 removed the rest; the fix is proved by running a hung blank child on a worker instead. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Stubs make the first keyboard-off hang, and the fixture blanks twice; the second blank must still reach omarchy-brightness-display. On quattro the reused blankProcess stays running, so the second blank is skipped and the test fails. It extends the existing lock service fixture rather than adding a file, and needs no compositor or display. Co-Authored-By: Codex Medium <noreply@openai.com> Co-Authored-By: muse-wonder High <noreply@meta.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
This had stopped merging cleanly with What changed on the branch
Verified on a worker, with the shell linked to each tree and
Second opinion: Codex Medium and muse-wonder (via pi, thinking high) reviewed five rounds. Round 1 found no defect in Related: #16368 also edits Waiting on the maintainer. |
[Medium impact] The PR appears safe to merge, and the previous wake-test coverage gap is addressed. SummaryThe PR replaces reused display-control processes with detached commands limited to ten seconds.
Reviews (2) · Last reviewed commit: "Cover the lock's wake path with a hung w..." · Reviewed by Greptile |
The behavioural check only drove runBlank(), so a wake that latches behind a hung child, an unlock wake swallowed by the coalescing window, or input forking one wake per event would all pass. The first omarchy-system-wake now hangs too, and two forceWake() calls followed by two runWake() calls must land exactly one wake. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Co-Authored-By: Codex Medium <noreply@openai.com>
|
Another round on this, aimed at what was still weakest: the evidence and the open questions. One commit was pushed to the branch. What changed on the branch
The suite The five Review Codex Medium reviewed the new commit and the whole diff against Still open
This waits on the maintainer. |
After locking, the display never powers off, and once it starts the shell never blanks again until
omarchy restart shell.runBlank()andrunWake()each drove a singleProcessobject created once and reused for the life of the shell. Quickshell'sProcessisrunningwhile itsQProcessexists and clears only onQProcess::finished, so one child that never exits pins the object true forever —startProcessIfReady()returns while a process exists, and theif (!process.running)guard in front of it drops the request outright rather than deferring it to an exit that never arrives. Every blank and every wake after that is discarded with no timeout, no reset, no log line, and nothing in the service's IPCstatus()to see it by.The blank half leaves the panel lit behind the lock surface. The wake half is worse and was latent in the same code:
runWake()is what unlock, a failed password, a lost session lock, and every key and pointer event call to bring the display back, so a wedged wake leaves a black screen that does not answer input.Both spawns are now stateless, which removes the state that could latch.
runWake()still coalesces, becauseLockView's full-surfaceMouseAreasetshoverEnabledand calls it fromonPositionChanged— so without a replacement, moving the mouse on the lock screen would fork abashplus twohyprctlround trips per motion event. It coalesces on aTimerrather than on wall-clock arithmetic a backwards clock step could suppress, and unlock and a lost session lock bypass the window entirely, since the surface is gone by then and no later input can ask again.runBlank()logsblank-requested, so the next blank that goes missing says so in the journal and inlastEvent.What made one child stop exiting after roughly a day is not established, and this does not claim to fix it — it makes it survivable. The likeliest candidate is an unbounded
hyprctlcall:omarchy-brightness-displayresolves the focused monitor throughhyprctl monitors -j | jqbefore it reaches theoffbranch that never uses the answer, and neither that call nor the DPMS dispatch after it has a timeout. Hoisting that query below theoff/onbranches would remove one such call from every blank and every wake, and is worth doing separately.Note for sequencing: #7179 rewrites both
runWake()andrunBlank()for fingerprint thermal backoff and will conflict textually, and #6538 and #6642 both editblankProcess's command line, which is gone here. None of them change the spawn semantics, so all three resolve by reapplying their own change to the new bodies.Fixes #7652