Bug 426206 - TeamViewer tray icon on Arch don't appear
Summary: TeamViewer tray icon on Arch don't appear
Status: RESOLVED DOWNSTREAM
Alias: None
Product: plasmashell
Classification: Plasma
Component: System Tray (show other bugs)
Version: 5.19.5
Platform: Arch Linux Linux
: VHI normal
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords:
: 431503 (view as bug list)
Depends on:
Blocks:
 
Reported: 2020-09-05 09:08 UTC by Nick Stefanov
Modified: 2021-03-03 12:05 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Script to list all registered SNI (739 bytes, application/x-shellscript)
2020-09-28 18:16 UTC, Konrad Materka
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Nick Stefanov 2020-09-05 09:08:58 UTC
SUMMARY
Plasma 5.19.5 panel doesn't detect TeamViewer at all. There's no icon and edit panel->System Tray->Configure doesn't detect it. The icon in the panel takes one square place but it's unresponsive except to single click to rise the app. There's no right click context menu - just nothing happens.

https://i.imgur.com/yH8XuVf.png

There's no entry in System Tray Settings:

https://i.imgur.com/OT43ISV.png

There are no such problems with previous Plasma versions. I'm not shure for 5.19.4 but in earlier versions everything is alright.

STEPS TO REPRODUCE
1. Start TeamViewer

OBSERVED RESULT
There's no sys tray icon and there's no TeamViewer System Tray Settings entry.

EXPECTED RESULT
Panel icon and TeamViewer System Tray Settings entry.

SOFTWARE/OS VERSIONS
Arch Linux/KDE Plasma: 
KDE Plasma Version: 5.19.5
KDE Frameworks Version: 5.73.0
Qt Version: 5.15.0
Comment 1 Nate Graham 2020-09-18 23:54:09 UTC
What version of TeamViewer? I see the icon in my system tray in Plasma 5.20 when TeamViewer 15.9.4 is running.

Another question: is the entry actually there, but the icon isn't appearing? If you hover the cursor over where there icon *would* appear, do you see a tooltip with the text "TeamViewer" in it?
Comment 2 Nick Stefanov 2020-09-19 07:41:30 UTC
Nope, hovering mouse triggers nothing. I can rise TeamViewer from the place where it's supposed to be TV's icon with left mouse click. There's no right click at all at this place. If I move the mouse one icon distance, I again have a right panel click menu. It's interesting TeamViewer isn't detected by Plasma - System Tray Settings. All other programs are there but TeamViewer. It doesn't exist for the system. The program is started but there's no TeamViewer entry:

https://i.imgur.com/qNnezqT.png

TeamViewer is 5.19.5. 

https://i.imgur.com/utk1Ico.png
Comment 3 Nick Stefanov 2020-09-19 11:23:01 UTC
Now I tried on another computer with Arch and Plasma and there is the same problem.
Comment 4 Nate Graham 2020-09-20 12:53:03 UTC
Got another report of something similar from a user.

Konrad, could you take a look? Also, would you be interested or willing to get CCd automatically on new system tray bugs?
Comment 5 Adomas Jackevičius 2020-09-21 16:06:15 UTC
I was the person that reported the issue on Telegram to Nate :) let me give more details on this:

It seems to happen only when Telegram or Slack is in "Autostart mode". It feels like it starts faster than plasmashell, and that is why tray is not hooked.

If I quit Telegram/Slack while plasmashell is running, I always get tray icon as I should.
Comment 6 Nate Graham 2020-09-21 17:43:36 UTC
Nick, can you confirm the same behavior as Adomas?
Comment 7 Nick Stefanov 2020-09-21 18:02:02 UTC
Nope. I doesn't have TeamViewer in Autostart. Closing and restarting the application gives nothing - the problem is still the same. I can record a video if you wish :)
Comment 8 Konrad Materka 2020-09-25 20:43:17 UTC
This kind of issue was reported few times already... Most probably a duplicate of Bug 425315. IMO this is not a problem with systemtray itself but with Plasma startup, applications are restored before thay have a chance to register icon correctly.

Nick, Adomas, can you check Bug 420635 follow instructions from comments there? There are a lot of them, so to simplify I'm mostly interested in running the attached script "listIcons.sh" to get more information.
Comment 9 Adomas Jackevičius 2020-09-25 20:56:02 UTC
Hey Konrad,

Here is the output of listIcons.sh:

org.kde.StatusNotifierWatcher
pid,start,command:  1174 22:31:33 /usr/bin/kded5

ITEMS:

ITEM:      :1.11/StatusNotifierItem
PID STAT:  1174 22:31:33 /usr/bin/kded5
ID:        KDE Daemon
TITLE:     Keyboard Layout

ITEM:      :1.36/org/ayatana/NotificationItem/steam
PID STAT:  1514 22:31:34 /home/adomas/.local/share/Steam/ubuntu12_32/steam
ID:        steam
TITLE:     Steam

ITEM:      :1.54/StatusNotifierItem
PID STAT:  4062 22:34:58 /usr/lib/telegram-desktop-bin/Telegram -externalupdater --
ID:        TelegramDesktop
TITLE:     Telegram Desktop

When Telegram autostarts, there is no icon in system tray, I kill Telegram and then start it again, then icon appears :) output is when icon is there in system tray. Let me know if I can provide some more info
Comment 10 Nick Stefanov 2020-09-25 21:07:55 UTC
I want to tell again - I don't set YeamViewer on startup. I start it manually. No matter how many times I start or stop it, there's no systray icon and there's no TeamViewer system tray settings entry. All other applications are there but TeamViewer.

Here's my output with TeamViewer running:

org.kde.StatusNotifierWatcher
pid,start,command:  826 17:34:32 /usr/bin/kded5

ITEMS:

ITEM:      :1.11/StatusNotifierItem
PID STAT:  826 17:34:32 /usr/bin/kded5
ID:        KDE Daemon
TITLE:     Keyboard Layout

ITEM:      :1.38/StatusNotifierItem
PID STAT:  872 17:34:32 /usr/bin/xembedsniproxy
ID:        skypeforlinux
TITLE:     skypeforlinux

ITEM:      org.kde.StatusNotifierItem-940-2/StatusNotifierItem
PID STAT:  940 17:34:32 /usr/bin/viber
ID:        ViberPC
TITLE:     ViberPC

ITEM:      :1.53/StatusNotifierItem
PID STAT:  1431 17:34:42 qbittorrent
ID:        qBittorrent
TITLE:     qBittorrent

ITEM:      org.kde.StatusNotifierItem-45004-1/StatusNotifierItem
PID STAT:  45004 00:05:02 /opt/teamviewer/tv_bin/TeamViewer
ID:        TeamViewer
TITLE:     TeamViewer
Comment 11 Nick Stefanov 2020-09-25 21:09:11 UTC
One more thing - I have many programs running at start up and I have no problems at all with them. It's just TeamViewer.
Comment 12 Konrad Materka 2020-09-28 18:16:48 UTC
Created attachment 131993 [details]
Script to list all registered SNI
Comment 13 Konrad Materka 2020-09-28 18:25:47 UTC
@Adomas, please check Bug 425315

@Nick, can you try on fresh user? I don't want you to delete any configuration from your current user, just create new one for this test. Your system looks heavily customized, I want to confirm if this problem appears on clean config as well.
Comment 14 Nick Stefanov 2020-09-28 18:38:47 UTC
Ok, I'll try and I will write you back.
Comment 15 Konrad Materka 2020-09-28 19:19:13 UTC
Looks like the Arch related bug:
https://aur.archlinux.org/packages/teamviewer/#comment-766942

Nick, can you check that first?
Comment 16 Nick Stefanov 2020-09-28 19:23:00 UTC
@Konrad
Because adding a new user currently doesn't working in KDE, I backuped my system and installed it again from scratch. Unfortunately the problem is still here:

https://i.imgur.com/VQmaLkR.png
https://i.imgur.com/UDhbydJ.png

There's no TeamViewer system tray icon, there's no TeamViewer system tray settings entry, and adding a new user isn't working too - neither from terminal or from User Manager. This is another bug and I will not bother you with it.
Comment 17 Nick Stefanov 2020-09-28 19:25:04 UTC
(In reply to Konrad Materka from comment #15)
> Looks like the Arch related bug:
> https://aur.archlinux.org/packages/teamviewer/#comment-766942
> 
> Nick, can you check that first?

Here they think it's a Qt bug, right?

"it's related to the regression introduced in versions of qt5-base after 5.15.0-4, which also breaks the system tray icon. if you downgrade the qt5-base package to that version, copy+paste and the tray icon should work normally again. "

What we should do now?
Comment 18 Nick Stefanov 2020-09-28 19:29:33 UTC
Yes, I can confirm - downgrading to 5.15.0-4 and everything is working again:

https://i.imgur.com/HvNfnEm.png
https://i.imgur.com/tsGAibH.png
Comment 19 Konrad Materka 2020-09-28 19:31:57 UTC
Thanks for information, I'm closing this bug. Please contact Arch community for further instructions, as this is a distribution specific bug.
Comment 20 Nick Stefanov 2020-09-28 19:38:07 UTC
It isn't clear for me - how do you decided it? Downgrading Qt fixes the problem. Isn't Qt the culprit?
Comment 21 Konrad Materka 2020-09-28 20:13:35 UTC
(In reply to Nick Stefanov from comment #20)
> It isn't clear for me - how do you decided it? Downgrading Qt fixes the
> problem. Isn't Qt the culprit?

The base version didn't change: 5.15.0. Suffix (-4, -5 etc) is usually added by the distribution.

On KDE Neon distribution I have version 5.15.0-0xneon+20.04+focal+build8, so the same version, but with even more suffixes :)

I've just done more searching, it is probably caused by:
https://github.com/archlinux/svntogit-packages/commit/8f483c540f0712dfde08b07e36f5a128afe5fc6c#diff-8d0411b338c83cd8cd8ad9d9db127101

Just an educated guess:
"pkgrel=5" corresponds to suffix
And these two changes are probably causing issues:
"-reduce-relocations"
"-no-strip"
Comment 22 Nick Stefanov 2020-09-28 20:22:46 UTC
Yeah, you're right. I now installet OpenSUSE Tumbleweed and there's no problem:

https://i.imgur.com/Dn0R0Cs.png

Thank you :)
Comment 23 Nick Stefanov 2020-09-28 20:23:40 UTC
Installed*
Comment 24 Adomas Jackevičius 2020-09-28 20:25:28 UTC
Hey, I'm running Gentoo and I have these problems with the tray. This is not Arch Linux specific, but more general problem. It might be Qt problem, probably Plasma needs a fix.

Note: Slack tray icon does not appear at all, even if I restart Slack. While with Telegram, I need to kill it, launch again and icon appears. Both apps I have in autostart.

Reopening, as it is not solved.
Comment 25 Konrad Materka 2020-09-29 15:51:00 UTC
Adomas, please do not reopen bugs if problem is not exactly the same. It is very difficult to track, comments will confuse developers and also original reporter will receive unwanted emails etc.

For auto-start issues there is an open bug 425315. Please add your report there, your problem with Telegram looks very similar.

For Slack issue, if it is not showing at all (not only on restarts) then it needs to be investigated separately. My first guess is that something is wrong with Slack itself (other applications are showing icon correctly) or with distribution (Gentoo allows some crazy setups, which makes investigation really hard...). If you still think it is caused by Plasma, please report new bug, so that we can focus on one problem at a time.
Comment 26 Adomas Jackevičius 2020-09-29 17:38:04 UTC
Sorry about re-opening the bug report. I will see what new versions like Plasma 5.20 will bring and then open a new bug.

One more discovery, Discord app also does not show icon in the tray.
Comment 27 Nick Stefanov 2020-12-25 11:54:29 UTC
Arch guys denied to address this bug:
https://bugs.archlinux.org/task/69097

What we can do from here?
Comment 28 Konrad Materka 2020-12-25 20:52:26 UTC
(In reply to Nick Stefanov from comment #27)
> Arch guys denied to address this bug:
> https://bugs.archlinux.org/task/69097
> 
> What we can do from here?

Sorry, nothing we can do. From comments here:
https://aur.archlinux.org/packages/teamviewer/
looks like several people are affected, not only on KDE (Xfce was mentioned as well). This is probably a packaging issue, some incompatibilities between Qt versions maybe.
Comment 29 Nick Stefanov 2020-12-25 21:17:56 UTC
Very bad...
Comment 30 Nate Graham 2020-12-28 19:57:51 UTC
(In reply to Nick Stefanov from comment #27)
> Arch guys denied to address this bug:
> https://bugs.archlinux.org/task/69097
> 
> What we can do from here?
Since the bug is in an AUR package, you can contact the maintainer of that AUR package.
Comment 31 Nick Stefanov 2020-12-28 20:38:56 UTC
The problem is that it's not only in the AUR package. If I download the portable package from the official site directly, there's still no sytray icon. It's not a packaging problem it seems.
Comment 32 Nate Graham 2020-12-28 20:39:34 UTC
Then you'll need to report it to the developers of the app.
Comment 33 Nick Stefanov 2020-12-28 20:42:15 UTC
If I install GNOME or Xfce for example, there is systray icon. If I downgrade KDE there is systray icon. I'm sure there's no problem with the application (TeamViewer).
Comment 34 Nate Graham 2020-12-28 20:44:11 UTC
How can you be sure about that? Did you read the source code? It's entirely possible that the developers made a change to the code which causes it to break only in newer versions of Plasma.
Comment 35 Nick Stefanov 2020-12-28 20:48:52 UTC
Mmm, in this issue there are people that mensioned other apps with the same problem. I'm pretty sure this isn't a coincidence.
Comment 36 Nate Graham 2020-12-28 20:49:44 UTC
And they all broke at the same time?
Comment 37 Nick Stefanov 2020-12-28 22:36:55 UTC
Yep, with a Plasma update.
Comment 38 Konrad Materka 2021-01-01 21:27:06 UTC
As I wrote in comment 21 this most probably caused by the Qt in Arch. Please re-run attached "Script to list all registered SNI" (./listIcons.sh) and then:

qdbus org.kde.StatusNotifierItem-XXX-1 /StatusNotifierItem org.kde.StatusNotifierItem.IconName

replace XXX with PID number (check output of ./listIcons.sh).

Unfortunately I have too little free time to install Arch (and without proper installer the installation in unnecessary too time consuming...).
Comment 39 Nick Stefanov 2021-01-01 21:38:19 UTC
Here it is again:

./listIcons.sh
https://pastebin.com/xwNexTpm

qdbus org.kde.StatusNotifierItem-65449-1 /StatusNotifierItem
https://pastebin.com/iTQ1EpjP

qdbus org.kde.StatusNotifierItem-65449-1 /StatusNotifierItem org.kde.StatusNotifierItem.IconName:
TeamViewer


One more thing - there are graphical Arch installers and it can be installed in a few minutes :)
Comment 40 Konrad Materka 2021-01-01 23:20:13 UTC
I installed Arch in VirtualBox and can confirm this. Really strange, other icons are working fine...
Comment 41 David Edmundson 2021-01-01 23:31:29 UTC
>TeamViewer

And does an icon named exactly like that exist? Can you check with cuttlefish?
Comment 42 Konrad Materka 2021-01-01 23:38:01 UTC
(In reply to David Edmundson from comment #41)
> >TeamViewer
> 
> And does an icon named exactly like that exist? Can you check with
> cuttlefish?

Icon exists and all other fields are correctly registered in Dbus. The icon is not the only problem, in System Tray -> Settings -> Entries even the title is missing. I will check this tomorrow.
Comment 43 Nick Stefanov 2021-01-02 08:36:09 UTC
A huge thanks Konrad! Finally someone understand there's a real problem and it's not my fantasy :)
Comment 44 Konrad Materka 2021-01-02 13:56:31 UTC
(In reply to Nick Stefanov from comment #43)
> A huge thanks Konrad! Finally someone understand there's a real problem and
> it's not my fantasy :)

It also might be that I installed Arch only to prove that this is a distribution issue and do nothing more to fix it :)

First thing: implementation of SNI in TeamViewer is strange - in DBus org.kde.StatusNotifierItem interface there are no signals, only properties and methods (not even all from specification). Anyway, that's probably not that important now.

On SNI registration, to get all values, org.freedesktop.DBus.Properties.GetAll is called (via DBus). On KDE Neon distribution it returns data as expected, on Arch there is just empty response.

> qdbus org.kde.StatusNotifierItem-1427-1 /StatusNotifierItem org.freedesktop.DBus.Properties.GetAll org.kde.StatusNotifierItem

Right now I don't know what is the root cause...
Comment 45 Nick Stefanov 2021-01-02 14:11:57 UTC
We are in deadlock... Arch devs refuse to look at the problem for TeamViewer is not in official repositories :(
Comment 46 David Edmundson 2021-01-02 14:34:30 UTC
>On KDE Neon distribution it returns data as expected, on Arch there is just empty response.

Then it's a client-side problem.
Comment 47 Konrad Materka 2021-01-02 15:08:07 UTC
(In reply to David Edmundson from comment #46)
> >On KDE Neon distribution it returns data as expected, on Arch there is just empty response.
> 
> Then it's a client-side problem.

What do you mean by "client-side"? Who is client it this case?

If that matters, I checked dbus-send as well, the same results.

> dbus-send --session --print-reply --dest=org.kde.StatusNotifierItem-134046-1 /StatusNotifierItem org.freedesktop.DBus.Properties.GetAll string:"org.kde.StatusNotifierItem"
Comment 48 David Edmundson 2021-01-02 17:59:35 UTC
>Who is client it this case?

TeamViewer
Comment 49 Konrad Materka 2021-01-02 23:57:50 UTC
Sorry Nick, closing this bug again. TeamViewer is broken, I don't know how or why it sometimes works.

On KDE neon, when calling:
> qdbus org.kde.StatusNotifierItem-449997-1 /StatusNotifierItem org.freedesktop.DBus.Properties.GetAll "aa"
it returns proper response, when it should return:
> Error: org.freedesktop.DBus.Error.UnknownInterface
> Interface org.kde.StatusNotifierIte was not found in object /StatusNotifierItem
The "aa" is wrong, you can find proper calls in the comments above.

On Arch it always return empty response, I don't know why.

My *guess* is that they have their own implementation of "org.freedesktop.DBus.Properties" interface (using QDBusAbstractAdaptor). Default implementation was introduced in Qt 4.5, TeamViewer 10 used 4.8 but maybe they started with older Qt version? Who knows... Anyway, this is a bug in TeamViewer, it is strange that it occurs only on Arch but most probably it is not a fault of the distribution.
Comment 50 Nick Stefanov 2021-01-03 08:46:34 UTC
Thank you for your precious efforts, Konrad! 
I'll try to write to TeamViewer team but again the app isn't officialy supported for Arch and I'm pretty sure they will not look at this.
Comment 51 Nick Stefanov 2021-01-03 10:52:30 UTC
Here's the bug:
https://community.teamviewer.com/English/discussion/109461/bug-report-teamviewer-sys-tray-icon-on-arch-doesnt-appear/p1?new=1

I'll be grateful to share your opinion. Thank you :)
Comment 52 Konrad Materka 2021-01-14 18:48:00 UTC
*** Bug 431503 has been marked as a duplicate of this bug. ***
Comment 53 medin 2021-03-03 12:05:15 UTC
On Manjaro KDE, with Plasma 5.21.1 it seems the icon appears now correctly with TeamViewer 15.15.5