Bug 419305 - Have transparent icons in systray
Summary: Have transparent icons in systray
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: System Tray widget (show other bugs)
Version: 5.18.3
Platform: Manjaro Linux
: NOR minor
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords:
: 418460 420907 (view as bug list)
Depends on:
Blocks:
 
Reported: 2020-03-27 17:48 UTC by agentxlax
Modified: 2020-07-01 05:09 UTC (History)
9 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description agentxlax 2020-03-27 17:48:55 UTC
Running Plasma 5.18.3 on Manjaro KDE 19.0.2 testing build and have transparent systray icons. In my case qBittorrent and Night Color. Links below to threads about this.

https://forum.kde.org/viewtopic.php?f=289&t=165212

https://forum.manjaro.org/t/alien-systray-icons-are-not-rendered-in-kde-systray/131571/7
Comment 1 Myriam Schweingruber 2020-03-27 17:56:10 UTC
maybe a screenshot could be helpful? Corrected the version this was reported against.
Comment 2 agentxlax 2020-03-27 19:15:34 UTC
OK here you go. On the top row og icons in the systray you will see 2 spaces, they actually are qBittorrent and Night Color. There is also a really faint on that is GWE or Green With Envy.

https://i.imgur.com/8xIaB0K.png
Comment 3 Myriam Schweingruber 2020-04-01 11:00:29 UTC
In other words, not native Plasma or KDE applications? Since I don't have those installed, I can hardly reproduce this, and I am not going to install external applications just to test this.

If this problem is specific to non-KDE applications, maybe there is something wrong in the Plasma API use of these applications.
Comment 4 agentxlax 2020-04-01 13:12:43 UTC
We both know that no matter what the program is in the systray it should be showing it's icon. The theme that seems to be causing the issue is "Gently" which is a KDE / Plasma theme.
Comment 5 David Redondo 2020-04-01 13:31:05 UTC
Does it still happen with the newly released 5.18.4? Also curious if it happens on master still as that has some changes to the systemstray backend that are not in 5.18.
Comment 6 agentxlax 2020-04-01 13:36:44 UTC
Yes it's still in the 5.18.4
Comment 7 David Redondo 2020-04-01 13:45:55 UTC
Am I reading you correct that it only happens with a specific plasma theme? Intuitively I would think that the problem as described should be independent from the plasma theme.
Comment 8 agentxlax 2020-04-01 14:25:47 UTC
Ok let me try to clear this up a bit. Was running Gently with all icons showing. then qBitorrent and Night Color icons went transparent after updates from Manjaro that included updates to Plasma.Gently has not had an update since I first installed it. So in a nutshell the bug is either something in Plasma that's not playing nice with Manjaro or the Gently theme, or Something something in the particular Manjaro updates. I do not know who cause the bug and just trying to narrow down who's responsible so maybe it can be properly addressed. Not trying to place blame cause things are going to break from time to time no matter the software or OS.
Comment 9 David Redondo 2020-04-01 16:10:49 UTC
Is it this one https://store.kde.org/p/1293160/ ? I can see a qbittorent icon with that theme applied.
Do you have the qbittorent icon on your system? For me they are inside /usr/share/icons/hicolor/$(size)/status. You are looking for files named "qbittorrent-tray" because that is the icon it sets to display in the system tray
Comment 10 David Redondo 2020-04-01 16:13:53 UTC
Also can you please test with another plasma theme? The icon is actually installed by the application (as you can see from the path) so should work in any plasma theme. I would be curious how a plasma theme can break that
Comment 11 agentxlax 2020-04-01 17:57:47 UTC
(In reply to David Redondo from comment #9)
> Is it this one https://store.kde.org/p/1293160/ ? I can see a qbittorent
> icon with that theme applied.
> Do you have the qbittorent icon on your system? For me they are inside
> /usr/share/icons/hicolor/$(size)/status. You are looking for files named
> "qbittorrent-tray" because that is the icon it sets to display in the system
> tray

yes if i switch theremes i see all the icons,but i could see all of the icons before plasma 5.18.3. so yes the icon is there and it is in use.
Comment 12 Avathar 2020-04-14 06:51:16 UTC
I have the same issue. Sometimes the icons are missing, sometimes not. However it is not consistent.

What i observed is, if it does not work, after starting an application with a system tray icon, i get several of the following errors in the journal log:
14.04.20 08:50	kded5	Registering ":1.106/StatusNotifierItem" to system tray
14.04.20 08:50	plasmashell	QQuickItem::stackAfter: Cannot stack StatusNotifierItem_QMLTYPE_425(0x55abedbd75e0, parent=0x55abeba98c50, geometry=0,0 0x0) after StatusNotifierItem_QMLTYPE_425(0x55abed8eb720), which must be a sibling
14.04.20 08:50	plasmashell	file:///usr/share/plasma/plasmoids/org.kde.plasma.private.systemtray/contents/ui/items/StatusNotifierItem.qml: ReferenceError: Icon is not defined
14.04.20 08:50	plasmashell	file:///usr/share/plasma/plasmoids/org.kde.plasma.private.systemtray/contents/ui/items/StatusNotifierItem.qml:51: ReferenceError: Icon is not defined
14.04.20 08:50	plasmashell	file:///usr/share/plasma/plasmoids/org.kde.plasma.private.systemtray/contents/ui/items/StatusNotifierItem.qml: ReferenceError: Icon is not defined
14.04.20 08:50	plasmashell	file:///usr/share/plasma/plasmoids/org.kde.plasma.private.systemtray/contents/ui/items/StatusNotifierItem.qml: ReferenceError: Icon is not defined
14.04.20 08:50	plasmashell	file:///usr/share/plasma/plasmoids/org.kde.plasma.private.systemtray/contents/ui/items/StatusNotifierItem.qml: ReferenceError: Icon is not defined
14.04.20 08:50	plasmashell	file:///usr/share/plasma/plasmoids/org.kde.plasma.private.systemtray/contents/ui/items/StatusNotifierItem.qml: ReferenceError: Icon is not defined
14.04.20 08:50	plasmashell	file:///usr/share/plasma/plasmoids/org.kde.plasma.private.systemtray/contents/ui/items/StatusNotifierItem.qml: ReferenceError: Icon is not defined
14.04.20 08:50	plasmashell	file:///usr/share/plasma/plasmoids/org.kde.plasma.private.systemtray/contents/ui/items/StatusNotifierItem.qml: ReferenceError: Icon is not defined
14.04.20 08:50	plasmashell	file:///usr/share/plasma/plasmoids/org.kde.plasma.private.systemtray/contents/ui/items/StatusNotifierItem.qml: ReferenceError: Icon is not defined
14.04.20 08:50	plasmashell	file:///usr/share/plasma/plasmoids/org.kde.plasma.private.systemtray/contents/ui/items/StatusNotifierItem.qml: ReferenceError: Icon is not defined
14.04.20 08:50	plasmashell	file:///usr/share/plasma/plasmoids/org.kde.plasma.private.systemtray/contents/ui/items/StatusNotifierItem.qml: ReferenceError: Icon is not defined
14.04.20 08:50	plasmashell	file:///usr/share/plasma/plasmoids/org.kde.plasma.private.systemtray/contents/ui/items/StatusNotifierItem.qml:51: ReferenceError: Icon is not defined
14.04.20 08:50	plasmashell	file:///usr/share/plasma/plasmoids/org.kde.plasma.private.systemtray/contents/ui/items/StatusNotifierItem.qml: ReferenceError: Icon is not defined

and
Comment 13 David Redondo 2020-04-14 09:47:06 UTC
I don't see how we could end up with Icon not being defined but I don't have the best insight into how it worked before how it doesn currently on master
Comment 14 agentxlax 2020-04-14 11:11:12 UTC
@Avathar is right there doesn't seem to be ant consistency with this. Two different themes in a row with the transparent icons. Theme I'm running now no issues. That tell me it is a Plasma problem, and not a problem with the particular theme.
Comment 15 Avathar 2020-04-14 11:38:58 UTC
I'm using the default Breeze Theme, so i also think it's not an issue with the theme. I'm using Manjaro too, so it may be related to changes there.

What i meant with consistency is, that on some boots it's happening, on the next it doesn't, with no updates or whatsoever in between.
So at the moment i have no way to reproduce this.
Comment 16 agentxlax 2020-04-14 12:31:20 UTC
Avathar Today I'm backing up my Manjaro partitions so I can install Garuda linux which is similar to Manjaro to see if the issue pops up in it. This will be a test to narrow down if the issue is Plasma or Manjaro related. You may have noticed Manjarowish in the unofficial spins section of the Manjaro forum, that is by the creator of Garuda. I downloaded the larger of the two below linked iso's.

http://www.garudalinux.in/

http://www.garudalinux.in/pages/download.html
Comment 17 Avathar 2020-04-14 19:26:20 UTC
Same issue here (with arch linux i suppose)

https://bbs.archlinux.org/viewtopic.php?id=253271
Comment 18 Nate Graham 2020-04-15 16:56:13 UTC

*** This bug has been marked as a duplicate of bug 418662 ***
Comment 19 Dacha204 2020-05-02 13:02:00 UTC
Same issue: https://imgur.com/uETqh5s

Re-loging sometimes helps. So far only reliable "fix" is to remove and add again system tray in the panel, but that works until next reboot. 

Currently, I'm using adapta theme with papirus icon set, but I tried other themes and icons sets including Breeze, and still have same issue. It doesn't seem to be theme related. 

I can also notice errors in journal logs as @Avathar:
file:///usr/share/plasma/plasmoids/org.kde.plasma.private.systemtray/contents/ui/items/StatusNotifierItem.qml: 

This occurs on both my laptops after KDE got upadted to 5.18. It worked fine in 5.17.

---System
OS: Manjaro 20.0 Lysia
Kernel: x86_64 Linux 4.19.118-1-MANJARO
DE: KDE 5.69.0 / Plasma 5.18.4
WM: KWin
GTK Theme: Adapta [GTK2/3]
Icon Theme: Papirus
Comment 20 Konrad Materka 2020-05-02 13:49:53 UTC
Removing duplicate - 418662 will be used to handle different issue.
Comment 21 Konrad Materka 2020-05-02 13:52:22 UTC
*** Bug 418460 has been marked as a duplicate of this bug. ***
Comment 22 Konrad Materka 2020-05-02 13:53:13 UTC
*** Bug 418748 has been marked as a duplicate of this bug. ***
Comment 23 Konrad Materka 2020-05-02 18:48:22 UTC
This is really hard to reproduce... When it happens again, can you:

* click with left/right button on the empty space where icon should be rendered - does it have any effect?
* hover over empty/invisible icon - can you see a tooltip? Does it have icon or title?
* open System Tray settings (if you don't know how: right click on the small arrow, you should find a menu option for it) - are icons correctly rendered there?
* Run "plasmoidviewer --applet org.kde.plasma.systemtray" - do you have icons correctly rendered (it should work correctly)
* open "System Settings" -> "Startup and Shutdown" -> "Background Services" and in section "Startup Service", then stop/pause and run again the "Status Notifier Manager" - what happened? On stop, it should remove "invisible" icons and on start it should recreate icons correctly.

I have some ideas, but I need your inputs to verify.
Comment 24 Dacha204 2020-05-02 19:48:33 UTC
(In reply to Konrad Materka from comment #23)
> This is really hard to reproduce... When it happens again, can you:
> 
> * click with left/right button on the empty space where icon should be
> rendered - does it have any effect?
> * hover over empty/invisible icon - can you see a tooltip? Does it have icon
> or title?
> * open System Tray settings (if you don't know how: right click on the small
> arrow, you should find a menu option for it) - are icons correctly rendered
> there?
> * Run "plasmoidviewer --applet org.kde.plasma.systemtray" - do you have
> icons correctly rendered (it should work correctly)
> * open "System Settings" -> "Startup and Shutdown" -> "Background Services"
> and in section "Startup Service", then stop/pause and run again the "Status
> Notifier Manager" - what happened? On stop, it should remove "invisible"
> icons and on start it should recreate icons correctly.
> 
> I have some ideas, but I need your inputs to verify.

* Right/Left click works as aspected
* Tooltip is shown and rendered as expected: https://imgur.com/uETqh5s
* System Tray settings is also affected. Icons are not rendered, tooltips are working fine: https://imgur.com/t5rpCKR
* "plasmoidviewer --applet org.kde.plasma.systemtray" view render icons correctly : https://imgur.com/rSXn1yM
* Restarting "Status Notifier Manager" does not help. Icons are still transparent. Tried multiple time to restart, same result.
Comment 25 Konrad Materka 2020-05-02 21:49:54 UTC
Thank you detailed report!

I have few more questions:

* To open System Tray settings, right click on the arrow - will show a menu with "Configure System Tray..." entry. This way you can access settings.

* From that bug occurrence you sent screenshots, do you have errors like this in logs?
file:///usr/share/plasma/plasmoids/org.kde.plasma.private.systemtray/contents/ui/items/StatusNotifierItem.qml:
My guess is that no, because tooltips are working, but it is worth to confirm.
Comment 26 Dacha204 2020-05-02 23:20:48 UTC
(In reply to Konrad Materka from comment #25)
> Thank you detailed report!
> 
> I have few more questions:
> 
> * To open System Tray settings, right click on the arrow - will show a menu
> with "Configure System Tray..." entry. This way you can access settings.
> 
> * From that bug occurrence you sent screenshots, do you have errors like
> this in logs?
> file:///usr/share/plasma/plasmoids/org.kde.plasma.private.systemtray/
> contents/ui/items/StatusNotifierItem.qml:
> My guess is that no, because tooltips are working, but it is worth to
> confirm.

* Sorry, my bad about system tray settings. Icons in settings dialog are actually rendered correctly: https://imgur.com/toPZdaN

* About tooltips and icons, it seems that not all of them are rendered correctly: https://imgur.com/IHbYVKI
In this GIF, I placed the second instance of the system tray side by side (the left one is new). On reboot, both of them are broken.

* I do have errors in logs

$ journalctl -b | grep org.kde.plasma.private.systemtray
May 03 00:38:25 dacha204-linux plasmashell[2143]: file:///usr/share/plasma/plasmoids/org.kde.plasma.private.systemtray/contents/ui/items/StatusNotifierItem.qml: ReferenceError: Icon is not defined
May 03 00:38:25 dacha204-linux plasmashell[2143]: file:///usr/share/plasma/plasmoids/org.kde.plasma.private.systemtray/contents/ui/items/StatusNotifierItem.qml:59: ReferenceError: Icon is not defined
May 03 00:38:26 dacha204-linux plasmashell[2143]: file:///usr/share/plasma/plasmoids/org.kde.plasma.private.systemtray/contents/ui/items/StatusNotifierItem.qml:51: ReferenceError: Icon is not defined

These 3 different lines are repeating

* Something that I discovered in the meantime and can reproduce: The system tray icon for Blueman-manager (GTK+ app; bluetooth icon) reappears when I edit panel. Also, the tooltip icon is rendered correctly. 
As shown in this GIF: https://imgur.com/1yS7JqX


Note: flickering is only visible in GIF. Recorded using Peek
Comment 27 Konrad Materka 2020-05-03 14:48:24 UTC
I have one idea, it might be caused by this change:
https://phabricator.kde.org/D24865#558963
Possible fix in:
https://phabricator.kde.org/D29386
Comment 28 Konrad Materka 2020-05-04 17:24:07 UTC
Git commit 77975468dc108e87e0bc491ac2c2da7276a6b518 by Konrad Materka.
Committed on 04/05/2020 at 17:23.
Pushed by kmaterka into branch 'Plasma/5.18'.

[systemtray] Fix SNI icon not rendering

Summary:
In some rare situations SNI icons are not rendered. It happens randomly, only some users are affected. It does not happen on every login.
Only SNI icons are not rendered, Plasmoids are fine. Restarting plasmashell or re-adding systemtray applet helps.

In QML all roles need to be defined before model is used. When data engines is used a a source for a data model, all roles has to be defined and proper value assigned (not a null QVariant). StatusNotifierItemSource does this properly, but in some situations it sets null QVariant for Icon. Setting empty/null QVariant removes key/role from the date set (DataConteiner implementation). If data model was loaded earlier or later when Icon has proper value it will work properly. In some rare situation it is possible that data model is loaded when Icon has null value assigned (in other words - removed), role is removed from the data model and not avaiable to system tray applet.

This fix makes sure that there is always a value for Icon role. To check if icon is null native method has to be used - QML does not understand that QIcon can be null.
FIXED-IN: 5.18.5

Test Plan: I don't have any reliable method to reproduce this issue.

Reviewers: #plasma_workspaces, #plasma, davidedmundson, broulik, ngraham

Reviewed By: ngraham

Subscribers: plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D29386

M  +6    -2    applets/systemtray/package/contents/ui/items/StatusNotifierItem.qml
M  +5    -0    applets/systemtray/systemtray.cpp
M  +7    -0    applets/systemtray/systemtray.h
M  +2    -2    dataengines/statusnotifieritem/statusnotifieritemsource.cpp

https://commits.kde.org/plasma-workspace/77975468dc108e87e0bc491ac2c2da7276a6b518
Comment 29 Nate Graham 2020-05-07 14:53:59 UTC
*** Bug 420907 has been marked as a duplicate of this bug. ***
Comment 30 Dacha204 2020-05-08 15:00:47 UTC
Update: Works in 5.18.5. It's fixed. Tested by rebooting several times (5+) and every time icons were properly loaded (previously once in ~10 times).

Operating System: Manjaro Linux 
KDE Plasma Version: 5.18.5
KDE Frameworks Version: 5.69.0
Qt Version: 5.14.2
Kernel Version: 4.19.120-1-MANJARO
Comment 31 Konrad Materka 2020-05-08 17:03:18 UTC
Thank you for confirming.
Comment 32 Matty R 2020-06-11 02:44:25 UTC
I'm still getting this issue on Plasma 5.19.

Operating System: Arch Linux 
KDE Plasma Version: 5.19.0
KDE Frameworks Version: 5.70.0
Qt Version: 5.15.0
Kernel Version: 5.6.15-arch1-1
OS Type: 64-bit
Processors: 12 × Intel® Core™ i7-10710U CPU @ 1.10GHz
Memory: 15.5 GiB of RAM
Graphics Processor: Mesa Intel® UHD Graphics
Comment 33 Matty R 2020-06-11 02:48:45 UTC
Thought I should probably add more detail - i'm experiencing this issue specifically with the microphone icon. When  I open an app that is using the mic, say Mumble, the system tray expands where the microphone icon should be but doesn't actually appear.

Its still possible to interact with the microphone, and mouse over still shows the hint bubble.
Comment 34 Konrad Materka 2020-06-22 14:14:08 UTC
Matt,

Is this problem with microphone icon only or with others to?
Does it happen always or randomly?
Are you using Latte Dock? 
Any other changes to default config, like new icon set, themes, additional plasmoids?
Can you test on new user?
Comment 35 Matty R 2020-07-01 05:08:28 UTC
@Konrad - as far as I can tell at this point it's to do with the Icon set I was using. I am having other issues with the icons now, though it's unrelated to this particular bug.

Sorry for the late reply - thanks for the response.