Bug 464776 - Twice as many scroll events as expected on Wayland
Summary: Twice as many scroll events as expected on Wayland
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: input (show other bugs)
Version: 5.26.90
Platform: Debian unstable Linux
: NOR normal
Target Milestone: ---
Assignee: John Brooks
URL:
Keywords: regression, wayland
: 465299 (view as bug list)
Depends on:
Blocks:
 
Reported: 2023-01-25 00:40 UTC by legimet
Modified: 2023-02-06 23:12 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.27
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description legimet 2023-01-25 00:40:30 UTC
After updating to the Plasma 5.27 beta release, scrolling events occur twice as much as expected. This only occurs on Wayland, and happens with both Xwayland and native Wayland applications. For instance, scrolling through the task manager on the bottom panel goes through the windows two at a time. The same thing happens in other applications (e.g. scrolling through the inventory list in the game Enigma). I am using a Logitech M720 wireless mouse.

STEPS TO REPRODUCE
1. Scroll through the windows listed on the bottom panel.

OBSERVED RESULT
Scrolls through windows two at a time.

EXPECTED RESULT
Scrolls through windows one at a time.

SOFTWARE/OS VERSIONS
KDE Plasma Version: 5.26.90
KDE Frameworks Version: 5.102.0
Qt Version: 5.15.8
Comment 1 John Brooks 2023-01-25 18:40:00 UTC
Can you run this in a terminal:
WAYLAND_DEBUG=1 konsole

A new terminal will open, move it so you can see both terminals. Scroll down with your mouse once and then press ctrl+d to close the terminal (so it doesn't flood it with more events). You'll see some events like this:
[3984022.430] wl_pointer@22.axis_source(0)
[3984022.439] wl_pointer@22.axis_discrete(0, 1)
[3984022.446] wl_pointer@22.axis(665303204, 0, 15.00000000)
[3984022.451] wl_pointer@22.frame()

Paste the events you get when scrolling once.
Comment 2 John Brooks 2023-01-25 20:05:53 UTC
Please see my comment above
Comment 3 legimet 2023-01-25 21:38:13 UTC
[1769264.988] wl_pointer@22.axis_source(0)
[1769265.028] wl_pointer@22.axis(20683845, 0, -15.00000000)
[1769265.045] wl_pointer@22.frame()
[1769292.491]  -> wl_surface@27.frame(new id wl_callback@44)
[1769292.554]  -> wl_surface@27.attach(wl_buffer@35, 0, 0)
[1769292.579]  -> wl_surface@27.damage_buffer(0, 76, 1680, 901)
[1769292.603]  -> wl_surface@27.commit()
[1769292.642] wl_pointer@22.axis_source(0)
[1769292.668] wl_pointer@22.axis(20683861, 0, -3.75000000)
[1769292.692] wl_pointer@22.frame()
[1769303.465] wl_display@1.delete_id(44)
[1769303.518] wl_callback@44.done(20683028)
[1769316.424]  -> wl_surface@27.frame(new id wl_callback@44)
[1769316.515]  -> wl_surface@27.attach(wl_buffer@45, 0, 0)
[1769316.543]  -> wl_surface@27.damage_buffer(0, 76, 1680, 901)
[1769316.574]  -> wl_surface@27.commit()
[1769316.637] wl_buffer@38.release()
[1769316.670] wl_pointer@22.axis_source(0)
[1769316.692] wl_pointer@22.axis(20683877, 0, -3.75000000)
[1769316.718] wl_pointer@22.frame()
[1769316.756] wl_pointer@22.axis_source(0)
[1769316.775] wl_pointer@22.axis(20683893, 0, -3.75000000)
[1769316.793] wl_pointer@22.frame()
[1769344.733]  -> wl_surface@27.attach(wl_buffer@38, 0, 0)
[1769344.803]  -> wl_surface@27.damage_buffer(0, 76, 1680, 901)
[1769344.833]  -> wl_surface@27.commit()
[1769349.119] wl_display@1.delete_id(44)
[1769349.262] wl_callback@44.done(20683920)
[1769349.317] wl_buffer@35.release()
[1769349.356] wl_pointer@22.axis_source(0)
[1769349.383] wl_pointer@22.axis_discrete(0, -1)
[1769349.406] wl_pointer@22.axis(20683921, 0, -3.75000000)
[1769349.432] wl_pointer@22.frame()
[1769374.324]  -> wl_surface@27.frame(new id wl_callback@44)
[1769374.438]  -> wl_surface@27.attach(wl_buffer@35, 0, 0)
[1769374.476]  -> wl_surface@27.damage_buffer(0, 76, 1680, 901)
[1769374.508]  -> wl_surface@27.commit()
[1769379.731] wl_buffer@45.release()
[1769410.749] wl_display@1.delete_id(44)
[1769410.856] wl_callback@44.done(20683986)
[1769410.964] wl_buffer@38.release()
Comment 4 John Brooks 2023-01-25 21:59:07 UTC
What is your kernel version? `uname -a`
Comment 5 legimet 2023-01-25 22:10:19 UTC
(In reply to John Brooks from comment #4)
> What is your kernel version? `uname -a`

6.1.0-2-amd64

Also, I noticed that scrolling works fine in Enigma (the game that I mentioned) if I use SDL_VIDEODRIVER=wayland.
Comment 6 John Brooks 2023-01-25 22:38:58 UTC
I see what happened. This was already fixed, but the commit that fixed it was added immediately after the beta was tagged. https://invent.kde.org/plasma/kwin/-/commit/9f494da9fa29fd2a8abd34e5bde95d531026301e

The parent (previous) commit is the beta version. Sorry about this.
Comment 7 legimet 2023-01-26 04:47:56 UTC
Thanks. I patched the Debian kwin package with that commit, and scrolling works normally in the Wayland session. However, I still get too many scroll events when using X11 in KDE applications such as Konsole and Dolphin. I will report a separate bug.
Comment 8 legimet 2023-01-26 06:52:51 UTC
(In reply to legimet from comment #7)
> Thanks. I patched the Debian kwin package with that commit, and scrolling
> works normally in the Wayland session. However, I still get too many scroll
> events when using X11 in KDE applications such as Konsole and Dolphin. I
> will report a separate bug.

Actually, I think this is probably a Qt issue. It happens in Qt applications like Wireshark that don't use KDE libraries, when running on X11 regardless of whether I'm in a Plasma session.
Comment 9 John Brooks 2023-02-06 23:10:52 UTC
*** Bug 465299 has been marked as a duplicate of this bug. ***