0

Libinput version - 1.14.1
OS - Arch Linux
Kernel version - 5.1.9
System - Lenovo T480s Display - X11

Recently my laptop has started firing left mouse click during normal navigation with single finger and double finger scrolling. This has lead to near breakdown of touchpad functionality with rogue selections, drags and click because of this.

xinput test results:

motion a[3]=5356 
motion a[3]=5358 
motion a[3]=5359 
motion a[3]=5360 
motion a[3]=5362 
motion a[3]=5363 
motion a[3]=5364 
motion a[2]=-24 a[3]=5364 
button press   1 
motion a[0]=559 a[1]=775 
motion a[1]=776 
motion a[1]=777 
motion a[1]=778 
motion a[1]=779 
motion a[1]=780 
motion a[1]=781 
motion a[1]=781 
motion a[1]=782 
motion a[1]=783 
motion a[1]=783 
motion a[1]=782 
motion a[0]=558 a[1]=778 
motion a[0]=557 a[1]=773 
motion a[0]=556 a[1]=767 
motion a[0]=554 a[1]=761 
motion a[0]=552 a[1]=755 
motion a[0]=551 a[1]=748 
motion a[0]=549 a[1]=741 
motion a[0]=547 a[1]=733 
motion a[0]=545 a[1]=723 
motion a[0]=543 a[1]=714 
motion a[0]=541 a[1]=706 
motion a[0]=539 a[1]=698 
motion a[0]=537 a[1]=691 
motion a[0]=536 a[1]=683 
motion a[0]=533 a[1]=674 
motion a[0]=532 a[1]=666 
motion a[0]=530 a[1]=657 
motion a[0]=528 a[1]=649 
motion a[0]=527 a[1]=641 
motion a[0]=525 a[1]=633 
motion a[0]=523 a[1]=624 
motion a[0]=521 a[1]=616 
motion a[0]=519 a[1]=608 
motion a[0]=517 a[1]=600 
motion a[0]=515 a[1]=592 
motion a[0]=512 a[1]=584 
button release 1 
motion a[3]=5361 
motion a[3]=5357   

You can see the button press 1 and button release 1 during normal motion.
This being a dual boot setup, I booted into Windows and faced no such issues. Either windows is not registering the incorrect events or is ignoring them.

I tried fixing this by disabling left-click using xinput set-button-map 11 0 2 3 4 5 6 7. Though this solves the issue, it breaks tapping.

Contents of /usr/share/X11/xorg.conf.d/40-libinput.conf

# Match on all types of devices but joysticks
#
# If you want to configure your devices, do not copy this file.
# Instead, use a config snippet that contains something like this:
#
# Section "InputClass"
#   Identifier "something or other"
#   MatchDriver "libinput"
#
#   MatchIsTouchpad "on"
#   ... other Match directives ...
#   Option "someoption" "value"
# EndSection
#
# This applies the option any libinput device also matched by the other
# directives. See the xorg.conf(5) man page for more info on
# matching devices.

Section "InputClass"
        Identifier "libinput pointer catchall"
        MatchIsPointer "on"
        MatchDevicePath "/dev/input/event*"
        Driver "libinput"
EndSection

Section "InputClass"
        Identifier "libinput keyboard catchall"
        MatchIsKeyboard "on"
        MatchDevicePath "/dev/input/event*"
        Driver "libinput"
EndSection

Section "InputClass"
        Identifier "libinput touchpad catchall"
        MatchIsTouchpad "on"
        MatchDevicePath "/dev/input/event*"
        Driver "libinput"
        Option "TappingDrag" "false"
EndSection

Section "InputClass"
        Identifier "libinput touchscreen catchall"
        MatchIsTouchscreen "on"
        MatchDevicePath "/dev/input/event*"
        Driver "libinput"
EndSection

Section "InputClass"
        Identifier "libinput tablet catchall"
        MatchIsTablet "on"
        MatchDevicePath "/dev/input/event*"
        Driver "libinput"
EndSection

xinput list-props for the device:

Device 'Elan Touchpad':
    Device Enabled (152):   1
    Coordinate Transformation Matrix (154): 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
    libinput Tapping Enabled (287): 1
    libinput Tapping Enabled Default (288): 0
    libinput Tapping Drag Enabled (289):    0
    libinput Tapping Drag Enabled Default (290):    1
    libinput Tapping Drag Lock Enabled (291):   0
    libinput Tapping Drag Lock Enabled Default (292):   0
    libinput Tapping Button Mapping Enabled (293):  1, 0
    libinput Tapping Button Mapping Default (294):  1, 0
    libinput Natural Scrolling Enabled (295):   0
    libinput Natural Scrolling Enabled Default (296):   0
    libinput Disable While Typing Enabled (297):    1
    libinput Disable While Typing Enabled Default (298):    1
    libinput Scroll Methods Available (299):    1, 1, 0
    libinput Scroll Method Enabled (300):   1, 0, 0
    libinput Scroll Method Enabled Default (301):   1, 0, 0
    libinput Click Methods Available (302): 1, 1
    libinput Click Method Enabled (303):    1, 0
    libinput Click Method Enabled Default (304):    1, 0
    libinput Middle Emulation Enabled (305):    0
    libinput Middle Emulation Enabled Default (306):    0
    libinput Accel Speed (307): 0.000000
    libinput Accel Speed Default (308): 0.000000
    libinput Left Handed Enabled (309): 0
    libinput Left Handed Enabled Default (310): 0
    libinput Send Events Modes Available (272): 1, 1
    libinput Send Events Mode Enabled (273):    0, 0
    libinput Send Events Mode Enabled Default (274):    0, 0
    Device Node (275):  "/dev/input/event8"
    Device Product ID (276):    1267, 32
    libinput Drag Lock Buttons (311):   <no items>
    libinput Horizontal Scroll Enabled (312):   1

WIll the libinput Tapping Drag Enabled Default (290) property help here? I tried disabling it via sudo xinput set-prop 11 290 0 but keep getting the following error:

X Error of failed request:  BadAccess (attempt to access private resource denied)
Major opcode of failed request:  131 (XInputExtension)
Minor opcode of failed request:  57 ()
Serial number of failed request:  20
Current serial number in output stream:  21
  1. Given that the touchpad works fine in Windows, is this an issue with libinput? Are there ways I can compensate for this while still retaining tapping?
  2. Or this is a clear hardware issue and I should (painfully) send the laptop for repairs?
  • Try to run evemu-record, and check if you see BTN_TOUCH 1/0 events when these unintentional left mouse clicks happen. If you do see them, then you know it's a problem with the touchpad. If you don't see them, then it's probably a regression with something, maybe libinput. It certainly would be worth reporting. Oh, and while on it: you can't change a property that ends with Default, it's there just for reference "what the default value was". – Hi-Angel Oct 28 '19 at 20:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.