omarchy icon indicating copy to clipboard operation
omarchy copied to clipboard

Unplugging a monitor destroys overlay surfaces until the shell restarts

Open shawnyeager opened this issue 2 months ago • 15 comments

System details

Omarchy 4.0.0.r6691.g8b4eae6-1, Hyprland 0.56.2, Quickshell 0.3.1. Two outputs: the laptop panel and one external monitor.

What's wrong?

Unplugging the external monitor kills every overlay built on OverlayWindow: the menu, the volume display, the clipboard, the emoji picker, the image picker, and reminders. The shell process keeps running, and omarchy menu summon still returns ok, but hyprctl layers has no omarchy-menu or omarchy-osd surface on either output. The bar and the background come back.

After those surfaces are mapped again on the remaining screen, the first open once focus is on the other monitor paints behind the windows. The next press, already on that monitor, paints on the overlay layer. That is the same window as #13562.

This started with #13419. OverlayWindow keeps one layer surface for the life of the shell. When that surface's output goes away, Hyprland closes it. Quickshell handles zwlr_layer_surface_v1.closed by calling QWindow::close(), and because a layer shell window deletes its backing window when it becomes invisible, the overlay stays unmapped. The constant visible: true binding is not evaluated again. Per-screen windows are unaffected: their Variants rebuild them when Quickshell.screens changes. Showing the surface in the same step that moves it onto another monitor recreates it full size on the bottom layer.

What I recorded

Removing the external output logged:

monitorremoved>>DP-1
closelayer>>omarchy-background
closelayer>>omarchy-menu
closelayer>>omarchy-osd
closelayer>>omarchy-bar
openlayer>>omarchy-bar
openlayer>>omarchy-background

The external output was added back after that. openlayer>>omarchy-bar happened again. openlayer>>omarchy-menu and openlayer>>omarchy-osd did not. With both outputs connected again, layers are:

  • laptop panel: omarchy-background, omarchy-bar, and the parked 1x1 clipboard, emoji, image-selector, and reminder surfaces
  • external output: omarchy-background, omarchy-bar
  • neither output: omarchy-menu, omarchy-osd

A later unplug of the external output, with every overlay parked on it, closed the menu, OSD, clipboard, emojis, image selector, and reminders together. Only the bar and background reopened.

Expected

Unplugging a monitor, then plugging it back in, leaves every overlay mapped. The first open on the focused output is on the overlay layer, in front of the windows.

Workaround

omarchy restart shell creates the surfaces again. The next unplug of the output an overlay last opened on kills them again.

Fix

#13903 maps a closed overlay again after its output disappears, and moves the parked surface to the focused monitor before it is shown. That covers this report and #13562.

shawnyeager avatar Sep 30 '26 15:09 shawnyeager

Clear repro and good tie-in to #13562 (first open paints behind).

Fix PR: #13903 (“Keep overlay surfaces alive across monitor changes”) — parks/remaps OverlayWindow across screensChanged / focus. Related older approaches: #13792, #13783, #13809, #13564. Suggest linking this issue to #13903 and concentrating review there.

jandrusk avatar Oct 01 '26 13:10 jandrusk

Another way to hit this, with no cable involved: outputs added and removed at runtime with hyprctl output create headless / hyprctl output remove.

Omarchy 4.0.0.r6720.g8e02fc8, Hyprland 0.56.2, Quickshell 0.3.1, RTX 3080, one DisplayPort monitor (DP-2).

Three things on this machine create and remove headless outputs:

  • A Sunshine prep-cmd that streams a client-sized HEADLESS-N output (with DP-2 disabled) and removes it when the app ends.
  • An iPad sidecar plugin (OpenDisplay protocol) that creates one headless output per session.
  • OmaDeck streamed to a Steam Deck through a second Sunshine instance. A touch on the Deck moves Hyprland's monitor focus to that output (focusedmon>> on every touch-down), so the parked overlay follows it there.

While one of these sessions was running, hyprctl -j layers showed omarchy-menu, omarchy-osd, omarchy-clipboard, omarchy-emojis, omarchy-image-selector and omarchy-reminders parked on the headless output. Once that output was removed, the menu would not open: omarchy-shell shell summon omarchy.menu '{}' returned ok, and no omarchy-menu surface existed on any output. omarchy restart shell brought it back.

Every streaming or sidecar session ends with an output removal, so on a setup like this it comes up regularly, not just on unplug. Glad to test #13903 or #13792 against these flows if that helps.

Unayung avatar Oct 04 '26 23:10 Unayung

Yet another trigger: a single DisplayPort monitor that disconnects and reconnects when it wakes from the lock screen's display-off.

Omarchy 4.0.0.r6720.g8e02fc8, Hyprland 0.56.2, Quickshell 0.3.1, kernel 7.2.5-4-omarchy, RTX 2080 (TU104), one Dell P2715Q on DP-3. No suspend involved.

Timeline from one occurrence:

15:26:49  omarchy lock: lock-requested, secure=true      (idle lock, display blanked)
16:29:26  qt.qpa.wayland: There are no outputs - creating placeholder screen
16:29:29  xdg-desktop-portal-hyprland: Found output name FALLBACK
16:29:29  quickshell.hyprland.ipc: Got removal for monitor "FALLBACK" which was not previously tracked.
16:29:29  xdg-desktop-portal-hyprland: Found output name DP-3
16:29:39  omarchy lock: unlocked

DP-3 stays present while blanked. It is removed and re-added when the monitor wakes, so the only output goes away and Hyprland falls back to FALLBACK for about 3 seconds. After unlock the result is the same as in this issue: omarchy menu summon returns ok, and hyprctl layers lists only omarchy-background and omarchy-bar. omarchy osd -m test shows nothing either. After omarchy restart shell, all six parked surfaces are back on the bottom layer: omarchy-reminders, omarchy-osd, omarchy-menu, omarchy-image-selector, omarchy-emojis, omarchy-clipboard.

The shell logged There are no outputs - creating placeholder screen 66 times in one boot, in pairs. That means every lock that blanks the display long enough for this monitor to sleep breaks the overlays.

Each wake also logs a Handler was registered but will not be used because another handler is registered for target omarchy.<name> warning for agents, bluetooth, network, audio, monitor, power, weather, system-update, clock, indicators and elsewhen. That matches #13072.

I have not tested #13903 on this machine.

johanns avatar Oct 05 '26 23:10 johanns

Another recurrence on a single physical DisplayPort monitor, captured before restarting the shell. Both Super+Space and the top-left menu button stopped opening the menu on October 5 and again on October 6. Restarting the shell restored the first occurrence; it did not prevent the second.

System: omarchy-dev 4.0.0.r6720.g8e02fc8-1, quickshell 0.3.1-1, hyprland 0.56.2-4 (efb50993780079460b0cbed1363e2166a2de1d9f), Intel i9-9900K, NVIDIA RTX 2080 Ti, Samsung LU28R55 on DP-1 at 3840×2160 / scale 2.

October 6 timeline from the same shell PID 1417 (times are Europe/London, UTC+1):

00:42:15  omarchy idle: lock-system: lock-timeout
02:08:37  omarchy idle: idle-monitor: active
02:08:55  qt.qpa.wayland: There are no outputs - creating placeholder screen
02:08:55  duplicate ShellIpc registrations; layer-shell placeholder-screen warnings
02:08:58  quickshell.hyprland.ipc: Got removal for monitor "FALLBACK" which was not previously tracked.
02:08:58  qt.qpa.wayland: There are no outputs - creating placeholder screen
02:09:22  omarchy lock: unlocked
02:11–02:12  shell still running; menu request accepted, overlay absent

The failing state is more specific than an unresponsive shortcut:

$ omarchy-shell shell ping
ok
$ omarchy menu ping
ok
$ omarchy menu summon root
ok
$ hyprctl configerrors
[empty]
$ hyprctl -j layers | jq '[.[].levels[][] | .namespace]'
[
  "omarchy-background",
  "omarchy-bar"
]

DP-1 was already back, active and focused when those queries ran. There was exactly one desktop Quickshell process. omarchy:menu.root remained registered. This matches the output-loss mechanism in this issue and the corrected recovery in #13792; the duplicate bar-widget IPC warnings alone do not establish a panel-loader bug.

The complete fix and compositor-backed regression tests are now submitted directly upstream in #14363, head edb7a8d3f81a19a361ac31dd6fac2ae815e430b0, based on current quattro at 81145eb1. This overlaps #13792 and preserves the original authorship of Wes Cole's remapping commit and omarchybot's explicit-hide correction. The test-only fork contribution wesleycole/omarchy#1 is superseded and closed, so the complete fix can be merged without a preceding test merge into another fork.

All 18 runtime recovery checks pass, including repeated parked/open output removals, keyboard input after recovery, and loss/restoration of the only output. Unchanged current quattro and the corrected implementation with only its explicit visible = false removed both fail at the first parked-output removal. Before/after fixture screenshots were inspected.

Full ./test/all completed on this PR head and unmodified current upstream. CLI checks pass on both. All six failed candidate shell files also fail on the baseline. The baseline additionally failed the unrelated Hermes-removal test, whose isolated retry passed 26/26. Both runs have the same two skipped files. No candidate-only failures were introduced; the complete suite is not green. The PR includes the exact validation counts and test instructions.

Greptile acknowledged that the fixture addresses its runtime-coverage finding on #13792. The new complete PR has its own fresh bot review; no old review is being represented as approval of the new head. Restarting the installed shell restored this session's menu without changing package-owned files; the permanent fix awaits upstream merge.

The complete PR also fixes Greptile's valid test-cleanup finding: injected write/copy failures stop both nested children. The input assertion now counts only the test key and tolerates multiple delivered presses; three fresh runs pass 54 checks and the final aggregate run passes all 18 recovery checks. Both buggy recovery controls were rerun with the final fixture and fail as expected.

Final readback: Greptile completed the re-review of edb7a8d3 with a successful check, confidence 5/5 and no new actionable findings. The cleanup thread is resolved. Runtime results above are local verification; the bot did not run runtime tests. The complete upstream PR remains open and mergeable, awaiting maintainer review/merge.

sprajs avatar Oct 06 '26 01:10 sprajs

Also affects the stable release (omarchy 4.0.4-1, quickshell 0.3.1-1, Hyprland 0.56.2-2, kernel 7.2.8-1-omarchy; ROG Xbox Ally X, AMD Strix). In case it helps test #13903 / #13792, here is a way to reproduce it on demand without unplugging anything.

Setup: internal eDP-1 plus an external LG 4K on DP-2 through a USB-C dock. The trigger in daily use is the dock resetting on every resume from s2idle: DP-2 is removed and added back about 3s later.

  1. With both outputs enabled and focus on DP-2, open and close the menu once (omarchy menu summon, then omarchy menu close). The surface has to have been mapped on DP-2.
  2. hyprctl eval 'hl.monitor({ output = "DP-2", disabled = true })'
  3. hyprctl reload (DP-2 comes back)
  4. omarchy menu summon: the command returns ok, but hyprctl layers has no omarchy-menu surface on any output.

Notes:

  • The other output (eDP-1) stays enabled the whole time, so it doesn't need a zero-output / placeholder-screen state.
  • If the menu was never opened on DP-2 before it was removed, it keeps working.
  • Toggling eDP-1 on and off never breaks it.
  • omarchy menu refresh doesn't help; omarchy-restart-shell does.

My local workaround until a fix lands: a Hyprland event listener restarts the shell once after any external monitorremovedv2. It waits until the outputs have been quiet for 5s and the session is unlocked.

iwoogy avatar Oct 07 '26 03:10 iwoogy

Additional reproduction on a single HDMI monitor with Stay Awake enabled. No idle lock or screensaver step is required; the monitor’s physical power button is enough to trigger the same missing-overlay state.

System: omarchy-dev 4.0.0.r6720.g8e02fc8-1, Hyprland 0.56.2-4, Quickshell 0.3.1-1; AMD Ryzen 7 8845HS / Radeon 780M; Samsung S34CG50 on HDMI-A-1, 3440×1440 at scale 1. No third-party shell plugins are active.

Steps performed:

  1. Run omarchy restart shell and verify that the app menu works.
  2. Leave Stay Awake enabled—the bar tooltip says “Allow Idle Lock & Screensaver”.
  3. Turn the monitor off and back on using its physical power button, without unplugging the cable.
  4. The monitor and bar return, but the app menu no longer opens.

Observed after this cycle:

  • HDMI-A-1 is active and focused again.
  • Shell and menu pings both return ok.
  • Hyprland lists only omarchy-background and omarchy-bar; none of the menu, OSD, clipboard, emoji, image-selector, or reminder surfaces remain.
  • The live idle service reports enabled: false, stayAwake: true, inIdleCycle: false, and all screensaver/lock/wake processes and timers stopped. The session is unlocked.

The same Quickshell PID logged “There are no outputs - creating placeholder screen” at 07:43:25 and 07:43:27 on October 7, UTC−07:00, plus removal of the FALLBACK monitor.

This supports the output-loss/recovery explanation without requiring an idle-lock/screensaver transition. A comparison with Stay Awake disabled has not been performed on this machine.

I have not tested #14363 locally;

Whamp avatar Oct 07 '26 15:10 Whamp

Same bug on a dual-monitor AMD desktop, triggered by the idle lock's display-off. Nothing is unplugged and the machine doesn't suspend.

System: omarchy-dev 4.0.0.r6720.g8e02fc8-1, Hyprland 0.56.2-4, Quickshell 0.3.1-1, kernel 7.2.5-4-omarchy, Ryzen 7 3700X, Radeon RX 7600. Two outputs: MSI G27C5 on DP-2 and HP 27er on HDMI-A-1, both 1920×1080 at scale 1.

Trigger: when the screens blank on the idle lock, both monitors drop their link. The Hyprland log shows drm: Connector HDMI-A-1 disconnected and drm: Connector DP-2 disconnected, each followed by Cannot commit a disconnected output. After unlocking, Super+Space does nothing. omarchy menu summon root returns ok, but there is no omarchy-menu layer on either output. The parked 1×1 surface is missing too.

Happened 3 times in 2 days. The latest one, from the same shell PID:

23:13:57Z  omarchy idle: lock-timeout -> lock-requested, secure=true
           (every plugin re-registers: "Handler was registered but will not be used ...")
23:14:35Z  omarchy lock: unlocked
23:42:01Z  menu summon -> ok, `hyprctl layers` has no omarchy-menu

Layers in that state: omarchy-background and omarchy-bar on both outputs, and nothing else. The OSD, clipboard, emoji picker, image selector and reminders surfaces are gone as well. After omarchy restart shell, all of them come back on DP-2:

DP-2      omarchy-background, omarchy-bar, omarchy-clipboard, omarchy-emojis,
          omarchy-image-selector, omarchy-menu, omarchy-osd, omarchy-reminders
HDMI-A-1  omarchy-background, omarchy-bar

So every parked overlay sits on one output. When that output's connector drops, they all die together. This matches the analysis above.

Local mitigation: a Hyprland Lua hook on monitor.layout_changed, and on layer.closed for omarchy-menu. It waits 8 s and runs omarchy restart shell only if the omarchy-menu layer is missing. It works around the bug and doesn't fix it. I'm happy to test #13903 / #14363's OverlayWindow.qml on this two-output setup if that helps.

rpalma avatar Oct 07 '26 23:10 rpalma

Heads-up for everyone hitting this: #14458 ("Keep overlays sharp without parked surfaces") was merged into quattro on Oct 7. It removes the parked 1x1 overlay surface entirely. Overlays now unmap when closed and map a fresh surface on the focused output when opened, and an open overlay whose output goes away is moved to a remaining screen. That should cover every trigger reported here: unplugging, headless outputs, DPMS/standby link drops, and the monitor's power button.

It isn't in a tagged release yet, so stable 4.0.4 still has the bug. If you're on the dev channel, please retest once you've updated past #14458 and say whether Super+Space still breaks after an output loss. If nobody can reproduce it there, this can be closed as fixed by #14458.

jandrusk avatar Oct 08 '26 13:10 jandrusk

This is fixed on quattro by #14458 (0a55a3c, "Keep overlays sharp without parked surfaces"). That fix is not in a release yet: v4.0.4 is the latest tag and does not contain it, so stable installs still have this bug.

What changed: shell/Ui/OverlayWindow.qml no longer keeps a permanently visible 1x1 surface for each overlay. Its visible is now bound to shown && !!targetScreen && !!targetMonitor, so a closed overlay has no surface for Hyprland to close, and every open maps a fresh surface on the focused screen at the overlay layer. If an overlay is open when its output goes away, onScreensChanged moves it to a remaining screen. All seven consumers (menu, OSD, clipboard, emojis, image picker, reminders, Wi-Fi QR) drive shown and none sets visible directly.

Reproduced on an Omarchy ISO worker VM with the shell running from each tree, using hyprctl output create headless / output remove, and disabling and re-enabling the only output so Hyprland drops to FALLBACK:

  • At d9b970d, the commit before #14458: after the menu had been opened and closed on a headless output and that output was removed, omarchy-shell shell summon omarchy.menu returned ok, but hyprctl layers had no omarchy-menu surface on any output. After the only output went away and came back, both the menu and the OSD were gone.
  • At current quattro (47caa9b), the same sequences all ended with the menu mapped on the remaining output and the OSD showing. That includes removing the output while the menu was open. The single-output case passed too.

test/shell.d/overlay-window-test.sh did not run on the worker because it needs node, which the worker image lacks. These results come from the reproduction above, not from the suite.

The second opinion was Codex at medium effort, reading the same tree. It agreed this is fixed for the output-loss sequences reproduced here. It also raised one case it could not rule out, and nobody has reproduced it: if Qt keeps listing a screen after Hyprland has dropped the matching monitor, an open overlay stays unmapped until it is closed and opened again. There is no onClosed handler to remap it. An open is a fresh surface either way, so the next Super+Space should still work.

#13903 and #13792 also say they fix this, but both patch the parked-surface design that #14458 removed. The maintainer will decide whether this closes now or once a release carries #14458. If you are on the dev channel and can still lose the menu after an output change on a build that includes 0a55a3c, please say so here with omarchy version and the hyprctl -j layers output from that state.

omarchybot avatar Oct 13 '26 06:10 omarchybot

Still reproduces after #14458 on a tagged release. This install already has the new OverlayWindow.qml (no parked surface; visible: shown && !!targetScreen && !!targetMonitor, onScreensChanged remap), but the menu still stops opening after the only output drops during an idle lock.

System: omarchy 4.5.0-3, Hyprland 0.56.2-4, Quickshell 0.3.2.r7.g2b4501a-1, kernel 7.2.15-1-omarchy. Intel Core Ultra 5 225H, Arc 130T/140T iGPU (Arrow Lake-P). A single LG UltraFine on HDMI-A-1, 3840×2160@60, scale 1.5. Idle: screensaver 150 s, lock 300 s. One third-party shell plugin (a Superwhisper panel); the menu itself is stock and ~/.config/omarchy/extensions/omarchy-menu.jsonc has only comments.

Timeline (same shell PID throughout, started 10:49:42):

12:35:43.94  INFO qt.qpa.wayland: There are no outputs - creating placeholder screen
12:35:43.98  WARN: Layershell screen does not correspond to a real screen. Letting the compositor pick.   (x3)
12:35:44.75  INFO qt.qpa.wayland: There are no outputs - creating placeholder screen
12:35:44.81  WARN: attempted to use dangling screen object   (x15 or so)
12:35:44     WARN scene: QML ShellIpc ... Handler was registered but will not be used because another handler is registered for target omarchy.<x>   (52 lines)
12:35:45.26  WARN quickshell.hyprland.ipc: Got removal for monitor "FALLBACK" which was not previously tracked.
12:35:58     omarchy lock: unlocked

After unlock:

  • Super+Space does nothing. The binding is intact (hyprctl binds shows it, and the omarchy:menu.root global shortcut is registered).
  • omarchy-menu ping → ok. omarchy-menu toggle root and omarchy-shell shell summon omarchy.menu '{"menu":"root"}' both return ok.
  • No omarchy-menu layer appears on any output. hyprctl layers shows only omarchy-background, omarchy-bar, omarchy-dock and omarchy-notifications.
  • Other shell panels still open: omarchy-shell shell toggle omarchy.clock '{}' maps a layer as usual.
  • HDMI-A-1 is back and focused.

omarchy restart shell fixes it. Right after the restart, omarchy-menu toggle root maps the omarchy-menu layer.

So #14458 doesn't cover this case. onScreensChanged only remaps an overlay that was open when its output went away, and the menu was closed here. This looks more like the path described in the root-cause comment on #14371: the plugin tree is re-created against the placeholder screen, as the 52 duplicate-handler warnings show, and the menu instance that keeps the IPC target never gets to shown on the real output again. The shell logged There are no outputs 12 times this boot. I didn't check whether the menu broke after every one of them.

trung-cly avatar Nov 12 '26 05:11 trung-cly

@trung-cly, the November 12 recurrence means my earlier conclusion that this was fixed does not cover every case.

I checked current quattro at 419a5a7095d118a218d5f84548dbd83ce90067e6 on disposable Omarchy ISO workers. The stock menu reopened after twelve loss/restoration cycles of the only real output: three with the menu closed and three open at each of scale 1 and 3840×2160 / scale 1.5. Removing a second output that had hosted the menu also recovered in both cases. Each summon mapped a fullscreen menu on the overlay layer with the same shell PID. A further pair of scale-1.5 checks on a fresh worker recorded the closed menu's absent layer before removal, automatic recovery of an open menu, and successful close/reopen through toggle, again with the same PID. I inspected a screenshot showing the recovered menu's contents.

Both workers used Hyprland 0.57.2, Quickshell 0.3.2.r7.g2b4501a-11 and Qt 6.12.0. Your plugin configuration was not replicated, and the physical monitor's idle-lock sequence was not reproduced. Placeholder-screen and dangling-screen warnings also occurred during successful recovery, so those alone do not identify the remaining cause. The host menu Loader is separate from the per-output bar widgets; duplicate widget IPC warnings do not by themselves establish that the menu was duplicated. #14363 now adds tests only and does not claim to fix this newer report.

Please capture these while the menu is broken, before restarting the shell:

omarchy version
pacman -Q hyprland quickshell qt6-base qt6-declarative
omarchy menu ping
omarchy menu summon root
hyprctl -j monitors
hyprctl -j layers
omarchy-shell shell listPlugins
journalctl --user -t omarchy-shell --since '10 minutes ago' --no-pager

Also say whether omarchy osd -m test -d 5000 draws in that state: the clock uses a different window path. Then report whether omarchy menu close followed by omarchy menu summon root restores the menu. A separate run with the Superwhisper panel disabled, restarting the shell once before reproducing, would distinguish the stock failure from a plugin interaction.

To test the exact source used on the worker, clone a separate checkout and accept the reboot offered by dev link:

git clone --branch quattro --single-branch https://github.com/omacom/omarchy.git ~/omarchy-13882
git -C ~/omarchy-13882 checkout --detach 419a5a7095d118a218d5f84548dbd83ce90067e6
omarchy dev link ~/omarchy-13882

omarchy dev unlink and a reboot restore the packaged tree. Please include whether the failure persists at that commit. The issue remains open pending that evidence; no new fix has been established.

Checked by GPT-6 High in Codex, with Opus 5.5 High and muse-wonder via pi, thinking high, reviewing the source. Both found no established cause or justified fix for the recurrence; their independence is not guaranteed.

Worker: menu contents visible after output recovery at scale 1.5; this does not reproduce the physical idle-lock failure.

omarchybot avatar Nov 18 '26 04:11 omarchybot

I don't have a broken-menu capture yet. I'll run your list the next time it happens, before restarting the shell. Going back through the logs, I found a condition your workers may not have covered: the session was locked when the output dropped.

Shell crash, reproducible on demand

  1. Lock the session and wait for DPMS off.
  2. Turn the only monitor off with its power button, wait about 10 s, and turn it back on.
10:27:47  lock-requested
10:27:53  output HDMI-A-1 dpms off
10:28:02.11  qt.qpa.wayland: There are no outputs - creating placeholder screen
10:28:03.09  qt.qpa.wayland: There are no outputs - creating placeholder screen
10:28:04.89  quickshell.hyprland.ipc: Got removal for monitor "FALLBACK" which was not previously tracked.
10:28:05.08  WARN: The Wayland connection experienced a fatal error: Invalid argument
10:28:05.18  Omarchy shell exited with status 255; relaunching.
10:28:07.23  (new shell) lock-stranded: recovering → lock-requested
10:28:08.05  session-locked=true

The session stays locked throughout. Hyprland's lock-dead screen flashes for about 2 s between the crash and the re-lock. If I turn the monitor off and on while unlocked, the shell survives.

Every output loss on this boot

All seven drops have the same signature in the Hyprland log (Got a hotplug event → Connector HDMI-A-1 disconnected), including the ones I triggered by hand. "Gap" is the time from the last There are no outputs line to the FALLBACK removal.

Time Locked Gap Result
Nov 12 11:54 no 1.4 s survived
Nov 12 12:35 yes 0.5 s survived, menu dead afterwards (my earlier report)
Nov 12 13:30 yes 2.0 s exit 255, relaunched
Nov 13 12:39 yes 1.7 s exit 255, relaunched
Nov 13 13:31 yes 1.8 s exit 255, relaunched
Nov 16 08:45 yes 0.26 s survived, menu fine
Nov 19 10:07 no (manual) 1.5 s survived, menu fine
Nov 19 10:28 yes (manual) 1.8 s exit 255, relaunched

In every crash, the fatal error arrives 130–230 ms after the FALLBACK removal. In the locked runs that survived, the shell spends that same moment recreating the lock surface for the returned screen. The Nov 16 run logs Not creating lock surface for screen ... as it is not backed by a valid wayland output, then the WlSessionLockSurface::contentItem binding warnings. My guess is that the lock surface gets created against an output that is already gone, and the request fails to marshal. I can't confirm that: my Hyprland log contains only aquamarine lines, and libwayland logged no marshalling error.

How this relates to the dead menu

A crash hides the menu bug, because the relaunched shell is fresh. The one dead-menu case is a locked drop where the shell survived (short gap). The Nov 16 run is the same kind of event and the menu was fine, so the survive path breaks the menu only some of the time. Five locked drops is a small sample, so the gap threshold may be coincidence.

Corrections

  • In my earlier comment I said this was the only third-party plugin. That was true on Nov 12 at 12:35. A second plugin, claude-agents, was added at 15:44 that day, so it was loaded for every drop after that.
  • An idle wake alone doesn't cause the output loss. About 20 lock → DPMS off → wake cycles between Nov 13 and Nov 19 caused none. I don't know what made the monitor drop on Nov 12, 13 and 16. In the log those drops look the same as turning it off with the power button.

Versions (unchanged since the original report): omarchy 4.5.0-3, hyprland 0.56.2-4, quickshell 0.3.2.r7.g2b4501a-1, qt6-base 6.12.0-3, qt6-declarative 6.12.0-2, qt6-wayland 6.12.0-1, wayland 1.26.0-1. misc:allow_session_lock_restore = true.

trung-cly avatar Nov 19 '26 03:11 trung-cly

@trung-cly, this pass reproduced a missing menu on current quattro at d54cde78f174761803e4caa96c38006a3461d0d2, including after a locked output-loss cycle that the shell survived. It did not reproduce the exit-255 crash.

On the unmodified tree, the menu disappeared after an unlocked loss/restoration of the only output. Menu commands still returned ok, the shell PID stayed unchanged, and repeated close/summon did not map a menu surface. A compositor reload restored it. Three subsequent locked cycles preserved the shell and allowed password authentication. The first left the menu absent after one transient IPC timeout; the second began in that broken state and recovered it; the third also recovered. The tests explicitly woke the virtual output to let monitor removal apply. The fallback output was lit in the first two cases and asleep in the third, so these are not a reproduction of physical hotplug while DPMS remains off.

A later run with only read-only IPC diagnostics added on the worker established one cause of the missing menu:

  • Qt's screen list contained the restored Virtual-1, but Quickshell's Hyprland.monitors was empty and its focused monitor was null.
  • The compositor itself reported the restored output at 3840×2160, scale 1.5. OverlayWindow requires a matching targetMonitor, so it remained unmapped.
  • Hyprland.refreshMonitors() did not restore the list. hyprctl reload repopulated it, while also resetting the worker's runtime-only display mode to its configured 1280×800. After setting 3840×2160 / scale 1.5 again and closing/summoning the menu, it opened with the same shell PID.

That matches the condition targeted by #19341. The worker exercised the manual reload, not that PR's full head. The exact stale-response ordering described there was not traced in this run, and this does not establish the cause of your exit-255 crash. Quickshell already rejects placeholder screens before creating new lock surfaces. That does not establish that an existing surface survives output teardown, and the placeholder warnings alone do not identify the failed request.

The worker used Hyprland 0.57.2-2, Quickshell 0.3.2.r7.g2b4501a-11 and Qt 6.12.0, with a virtual GPU and no third-party plugins. Your Hyprland version and physical HDMI sequence remain unmatched. No product patch was made and no full suite was run.

On the next dead-menu occurrence, please collect the diagnostics from my previous comment before recovery. Then try hyprctl reload, followed by omarchy menu close and omarchy menu summon root, and say whether the menu returns without restarting the shell. For the exit-255 case, your existing logs do not identify the failed request; a client-side WAYLAND_DEBUG=client trace through output restoration could identify it. Such traces can record keystrokes: share only the relevant error/request excerpt, excluding keyboard events, rather than the raw trace. The issue remains open waiting for that evidence.

Checked by GPT-6 in Codex (effort setting not exposed), with the final evidence reviewed by Opus 5.5 High. An earlier source review also ran with Opus 5.5 High and muse-wonder via pi, thinking high; it did not include the later monitor-state capture. Opus identified the DPMS and mode-reset limits stated above. Reviewer independence is not guaranteed.

Before reload: the worker shows only the background where the summoned menu should be; captured in the instrumented diagnostic run.

After reload: the menu card is visible at the same resolution and scale, with the same shell PID; this demonstrates recovery, not a fix for the physical locked-output crash.

omarchybot avatar Nov 19 '26 03:11 omarchybot

I captured the WAYLAND_DEBUG=client trace for the exit-255 case: the locked, power-cycled monitor sequence from my last comment. It shows that Hyprland causes the crash. The crash is hyprwm/Hyprland#16385, and Hyprland 0.57.2 fixes it. That would explain why your 0.57.2 workers don't reproduce it.

Excerpt (keyboard and text-input traffic was filtered out before the trace was stored; timestamps UTC):

01.917055  wl_output#133.name("FALLBACK")
01.917117  wl_output#133.done()
01.991664   -> ext_session_lock_v1#46.get_lock_surface(new id ext_session_lock_surface_v1#141, wl_surface#138, wl_output#133)
02.268795   -> wl_registry#2.bind(73, "wl_output", 4, new id [unknown]#150)
02.268898  wl_registry#2.global_remove(72)                ; FALLBACK gone
02.421617   -> wl_output#133.release()
02.555499  wl_output#150.name("HDMI-A-1")
02.628541   -> ext_session_lock_v1#46.get_lock_surface(new id ext_session_lock_surface_v1#101, wl_surface#91, wl_output#150)
03.664486   -> ext_session_lock_surface_v1#141.destroy()
03.682869  wl_display#1.error(wl_display#1, 0, "invalid object 141")
WARN: The Wayland connection experienced a fatal error: Invalid argument

The shell asks for a lock surface on FALLBACK. By the time Hyprland handles the request, FALLBACK is already gone. Hyprland never creates the object, so the shell never receives a configure for #141. When the shell later destroys its unused lock surface, Hyprland answers invalid_object and the connection dies. This is the onGetLockSurface early return described in hyprwm/Hyprland#16385. That issue was auto-closed because Hyprland no longer accepts user-opened issues. The fix landed as hyprwm/Hyprland#16784 ("protocols/session-lock: fix removed output causing a protocol error"). v0.57.2 now creates the resource even when the monitor is gone. v0.56.2 doesn't, and Omarchy 4.5.0-3 still ships hyprland 0.56.2-4.

So the exit-255 crash and the lock-dead flash should go away once Omarchy moves to Hyprland ≥ 0.57.2. Nothing in the shell needs to change for that part. The dead menu is a separate problem, and #19341 looks like the right fit for it. On my next dead-menu occurrence I'll collect your diagnostics and try hyprctl reload before restarting the shell.

trung-cly avatar Nov 19 '26 09:11 trung-cly

The trace closely matches the removed-monitor lock-surface defect addressed by hyprwm/Hyprland#16784. I checked both release sources: v0.56.2 returns before creating the resource when its monitor has gone; v0.57.2 creates an inert, destroyable resource for that case. The client trace does not prove which server return path ran, and other silent returns remain. This supports the upstream explanation without establishing that the crash or lock-dead flash is eliminated on your machine.

At this check, the configured x86_64 stable extra mirror still lists hyprland 0.56.2-4, with no overriding hyprland package in Omarchy stable. The newer package recipe does not establish delivery. The crash retest therefore depends on a build containing that correction reaching your channel; once available, repeating the locked power-cycle several times and reporting the running hyprctl version and outcome would test it.

The missing-menu failure remains open: it also occurred on the earlier 0.57.2 worker, and #19341 remains an unverified candidate. Your planned diagnostics before restarting the shell, followed by the reload recovery check, are still the next evidence needed for that failure. This follow-up checked your new trace, the upstream diff and release sources, stable package metadata, and #19341's status; it ran no new runtime tests and verified no fix.

Codex High reviewed this follow-up with Opus 5.5 High and muse-wonder via pi, thinking high. Both second opinions agreed with the bounded source explanation; Opus also noted that the newer package's output-lifetime patch prevents attributing the earlier workers' non-reproduction solely to #16784. Reviewer independence is not guaranteed.

omarchybot avatar Nov 19 '26 10:11 omarchybot