#StackBounty: #xorg #touchpad #lenovo #libinput #gestures Lenovo trackpad libinput pinch event being swallowed?

Bounty: 50

I’m running Ubuntu 21.10 development preview on a Lenovo 82B500DBAU, with xmonad-wm.

It has a MSFT0001:00 06CB:7F28 Touchpad, which for the most part seems to work quite well (notably though, isn’t supported [at all] in Linux kernels shipping with <= 21.04), which is being driven by libinput 1.18.1.

Two-finger scrolling, two-finger right-click, tap to click, and 3/4 finger gestures (using fusuma) all work perfectly fine. When watching libinput debug-gui, everything seems to work perfectly, detecting up to 5 fingers at a time with vertical/horizontal scrolling and pinching controls.

I’m having some trouble with pinching controls in applications however, and I intuitively feel that it is something to do with the libinput event getting swallowed somewhere along the way.

When watching libinput debug-events, I can clearly see PINCH events being triggered when I do a two finger pinch on the trackpad:

 event7   GESTURE_PINCH_BEGIN +35.886s  2
 event7   GESTURE_PINCH_UPDATE +35.886s 2 -0.40/-1.21 (-0.44/-1.32 unaccelerated)  1.03 @ -0.09
 event7   GESTURE_PINCH_UPDATE +35.893s 2  0.00/-0.80 ( 0.00/-0.88 unaccelerated)  1.06 @  0.13
 event7   GESTURE_PINCH_UPDATE +35.901s 2 -0.44/-0.88 (-0.44/-0.88 unaccelerated)  1.09 @ -0.06
 event7   GESTURE_PINCH_UPDATE +36.107s 2  0.88/ 2.20 ( 0.88/ 2.20 unaccelerated)  1.10 @  0.53
 event7   GESTURE_PINCH_UPDATE +36.114s 2  0.00/ 0.44 ( 0.00/ 0.44 unaccelerated)  1.10 @  0.04
 event7   GESTURE_PINCH_END +36.120s    2

And, if I set up fusuma to have some sort of trigger on a trackpad pinch, it will happily trigger that function for me.

What I’m looking for is smooth zooming in applications that should support it — notably, the ones I have been testing with are firefox 91.0 and evince 40.4. These applications, AIUI, should natively support pinch controls for a smooth zoom (eg. in the case of Firefox 83+, it should control a naive zoom which does not trigger a DOM re-render). However, neither of them seem to produce any effect.

I considered this may have been a window manager issue, but have since reproduced the same results in Ubuntu’s native GNOME.

Any wisdom in how I can continue to debug this? I’m not very well-versed in input devices / drivers / the overall abstract pipeline of things, so any ideas on things to try would be greatly appreciated.

EDIT: Forgot to mention — worth noting that "weirder" inputs like horizontal scrolling do work in applications like Firefox / evince, it really does just seem to be pinching.

Get this bounty!!!

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.