I'm using Ubuntu 22.04.2 on an x86_64 system, with Xorg and libinput.
I have a Logitech MX Master mouse (the first model), and I've noticed some unusual behaviour with scrolling. The mouse has a free-wheeling scroll wheel which can be set to "notched" mode, allowing distinct tactile feedback for each scroll event.
The problem is that sometimes a scroll event is missed. E.g. scrolling through Firefox, or an IDE window, sometimes moving the wheel a single notch has no visual effect, but subsequent notches work OK.
Narrowing it down, it seems that the first notch in the alternate direction is always dropped. I.e. if I scroll down three notches, the visual response corresponds to three scroll events, then if I scroll up one notch, there is no response. The second up event does cause a visual response.
I used xev -event button
and it clearly shows no ButtonPress or ButtonRelease events if I move the scroll wheel up/down a single notch. I have to reverse direction and move it two notches to see any new events.
I used evtest
and libinput debug-events
and the device itself is definitely generating correct low-level messages for scroll wheel movements - so the low level and hardware are working properly.
From this question, I think this suggests the issue is somewhere above libinput - what would be the next component in the stack to look at?
EDIT: Given that xev
shows the problem, and libinput debug-events
does not, I'm thinking that the obvious first place to look is xf86-input-libinput
, so I've built my own version and will start debugging it shortly...
EDIT2: after putting in debug for xf86-input-libinput
I have confirmed that the data coming into this layer from libinput is intact, and seemingly correct, but the conversion to X11 input events seems to drop some of the data. Unfortunately, having live debug output in the log causes the problem to disappear, so I'm wondering if this is some kind of timing related situation, perhaps with regards to scroll wheel position estimation? I'll dig deeper when I have time.
xinput
andxinput list-props ID_OF_THE_MOUSE
Also, this thread could give some extra insights on the debugging process: gitlab.freedesktop.org/libinput/libinput/-/issues/681