Skip to content

Tray icon of an already-running app disappears (and never returns) after omarchy-shell restarts #12214

Description

@IgnisNatura

What happened

An app with a system-tray icon (StatusNotifierItem) was already running when
omarchy-shell restarted (in my case, triggered by an IPC request — I see
omarchy-shell[1135]: INFO: Exiting due to IPC request. in the journal,
likely from a theme/plugin reload). After the new shell process came up, the
app's tray icon never appeared again in the omarchy.tray drawer, even
though the app kept running normally in the background.

I confirmed the mechanism directly over D-Bus: the app still owned its
StatusNotifierItem service name, but the new watcher's registered-item list
was empty:

$ busctl --user get-property org.kde.StatusNotifierWatcher \
    /StatusNotifierWatcher org.kde.StatusNotifierWatcher \
    RegisteredStatusNotifierItems
as 0

Killing and relaunching the affected app made it re-register and its icon
reappeared immediately:

$ busctl --user get-property org.kde.StatusNotifierWatcher \
    /StatusNotifierWatcher org.kde.StatusNotifierWatcher \
    RegisteredStatusNotifierItems
as 1 "org.kde.StatusNotifierItem-<app>-<pid>/StatusNotifierItem"

Why

The StatusNotifierItem protocol only has clients call
RegisterStatusNotifierItem once, at their own startup. It has no mechanism
for a client to notice the watcher itself was replaced and re-register on
its own. So any time omarchy-shell's StatusNotifierWatcher restarts while a
tray app is already running, that app's icon is silently dropped until the
app itself is restarted — the shell has no way to know it's missing an icon
it should have.

Expected

The tray watcher could proactively recover already-running items after its
own restart — e.g. by enumerating current D-Bus names matching
org.kde.StatusNotifierItem-* (or org.freedesktop.StatusNotifierItem-*)
on startup and querying them directly, rather than relying solely on them
calling RegisterStatusNotifierItem again.

Steps to reproduce

  1. Launch any app that registers a tray icon (I used ProtonVPN's GTK app,
    proton-vpn-gtk-app).
  2. Confirm its icon shows in the omarchy.tray drawer.
  3. Restart omarchy-shell (e.g. omarchy-shell shell rescanPlugins, a theme
    switch, or any other action that sends the shell an IPC restart request)
    without closing the app.
  4. Hover the tray drawer again — the icon is gone. The app is still running
    and its VPN/whatever functionality is unaffected; only the tray
    registration is lost.

System

  • omarchy 4.0.3-1
  • quickshell 0.3.1-1
  • Hyprland, Arch Linux

Related

Possibly the same underlying StatusNotifierWatcher-lifecycle-across-restart
root cause as #7957 ("Restarting Omarchy Shell reopens tray-resident
Spotify and steals focus"), but the opposite symptom: there, Spotify's item
survives the restart and the shell re-focuses its window; here, the item is
dropped entirely and needs the app itself relaunched to reappear.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions