Bug 103960

Summary: libinput trackpad zoom too sensitive
Product: Wayland Reporter: Mikko Rapeli <mikko.rapeli>
Component: libinputAssignee: Wayland bug list <wayland-bugs>
Status: RESOLVED INVALID QA Contact:
Severity: normal    
Priority: medium CC: peter.hutterer
Version: unspecified   
Hardware: x86 (IA32)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:

Description Mikko Rapeli 2017-11-28 20:14:14 UTC
Sorry if I'm filing this to the wrong SW component, but it feels like libinput could be causing this.

On a Thinkpad T60 running Xfce from Debian unstable, the trackpad scromm from right side of the tracking area got really sensitive a while ago which sort of matches to some update or switch to libinput. 

In browser scrolling it is fine, but some how key combinations like alt + scroll from touch pad (weird full desktop zoom), ctrl + scroll from touchpad (change browser zoom level) and other to me new features are triggered way too fast.
Often it feels that the events are even buffered somewhere and key combination used to switch between X11 windows and slightly later touch on scroll triggers a browser zoom level change from 100 to 300% which is quite annoying.

I can't see ways to change or disable these things in Xfce mouse dialogs or anywhere else in Xfce settings.

How can I make touchpad scrolling less sensitive?

The touchpad itself is working fine and slow enough.

Device:           Power Button
Kernel:           /dev/input/event5
Group:            1
Seat:             seat0, default
Capabilities:     keyboard 
Tap-to-click:     n/a
Tap-and-drag:     n/a
Tap drag lock:    n/a
Left-handed:      n/a
Nat.scrolling:    n/a
Middle emulation: n/a
Calibration:      n/a
Scroll methods:   none
Click methods:    none
Disable-w-typing: n/a
Accel profiles:   n/a
Rotation:         n/a

Device:           Video Bus
Kernel:           /dev/input/event6
Group:            2
Seat:             seat0, default
Capabilities:     keyboard 
Tap-to-click:     n/a
Tap-and-drag:     n/a
Tap drag lock:    n/a
Left-handed:      n/a
Nat.scrolling:    n/a
Middle emulation: n/a
Calibration:      n/a
Scroll methods:   none
Click methods:    none
Disable-w-typing: n/a
Accel profiles:   n/a
Rotation:         n/a

Device:           Lid Switch
Kernel:           /dev/input/event3
Group:            3
Seat:             seat0, default
Capabilities:     switch
Tap-to-click:     n/a
Tap-and-drag:     n/a
Tap drag lock:    n/a
Left-handed:      n/a
Nat.scrolling:    n/a
Middle emulation: n/a
Calibration:      n/a
Scroll methods:   none
Click methods:    none
Disable-w-typing: n/a
Accel profiles:   n/a
Rotation:         n/a

Device:           Sleep Button
Kernel:           /dev/input/event4
Group:            4
Seat:             seat0, default
Capabilities:     keyboard 
Tap-to-click:     n/a
Tap-and-drag:     n/a
Tap drag lock:    n/a
Left-handed:      n/a
Nat.scrolling:    n/a
Middle emulation: n/a
Calibration:      n/a
Scroll methods:   none
Click methods:    none
Disable-w-typing: n/a
Accel profiles:   n/a
Rotation:         n/a

Device:           AT Translated Set 2 keyboard
Kernel:           /dev/input/event0
Group:            5
Seat:             seat0, default
Capabilities:     keyboard 
Tap-to-click:     n/a
Tap-and-drag:     n/a
Tap drag lock:    n/a
Left-handed:      n/a
Nat.scrolling:    n/a
Middle emulation: n/a
Calibration:      n/a
Scroll methods:   none
Click methods:    none
Disable-w-typing: n/a
Accel profiles:   n/a
Rotation:         n/a

Device:           SynPS/2 Synaptics TouchPad
Kernel:           /dev/input/event1
Group:            6
Seat:             seat0, default
Size:             43x24mm
Capabilities:     pointer 
Tap-to-click:     disabled
Tap-and-drag:     enabled
Tap drag lock:    disabled
Left-handed:      disabled
Nat.scrolling:    disabled
Middle emulation: n/a
Calibration:      n/a
Scroll methods:   *two-finger edge 
Click methods:    none
Disable-w-typing: enabled
Accel profiles:   none
Rotation:         n/a

Device:           TPPS/2 IBM TrackPoint
Kernel:           /dev/input/event2
Group:            7
Seat:             seat0, default
Capabilities:     pointer 
Tap-to-click:     n/a
Tap-and-drag:     n/a
Tap drag lock:    n/a
Left-handed:      disabled
Nat.scrolling:    disabled
Middle emulation: disabled
Calibration:      n/a
Scroll methods:   *button
Click methods:    none
Disable-w-typing: n/a
Accel profiles:   flat *adaptive
Rotation:         n/a

Device:           ThinkPad Extra Buttons
Kernel:           /dev/input/event7
Group:            8
Seat:             seat0, default
Capabilities:     keyboard 
Tap-to-click:     n/a
Tap-and-drag:     n/a
Tap drag lock:    n/a
Left-handed:      n/a
Nat.scrolling:    n/a
Middle emulation: n/a
Calibration:      n/a
Scroll methods:   none
Click methods:    none
Disable-w-typing: n/a
Accel profiles:   n/a
Rotation:         n/a
Comment 1 Peter Hutterer 2017-11-29 02:35:09 UTC
Not really something we can fix in libinput easily. The data libinput provides in the scroll events is well defined as "equivalent to pointer motion". So if the scrolling is too fast this means that the toolkit needs to scale down scroll motion to something more sensible for the given context. Since we don't have a reference or knowledge of what's on the screen at any time, having something that's defined in physical units is the only thing we *can* do.
Comment 2 Mikko Rapeli 2017-12-10 22:42:54 UTC
Hmm. Both web and file browsers suffer from this on my Xfce desktop. It feels the same on a number applications: from Thunar to Nautilus to Firefox to Chromium.

All behave in same so I suspect the input SW stack is the same and libinput is somewhere there too.

As a user it feels like something is adding an invisible weight to the scroll motion and this keeps weight keeps rolling after the movement on trackbad had ended. If I swipe a bit harder and faster and then later on press ctrl key, all of the apps suddenly combine the delayed scroll weight roll and ctrl key press as brand new ctrl key plus scroll event.

But they are not the same input gesture. They are separate. There a few tens if not hundreds of milliseconds between stopping scroll movement on track pad to when ctrl is pressed.

I think something in the SW stack, maybe libinput, could separate these two gestures. Or maybe there is way to change the weight of the virtual scroll ball to reduce the fly wheel effect where it keeps going long after my finger lifted from trackpad.
Comment 3 Peter Hutterer 2017-12-11 03:39:33 UTC
> If I swipe a bit harder and faster and then later on press ctrl key, all of the apps suddenly combine the delayed scroll weight roll and ctrl key press as brand new ctrl key plus scroll event.

that is a long-standing issue with the synaptics driver, but not with libinput. libinput doesn't do kinetic scrolling, any scroll event that happens after finger release is emulated in the client. Are you sure you're on libinput here?
Comment 4 Mikko Rapeli 2017-12-11 20:31:37 UTC
I thought I was using libinput since update of that made a difference to the trackpoint knob.

Here's what Xorg.log says:

[228234.049] (II) event5  - (II) Power Button: (II) is tagged by udev as: Keyboa
rd
[228234.049] (II) event5  - (II) Power Button: (II) device is a keyboard
[228234.052] (II) config/udev: Adding input device Video Bus (/dev/input/event6)
[228234.052] (**) Video Bus: Applying InputClass "evdev keyboard catchall"
[228234.052] (**) Video Bus: Applying InputClass "libinput keyboard catchall"
[228234.052] (II) Using input driver 'libinput' for 'Video Bus'
[228234.053] (**) Video Bus: always reports core events
[228234.053] (**) Option "Device" "/dev/input/event6"
[228234.053] (**) Option "_source" "server/udev"
[228234.055] (II) event6  - (II) Video Bus: (II) is tagged by udev as: Keyboard
[228234.055] (II) event6  - (II) Video Bus: (II) device is a keyboard
[228234.055] (II) event6  - (II) Video Bus: (II) device removed
[228234.068] (**) Option "config_info" "udev:/sys/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/LNXVIDEO:00/input/input7/event6"
[228234.068] (II) XINPUT: Adding extended input device "Video Bus" (type: KEYBOARD, id 7)
...
[228234.071] (II) event6  - (II) Video Bus: (II) is tagged by udev as: Keyboard
[228234.071] (II) event6  - (II) Video Bus: (II) device is a keyboard
[228234.074] (II) config/udev: Adding input device Lid Switch (/dev/input/event3
)
[228234.074] (II) No input driver specified, ignoring this device.
[228234.074] (II) This device may have been added with another device file.
[228234.077] (II) config/udev: Adding input device Sleep Button (/dev/input/event4)
[228234.077] (**) Sleep Button: Applying InputClass "evdev keyboard catchall"
[228234.077] (**) Sleep Button: Applying InputClass "libinput keyboard catchall"
[228234.077] (II) Using input driver 'libinput' for 'Sleep Button'
[228234.078] (**) Sleep Button: always reports core events
[228234.078] (**) Option "Device" "/dev/input/event4"
[228234.078] (**) Option "_source" "server/udev"
[228234.080] (II) event4  - (II) Sleep Button: (II) is tagged by udev as: Keyboard
[228234.080] (II) event4  - (II) Sleep Button: (II) device is a keyboard
[228234.081] (II) event4  - (II) Sleep Button: (II) device removed
[228234.100] (**) Option "config_info" "udev:/sys/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C0E:00/input/input5/event4"
[228234.100] (II) XINPUT: Adding extended input device "Sleep Button" (type: KEYBOARD, id 8)
...
[228234.139] (II) config/udev: Adding input device SynPS/2 Synaptics TouchPad (/dev/input/event1)
[228234.139] (**) SynPS/2 Synaptics TouchPad: Applying InputClass "evdev touchpad catchall"
[228234.139] (**) SynPS/2 Synaptics TouchPad: Applying InputClass "libinput touchpad catchall"
[228234.139] (**) SynPS/2 Synaptics TouchPad: Applying InputClass "touchpad catchall"
[228234.140] (**) SynPS/2 Synaptics TouchPad: Applying InputClass "Default clickpad buttons"
[228234.140] (**) SynPS/2 Synaptics TouchPad: Applying InputClass "Touchpad"
[228234.140] (II) LoadModule: "synaptics"
[228234.140] (II) Loading /usr/lib/xorg/modules/input/synaptics_drv.so
[228234.141] (II) Module synaptics: vendor="X.Org Foundation"
[228234.141]    compiled for 1.19.0, module version = 1.9.0
[228234.141]    Module class: X.Org XInput Driver
[228234.141]    ABI class: X.Org XInput driver, version 24.1
[228234.141] (II) Using input driver 'synaptics' for 'SynPS/2 Synaptics TouchPad
'
[228234.141] (**) SynPS/2 Synaptics TouchPad: always reports core events
[228234.141] (**) Option "Device" "/dev/input/event1"
[228234.176] (--) synaptics: SynPS/2 Synaptics TouchPad: x-axis range 1472 - 5472 (res 93)
[228234.176] (--) synaptics: SynPS/2 Synaptics TouchPad: y-axis range 1408 - 4448 (res 125)
[228234.176] (--) synaptics: SynPS/2 Synaptics TouchPad: pressure range 0 - 255
[228234.176] (--) synaptics: SynPS/2 Synaptics TouchPad: finger width range 0 - 15
[228234.176] (--) synaptics: SynPS/2 Synaptics TouchPad: buttons: left right double triple
[228234.176] (--) synaptics: SynPS/2 Synaptics TouchPad: Vendor 0x2 Product 0x7
[228234.177] (**) Option "VertEdgeScroll" "1"
[228234.177] (**) Option "VertTwoFingerScroll" "0"
[228234.177] (--) synaptics: SynPS/2 Synaptics TouchPad: touchpad found
[228234.177] (**) SynPS/2 Synaptics TouchPad: always reports core events
[228234.208] (**) Option "config_info" "udev:/sys/devices/platform/i8042/serio1/input/input2/event1"
[228234.208] (II) XINPUT: Adding extended input device "SynPS/2 Synaptics TouchPad" (type: TOUCHPAD, id 10)
[228234.208] (**) synaptics: SynPS/2 Synaptics TouchPad: (accel) MinSpeed is now constant deceleration 2.5
[228234.208] (**) synaptics: SynPS/2 Synaptics TouchPad: (accel) MaxSpeed is now 1.75
[228234.208] (**) synaptics: SynPS/2 Synaptics TouchPad: (accel) AccelFactor is now 0.040
[228234.209] (**) SynPS/2 Synaptics TouchPad: (accel) keeping acceleration scheme 1
[228234.209] (**) SynPS/2 Synaptics TouchPad: (accel) acceleration profile 1
[228234.209] (**) SynPS/2 Synaptics TouchPad: (accel) acceleration factor: 2.000
[228234.209] (**) SynPS/2 Synaptics TouchPad: (accel) acceleration threshold: 4
[228234.209] (--) synaptics: SynPS/2 Synaptics TouchPad: touchpad found
[228234.212] (II) config/udev: Adding input device SynPS/2 Synaptics TouchPad (/dev/input/mouse0)
[228234.213] (**) SynPS/2 Synaptics TouchPad: Ignoring device from InputClass "touchpad ignore duplicates"


So this means that the Xorg Synaptics driver is used for touchpad and not libinput?

[228234.217] (II) config/udev: Adding input device TPPS/2 IBM TrackPoint (/dev/input/event2)
[228234.217] (**) TPPS/2 IBM TrackPoint: Applying InputClass "evdev pointer catchall"
[228234.217] (**) TPPS/2 IBM TrackPoint: Applying InputClass "libinput pointer catchall"
[228234.217] (II) Using input driver 'libinput' for 'TPPS/2 IBM TrackPoint'
[228234.217] (**) TPPS/2 IBM TrackPoint: always reports core events
[228234.217] (**) Option "Device" "/dev/input/event2"
[228234.217] (**) Option "_source" "server/udev"
[228234.243] (II) event2  - (II) TPPS/2 IBM TrackPoint: (II) is tagged by udev as: Mouse Pointingstick
[228234.243] (II) event2  - (II) TPPS/2 IBM TrackPoint: (II) device is a pointer
[228234.243] (II) event2  - (II) TPPS/2 IBM TrackPoint: (II) device removed
[228234.280] (**) Option "config_info" "udev:/sys/devices/platform/i8042/serio1/serio2/input/input3/event2"
[228234.280] (II) XINPUT: Adding extended input device "TPPS/2 IBM TrackPoint" (type: MOUSE, id 11)
[228234.281] (**) Option "AccelerationScheme" "none"
[228234.281] (**) TPPS/2 IBM TrackPoint: (accel) selected scheme none/0
[228234.281] (**) TPPS/2 IBM TrackPoint: (accel) acceleration factor: 2.000
[228234.281] (**) TPPS/2 IBM TrackPoint: (accel) acceleration threshold: 4
[228234.284] (II) event2  - (II) TPPS/2 IBM TrackPoint: (II) is tagged by udev as: Mouse Pointingstick
[228234.285] (II) event2  - (II) TPPS/2 IBM TrackPoint: (II) device is a pointer
[228234.287] (II) config/udev: Adding input device TPPS/2 IBM TrackPoint (/dev/input/mouse1)
[228234.287] (II) No input driver specified, ignoring this device.
[228234.288] (II) This device may have been added with another device file.

Huh, does this say that libinput is not used for trackpoint either? I'm confused..
Comment 5 Mikko Rapeli 2017-12-11 20:33:58 UTC
Indeed, for the touchpad I'm still using synaptics driver and the problematic
default for me was:

CoastingSpeed=20

which continues the scroll after finger leaves touch and combines the scroll with keyboard button presses to produce the unwanted zoom etc actions. I'm fixing this with:

synclient CoastingSpeed=0

Sorry for barking at the wrong tree!

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.