telegramdesktop / tdesktop

Telegram Desktop messaging app
https://desktop.telegram.org/
Other
25.48k stars 5.06k forks source link

Mouse scrolling is broken #17254

Closed melroy89 closed 1 year ago

melroy89 commented 2 years ago

Steps to reproduce

  1. Open any chat
  2. Try to use your scroll-wheel, to scroll up or down

Expected behaviour

Scrolling within the message window.

Actual behaviour

Telegram desktop doesn't respond to any scroll wheel action.

Operating system

Linux Mint 20.2 (Ubuntu based)

Version of Telegram Desktop

3.2.4

Installation source

Static binary from official website

Logs

No response

ilya-fedin commented 2 years ago

Well, I don't. I can't reproduce that, so I can't write a minimal reproducible example and can't report this to Qt, so the issue is in dead end (until someone else consider to report that to Qt, moving the issue forward).

melroy89 commented 2 years ago

This escalated quickly. But I fully agree with Andrey here, just down grade qt for now. And we also need to fill a bug report at qt.

ilya-fedin commented 2 years ago

Downgrading Qt is not a good idea. Qt 6 has a lot of fixes that will never be backported to 5.x, e.g. fixes for clipboard on X11 & Wayland and Qt 6.3 will have a lot of more important bugfixes, like the fix for #10348. Self-dragging bug is a more important bug than scrolling problems after suspend in my opinion.

Aokromes commented 2 years ago

No, you can fix it - just downgrade Qt version used to the working one. The problem will be solved.

This escalated quickly. But I fully agree with Andrey here, just down grade qt for now. And we also need to fill a bug report at qt.

upgrading was done to fix bugs, if the amount of bugs and importance it fixes is more than the amount of things it breaks be sure the downgrade will be rejected.

melroy89 commented 2 years ago

Ps. Just for info, in my case the scrolling issue happened without suspend.

Clear. We do not downgrade.

@AndreyKopeyko could you fill a qt bug report, please? And cross reference to this ticket?

31337-4554551n commented 2 years ago

I can confirm this issue on ubuntu 20.04 and that is without suspend

AndreyKopeyko commented 2 years ago

@AndreyKopeyko could you fill a qt bug report, please? And cross reference to this ticket?

I never filed any bugs to QT so I need some assistance from you. It would be nice if you email me this week later.

melroy89 commented 2 years ago

https://doc.qt.io/qt-6/bughowto.html

AndreyKopeyko commented 2 years ago

@Aokromes @ilya-fedin please provide the following information needed to fill a Qt bug report

The name and version number of your compiler
The version of Qt you are using, and what configure options it was compiled with
ilya-fedin commented 2 years ago

The name and version number of your compiler

GCC 9 for static binary and snap, GCC 11 for flatpak

The version of Qt you are using, and what configure options it was compiled with

Qt 6.2.0, the latter depends on where you got tdesktop from (static binary, flatpak and snap - all have different configure flags passed to Qt)

AndreyKopeyko commented 2 years ago

I installed deb package provided here.

ilya-fedin commented 2 years ago

tdesktop doesn't have deb packages

AndreyKopeyko commented 2 years ago

Yes, you are right - it was a binary from tsetup.tar.xz

ilya-fedin commented 2 years ago

Here are the static binary's Qt configure flags https://github.com/telegramdesktop/tdesktop/blob/dev/Telegram/build/docker/centos_env/Dockerfile#L744-L761

AndreyKopeyko commented 2 years ago

The same problem occurs on Ubuntu-18

kaa@Polina-X270:~$ lsb_release -a 
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 18.04.6 LTS
Release:    18.04
Codename:   bionic
kaa@Polina-X270:~$ 
john-preston commented 2 years ago

Ok, I've made a bug report:

https://bugreports.qt.io/browse/QTBUG-98720

It's a pity not me, not @ilya-fedin can reproduce that, but maybe something could be done from the Qt side.

john-preston commented 2 years ago

@AndreyKopeyko

Also I'll try to throw in some more logs in the next beta version so I'll ask for one more clear reproduction-with-logs, like https://dev.kopeyko.ru/tmp/telegram-v3.2.5.debug20211119.output3 was, but for 3.2.6 beta version (that'll be out later today or in a couple of days).

belousoves commented 2 years ago

Have same problem. version 3.2.4 on linux Mint 20.2. Scrolling using mouse wheel never works, restarting telegram does not help. Scrolling by PgUp/PgDn works.

john-preston commented 2 years ago

@belousoves BTW Linux build 3.2.6 beta should have the additional logs. I doubt they'll help fixing the issue, but who knows.. at least I'll add them to the Qt bug report.

rromrrom commented 2 years ago

Fedora Linux 35. Gnome. Telegram 3.2.5. I have the same issue: Mouse wheel scrolling doesn't work while both touchpad two-fingers and pgup/pgdown works fine. Annoying bug.

john-preston commented 2 years ago

@AndreyKopeyko @belousoves @rromrrom @danger89 @31337-4554551n @AMV007 @thenetengineer @jprando

  1. I want to get new set of logs from 3.2.6 beta version (or later) obtained with such command:
    QT_LOGGING_RULES='*.debug=true' QT_MESSAGE_PATTERN="[%{time}] %{if-category}%{category}: %{endif}%{message}" ./Telegram 2>&1 |tee telegram-v3.2.6.debug$(date +%Y%m%d).txt

I want such log (telegram-v3.2.6.debug[smth].txt) from launch, through the suspend, till the bug is reproduced and you try to scroll several times without it working.

  1. The question from the Qt bug tracker:

image

belousoves commented 2 years ago

@john-preston On beta 3.2.6 bug is not reproducible. Scroll works fine.

john-preston commented 2 years ago

It's (nearly) impossible. Maybe just didn't try long enough.. Anyway, if it reproduces again, please send the log.

john-preston commented 2 years ago

@AndreyKopeyko @belousoves @rromrrom @danger89 @31337-4554551n @AMV007 @thenetengineer @jprando

Do you have this issue with a USB mouse or a Bluetooth mouse?

rromrrom commented 2 years ago

@AndreyKopeyko @belousoves @rromrrom @danger89 @31337-4554551n @AMV007 @thenetengineer @jprando

Do you have this issue with a USB mouse or a Bluetooth mouse?

On my side it is Bluetooth mouse.

vjrj commented 2 years ago

On my side USB mouse (no wireless).

belousoves commented 2 years ago

On my side it is USB wireless(but not Bluetooth) mouse with keyboard.

0xffh commented 2 years ago

Same on ubuntu 20.04.3 and wireless mouse. The touchpad is fine. Telegram version 3.2.2

melroy89 commented 2 years ago

In my case it's all wired. Wired keyboard, wired mouse.

belousoves commented 2 years ago

Telegram 3.2.8 beta, bug reproduces again. Scroll never works, no need to suspend or doing something else. Scrolling does not works just after telegram start. Attaching lo telegram-v3.2.8.debug20211204.txt g.

john-preston commented 2 years ago

@belousoves But this should be something else then, because in the initial report scroll works and then stops. This might be completely different (or might not) from the case when it simply doesn't work at all.

john-preston commented 2 years ago

@belousoves And the log is very small and doesn't contain any of those scroll input event log lines at all :(

mwoodson commented 2 years ago

Adding some more info on what I've seen and reproducer. I have Fedora 35 + KDE. I also have VFIO VM with a USB switch.

VFIO is a VM that runs passthrough to certain devices (like usb card, hard drive, gpu) to a VM for direct access.

My config:

mouse/keyboard -> usb switch -> 2 different USB ports on the computer.
USB1 = VM USB USB2 = PC USB (never gets passed through)

When I switch to my VFIO VM, I switch the USB switch to use USB1. Windows is happy. When I turn off VM and come back to the Linux PC, the mouse works, but the scrolling in telegram is broken. All other apps seem to work fine (chrome, for example).

I also noticed that If I plug a mouse into USB2 (which is always connected to the linux PC, never passed through to the VM), scrolling still works with that mouse, but will be broken on the mouse that is passed through.

Let me be clear, I have a complex setup. I don't expect this to be the reproducer. But having the mouse get disconnected and reconnected seems to be what is causing the loss of scrolling for me. This seems similar to the supsend/hibernation and is not getting picked back up by QT.

I figure the info doesn't hurt.

joeytwiddle commented 2 years ago

How are you running older versions? I would like to run an older version until this bug is fixed.

snap and flatpak only seem to offer me the latest version.

I found old v1.2.6 but when I give it my phone number, it responds "Internal Server Error".

I tried installing the 3.1.13 release from this repo, but when I run it:

Is there another way I could try? Thanks in advance.

ilya-fedin commented 2 years ago

There's a coincidence that versions before update to Qt 6 no longer working due to server API update

AndreyKopeyko commented 2 years ago

@AndreyKopeyko @belousoves @rromrrom @danger89 @31337-4554551n @AMV007 @thenetengineer @jprando

Do you have this issue with a USB mouse or a Bluetooth mouse?

I worked for about 2 weeks with 3.2.5 without restarting it, and found some new stranges in wheel scroll behaviour - from time to time it cures and fails back later.

It happens so that I use 5 different devices to perform wheel scrolling

First & second devices are used in office; other are used at my home (touchpad and trackpoint-on-the-body aren't available at the office because laptop sits in the dock with lid closed). So, in any condition I can use 2 different scroll devices minimum.

They all fail randomly and independently

After 2-3 days I suddenly find out that wheel scrolling can "repair itself" on some devices. But next time it can fail back... Or can continue to work.

I was unable to figure any pattern it their behaviour. Just try and see if this kind of wheel scroll works now or not.

The only rule discovered is that status change happens when note is resumed from sleep, or when screen is unlocked.

I was unable to grep smth interesting from OS logs.

Also I must point out that I do not have any wheel scrolling issues with any other software I run on my laptop.

Hope this details may help you to understand the root cause.

Sorry for my long silent period - I was busy with work problems. Now I am heading to install & test 3.3.0 binary you've released few days ago.

pfortin commented 2 years ago

WEIRD: mouse quit scrolling a few days ago on v3.3. Because this wireless mouse shares the USB dongle with a keyboard, and wanting to use that pair for a Pi4B I just ordered, I bought a new wireless mouse. Plugged it in and telegram scrolling works again. Previous mouse now works too -- without restarting Telegram... (Twilight Zone)

DK4PN commented 2 years ago

i have literally had this problem for ages now. even in version 3.3 it happens quite often. the application appears as if it is being dragged around using left mouse button and Alt-key, even though no keys or buttons were pressed. I have the four-way arrow everywhere on the application window and no amount of clicking and pressing keys works to get rid of it. Scrolling using a mouse wheel of two-finger gesture of course does not work. and moving the mouse or pointer around moves the application window around without any keys or buttons being pressed. Only force closing and restarting telegram does work for a little while. I am running Arch Linux with XFCE desktop

ilya-fedin commented 2 years ago

i have literally had this problem for ages now. even in version 3.3 it happens quite often. the application appears as if it is being dragged around using left mouse button and Alt-key, even though no keys or buttons were pressed.

This sounds like #10348 rather than this issue

DK4PN commented 2 years ago

seems more like i am actually having both problems. Will now try to see if the suggested fix Enable "System Windows Frame" will do anything. Does not seem like it, sorry.

pfortin commented 2 years ago

Another weird problem (blurred images; videos OK) cropped up with Telegram over the last 12-18 hours. I managed to resolve thes issue by:

  1. Closing Telegram
  2. Finding a still running Telegram process
  3. Terminating that background process. Like this: $ ps aux | grep -i telegram pfortin 2573169 1.5 1.2 2783736 402960 pts/7 Sl Dec07 197:34 /home/pfortin/Downloads/Telegram/Telegram/2.5.7/Telegram/Telegram -noupdate $ kill 2573169 $ Telegram & ... it's running fine again, for now... Maybe this will help the mouse problem.
ilya-fedin commented 2 years ago

Why do you kill it instead of quitting via tray icon?

AndreyKopeyko commented 2 years ago

Finally I tried 3.3.0 and it demonstrates the same behaviour

@ilya-fedin @john-preston shall I create another debug log from 3.3.0 and send it to you?

pfortin commented 2 years ago

Why do you kill it instead of quitting via tray icon? Valid question... I was curious if there was something hanging around; found it and killed it from where I found it. Brain fart: Forgot that some apps leave a process running when you "close" them.

snorlax212 commented 2 years ago

xubuntu 20.04, telegram version 3.3. also encounter this bug, it appears randomly, mostly on startup. relaunch helps.

vazir commented 2 years ago

2 mouses connected (Ubuntu 21.10) at the same time, both Razer via BT, 1-atheris, 2-basilisk X. Basilisk - lost scrolling, Atheris still scrolls. Restarting Telegram restore scrolling in the chat... For a while. But it may be not a TG problem, as there are reports of similar (not exactly) problems with other apps (which I personally did not experienced https://support.mozilla.org/gl/questions/1256809)

prannonpendragas commented 2 years ago

Running Manjaro Linux with Telegram desktop 3.3. Having the same intermittent scroll wheel issue.

bast1aan commented 2 years ago

Telegram Desktop installed with Snap on Ubuntu 18.04 and 20.04, same issue. It only appears after a while, not immediately. Scrolling stops working with both my external (USB cabled) mouse as my laptops touchpad, so this is no hardware issue.

2 mouses connected (Ubuntu 21.10) at the same time, both Razer via BT, 1-atheris, 2-basilisk X. Basilisk - lost scrolling, Atheris still scrolls. Restarting Telegram restore scrolling in the chat... For a while. But it may be not a TG problem, as there are reports of similar (not exactly) problems with other apps (which I personally did not experienced https://support.mozilla.org/gl/questions/1256809)

This links to a very old issue to an even older environment, CentOS7/KDE4 is from 2014. I don't think this is relevant.

Aokromes commented 2 years ago

maybe https://newbedev.com/how-to-disable-auto-power-off-of-usb-devices-like-usb-mouse can work as workaround

Virusmater commented 2 years ago

Currently I have a situation when wireless mouse scroll stopped working, but laptop touchpad and trackpad are working