trayscale icon indicating copy to clipboard operation
trayscale copied to clipboard

Tray icon disappears

Open smeyernyc opened this issue 5 months ago • 7 comments

When I initially open Trayscale, the application shows fine with no tray icon. I can close it and still no icon. If I reopen and then toggle the "tray icon" twice, then it stays. Mint 22.2 cinnamon

smeyernyc avatar Sep 26 '25 16:09 smeyernyc

https://github.com/DeedleFake/trayscale/issues/246#issuecomment-3263714632 The comment on this closed issue was able to help me get the icon to show back up.

armchair45 avatar Sep 27 '25 16:09 armchair45

#246 (comment) The comment on this closed issue was able to help me get the icon to show back up.

That does not work for Mint 22.2

Spectroxx avatar Oct 07 '25 13:10 Spectroxx

Output of : TRAY_DEBUG=1 flatpak run dev.deedles.Trayscale on Mint 22.2 cinnamon

2025/10/07 09:41:27 WARN request name failed TRAY_DEBUG=1 name=org.freedesktop.StatusNotifierItem-2-1 reply=0 err=org.freedesktop.DBus.Error.ServiceUnknown
2025/10/07 09:41:27 INFO names acquired TRAY_DEBUG=1 registered=:1.220 available="[:1.220 :1.220]"
2025/10/07 09:41:27 WARN dbus call failed TRAY_DEBUG=1 destination=org.freedesktop.StatusNotifierWatcher path=/StatusNotifierWatcher method=org.freedesktop.StatusNotifierWatcher.RegisterStatusNotifierItem args=[:1.220] err="The name org.freedesktop.StatusNotifierWatcher was not provided by any .service files"

** (process:19545): WARNING **: 09:41:27.381: Invalid client serial
2025/10/07 09:41:27 ERROR g_application_send_notification: assertion 'g_application_get_is_registered (application)' failed glib_old_log_api=1 priority=4 glib_domain=GLib-GIO

Spectroxx avatar Oct 07 '25 13:10 Spectroxx

I'm also running Mint 22.2 Cinnamon. I get the following output when running trayscale with TRAY_DEBUG=1

2025/10/08 09:08:45 WARN request name failed TRAY_DEBUG=1 name=org.freedesktop.StatusNotifierItem-2-1 reply=0 err=org.freedesktop.DBus.Error.ServiceUnknown
2025/10/08 09:08:45 INFO names acquired TRAY_DEBUG=1 registered=:1.141 available="[:1.141 :1.141]"
2025/10/08 09:08:45 WARN dbus call failed TRAY_DEBUG=1 destination=org.freedesktop.StatusNotifierWatcher path=/StatusNotifierWatcher method=org.freedesktop.StatusNotifierWatcher.RegisterStatusNotifierItem args=[:1.141] err="The name org.freedesktop.StatusNotifierWatcher was not provided by any .service files"

** (process:3520): WARNING **: 09:08:45.219: Invalid client serial
2025/10/08 09:08:45 ERROR g_application_send_notification: assertion 'g_application_get_is_registered (application)' failed glib_old_log_api=1 priority=4 glib_domain=GLib-GIO

And this from ~/.xsession-errors

Window manager warning: Buggy client sent a _NET_ACTIVE_WINDOW message with a timestamp of 0 for 0x2c0004c
Gjs-Message: 09:13:23.865: JS LOG: [LookingGlass/info] Adding XAppStatusIcon:  (:1.50/org/x/StatusIcon/Icon_4)
Gjs-Message: 09:13:23.921: JS LOG: [LookingGlass/info] Removing XAppStatusIcon: trayscale (:1.50/org/x/StatusIcon/Icon_4)

Airman8 avatar Oct 08 '25 01:10 Airman8

Same issue with missing icon on linux mint. When i go in Trayscale settings, disable the tray icon, then reenable it, it quickly shows up at in the tray (with a broken / missing connection? icon) and dissappear.

Doublemyst avatar Nov 08 '25 09:11 Doublemyst

I've installed Mint 22 in a VM to experiment with this and have been able to reproduce this problem. Weirdly, it seems to just work, at least temporarily, every once in a while for seemingly no reason.

From what I've been able to tell from some research based on some stuff I saw in the D-Bus traffic, Linux Mint's system tray implementation is quite weird. They apparently used to have their own version of the protocol that worked a bit differently from the one that most other desktop environments now use. When they wanted to add support for the newer protocol, they added a little background program called xapp-sn-watcher that proxied attempts to use the new protocol into the old implementation, translating as it did so. However, this implementation seems to be quite buggy and has had weird memory leak issues, crashes, and all sorts of problems over the years, and is also known for being randomly incompatible with Flatpak from what I can tell.

So, for now, the only real solution if you're on Mint seems to just be to allow Trayscale to have full session bus access, either via --socket=session-bus when using flatpak run or by turning on the session bus option in Flatseal to make it a bit more permanent.

The problem is probably related to linuxmint/xapp#136.

DeedleFake avatar Nov 18 '25 03:11 DeedleFake

This issue is present on Pop_OS! 22.04 LTS as well.

clayauld avatar Nov 21 '25 18:11 clayauld

Using what system tray host, @clayauld? The usual GNOME extension one? There are several GNOME system tray extensions and some of them don't support the protocol that Trayscale uses. Tray Icons: Reloaded, for example, is another popular one but it only supports the legacy X11 protocol, not the newer D-Bus one that's necessary to work on Wayland without XWayland. Trayscale only supports the new protocol, not the X11 one.

DeedleFake avatar Nov 24 '25 02:11 DeedleFake

I was able to figure it out and get it to work by allowing dbus permissions in Flatseal. On Nov 23, 2025 at 5:30 PM -0900, DeedleFake @.***>, wrote:

DeedleFake left a comment (DeedleFake/trayscale#256) Using what system tray host, @clayauld? The usual GNOME extension one? There are several GNOME system tray extensions and some of them don't support the protocol that Trayscale uses. Tray Icons: Reloaded, for example, is another popular one but it only supports the legacy X11 protocol, not the newer D-Bus one that's necessary to work on Wayland without XWayland. Trayscale only supports the new protocol, not the X11 one. — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>

clayauld avatar Nov 24 '25 03:11 clayauld

Can confirm that if installed as flatpak, allowing access to dbus session bus with flatseal resolves this

daniel-osborne avatar Nov 25 '25 15:11 daniel-osborne

After staring at far, far too many D-Bus logs, the only thing I've been able to figure out is that Pop!_OS 22.04 uses GNOME 42 and the extension is version 53, whereas my desktop where everything works fine is running GNOME 49 and the extension is version 61. It is definitely possible that this is an old bug that was fixed in newer versions, though what that bug was and why other apps work fine I don't know.

As an extra piece of info, I installed GNOME OS Nightly in a VM and installed the StatusNotifierHost extension and Trayscale to see what would happen on a brand new installation of newer versions, and it worked perfectly fine.

The next LTS version of Ubuntu is apparently going to upgrade to GNOME 50, so maybe that'll fix it.

Edit: For reference, here are all the changes between the old version of the extension and the latest one. There are a lot that are obviously not related to the problem, especially anything that was just updating for breaking changes in newer GNOME Shell versions, but there are plenty of other changes that might have fixed it.

DeedleFake avatar Nov 26 '25 20:11 DeedleFake

Never mind. I think I found the actual problem. It is a version issue, but not of the extension. It's https://github.com/flatpak/xdg-dbus-proxy/issues/46#issuecomment-2019073783. It was fixed in v0.1.6, but Ubuntu LTS and various things based on it like Pop!_OS and Mint are still on v0.1.3.

Unfortunately, this doesn't seem really fixable from my end without some way of guaranteeing that queued messages from different threads are always sent in the order that they're generated internally in godbus, but it doesn't seem to be possible.

Well, until v0.1.6 is available on Ubuntu, I guess the only real workaround is --socket=session-bus.

Thanks for all the info from various systems. Since this isn't actually fixable by my end as far as I'm aware, I'm going to close this.

DeedleFake avatar Nov 26 '25 21:11 DeedleFake