Launch OSD ("Launching <app>…") can get permanently stuck on screen
Launch OSD ("Launching …") can get permanently stuck on screen
What happened
After launching an app from the Omarchy menu, the persistent "Launching omarchy-osd layer-shell surface remained up (visible card, duration: 0),
and omarchy-shell osd close was required to dismiss it manually.
What was expected
The launch OSD should always clear — either when the launched window appears, or via the 15s timeout fallback — with no path that leaves it stranded.
Where it comes from
shell/services/AppLibrary.qml:
beginLaunchFeedback(name)startslaunchDelay(2000 ms) andlaunchTimeout(15000 ms).launchDelay.onTriggeredsetslaunchOsdOpen = trueand callsQuickshell.execDetached(["omarchy-shell", "osd", "show", {icon, message, duration: 0}]).closeLaunchFeedback()callsQuickshell.execDetached(["omarchy-shell", "osd", "close"]).
shell/plugins/osd/Osd.qml: show() with duration <= 0 calls
hideTimer.stop() and leaves opened = true until an explicit close().
There is no self-heal / no max lifetime for a duration: 0 OSD.
Root cause (two compounding issues)
-
Show/close race.
showandcloseare dispatched as two separate detachedomarchy-shellprocesses. Each then makes its ownqs ipc callto the shell. Delivery order is decided by process scheduling, not by the order the QML issued them. When a toplevel appears in roughly the same tick the 2slaunchDelayfires,closeLaunchFeedback()runs right afterlaunchDelay.onTriggered, so acloseIPC can reach the shell before theshowIPC. Net result:openedends uptruewith no timer, forever. -
Single-shot backstop with no retry. For a launch that never produces a detectable new/active toplevel (app already running and merely refocused so
ToplevelManager.toplevelscount andactiveToplevelare unchanged, a background/agent app, or a failed launch), the only thing that clears the OSD is the one-shotlaunchTimeout→ singlecloseLaunchFeedback(). If that lone detachedclosefails to land (shell busy past the 2sOMARCHY_SHELL_IPC_TIMEOUT, transient error), nothing ever retries and the OSD is stranded.
Steps to reproduce
Exact timing is racy, but the shape:
- From the Omarchy menu, launch an app whose window takes ~2s to map, or an app that is already open and just gets refocused without changing the toplevel set.
- Observe the "Launching …" OSD appear at the 2s mark.
- Intermittently: the OSD does not clear after the window is up and does not
clear after 15s. It stays until
omarchy-shell osd close/omarchy restart shell.
Suggested fixes
- Have
Osd.show()enforce a hard maximum lifetime even forduration <= 0(e.g. a separate long guard timer, ~30–60s), so no OSD can outlive its purpose. - Make the launch feedback converge on shell state rather than fire-and-forget:
issue
show/closethrough a single serialized path (one IPC target method that owns the launch-OSD lifecycle), or re-issuecloseon a short repeating timer untilosd statereportsclosed. - In
maybeFinishLaunchFeedback()/launchTimeout, always sendcloseunconditionally on timeout (drop theif (root.launchOsdOpen)guard for the timeout path) and verify via theosd stateIPC.
System details
- Omarchy: 4.0.1-1
- Kernel: 7.1.9-arch1-2
- Hyprland: 0.56.2 (v0.56.2, efb5099)
- Quickshell: 0.3.1 (Arch)
- CPU: Intel Core i3-2350M
- GPU: Intel 2nd Gen Core integrated graphics [8086:0116] (Sandy Bridge)
Checked this against quattro (0b3f1b7e) and against the two open PRs that touch it.
Both of your root causes hold up in source, but they are not equally established. The race is: closeLaunchFeedback() dispatches omarchy-shell osd close at shell/services/AppLibrary.qml:174 and launchDelay.onTriggered dispatches the duration-0 osd show at shell/services/AppLibrary.qml:245, as two separate detached processes, so delivery order is decided by process scheduling rather than by the order QML issued them. Osd.show() stops hideTimer when duration is non-positive (shell/plugins/osd/Osd.qml:69) and close() only clears opened (:80), so an inverted delivery leaves the card open with nothing left to close it. Your second root cause is a genuinely different failure mode rather than the same one restated — but the 15s launchTimeout does fire an unconditional close in the refocus case, so stranding there needs that detached close to actually be lost, which bin/omarchy-shell:58 makes possible (2s default IPC timeout, no retry, and execDetached never sees the result). That path is plausible from the source and has not been demonstrated; the race has been, by you and by two reporters on #8242.
PR #8890 is open against this issue and cites it. It adds a 30s maxLifetimeTimer for duration-0 OSDs in Osd.qml, and that part works: on a disposable Omarchy VM a duration-0 card was observed open until t=31s and then closed, and a newer OSD correctly cancels the cap. With that PR merged, a stuck launch card can no longer outlive 30s.
What it does not do is fix the race. The show and the close are still two separate detached processes at the same two call sites, so an inverted ordering still happens — the card is bounded at 30s rather than prevented, and for those 30s it still looks stuck. The PR also drops the if (root.launchOsdOpen) guard so osd close fires unconditionally. Because maybeFinishLaunchFeedback() only early-returns when neither timer is running (AppLibrary.qml:180), that sends a close on every launch whose window maps inside the 2s launchDelay, and the OSD is a single shared card: omarchy.osd is what the volume, brightness and media paths all summon (shell/plugins/panels/audio/Panel.qml:435, shell/plugins/panels/monitor/Panel.qml:258, shell/plugins/services/media/Service.qml:248). So that close dismisses whatever card happens to be on screen at the time. This was reproduced by mutation on the same VM.
The repo already has a route with no second process to reorder against: shell.callIfLoaded("omarchy.osd", ...) (shell/shell.qml:567), the in-process call those three siblings reach through summon. Closing the launch OSD that way removes the reordering rather than capping its consequence.
Your second root cause is separately targeted by open PR #8570, which also edits AppLibrary.qml and test/shell.d/app-search-test.sh and will likely conflict with #8890.
On duplicates: #8242 reports the same show/close race, filed three days earlier, with a 100-iteration reproduction (53 stranded of 100) and an independent confirmation on different hardware. Your root cause 1 and that issue are the same defect; your report additionally raises the lost-close path, which #8242 does not discuss. They should be linked, but which number stays open is the maintainer's to decide.
Next: this is waiting on the maintainer to choose between the 30s cap in #8890 and closing the launch OSD in-process. Nothing is needed from you.
Diagnosed by Opus 5 in Claude Code with a second opinion from Codex at xhigh reasoning. Codex confirmed the mechanism and the shared-OSD side effect against the same source, and corrected the characterisation of your second root cause from an established defect to a reported-but-undemonstrated path, which is how it is described above.
A few technical observations regarding why this is timing-dependent and how to reproduce it:
- Warm vs. Cold Start:
- In
AppLibrary.qml, there is a 2000 mslaunchDelaytimer. - When launching Bitwarden with a warm disk cache (< 2.0s), the OSD is never shown at all.
- On a cold launch (e.g. after
killall bitwardenor under system load) where startup takes > 2.0s, the"Launching Bitwarden…"OSD appears withduration: 0.
- In
- Stuck Layer-Surface OSD:
- Once displayed,
maybeFinishLaunchFeedback()does not reliably catch the new toplevel window for Bitwarden / Electron (especially when restoring from tray or single-instance handoff). - Because the OSD is spawned with
duration: 0and rendered as a Wayland layer-shell surface, it stays stuck across all virtual workspaces indefinitely until a manual shell restart oromarchy-shell osd close. Enforcing a non-zero fallback duration (e.g.duration: 3500ms) on the launch OSD or ensuring unconditional dismissal on timeout would prevent the OSD layer from getting permanently stranded.
- Once displayed,
Can confirm — hit this exact issue on Omarchy 4.0.2-1 (Hyprland, Nautilus 50.2.2). The toast stayed
stuck for several minutes past the 15s failsafe. Manually running omarchy-shell osd close closed
it immediately, confirming the OSD backend itself is fine — it's the timeout/close dispatch that's
unreliable, matching what's described here.
Automated duplication check: this issue looks similar to #8242, which covers the same stuck Launching OSD from IPC race. I keep that one open and close this one to keep the discussion in one place.
If you feel this is the wrong decision, please open the issue again with a note on the difference.
Additional reproduction on a windowless app: Caffeine (/usr/bin/caffeine, AUR
caffeine 2.10.1).
Observed:
- Launcher shows
Launching Caffeine…and the OSD can remain indefinitely. - The app does launch successfully:
pgrep -af /usr/bin/caffeineshows a live PID inapp-Hyprland-gtk\x2dlaunch-*.scope(ActiveState=active SubState=running), journal hasuwsm_app-daemon: received: app -- gtk-launch caffeine.desktopwith no failed units. - No window appears because
caffeine.pyis a headless daemon: it buildsCaffeine(EWMH())+Gtk.main()with noGtk.Windowand no status icon.
Why the heuristic can't succeed here (AppLibrary.qml):
maybeFinishLaunchFeedback()clears the OSD only ontoplevelCount()growth orToplevelManager.activeToplevelchange. A windowless app never produces either.- The
launchTimeout(15 s) backstop callscloseLaunchFeedback()exactly once, guarded bylaunchOsdOpen, with no retry — so the show/close IPC race described in this issue strands theduration: 0OSD permanently instead of self-healing.
Suggestion: for .desktop entries whose app is expected to be windowless
(NoDisplay/TrayIcon/no mapped toplevel), key launch feedback off the process/scope
existing (e.g. the transient app-…-gtk\x2dlaunch-*.scope reaching running and then
exiting/staying alive) rather than toplevel arrival, and make the 15 s close retry-safe.
Happy to provide journal excerpts or test a patched AppLibrary.qml.
Confirmed as well on
OS: Omarchy 4.0.6-1 ├: stable ├: Linux 7.2.5-3-omarchy ├: Hyprland 0.56.2 (Wayland) ├: foot 1.28.0 ├: 986 (pacman) ├: Tokyo Night ●●●●●●●● └: JetBrainsMono Nerd Font (9pt)
I do believe a max delay could prevent this in case the application fails to notify the service.