Repository navigation
Make a dead lock client diagnosable and recoverable - #6630
Conversation
Quickshell only logs to its instance runtime dir on tmpfs, so when the shell dies the idle/lock event trail is gone after a reboot (#6628). Launch the shell through omarchy-launch-shell, which pipes stdout/stderr into the journal under the omarchy-shell tag — bounded, timestamped, and persistent — and surface that log in omarchy-debug-idle. Co-Authored-By: Claude Fable 5 <[email protected]>
When the shell dies while the session is locked, Hyprland's failsafe keeps the session locked with no lock client left, and omarchy-restart-shell refused to run in exactly that state, leaving reboot as the only way back in (#6628). Gate the refusal on the lock service actually holding (or acquiring) the lock rather than on the session's LOCK state — a dead shell and a crash-handler relaunch that holds no lock both fail that check — then restart the shell, re-acquire the session lock, and wait for it to report secure, the same secure-poll omarchy-system-sleep-lock uses, so the user can authenticate out of the failsafe. Enable Hyprland's allow_session_lock_restore so the compositor accepts the replacement lock client. Co-Authored-By: Claude Fable 5 <[email protected]>
There was a problem hiding this comment.
Pull request overview
Adds shell crash diagnostics and recovery from Hyprland’s dead-lock-client failsafe.
Changes:
- Routes shell output through journald and exposes it in idle diagnostics.
- Restarts dead lock clients and waits for the replacement lock to become secure.
- Enables Hyprland session-lock restoration and adds recovery 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 3 out of 6 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
bin/omarchy-launch-shell |
Launches Quickshell through journald. |
bin/omarchy-restart-shell |
Adds dead-lock recovery and secure-lock polling. |
bin/omarchy-debug-idle |
Displays journaled shell logs. |
default/hypr/autostart.lua |
Uses the shell launcher. |
default/hypr/looknfeel.lua |
Enables session-lock restoration. |
test/shell.d/restart-shell-test.sh |
Tests launcher and lock recovery behavior. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
akashgagda
left a comment
There was a problem hiding this comment.
General approval. This matches our captured diagnosis on #6628 exactly:
- Persisted shell log: our crash reproduced only because we added a user-side wrapper to keep the quickshell log; having the shell's idle/lock trail in the journal (
omarchy-launch-shell+journalctl -t omarchy-shell) closes the "died → reboot → zero diagnostics" gap for everyone. - Dead-lock recovery: the current
omarchy-restart-shellhard-refuses on anyLOCKsession, which is precisely the state that's unrecoverable. Gating onomarchy-shell lock status(secure/requested) instead of a blind refuse preserves a live locker and allows recovery when the locker is gone, and re-requesting + polling tosecuremirrors the existing sleep-lock pattern. misc.allow_session_lock_restore = trueis required for Hyprland to accept the replacement lock client — validated it's a recognized 0.56.2 option.
Scope note: this fixes the recoverable half. The crash cause itself remains upstream (quickshell #61/#76 family, with a monitor-flap/EGL trigger on our Intel HDMI system), so this gets users out of the reboot trap and keeps evidence, which is the right omarchy-owned slice. Tests updated in-repo; I'll run the hermetic shell suite against this branch.
akashgagda
left a comment
There was a problem hiding this comment.
General approval. This matches our captured diagnosis on #6628 exactly:
- Persisted shell log: our crash reproduced only because we added a user-side wrapper to keep the quickshell log; having the shell's idle/lock trail in the journal (
omarchy-launch-shell+journalctl -t omarchy-shell) closes the "died → reboot → zero diagnostics" gap for everyone. - Dead-lock recovery: the current
omarchy-restart-shellhard-refuses on anyLOCKsession, which is precisely the state that's unrecoverable. Gating onomarchy-shell lock status(secure/requested) instead of a blind refuse preserves a live locker and allows recovery when the locker is gone, and re-requesting + polling tosecuremirrors the existing sleep-lock pattern. misc.allow_session_lock_restore = trueis required for Hyprland to accept the replacement lock client — validated it's a recognized 0.56.2 option.
Scope note: this fixes the recoverable half. The crash cause itself remains upstream (quickshell #61/#76 family, with a monitor-flap/EGL trigger on our Intel HDMI system), so this gets users out of the reboot trap and keeps evidence, which is the right omarchy-owned slice. Tests updated in-repo; I'll run the hermetic shell suite against this branch.
* Persist the Omarchy shell log across sessions Quickshell only logs to its instance runtime dir on tmpfs, so when the shell dies the idle/lock event trail is gone after a reboot (omacom#6628). Launch the shell through omarchy-launch-shell, which pipes stdout/stderr into the journal under the omarchy-shell tag — bounded, timestamped, and persistent — and surface that log in omarchy-debug-idle. Co-Authored-By: Claude Fable 5 <[email protected]> * Recover a locked session whose lock client died When the shell dies while the session is locked, Hyprland's failsafe keeps the session locked with no lock client left, and omarchy-restart-shell refused to run in exactly that state, leaving reboot as the only way back in (omacom#6628). Gate the refusal on the lock service actually holding (or acquiring) the lock rather than on the session's LOCK state — a dead shell and a crash-handler relaunch that holds no lock both fail that check — then restart the shell, re-acquire the session lock, and wait for it to report secure, the same secure-poll omarchy-system-sleep-lock uses, so the user can authenticate out of the failsafe. Enable Hyprland's allow_session_lock_restore so the compositor accepts the replacement lock client. Co-Authored-By: Claude Fable 5 <[email protected]> --------- Co-authored-by: Claude Fable 5 <[email protected]>
Addresses the unrecoverable half of #6628: when the Omarchy shell dies while the session is locked, Hyprland's ext-session-lock failsafe keeps the session locked with no lock client left, and today the only way back in is a reboot — with no diagnostics left behind to explain what killed the shell.
The crash itself is upstream (quickshell-mirror/quickshell#61/#76 are still open), but Omarchy owned two gaps that turned it into "reboot required with zero logs":
Persist the shell log across sessions. Quickshell only logs to its instance runtime dir on tmpfs, so the idle/lock event trail vanished with every reboot. The shell now launches through
omarchy-launch-shell, which pipes stdout/stderr into the journal under theomarchy-shelltag — bounded, timestamped, and persistent — andomarchy-debug-idlesurfaces that log, so the next occurrence of #6628 is diagnosable after the fact.Recover the dead-lock-client failsafe.
omarchy-restart-shellrefused to run whenever the session was locked, which blocked recovery in exactly the state that needs it. The refusal is now gated on the lock service actually holding (or acquiring) the lock: a live locker is preserved as before, but a dead shell — or a crash-handler relaunch that holds no lock — no longer blocks the restart. Recovery then re-requests the session lock and polls until the shell reports it secure (the same secure-pollomarchy-system-sleep-lockuses), so the command can't claim success while the failsafe is still up, and the user authenticates out of it from a TTY or SSH instead of rebooting.misc.allow_session_lock_restoreis enabled so Hyprland accepts the replacement lock client; without it the compositor denies the re-lock and the recovery path is dead on arrival.The session stays compositor-locked for the whole recovery window — ext-session-lock keeps the failsafe up until a new client locks and the user authenticates — so nothing is exposed if recovery fails partway.
— 🤖 Claude, posting on behalf of @dhh