New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug with opening context menu in KDE system tray #8708
Comments
Well, I have no idea what else is needed to fix this and I don't know if KDE has any logging that could help, sorry :( |
Oh, that explains a lot |
Hi, Ilya! Thank you for taking part! Thanks for your try of comparison of log files attached in initial post. Do we now have a chance to to try to fix it? If not: Does Telegram client has some debugging CLI/TUI params to add while it starting to make Telegram logs to be more verbose? What you can suggest to try? What to try to find first? KDE logging? |
if to start Telegram manually after desktop workspace has been loaded, then the Telegram executes with SNI icon in log and has context menu. |
As far I know KDE based on Qt. |
We have custom SNI implementation to have a good tray icon on all zoo of desktop environments with static binary, since we can't add platform theme plugins for each DE (including KDE) to static build. And the plain QSystemTrayIcon implementation (without platform theme plugins) really sucks. |
Understood. Thank you very much! Like the same web browser app tries to provide the same JS API on all OS plalforms making the single JS apps running near the same in all OSes. Again, as abstraction layer/library/module. |
Vice versa. SNI is a tray icon protocol, which tdesktop implements on its own. QSystemTrayIcon is an abstraction level for Qt's and platform themes' tray icon implementations (usually SNI&XEmbed) Fallback to QSystemTrayIcon is used to not to implement the XEmbed protocol (which is a X11 mess) |
No, If I got the idea right! ;)
Hm, but there are "SNI for Qt" (https://agateau.com/2011/statusnotifieritem-for-qt-applications/) and package name "sni-qt" (https://github.com/bilelmoussaoui/sni-qt) makes me feel that there are sni for unity, gnome, xfce, i3, etc... so SNI is not universal (not like abstraction layers of jQ, Angular, React, which for different browsers provides the same API and behavior). Ok, my try to understand it on the fly crashed) But thank you for your explanation efforts. |
No, SNI is not an abstraction level, SNI stands for StatusNotifierItem, which is the name of the protocol that Telegram implements "Using SNI tray icon" == using custom implementation of the StatusNotifierItem protocol |
Protocol... so it should be sender and addressee... and may be there are built-in addressee in each DE: for KDE it is sni-qt, for gnome it is sort of gnome-qt, etc... Oh, StatusNotifierItem is not a receiver/base, but protocol itself... |
Yeah. Applications on one side and a panel on another (there are no sni-qt and etc, sni-qt was a Canonical's SNI implementation for Qt4, Qt5 has SNI without additional plugins like sni-qt, but it still sucks for tdesktop) |
Thank you for your patience to try to explain it in details! I should not take another your time anymore but start to read articles if I want to know it and its environment/ecosystem more exactly. Danke! |
@ilya-fedin , may be I distracted you from additional actions of fixing process but this lack, but I got 2.4.2 version, restarted PC but still have no context menu (app behavior is the same as was in initial post). Tried to re-create autostart link via v2.4.2's setting menu and restart PC again. Not helped. $ cat /var/log/pacman.log | grep -i telegram | tail -n3
$ pacman -Qi telegram-desktop
If to change GUI language to another, than Telegram app restarts and context menu on the system icon tray showing (in the general log last line is SNI icon). If to remove Telegram from autostart and to add it via KDE's Settings app, than executable link will be slightly different (having some different params and lines order are not the same) but restarting PC with such made link via direct KDE functionality still does not make Telegram to show context menu (logged Qt icon). I tried to remove Telegram from autostart and after PC restarted I executed Telegram manually: context menu works, logged SNI icon. May be somehow Telegram loads "too earlier"May be you have a condition in the app which checks SNI protocol "receiver" in OS if it is absent, then using compatibility mode of Qt icon. But may be such "receiver" is just not yet loaded at that early desktop initialization stage when Telegram came. May be it is not good idea when Telegram is too quick in all aspects including startup.May be other reason of that issue. May be I have damaged OSRecently I tried 5.9rc7 kernel which issue ( https://gitlab.freedesktop.org/drm/intel/-/issues/2526 ) could broke my OS functionality, but I just did still not know about it. May be to collect additional logs? What exactly? Tried to open via TUI in GUI sessionTelegram window opens, console output is:
and after exit from Telegram app via context menu on system ray icon, that the only one line adds to the console output:
Qt... Platform themes... |
Yeah, it's definitely so. KDE loads applications too earlier and that lead to bugs like that one and a bug with detection of notification daemon. But there is nothing that Telegram can do about that.
Yeah, that exactly so. But tdesktop also registers a service watcher and it should detect SNI service as soon as it registers in dbus. Maybe KDE starts applications even before dbus 🤔, then there is nothing that Telegram can do about that :( |
hmm, looks like you are using a packaged version, can you check with binary from desktop.telegram.org? |
You are lightning-fast on answers! Now I will try different KDE themes. Will post results. Lets collect logs which could be useful. In what garbage will we search payload? :) What to collect? |
GitHub has AJAX, it updates the page as soon as there are a new answer and indicates that in the tab title. And there are a email notification that fast as well.
I have no idea where KDE logs its boot process :( |
Tried all 4 avail. themes which are pre-defined/pre-installed in the official ManjaroLinux KDE distro. I even used layout from theme. Also on the PC with i5-10210U CPU, DDR4-2400 dual channel, nvme ssd I wait for PC background load while was login screen and after about 20 seconds enter my user session, saw default theme's splash screen and still see no telegram's context menu and logged Qt icon. |
@alven-a |
Spent a 30-40 minutes in tries to read and to do that. I was never install somewhat from a file, always used repos. Will continue tries soon. |
🙁 Just unpack the archive and double click the binary |
it is only executes binary, as I think we need to install package to add it into autostart, cause manual execution has no lack with context menu on packaged version too. |
I uninstalled package version and now search the ways to install it from file. |
You don't need to "install it from file", it is like portable applications on WIndows. Just double click and it will start (if you don't have an already launched instance) |
started from file. how it can help? |
You can enable autostart in telegram settings. If it is already enabled, just disable and re-enable it. |
About starting from file: hm, BTW, log is about 1.5 times longer (4.1 KB against prev. 2.8 KB from package version): log from execution as file.txt Autostart: Will restart PC now. |
Report to KDE - ok, but before I believe we should understand what is that mean- how it is too early/ how it is normal - so the root what before what - that question will be for that KDE issue reporter, but I can't say that right order or what event to wait to start an App. May be that component which did not start yet gererates system event "I am started, c'mon guys i am ready!" like |
"normal" in my opinion is when all KDE services are started: tray area, notification daemon, etc. |
Grabbed PC loading Note: May be that log could help. Anyway thank you so much for trying to solve it. |
Telegram start: System tray registration (happens after Telegram start): And even some KDE service reports lack of the tray: Something is really wrong with the system or KDE 🙈 |
Ok, got it. Thanks! after a few complete hangs while was running 5.9rc7 kernel (mentioned in this topic earlier) my "OS sample" should not be a litmus test. |
after such conversation with developer that label |
What are you talking about? |
#8708 (comment) |
I did not catch this: portable version can show menu, the same version number prepared by another man and installed as package can't show context menu after autostart. |
It marks any linux issue, I just called Aokromes to mark it since I feel that there wouldn't be fix for much time, so that it would be handy to have the issue in linux to not to forget about it
I already explained that in this thread |
Saw it in #8708 (comment)
Still can't understand why only Telegram can't show menu. Telegram needs only custom click handler or custom looking menu? Is it not good idea to show context menu as other icons do?
Also fact that if to start installed Telegram package manually not via autostart, then it's context menu works, adds some mess in that explanation above, there effect of showing and not showing context menu depends on package origin. |
Because only our implementation is affected by that race condition on autostart for some reason |
Wrote description as understand it: https://bugs.kde.org/show_bug.cgi?id=427326 |
Hi, it might be a race condition in KDE/Plasma startup: The additional question is, why there is no context menu when legacy XEmbed protocol is used? |
|
@alven-a just wondering, is this really fixed after the last attempt to fix? |
Hi, Ilya! Thank you for your msg! I get some troubles with PC's hardware. No! Not cause Telegram app :) Some UEFI settings triggered constant black screen and it is no video signal from NUC10. I exchanged it in shop to another model. It is raw currently, no hardware, software installed yet. And currently I am on another old desktop machine (i3-550) on the freash installation of Manjaro Linux from scratch. I have something to say about |
On completely different PC hardware I installed fresh copy of Manjaro Linux OS (KDE official edition) made in Oct-2020. I got all latest updates on freshest update branch of the OS.
Installed the app:
Setup it to autostart via the app settings menu. Rebooted PC several times: results are the same:
and now:
It is on the current boot. Before previous boot the app was added in autostart via Telegram settings menu. One more 'effect' discovered:
all lines appears at the app's startup except last one - it logs if to quit the app via item in sys. tray context menu. May be it is usual line, may be could be a key for investigation. |
What do you mean? As I can see in the log you provided, tdesktop correctly switches to SNI now |
May be correctly switches and then probably immediately gone from memory.
tried several times to reboot PC, but the same
|
I guess it crashes, you should reproduce that with official binary since arch and manjaro packages don't have a crash reporter nor debug symbols in repositories. |
with packaged version (Manjaro OS): with the site version: Tried 2 reboots. Gathered logs: https://dropmefiles.com/lmxll Thank you so much for your efforts and hitting target result! The site
Could I ask you more? Again) |
I have no idea, debugging is needed, but manjaro doesn't provide debug symbols and getting them is a complicated process: https://wiki.archlinux.org/index.php/Debug_-_Getting_Traces |
Somehow the
packaged version able to autostart w/o crashing at the start. Context menu on the system tray icon works well also. Tested 4 re-boots on the
with 4 times of success autostart. |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Hi!
I experiencing just the same issue as was in closed #7373
Steps to reproduce
Expected behaviour
Display context menu
Actual behaviour
No any action
Configuration
Operating system:
Version of Telegram Desktop:
2.4.
Previuos 2.3.2-2 version was with the same lack.
Installation source (Linux Only) - the official website / GitHub releases / flatpak / snap / distribution package:
"Community" official Manjaro repo.
Used theme:
Tinted
Additional info
Workaround is the same as in mentioned ticked above. After switch to Russian, Telegram restarts and can show menu, switch back to English, Telegram restarts and context menu now can work. Telegram was added in autostart with the option in it's settings menu.After PC restart situation is the same: lack is present again.
Fixing.
Logs
1. log before telegram restarts (no icon context menu).txt
2. log after telegram restarts (icon context menu works).txt
The text was updated successfully, but these errors were encountered: