Bug 505134 - Most tray icons for running applications not shown at all
Summary: Most tray icons for running applications not shown at all
Status: RESOLVED NOT A BUG
Alias: None
Product: plasmashell
Classification: Plasma
Component: System Tray widget (other bugs)
Version First Reported In: 6.4.80
Platform: Solus Linux
: HI normal
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords: regression
Depends on:
Blocks:
 
Reported: 2025-06-02 18:26 UTC by TraceyC
Modified: 2025-06-09 22:40 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description TraceyC 2025-06-02 18:26:19 UTC
SUMMARY
Some of the programs that should have icons in the system tray do not
I found this while testing bug 499892. The behavior was also reported by another person.

Setup:
Have at least one of the following installed and, optionally, add to the auto start programs through the app or system settings: KeepassXC, Nextcloud, Yakuake, Discord, Nheko

I have those as well as Syncthing-GTK in autostart.
Non-auto start apps that should show a try icon include Nheko and Discord

STEPS TO REPRODUCE
1. Boot the system
2. Start a non-auto start app that has a tray icon

OBSERVED RESULT
Not all application tray icons are present in the system tray

Shown after boot: Syncthing-GTK
Missing on startup: KeepassXC, Nextcloud, Yakuake
Also, after launching Nheko or Discord, the icon is not in the system tray

EXPECTED RESULT
There are icons for all 4 autostart programs in the system tray, as well as Nheko and any other running apps with a tray icon

SOFTWARE/OS VERSIONS
Operating System: Solus 4.7
KDE Plasma Version: 6.4.80
KDE Frameworks Version: 6.15.0
Qt Version: 6.8.3
Kernel Version: 6.14.6-319.current (64-bit)
Graphics Platform: Wayland

ADDITIONAL INFORMATION
This bug didn't exist in 6.3.80

If I expand the system tray using the chevron, and then start Discord, its icon will appear in the tray. This doesn't work for Nheko, its icon is still not shown.

===This is the info from the other user in bug 499892===
 Leia 2025-05-31 13:06:51 UTC

I can also reproduce this issue, its been annoying me for a while (i think it started happening about 3 - 4 weeks ago after a fresh build of master)

and its not just autostart applications for me, tray icon for any application i open after a fresh boot will be missing, i did find an interesting thing: if i click on the system tray right side arrow to expand it, then open the applications, the tray icons will load properly!

example: 
fresh boot, open discord, discord tray icon missing
fresh boot, expand system tray, open discord, discord tray icon shows up

system info:
Operating System: Arch Linux 
KDE Plasma Version: 6.4.80
KDE Frameworks Version: 6.15.0
Qt Version: 6.9.0
Comment 1 TraceyC 2025-06-02 19:46:35 UTC
.
Comment 2 cwo 2025-06-02 23:16:06 UTC
I can sort of reproduce.

No auto-started SNIs appear in the tray, ever.

Apps launched after system startup show their tray icons as expected. I don't think expanding the tray matters, but I'll try it again. Disabling then enabling the icon again in settings also gets them to show up

Tested with KeepassXC, Yakuake,  Nheko, and Neochat. (I don't have the other apps).

System log shows messages like:

Jun 02 23:42:07 X260 keepassxc[2047]: kf.notifications: env says KDE is running but SNI unavailable -- check KDE_FULL_SESSION and XDG_CUR>
Jun 02 23:41:33 X260 xwaylandvideobridge[2029]: kf.statusnotifieritem: KDE platform plugin is loaded but SNI unavailable
Jun 02 23:41:32 X260 yakuake[2043]: kf.statusnotifieritem: KDE platform plugin is loaded but SNI unavailable


This seems relevant - maybe something is delaying StatusNotifierWatcher startup until after the autostarted apps launch?

There doesn't seem to be any code change in the systemtray applet since 6.3.80, and StatusNotifierWatcher even longer.

In any case, this is very noticeable (for people who use app tray icons) so it seems HI priority material.
Comment 3 cwo 2025-06-03 09:42:33 UTC
More digging. nheko seems to work for me even in autostart, but it opens as the last one so whatever it is that breaks early on might have already fixed itself at that point.

The problem is that for autostarted apps, the dbus registration with the StatusNotifierWatcher fails, early on - the dbus call to get the protocol version times out. On the KStatusNotifierWatcher that's just a "return 0;" so not something that can time out itself, so it seems to be dbus calls in general that break. I did put some debug output into it, and it's loaded and running when the apps try to access it, that does not seem to be the problem.

DBus breaking would also explain some of the other weird messages (and completely non-functional akonadi) that I got since yesterday. (The system was up for a few days before that, and worked perfectly with regard to that, so it must be a recent regression within the last week or so... could of course also be a different cause).

At this point I'm stumped on how to debug it further.

Also, the autostarted KDE apps are the system versions and not the kde/usr versions, but I'm not sure if that's related - it also breaks for things where I only have the distro version. They're also loaded very early, the autostarted NeoChat doesn't use my accent color for some reason, and sometimes (not always though) KeepassXC fails to be in dark mode at all.
Comment 4 David Edmundson 2025-06-03 17:42:38 UTC
>and its not just autostart applications for me, tray icon for any application i open after a fresh boot will be missing


When you're in this state can you run:
pgrep kded6
qdbus org.kde.StatusNotifierWatcher /StatusNotifierWatcher org.kde.StatusNotifierWatcher.IsStatusNotifierHostRegistered
Comment 5 TraceyC 2025-06-03 18:54:12 UTC
(In reply to David Edmundson from comment #4)

 ~ pgrep kded6 
1229

 ~ qdbus org.kde.StatusNotifierWatcher /StatusNotifierWatcher org.kde.StatusNotifierWatcher.IsStatusNotifierHostRegistered
true
Comment 6 cwo 2025-06-03 19:10:09 UTC
Do the ones that fail to show appear when you disable and enable the tray icon in their settings dialogs? I don't know about Discord but in nheko you can toggle it.
Comment 7 TraceyC 2025-06-03 21:53:12 UTC
(In reply to cwo from comment #6)
> Do the ones that fail to show appear when you disable and enable the tray
> icon in their settings dialogs?

Yes. I tested with KeepassXC, Nheko and Yakuake.
Comment 8 cwo 2025-06-06 13:40:20 UTC
I deleted ~/kde/usr and rebuilt everything (left kde/build in place though) and that seems to have fixed the issue for me (and akonadi also works again).
Comment 9 TraceyC 2025-06-09 22:35:03 UTC
(In reply to cwo from comment #8)
> I deleted ~/kde/usr and rebuilt everything (left kde/build in place though)
> and that seems to have fixed the issue for me (and akonadi also works again).

This fixed the issue for me as well
Comment 10 Nate Graham 2025-06-09 22:40:28 UTC
Seems like this was caused by stale installed files. It's a good idea to clean out ~/kde/usr at least monthly (if not more frequently; I do it weekly). to prevent build gremlins like these from showing up.