Touchpad scrolling is jittery/laggy on GNOME Wayland
Steps to reproduce
- Install tdesktop on a system running GNOME Wayland
- Open a window and scroll the chat list or messages
- Notice the lag/jitteryness
- Plug in a mouse and scroll, the scrolling seems fine
- Log out of the GNOME session, and set the session to Xorg before logging back in. You'll notice touchpad scrolling is fine
Expected behaviour
The scrolling should be smooth
Actual behaviour
Tell us what happens instead
Configuration
Operating system: Fedora Workstation 34
Version of Telegram Desktop: 2.7.1
Installation source (Linux Only) - the official website / GitHub releases / flatpak / snap / distribution package: Distribution package (rpmfusion repo)
Used theme: Stock
Logs:
Insert log.txt here (if necessary)
Please check the issue on the official binary from https://desktop.telegram.org
I can't reproduce the issue on Weston
@ilya-fedin - Just tried the official flatpak from the URL you posted. I'm still having the same issue.
Perhaps this is specific to Mutter rather than Weston? Whatever other data or testing you need from me I'm happy to do.
Just tried the official flatpak from the URL you posted.
No, I meant official static binary. Please check it. Flatpak package uses Qt from KDE runtime that is patched by Fedora folks, so it still can have third-party bugs.
Ah, I'm running Fedora so that might explain why the issue remains, they're likely both the same version.
The static binary is working perfectly, scrolling is smooth as butter.
Is this something I would need to report to the Fedora folks?
Is this something I would need to report to the Fedora folks?
Well, one of their Qt patches is to force native Wayland (upstream Qt blacklists Wayland on GNOME since there are still big bugs that are specific only to GNOME, but looks like Fedora folks don't care), so maybe you want to recheck with QT_QPA_PLATFORM=wayland
Thanks for the tip, unfortunately it didn't work.
Since the issue clearly isn't anything on your end I'm fine to close this out. I'll pursue the the issue with them and hope something can be figured out. :)
:thinking: i wonder whether this could be an upstream Qt bug actually and fixed by one of tdesktop's patches, e.g. https://github.com/desktop-app/patches/blob/master/qtbase_5_15_2/0015-count-scrollbar-sizehint-only-when-needed.patch
Out of my area of expertise, but it's definitely possible. I'm happy to leave this issue open and updating/testing once the upstream patch gets implemented?
I'm happy to leave this issue open and updating/testing once the upstream patch gets implemented?
I guess upstream Qt is not even aware of this... But I think you can build tdesktop yourself, adding to the Dockerfile a RUN cd patches && rm qtbase_5_15_2/0015-count-scrollbar-sizehint-only-when-needed.patch line right after 33th line (with git clone). Or even remove entire patching code: https://github.com/telegramdesktop/tdesktop/blob/dev/Telegram/build/docker/centos_env/Dockerfile#L527-L531. And check whether the issue will appear after this or not.
Hello, @DualityKyle , could you check please this command:
QT_QPA_PLATFORM=xcb /usr/bin/telegram-desktop
@leha-bot - Thanks, this does work but the ability to resize the tdesktop window is lost. Is there any way around that?
so maybe you want to recheck with
QT_QPA_PLATFORM=wayland
@DualityKyle I wonder whether this is possible that you specified this variable incorrectly to the official binary? Can you try again and check the string with information about OS in Privacy & Security -> Show all sessions? It should show whether Wayland or XWayland (X11) is used.

Appears it is indeed using Wayland
Appears it is indeed using Wayland
And doesn't have lags?
The official binary on the site never had issues. I was trying the various fixes with the Fedora repo package. Launching the repo version with QT_QPA_PLATFORM=xcb has removed the stuttering. I'm satisfied with this solution, so I think we're fine to close out this issue. :)
Weird Fedora package
Expected Behavior
Smooth scrolling when using a touchpad.
Current Behavior
When using a touchpad for srolling the app stutters for random period of time from 0.5 to 3 seconds.
Steps to Reproduce
- Have a device with a touchpad.
- Install Fedora Workstation 34, log in to Gnome wayland session (default).
- Download and unpack the official Telegram desktop appimage archive.
- Start the app using
QT_QPA_PLATFORM=wayland ./Telegram/Telegramcommandline. - Try to scroll a chat or a settings menu.
- Observe the app becoming unresponsive for a short period of time.
Detailed Description
When using the telegram desktop app on Gnome 34 wayland session trying to scroll a chat or a menu inside the app results in the app becoming unresponsive for 0.5 to 3 seconds, after which the the interface refreshes with a result of scrolling visible (the chat is scrolled up/down approximately as expected).
This issue is specific to gnome environment. It does not reproduce in weston or sway.
This issue does reproduce with the rpmfusion package, the official binary and the flatpak package from flathub if forced to start as native wayland client.
Configuration
Device: Dell Inc. Inspiron 11-3168
Touchpad: Synaptics TM3207-001, over libinput driver.
OS: Fedora 34 (Workstation Edition)
Gnome: 40.1.0
mutter: 40.1
wayland: 1.19.0
Telegram binary version: 2.7.4
Additional notes
My laptop also has a touchscreen that, unlike the touchpad, is handled by the i2c_hid driver, and scrolling using it does not cause the app to stutter.
I see why you don't want to bother trying to fix this yet while the only version that is started as native wayland client by default is the rpmfusion package and the only distribution effected so far is Fedora Workstation. But the issue is not specific to Fedora packaging as it does reproduce with the official binary if it's forced to be a native wayland client.
I see why you don't want to bother trying to fix
Because no idea how to fix that. This issue is so specific: you should have Fedora, you should have GNOME, you should have Wayland, you should have Intel processor with intel_pstate powersave governor, I'm just not able to reproduce that. I asked people from #8347 to bisect through official binaries including beta versions multiple times, but no one wants to, so I gave up and asked to let the bot to close the issue.
Attaching the logs.
All I did here was launch on Gnome, choose the chat, scroll up using the touchpad, wait for reaction, scroll down, wait for reaction, close.
One is the output of WAYLAND_DEBUG=1 QT_QPA_PLATFORM=wayland ./Telegram |& tee t_w_debug.log, mostly wayland debug there.
The other is the ~/local/share/TelegramDesktop/log.txt.
In case it helps.
And, btw, Intel CPU is in about 90% of laptops, I don't say that you should install Fedora immediately, but that if this issue doesn't accidentally fix itself, it will eventually spread with the adoption and forcing of wayland by other distributions. I don't think this depends on the powersave governor, rather the powersave one makes things more noticeable, maybe IO scheduling, but then why the CPU at all. To me the issue seems to be somewhere in the libinput-mutter-telegram chain, but then what do I know about these things, I'm just a regular user.