Closed LDVSOFT closed 6 months ago
I can't reproduce, provide a screen record of the issue please
How could I share recording privately? It obviously would expose my chats.
How could I share recording privately? It obviously would expose my chats.
you can create a folder with for example telegram beta chat and screenrecord only that folder.
Apparently this is hardware-dependent, I still can't reproduce. Or maybe GNOME is bad at performance, I use KDE.
Other apps seem not to be affected (Firefox works fine), I'll try to check that.
Well, GNOME always makes everything for Qt apps to work badly, I'm not surprised. I don't think it will ever be possible to get a good UX with tdesktop on GNOME desktop, due to all these silent cross-toolkit wars.
I have the same issue with Telegram from Arch Linux repo and with Telegram from official website. I am using Hyprland, not gnome and have massive stutters and lags, but don't have them on X11
Will it lag on Plasma Wayland for you? I wonder whether it's DE-dependent, hardware-dependent or both... I have AMD hardware and Plasma Wayland, it works pretty fine...
Will it lag on Plasma Wayland for you? I wonder whether it's DE-dependent, hardware-dependent or both... I have AMD hardware and Plasma Wayland, it works pretty fine...
Seems that I don't have such issue in plasma
Does that mean Qt has bad compatibility with everything except of Plasma? Is it reproducible with Weston?
Does that mean Qt has bad compatibility with everything except of Plasma? Is it reproducible with Weston?
No, don't have such issue in Weston. Also checked gnome and the issue is reproducible in it.
I wonder what GNOME and Hyprland do that Qt operates slowly? :thinking:
I wonder what GNOME and Hyprland do that Qt operates slowly? thinking
Also, other QT apps don't have such issue, for example qbittorrent, OBS and WPS Office
Are you sure they're based on Qt 6 and use OpenGL as well as tdesktop?
I have the exactly same problem. It also weirdly consume way, way more RAM than necessary. Running on gnome here. GPU is intel integrated. All other apps are fine.
@vitordelucca how much?
@vitordelucca how much?
Easily 500mb... I was used to tdesktop on Windows, when after hours and hours of use, was always less than 100mb.
I wonder if there is some flag to enable xwayland on tdesktop to see if perf improves?
Easily 500mb... I was used to tdesktop on Windows, when after hours and hours of use, was always less than 100mb.
Well, it starts from 400MB on Linux so it's normal... I guess that's some difference in how the systems work.
I wonder if there is some flag to enable xwayland on tdesktop to see if perf improves?
QT_QPA_PLATFORM=xcb
About OpenGL for media (which was removed from the comment), disabling it forces SHM flush which is reported to be working poorly on GNOME, leading to graphics artifacts on some GNOME systems. Apparently OpenGL flush also works poorly on some GNOME systems, which means both Qt's flush mechanisms are broken on GNOME's Wayland implementation in various ways... The slow performance is probably better than graphics artifacts so I guess switching the default is not a good idea. And I have no idea how to get this fixed given that the one who can reproduce (I can't) should create a minimal reproducible example for Qt developers to accept a bug report.
QT_QPA_PLATFORM=xcb
How can I set it?
QT_QPA_PLATFORM=xcb ./Telegram
Telegram shouldn't running in background or it would just send a message to an already running instance.
QT_QPA_PLATFORM=xcb ./Telegram
Indeed this way is much faster.... I'm wondering if this could be put into experimental settings for those who might have problems turn on easily?
@vitordelucca
Found a way to disable Wayland for QT Flatpak apps: Using Flatseal, just unselect Wayland, and then Telegram will run as X11 (so in this case, xwayland)
Hi gnome users :) As Ilya mentioned
Well, GNOME always makes everything for Qt apps to work badly, I'm not surprised
Wayland gnome implements protocols very poorly in contrast with other DEs and WMs, do not use it if you want good wayland setup and environment, you may encounter issues in many apps. Especially if its combo with nvidia gpu, that's the worst setup you can do :) I am sure that telegram-desktop can do nothing about issues on gnome's wayland. It just uses qt and opengl, that's it.
I was using telegram-desktop for years. My wayland experience with it included 2 setups:
apple air m1 laptop, gentoo linux, hyprland wm
In both cases it's high res and scaling, do not experience any issues. On my second setup it's even pure wayland, I don't have X installed.
Current setup:
net-im/telegram-desktop-4.10.3-r1
compiled with source with wayland dbus fonts screencast -X -enchant -qt6-imageformats -webkit
compilation flagsI am not sure if it's 4k or not, but should be pretty close. I also use blur behind telegram window and lot's of opacity in my theme, it does not give me any performance issues.
I wonder what GNOME and Hyprland do that Qt operates slowly? 🤔
I am sure Hyprland does nothing with Qt or any other frameworks, it's just a simple wlroots based WM.
So current official distribution uses qt6? I think I'll find some time to compile it under qt6 and give feedback here. I was just looking through some open issues and stumbled across this one, so why not to help you testing this :)
BTW, Ilya, is it possible to hide these icons on telegram window?
I tried setting env variable QT_WAYLAND_DISABLE_WINDOWDECORATION
to 1
but tg window just ignores it. Please let me know if there is a quick way to hide them :)
Enable Qt window frame? Telegram's window frame follows GTK's window frame layout via portal.
I am sure Hyprland does nothing with Qt or any other frameworks, it's just a simple wlroots based WM.
Well, almost every Qt update leads to bug reports from wlroots and GNOME users. These issues are frequently reproducible even with weston but testing under kwin never shows issues. So there's definitely some difference between kwin and every other compositor that makes Qt utterly buggy on everything but kwin.
Your good experience might be because you're stumbled upon Qt 5 that had no minor updates for years...
Your good experience might be because you're stumbled upon Qt 5 that had no minor updates for years...
Just unmasked qt6 use flag on my arm64 gentoo and recompiled all packages that can use it. Qt6 is still masked in gentoo for all architectures except amd64 unstable as it's considered not ready for migration from 5 version for all users, and most packages still use qt5 afaik.
So now some of my qt apps like obs and telegram use qt6. Feels like transparent themes in telegram-desktop work better then before, nice :D And again I did not stumbled upon any performance issues.
May this be related that guys using not the latest qt dependencies? I have ton of them on gentoo, and sometimes after @world
upgrade I can stumble upon some issues like "freezing when reading images", I came across some of issues like this in this repo, but I don't really care about them as they can appear when some little dependency was updated like dev-qt/qtsvg
, etc.. May this be related to ubuntu/debian having legacy libs/dependencies/packages and all that? I update my packages once a week and sometimes it can cause issues in telegram, even on updates that came to qt5 components, and even if tg itself wasn't upgraded. Though I can't remember huge performance loss as being reported in this issue.
Maybe we can list all telegram dependencies and require at least somewhat up to date? Here are all qt dependencies from telegram-desktop I have:
dev-qt/qtcore-5.15.11-r1
dev-qt/qtgui-5.15.11
dev-qt/qtnetwork-5.15.11
dev-qt/qtwidgets-5.15.11
kde-frameworks/kcoreaddons-5.111.0
dev-qt/qtbase-6.6.0-r1
dev-qt/qtimageformats-6.6.0
dev-qt/qtsvg-6.6.0-r1
dev-qt/qtdeclarative-6.6.0
dev-qt/qtwayland-6.6.0
And while typing this I found that when upgraded to qt6 my WM workspace gets switched to one where telegram-desktop is opened, so it just requires focus every time I get a message, notification. This is really awful :0 Is there a way to disable this? Is this considered an expected behavior? I know I can disable this globally in WM, but sometimes it's useful, in some apps, but not every time you receive a notification..
Enable Qt window frame? Telegram's window frame follows GTK's window frame layout via portal.
~I remember there was a setting like this in telegram-desktop, but I could not find it anymore, even in dev settings~ Found it, thank you! Maybe it appeared when I migrated to qt6, not sure why I was not able to find it.
May this be related that guys using not the latest qt dependencies?
I'd rather assume it's related to GL drivers and Qt<->GL (mesa)<->compositor communication
so it just requires focus every time I get a message, notification
Apparently that's how your compositor reacts to QWindow::alert? It blinks in taskbar/dock on KDE (both X11/Wayland), Windows and macOS.
I'd rather assume it's related to GL drivers and Qt<->GL (mesa)<->compositor communication
Hm, this issue, maybe. I was just thinking about my cases when I saw freezes after upgrading some little qt deps.
Apparently that's how your compositor reacts to QWindow::alert?
Oookayy.. Seems like this is intended in hyprland. There are some issues and discussion related to this:
Hyprland creator quote from https://github.com/hyprwm/Hyprland/issues/1350#issuecomment-1377065229:
the reason I keep it off and generally not work on it is that it was causing me more issues than switching workspaces to firefox. Maybe it's my shady impl, maybe not, but some apps would repeatedly spam activation a kjhillion times a second (e.g. obs)
I'll post your message above to one of the threads and we'll discuss this behavior, maybe something wrong with implementation of focus request. Thanks.
It blinks in taskbar/dock on KDE
I don't use any taskbars or docks :)
Anyways I don't want this issue gets flooded by off topic messages, so thank you for all that info, and I gave you as much info as I can. I am not subscribing to the thread, so do not hesitate pinging me if you want me to test anything. The problem here is that I am using asahi video drivers which is crazy and only few people here use it :)
Hi gnome users :) As Ilya mentioned
Well, GNOME always makes everything for Qt apps to work badly, I'm not surprised
Wayland gnome implements protocols very poorly in contrast with other DEs and WMs, do not use it if you want good wayland setup and environment, you may encounter issues in many apps. Especially if its combo with nvidia gpu, that's the worst setup you can do :) I am sure that telegram-desktop can do nothing about issues on gnome's wayland. It just uses qt and opengl, that's it.
I was using telegram-desktop for years. My wayland experience with it included 2 setups:
* huawei laptop with amd graphics, void linux, river wm * apple air m1 laptop, gentoo linux, hyprland wm
In both cases it's high res and scaling, do not experience any issues. On my second setup it's even pure wayland, I don't have X installed.
Current setup:
* 2560x1600@60 monitor with 1.5 scaling * `net-im/telegram-desktop-4.10.3-r1` compiled with source with `wayland dbus fonts screencast -X -enchant -qt6-imageformats -webkit` compilation flags * qt5, did not have time yet figuring out how to migrate to qt6 * hyprland 0.30.0. wlroots 0.16.2 * latest asahi video drivers
I am not sure if it's 4k or not, but should be pretty close. I also use blur behind telegram window and lot's of opacity in my theme, it does not give me any performance issues.
I wonder what GNOME and Hyprland do that Qt operates slowly? 🤔
I am sure Hyprland does nothing with Qt or any other frameworks, it's just a simple wlroots based WM.
So current official distribution uses qt6? I think I'll find some time to compile it under qt6 and give feedback here. I was just looking through some open issues and stumbled across this one, so why not to help you testing this :)
BTW, Ilya, is it possible to hide these icons on telegram window? Screenshot
I tried setting env variable
QT_WAYLAND_DISABLE_WINDOWDECORATION
to1
but tg window just ignores it. Please let me know if there is a quick way to hide them :)
I don't think it's related to Gnome. I'm now running EndeavourOS with KDE, and I still have bad Telegram perf under Wayland. When I run Telegram as xwayland, it runs much better.
I didn't notice this problem on any other QT app (after all, I'm on KDE, everything is QT!). Even SDDM I'm running under wayland and is working fine.
Only Telegram have this issue.
Can reproduce on Plasma Wayland too.
It's quite sad that no one who reproduces manage to debug the issue...
Can everyone tell their screen resolution & screen scale of all screens mentioning Telegram is slow on which of them, Telegram window size (mentioning whether it's physical size or divided by scale), whether the issue disappears after shrinking the window size?
Can everyone tell their screen resolution & screen scale of all screens mentioning Telegram is slow on which of them, Telegram window size (mentioning whether it's physical size or divided by scale), whether the issue disappears after shrinking the window size?
2880x1800 scale 1.8
Can everyone tell their screen resolution & screen scale of all screens mentioning Telegram is slow on which of them, Telegram window size (mentioning whether it's physical size or divided by scale), whether the issue disappears after shrinking the window size?
1920x1080, TDesktop is laggy for me when using a screen scale of 1.25 but seems to be fine on the default scale. Also, the issue is indeed fixed when the window is shrunk from the maximum size. The "Enable precise High DPI scaling" option in Experimental settings also helps to some extent.
@pranayadmn what's the CPU and GPU in your case? As I also have 1920x1080 with 1.25 and can't reproduce :(
3840x2160 resolution with 1.5 scaling (using Hyprland). Can confirm that the issue seems to be gone if scaling is disabled or the window is set to a smaller size. Graphics card is AMD Vega 56, should be good enough to handle this.
The "Enable precise High DPI scaling" option in Experimental settings also helps to some extent.
Indeed it seems to make it better, although it introduces some other weird behavior (icons and emojis look a bit pixelated).
@pranayadmn what's the CPU and GPU in your case? As I also have 1920x1080 with 1.25 and can't reproduce :(
i3-8100 with an NVIDIA GT 1030 w/ 545.29.02 drivers, running on GNOME.
@pranayadmn are you sure it's NVIDIA? sometimes people with dual GPU systems say NVIDIA but NVIDIA is not used on such systems for anything but games
@pranayadmn are you sure it's NVIDIA? sometimes people with dual GPU system say NVIDIA but NVIDIA is not used on such systems for anything but games?
I can confirm the GPU in use is indeed the GT 1030 via resource monitoring tools which show its utilisation and the iGPU utilisation to be constantly 0%. Although I don't think it matters in my case for a desktop since the display is directly plugged in to the external GPU.
@pranayadmn can you provide tdesktop's log.txt?
@pranayadmn can you provide tdesktop's log.txt?
log.txt Here you go!
@pranayadmn Will it still happen if you click reset the experimental options and restart the client?
@pranayadmn Will it still happen if you click reset the experimental options and restart the client?
It might have been left accidentally enabled by me when I was trying to find what could possibly fix the issue. Yes, it does happen even when the experimental settings are disabled.
Does it happen with animations disabled and when no moving parts are on screen? Maybe the CPU just can't keep up with drawing the animations/moving content fast enough (yeah, tdesktop main window is painted using CPU as any QtWidgets application) on a scaled surface (which is way bigger as it's painted at the next integer factor which is 2x)... If it is then apparently it's not possible to fix without fixing #1121 first, which in turn is not possible to fix without full rewrite of application 😭
I guess no other QtWidgets application has animations nor such moving content which would explain why it's not possible to reproduce with any other Qt application.
@pranayadmn are you sure it's NVIDIA? sometimes people with dual GPU systems say NVIDIA but NVIDIA is not used on such systems for anything but games
I'm using intel gpu, so it's not nvidia thing
Does it happen with animations disabled and when no moving parts are on screen? Maybe the CPU just can't keep up with drawing the animations/moving content fast enough (yeah, tdesktop main window is painted using CPU as any QtWidgets application) on a scaled surface (which is way bigger as it's painted at the next integer factor which is 2x)... If it is then apparently it's not possible to fix without fixing #1121 first, which in turn is not possible to fix without full rewrite of application 😭
I guess no other QtWidgets application has animations nor such moving content which would explain why it's not possible to reproduce with any other Qt application.
It is indeed snappier when interface animations are disabled, but, isn't that kinda expected? 😅 I could consider switching to Xorg but the lack of fractional scaling support makes the display elements miserably small, while Xorg apps under Wayland look awful with fractional scaling :/ I guess for now I'll keep using the "Enable precise High DPI scaling" option under Experimental settings.
Yeah, as you can see, tdesktop is a legacy application regarding scaling. This is unlikely to improve so you can switch to the Electron version from the official Web A repo if that's something you really need. The best thing could be done in tdesktop is to patch Qt in official builds to always work at 1x scale but I guess this will make things worse as the compositor will upscale then and tdesktop window will be blurry.
Steps to reproduce
I've tried using Telegram Desktop on my Linux desktop running Ubuntu 22.04 with AMD videocard and 4K display, and when running under Wayland the UI is very slow (low fps? high latency?).
Expected behaviour
Should run as always.
Actual behaviour
Way slower than on X11.
Operating system
Ubuntu 22.04
Version of Telegram Desktop
4.8.1
Installation source
Static binary from official website
Crash ID
No response
Logs