Repository navigation
Prevent screensaver launch during lock transitions - #7132
mlitwiniuk wants to merge 1 commit into
Conversation
Fixes omacom#6995. Destroying the screensaver during an idle lock can make Hyprland report idle again. The idle service may then start a second cycle while the lock is still pending, launching a new screensaver whose terminal is immediately destroyed. Its ttfx renderer consequently aborts after receiving EIO. Block idle-cycle startup and recheck delayed screensaver launches whenever: - the idle service’s lock subprocess is running, or - the in-process omarchy.lock service reports locked, including lockRequested. The in-process check avoids the fall-through behavior of the existing shell IPC guard during lock transitions. This complements omacom#6813: that PR fixes renderer/supervisor teardown, while this change prevents an entirely new screensaver from existing launched during the pending lock. Tests: - bash test/shell.d/idle-test.sh - ./test/all — all applicable tests pass; three packaging-coverage tests require an omarchy-pkgs checkout.
There was a problem hiding this comment.
Pull request overview
Prevents idle-cycle races from launching screensavers while session locking is pending.
Changes:
- Detects active lock subprocesses and in-process lock state.
- Guards idle-cycle startup and delayed screensaver launches.
- Adds unit and structural regression coverage.
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 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
shell/plugins/services/idle/Service.qml |
Applies lock-transition guards. |
shell/plugins/services/idle/IdleModel.js |
Adds shared lock-state logic. |
test/shell.d/idle-test.sh |
Covers lock detection and guard placement. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
Reviewed at 6f47c41, against the merge-base with The failure mode we went looking for. A guard keyed on a transition flag that is set but never cleared is the mirror image of the bug you are fixing: it would suppress the screensaver and the idle lock for the rest of the session. This one does not latch. One finding, medium. Nothing was pushed for it. The re-arm wants the lock service bound as a property so Two things that are deliberately not findings. The in-process check does not conflict with the Tests. On a disposable VM built from the Omarchy ISO, with the compositor rebooted onto this branch and Who reviewed it. Claude Opus 5 in Claude Code, with Codex at xhigh reasoning as an independent second opinion. Codex reached the same re-arm conclusion, which had already been written down before it ran, and its independence is not currently guaranteed — it can read the first reviewer's working notes, so treat that agreement as weaker than it looks. What it contributed on its own terms: the This is waiting on the maintainer rather than on you: #7131 fixes the same race a different way and only one of them can land. |
|
Automated duplication check: this pull request looks similar to #7131, which covers the same idle lock transition guard. I keep that one open and close this one to consolidate review. If you feel this is the wrong decision, please open the PR again with a note on the difference. |
Fixes #6995.
Destroying the screensaver during an idle lock can make Hyprland report idle again. The idle service may then start a second cycle while the lock is still pending, launching a new screensaver whose terminal is immediately destroyed. Its ttfx renderer consequently aborts after receiving EIO.
Block idle-cycle startup and recheck delayed screensaver launches whenever:
The in-process check avoids the fall-through behavior of the existing shell IPC guard during lock
transitions.
This complements #6813: that PR fixes renderer/supervisor teardown, while this change prevents an entirely new screensaver from existing launched during the pending lock.
Tests: