Bug 470746 - Discrete mouse wheel movements do not always generate axis event when scrolling speed is reduced to a lower-than-default value
Summary: Discrete mouse wheel movements do not always generate axis event when scrolli...
Status: CONFIRMED
Alias: None
Product: kwin
Classification: Plasma
Component: input (show other bugs)
Version: 5.27.5
Platform: Arch Linux Linux
: HI normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords: wayland-only
: 462517 471396 487831 488936 489123 500875 (view as bug list)
Depends on:
Blocks:
 
Reported: 2023-06-07 12:53 UTC by hexchain
Modified: 2025-03-05 16:00 UTC (History)
12 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description hexchain 2023-06-07 12:53:47 UTC
SUMMARY
When scrolling speed is reduced to a value less than the default, mouse wheel movements will generate inconsistent wl_pointer axis events for Wayland clients.

This seems to affect scrolling in WezTerm, Qt5/6/GTK3 list views, Firefox (Wayland), and Chromium tab strip. 

STEPS TO REPRODUCE
1. Reset the "scrolling speed" of the current mouse to its default (5th tick on the slider)
2. Start wev from a terminal, move the wheel while hovering the window, and observe the output.
3. Reduce the scrolling speed
4. Repeat step 2

OBSERVED RESULT
When the scrolling speed is at its default value, wl_pointer axis events with the following values can be observed:
15, 15, 15, 15, ...

When it is lower than the default, one of the following repeat sequences can be seen (x = empty frame):
- x, 22, 11, ...
- x, 15, ...
- x, x, x, 18, x, x, 13, x, x, 13, ...
- x (repeat 9 times), 15, ...

EXPECTED RESULT
I'm not sure what the expected (correct) outcome should be, but I guess every wheel movement should generate an axis event with the same value.

SOFTWARE/OS VERSIONS
Operating System: Arch Linux 
KDE Plasma Version: 5.27.5
KDE Frameworks Version: 5.106.0
Qt Version: 5.15.9
Kernel Version: 6.3.5-arch1-1 (64-bit)
Graphics Platform: Wayland
Comment 1 Nate Graham 2023-06-07 18:45:50 UTC
Can reproduce on Plasma 5.27 (can't test on 6 right now because the mouse KCM doesn't open); probably it's being rounded down do nothing. We should always ensure that a single scroll tick adjusts the axis by at least 1.
Comment 2 Zamundaaa 2023-06-07 19:07:53 UTC
This bug is not caused by rounding errors or wl_pointer axis events. It's caused by axis_discrete & axis_value120 events being handled incorrectly after https://invent.kde.org/plasma/kwin/-/merge_requests/3900
Comment 3 Nate Graham 2023-06-07 19:16:09 UTC
So we're back to the original error state, darn.
Comment 4 Zamundaaa 2023-08-04 22:07:59 UTC
*** Bug 471396 has been marked as a duplicate of this bug. ***
Comment 5 Zamundaaa 2024-06-11 23:41:33 UTC
*** Bug 462517 has been marked as a duplicate of this bug. ***
Comment 6 Zamundaaa 2024-06-11 23:41:51 UTC
*** Bug 487831 has been marked as a duplicate of this bug. ***
Comment 7 Nate Graham 2024-06-25 14:15:15 UTC
*** Bug 489123 has been marked as a duplicate of this bug. ***
Comment 8 Nate Graham 2024-06-27 16:11:54 UTC
*** Bug 488936 has been marked as a duplicate of this bug. ***
Comment 9 Nate Graham 2025-03-05 16:00:37 UTC
*** Bug 500875 has been marked as a duplicate of this bug. ***