tdesktop icon indicating copy to clipboard operation
tdesktop copied to clipboard

Mouse scrolling is broken

Open melroy89 opened this issue 2 years ago • 185 comments

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

melroy89 avatar Nov 15 '21 22:11 melroy89

  • Open any chat

  • Try to use your scroll-wheel, to scroll up or down

Works like a charm. Looks like these steps aren't right.

ilya-fedin avatar Nov 15 '21 23:11 ilya-fedin

Hmm.. restarting Telegram fixed the problem. I could still type messages.

Is there some kind of crash report or logging file I could refer to?

EDIT: I found /home/<user>/.local/share/TelegramDesktop/log.txt file..

melroy89 avatar Nov 16 '21 00:11 melroy89

The log file (log.txt) gets overridden.. Maybe you should store at least the current log AND ALSO the previous log file.

melroy89 avatar Nov 16 '21 00:11 melroy89

Nothing regarding scrolling is logging, it's something handled at toolkit level, not at app level

ilya-fedin avatar Nov 16 '21 00:11 ilya-fedin

happened here with me too.

what I noticed is that the problem is intermittent, when the scroll does not work, I noticed that the mouse icon is different when it is over the application, and when the mouse icon is not different (from other apps) the scroll works in desktop telegram

I'm using the binary version available here on github in release v3.2.4 Pop!_OS 21.04 x64 Gnome 3.38.5 X11

jprando avatar Nov 16 '21 02:11 jprando

Without a reliable way to reproduce, it's unlikely to be fixed

ilya-fedin avatar Nov 16 '21 02:11 ilya-fedin

Without a reliable way to reproduce, it's unlikely to be fixed

yes, i'll keep an eye out here and if i can find a way to reproduce it, i'll share it here 😉

jprando avatar Nov 16 '21 03:11 jprando

@ilya-fedin yes, you could also think along how to debug this issue better.

melroy89 avatar Nov 16 '21 14:11 melroy89

@danger89 I don't imagine how this could happen and how to debug this, tdesktop just reacts to mouse events sent by Qt. I have a feel this is a Qt bug.

ilya-fedin avatar Nov 16 '21 14:11 ilya-fedin

I have the same problem running 3.2.2 and 3.2.5 versions.

version 3.2.5 works for while after start, but some moment later wheel scroll becomes broken.

AndreyKopeyko avatar Nov 17 '21 07:11 AndreyKopeyko

@danger89 I don't imagine how this could happen and how to debug this, tdesktop just reacts to mouse events sent by Qt. I have a feel this is a Qt bug.

It should happened in 3.1.8 version also if it was a Qt bag. But 3.1.8 scrolls nicely. No update of Gt libs on my laptop happened.

AndreyKopeyko avatar Nov 17 '21 07:11 AndreyKopeyko

Qt was updated in 3.2.0

ilya-fedin avatar Nov 17 '21 07:11 ilya-fedin

Without a reliable way to reproduce, it's unlikely to be fixed

How to reproduce:

  1. install & start telegram desktop 3.2.5 - wheel scroll will work
  2. put your note asleep - just close the lid
  3. after awake - wheel scroll fails ;-(

Ubuntu 20.04.3 LTS libqt5gui5:amd64 5.12.8+dfsg-0ubuntu1

AndreyKopeyko avatar Nov 17 '21 09:11 AndreyKopeyko

libqt5gui5:amd64 5.12.8+dfsg-0ubuntu1

tdesktop doesn't use your system Qt, it has Qt 6.2 embedded in the binary

ilya-fedin avatar Nov 17 '21 09:11 ilya-fedin

  1. put your note asleep - just close the lid

Can you be more specific - you mean suspend or hibernation? I don't have any action assigned to the lid.

ilya-fedin avatar Nov 17 '21 09:11 ilya-fedin

  1. put your note asleep - just close the lid

Can you be more specific - you mean suspend or hibernation? I don't have any action assigned to the lid.

suspend. No hibernation.

AndreyKopeyko avatar Nov 17 '21 09:11 AndreyKopeyko

suspend. No hibernation.

Sorry, but I can't reproduce :( Works like a charm after suspend on my hardware.

ilya-fedin avatar Nov 17 '21 09:11 ilya-fedin

Qt was updated in 3.2.0

This could be why..

Maybe build a debug app (if possible, so we can catch any eerros)? Or did you see anything strange in the telegram desktop log.txt?

melroy89 avatar Nov 17 '21 10:11 melroy89

suspend. No hibernation.

Sorry, but I can't reproduce :( Works like a charm after suspend on my hardware.

Sorry indeed. How can I get additional info for you? Does desktop write some logs I can send you back?

AndreyKopeyko avatar Nov 17 '21 16:11 AndreyKopeyko

Maybe build a debug app (if possible, so we can catch any eerros)? Or did you see anything strange in the telegram desktop log.txt?

I don't imagine how a debug build would help, this is not a crash, so debug symbols won't help. log.txt won't help either since, as I said previously, nothing regarding scrolling is logged.

How can I get additional info for you?

I don't know :(. If this is a Qt bug, only Qt developers know how to debug this...

ilya-fedin avatar Nov 17 '21 20:11 ilya-fedin

yea I could find some debugging techniques within the Qt docs: https://doc.qt.io/qt-5/debug.html

Just maybe QT_DEBUG_PLUGINS=1 environment variable could help... Maybe..

melroy89 avatar Nov 17 '21 23:11 melroy89

All QT_DEBUG_PLUGINS=1 does is outputs debug info about plugins loading

ilya-fedin avatar Nov 17 '21 23:11 ilya-fedin

maybe QT_LOGGING_RULES='*.debug=true' would help, I'm not sure...

ilya-fedin avatar Nov 17 '21 23:11 ilya-fedin

suspend. No hibernation.

Sorry, but I can't reproduce :( Works like a charm after suspend on my hardware.

It solidly happens if notebook was suspended for about 1 hour - the way from home to office.

AndreyKopeyko avatar Nov 18 '21 10:11 AndreyKopeyko

QT_LOGGING_RULES='*.debug=true'

It produces a lot of output. Hope my SSD is enough to accommodate all of them until scroll freezes...

AndreyKopeyko avatar Nov 18 '21 10:11 AndreyKopeyko

maybe QT_LOGGING_RULES='*.debug=true' would help, I'm not sure...

Pls take a look in the log - https://dev.kopeyko.ru/tmp/telegram-v3.2.5.debug20211119.output

I started telegram as

kaa@MRGnb2:~/tmp$ QT_LOGGING_RULES='*.debug=true' telegram 2>&1 |tee telegram-v3.2.5.debug20211119.output

All day it work great, but finally wheel scrolling got frozen - after note spend about 45 minutes in suspend mode (the way from office to home) :-(

Hope it'll help you to investigate the problem.

AndreyKopeyko avatar Nov 18 '21 21:11 AndreyKopeyko

Pls take a look in the log - https://dev.kopeyko.ru/tmp/telegram-v3.2.5.debug20211119.output

I see input device re-detection at line 87810 and no scroll wheel events logged since then. I don't know when it happened though since the log has no timestamps.

ilya-fedin avatar Nov 18 '21 21:11 ilya-fedin

Pls take a look in the log - https://dev.kopeyko.ru/tmp/telegram-v3.2.5.debug20211119.output

I see input device re-detection at line 87810 and no scroll wheel events logged since then. I don't know when it happened though since the log has no timestamps.

How I can enable timestamps?

AndreyKopeyko avatar Nov 18 '21 22:11 AndreyKopeyko

looks like QT_MESSAGE_PATTERN="[%{time}] %{if-category}%{category}: %{endif}%{message}"

ilya-fedin avatar Nov 18 '21 22:11 ilya-fedin

Pls take a look in the log - https://dev.kopeyko.ru/tmp/telegram-v3.2.5.debug20211119.output

I see input device re-detection at line 87810 and no scroll wheel events logged since then. I don't know when it happened though since the log has no timestamps.

OK, tomorrow morning you'll have the log with a timestamps and with a scroll freeze, both of them.

20211119T013539: qt.qpa.xcb: Has MIT-SHM : true
20211119T013539: qt.qpa.xcb: Has MIT-SHM FD : true
20211119T013539: qt.qpa.xcb: Using XInput version 2.2
20211119T013539: qt.qpa.screen: EDID data for output "eDP-1": identifier 'LP140WF6-SPB1', manufacturer 'LGD',model '', serial '', physical size: 310.00x170.00
20211119T013539: qt.qpa.screen: Output DP-1 is not connected
20211119T013539: qt.qpa.screen: Output HDMI-1 is not connected
20211119T013539: qt.qpa.screen: Output DP-2 is not connected
20211119T013539: qt.qpa.screen: Output HDMI-2 is not connected
20211119T013539: qt.qpa.screen: Output DP-2-1 is not connected
20211119T013539: qt.qpa.screen: Output DP-2-2 is not connected
20211119T013539: qt.qpa.screen: Output DP-2-3 is not connected
20211119T013539: qt.qpa.screen: adding QXcbScreen(0x7f3a05cbf540, name="eDP-1", geometry=1920x1080+0+0, availableGeometry=1864x1053+56+27, devicePixelRatio=1.0, logicalDpi=std::pair(96.0,96.0), physicalSize=309.0x174.0mm, screenNumber=0, virtualSize=1920x1080 (1920.0x1080.0mm), orientation=Qt::LandscapeOrientation, depth=24, refreshRate=60.0, root=7ad, windowManagerName="GNOME Shell") (Primary: true )
20211119T013539: qt.qpa.screen: primary output is "eDP-1"

AndreyKopeyko avatar Nov 18 '21 22:11 AndreyKopeyko