Elantech touchpad physical click buttons not working after update

After updating OpenSuse Tumbleweed, my touchpad stopped working properly.
Moving the cursor still works, but clicking with the physical buttons stopped working.
The left click button of the touchpad works sometimes after a reboot, the middle button works almost never.
The right click button never works.

In grub I can boot different kernels (/etc/zypp/zypp.conf).
When I boot the 4.17.13-1 kernel, the touchpad and the physical buttons work.
When I boot the 4.18.0-1 kernel, the touchpad doesn’t work, as described above.

xinput list gives:
⎡ Virtual core pointer id=2 [master pointer (3)] ⎜ ↳ ELAN1200:00 04F3:301A Touchpad id=11 [slave pointer (2)]

My touchpad is an Elantech touchpad on an ASUS Zenbook Flip.

xinput list-props 11 gives:

Device 'ELAN1200:00 04F3:301A Touchpad': 	Device Enabled (148):	1 	Coordinate Transformation Matrix (150):	1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000 	libinput Tapping Enabled (283):	1 	libinput Tapping Enabled Default (284):	0 	libinput Tapping Drag Enabled (285):	1 	libinput Tapping Drag Enabled Default (286):	1 	libinput Tapping Drag Lock Enabled (287):	0 	libinput Tapping Drag Lock Enabled Default (288):	0 	libinput Tapping Button Mapping Enabled (289):	1, 0 	libinput Tapping Button Mapping Default (290):	1, 0 	libinput Natural Scrolling Enabled (291):	0 	libinput Natural Scrolling Enabled Default (292):	0 	libinput Disable While Typing Enabled (293):	1 	libinput Disable While Typing Enabled Default (294):	1 	libinput Scroll Methods Available (295):	1, 1, 0 	libinput Scroll Method Enabled (296):	1, 0, 0 	libinput Scroll Method Enabled Default (297):	1, 0, 0 	libinput Click Methods Available (298):	1, 1 	libinput Click Method Enabled (299):	1, 0 	libinput Click Method Enabled Default (300):	1, 0 	libinput Middle Emulation Enabled (301):	0 	libinput Middle Emulation Enabled Default (302):	0 	libinput Accel Speed (303):	0.000000 	libinput Accel Speed Default (304):	0.000000 	libinput Left Handed Enabled (305):	0 	libinput Left Handed Enabled Default (306):	0 	libinput Send Events Modes Available (268):	1, 1 	libinput Send Events Mode Enabled (269):	0, 0 	libinput Send Events Mode Enabled Default (270):	0, 0 	Device Node (271):	"/dev/input/event17" 	Device Product ID (272):	1267, 12314 	libinput Drag Lock Buttons (307):	 	libinput Horizontal Scroll Enabled (308):	1

libinput list-devices gives:


Device:           ELAN1200:00 04F3:301A Touchpad Kernel:           /dev/input/event17 Group:            7 Seat:             seat0, default Size:             103x71mm Capabilities:     pointer gesture Tap-to-click:     disabled Tap-and-drag:     enabled Tap drag lock:    disabled Left-handed:      disabled Nat.scrolling:    disabled Middle emulation: disabled Calibration:      n/a Scroll methods:   *two-finger edge  Click methods:    *button-areas clickfinger  Disable-w-typing: enabled Accel profiles:   none Rotation:         n/a

When I run libinput debug-events, I get output about the position of the touchpad:
event17 POINTER_MOTION …

However, I don’t get any output about clicking with the physical buttons of the touchpad.

Does anyone know how to debug this problem?
How could I check whether libinput is the problem?
Is there a recent update which broke the touchpad functionality?

It could be a kernel regression at play I guess. Some questions… Can you roll back (assuming snapper/btrfs in use)? Did you reboot since this update? I assume you’re using the following to kepp your OS up to date?

zypper dup

In the first months I used zypper up to keep my os up to date and sometimes after doing that I’ve used zypper dup.
Yesterday I’ve read that you should only use zypper dup on tumbleweed.
I rebooted multiple times after the update.

I tried other kernels with the multiversion.kernels option from /etc/zypp/zypp.conf.
In grub I can select the old kernels.
On kernel 4.17.13-1 everything works as it should.
The next version of the kernel available in my grub menu is 4.18.0-1, where the problems are introduced.
I can’t tell for sure whether the problem is the kernel, but when I boot the old 4.17.13-1 kernel in grub, everything works again.
I’m using btrfs, but I guess I will lose my files after doing a btrfs rollback?

I have a little bit experience with kernel development and kernel debugging, so I’m wondering how I could debug this issue.
Is there a way to diff the two kernel images, so I could triage and fix the issue?

If you don’t mind a bit of effort, you could do a kernel bisection. It involves downloading the kernel git tree and running git bisect on it iteratively. You start with a kernel version that definitely doesn’t have the issue and a version does, with the version being as close to each other as possible. Each bisection gives you a new intermediate kernel to build and test. This helps to find the change that is causing the problem. I’ve often seen this done as part of a bug report.

https://git-scm.com/docs/git-bisect/1.6.2.2

At the very least though, submitting a bug report with a good description and demonstrating which kernel upgrade introduced the regression could be helpful here.

Same here. Asus zenbook ux330u. Left click still works, right click is dead. xev doesn’t feel it. libinput debug-events doesn’t feel it. evtest DOES see events from the right click area. IT has happened after update to 4.18 tumbleweed.


Device:           ELAN1200:00 04F3:3022 Touchpad
Kernel:           /dev/input/event9
Group:            8
Seat:             seat0, default
Size:             103x71mm
Capabilities:     pointer gesture
Tap-to-click:     disabled
Tap-and-drag:     enabled
Tap drag lock:    disabled
Left-handed:      disabled
Nat.scrolling:    disabled
Middle emulation: disabled
Calibration:      n/a
Scroll methods:   *two-finger edge  
Click methods:    *button-areas clickfinger  
Disable-w-typing: enabled
Accel profiles:   none
Rotation:         n/a


Asus Zenbook Flip UX360C here.
Sometimes my left click suddenly works after a reboot, but most of the times none of the physical buttons.
Tapping on the touchpad does trigger a click event, is it the same with yours?
Could you please post the debug output from evtest, so I could compare your output with mine?

Tapping clicks are working fine. I’ve configured tapping with 2 fingers to serve as a right click. Left click works always. Right click - never.

This is evtest output of single tap on right click area and of right click.


Input driver version is 1.0.1
Input device ID: bus 0x18 vendor 0x4f3 product 0x3022 version 0x100
Input device name: "ELAN1200:00 04F3:3022 Touchpad"
Supported events:
  Event type 0 (EV_SYN)
  Event type 1 (EV_KEY)
    Event code 272 (BTN_LEFT)
    Event code 325 (BTN_TOOL_FINGER)
    Event code 328 (BTN_TOOL_QUINTTAP)
    Event code 330 (BTN_TOUCH)
    Event code 333 (BTN_TOOL_DOUBLETAP)
    Event code 334 (BTN_TOOL_TRIPLETAP)
    Event code 335 (BTN_TOOL_QUADTAP)
  Event type 3 (EV_ABS)
    Event code 0 (ABS_X)
      Value   1282
      Min        0
      Max     3200
      Resolution      31
    Event code 1 (ABS_Y)
      Value   1237
      Min        0
      Max     2198
      Resolution      31
    Event code 47 (ABS_MT_SLOT)
      Value      0
      Min        0
      Max        4
    Event code 53 (ABS_MT_POSITION_X)
      Value      0
      Min        0
      Max     3200
      Resolution      31
    Event code 54 (ABS_MT_POSITION_Y)
      Value      0
      Min        0
      Max     2198
      Resolution      31
    Event code 57 (ABS_MT_TRACKING_ID)
      Value      0
      Min        0
      Max    65535
  Event type 4 (EV_MSC)
    Event code 5 (MSC_TIMESTAMP)
Properties:
  Property type 0 (INPUT_PROP_POINTER)
  Property type 2 (INPUT_PROP_BUTTONPAD)
Testing ... (interrupt to exit)
Event: time 1535633877.048791, type 3 (EV_ABS), code 57 (ABS_MT_TRACKING_ID), value 2070
Event: time 1535633877.048791, type 3 (EV_ABS), code 53 (ABS_MT_POSITION_X), value 2887
Event: time 1535633877.048791, type 3 (EV_ABS), code 54 (ABS_MT_POSITION_Y), value 2111
Event: time 1535633877.048791, type 1 (EV_KEY), code 330 (BTN_TOUCH), value 1
Event: time 1535633877.048791, type 1 (EV_KEY), code 325 (BTN_TOOL_FINGER), value 1
Event: time 1535633877.048791, type 3 (EV_ABS), code 0 (ABS_X), value 2887
Event: time 1535633877.048791, type 3 (EV_ABS), code 1 (ABS_Y), value 2111
Event: time 1535633877.048791, type 4 (EV_MSC), code 5 (MSC_TIMESTAMP), value 0
Event: time 1535633877.048791, -------------- SYN_REPORT ------------
Event: time 1535633877.050219, type 3 (EV_ABS), code 57 (ABS_MT_TRACKING_ID), value -1
Event: time 1535633877.050219, type 1 (EV_KEY), code 330 (BTN_TOUCH), value 0
Event: time 1535633877.050219, type 1 (EV_KEY), code 325 (BTN_TOOL_FINGER), value 0
Event: time 1535633877.050219, type 4 (EV_MSC), code 5 (MSC_TIMESTAMP), value 111000
Event: time 1535633877.050219, -------------- SYN_REPORT ------------
Event: time 1535633880.084773, type 3 (EV_ABS), code 57 (ABS_MT_TRACKING_ID), value 2071
Event: time 1535633880.084773, type 3 (EV_ABS), code 53 (ABS_MT_POSITION_X), value 2946
Event: time 1535633880.084773, type 3 (EV_ABS), code 54 (ABS_MT_POSITION_Y), value 2133
Event: time 1535633880.084773, type 1 (EV_KEY), code 330 (BTN_TOUCH), value 1
Event: time 1535633880.084773, type 1 (EV_KEY), code 325 (BTN_TOOL_FINGER), value 1
Event: time 1535633880.084773, type 3 (EV_ABS), code 0 (ABS_X), value 2946
Event: time 1535633880.084773, type 3 (EV_ABS), code 1 (ABS_Y), value 2133
Event: time 1535633880.084773, type 4 (EV_MSC), code 5 (MSC_TIMESTAMP), value 0
Event: time 1535633880.084773, -------------- SYN_REPORT ------------
Event: time 1535633880.087082, type 4 (EV_MSC), code 5 (MSC_TIMESTAMP), value 110000
Event: time 1535633880.087082, -------------- SYN_REPORT ------------
Event: time 1535633880.094267, type 4 (EV_MSC), code 5 (MSC_TIMESTAMP), value 111000
Event: time 1535633880.094267, -------------- SYN_REPORT ------------
Event: time 1535633880.100882, type 3 (EV_ABS), code 53 (ABS_MT_POSITION_X), value 2938
Event: time 1535633880.100882, type 3 (EV_ABS), code 54 (ABS_MT_POSITION_Y), value 2119
Event: time 1535633880.100882, type 3 (EV_ABS), code 0 (ABS_X), value 2938
Event: time 1535633880.100882, type 3 (EV_ABS), code 1 (ABS_Y), value 2119
Event: time 1535633880.100882, type 4 (EV_MSC), code 5 (MSC_TIMESTAMP), value 119000
Event: time 1535633880.100882, -------------- SYN_REPORT ------------
Event: time 1535633880.107883, type 3 (EV_ABS), code 54 (ABS_MT_POSITION_Y), value 2118
Event: time 1535633880.107883, type 3 (EV_ABS), code 1 (ABS_Y), value 2118
Event: time 1535633880.107883, type 4 (EV_MSC), code 5 (MSC_TIMESTAMP), value 125000
Event: time 1535633880.107883, -------------- SYN_REPORT ------------
Event: time 1535633880.114964, type 3 (EV_ABS), code 54 (ABS_MT_POSITION_Y), value 2117
Event: time 1535633880.114964, type 3 (EV_ABS), code 1 (ABS_Y), value 2117
Event: time 1535633880.114964, type 4 (EV_MSC), code 5 (MSC_TIMESTAMP), value 132000
Event: time 1535633880.114964, -------------- SYN_REPORT ------------
Event: time 1535633880.121833, type 3 (EV_ABS), code 54 (ABS_MT_POSITION_Y), value 2116
Event: time 1535633880.121833, type 3 (EV_ABS), code 1 (ABS_Y), value 2116
Event: time 1535633880.121833, type 4 (EV_MSC), code 5 (MSC_TIMESTAMP), value 139000
Event: time 1535633880.121833, -------------- SYN_REPORT ------------
Event: time 1535633880.128590, type 3 (EV_ABS), code 54 (ABS_MT_POSITION_Y), value 2115
Event: time 1535633880.128590, type 3 (EV_ABS), code 1 (ABS_Y), value 2115
Event: time 1535633880.128590, type 4 (EV_MSC), code 5 (MSC_TIMESTAMP), value 147000
Event: time 1535633880.128590, -------------- SYN_REPORT ------------
Event: time 1535633880.135493, type 3 (EV_ABS), code 53 (ABS_MT_POSITION_X), value 2937
Event: time 1535633880.135493, type 3 (EV_ABS), code 54 (ABS_MT_POSITION_Y), value 2113
Event: time 1535633880.135493, type 3 (EV_ABS), code 0 (ABS_X), value 2937
Event: time 1535633880.135493, type 3 (EV_ABS), code 1 (ABS_Y), value 2113
Event: time 1535633880.135493, type 4 (EV_MSC), code 5 (MSC_TIMESTAMP), value 153000
Event: time 1535633880.135493, -------------- SYN_REPORT ------------
Event: time 1535633880.142412, type 3 (EV_ABS), code 53 (ABS_MT_POSITION_X), value 2935
Event: time 1535633880.142412, type 3 (EV_ABS), code 54 (ABS_MT_POSITION_Y), value 2111
Event: time 1535633880.142412, type 3 (EV_ABS), code 0 (ABS_X), value 2935
Event: time 1535633880.142412, type 3 (EV_ABS), code 1 (ABS_Y), value 2111
Event: time 1535633880.142412, type 4 (EV_MSC), code 5 (MSC_TIMESTAMP), value 160000
Event: time 1535633880.142412, -------------- SYN_REPORT ------------
Event: time 1535633880.149353, type 4 (EV_MSC), code 5 (MSC_TIMESTAMP), value 167000
Event: time 1535633880.149353, -------------- SYN_REPORT ------------
Event: time 1535633880.156242, type 4 (EV_MSC), code 5 (MSC_TIMESTAMP), value 174000
Event: time 1535633880.156242, -------------- SYN_REPORT ------------
Event: time 1535633880.163159, type 3 (EV_ABS), code 53 (ABS_MT_POSITION_X), value 2933
Event: time 1535633880.163159, type 3 (EV_ABS), code 54 (ABS_MT_POSITION_Y), value 2109
Event: time 1535633880.163159, type 3 (EV_ABS), code 0 (ABS_X), value 2933
Event: time 1535633880.163159, type 3 (EV_ABS), code 1 (ABS_Y), value 2109
Event: time 1535633880.163159, type 4 (EV_MSC), code 5 (MSC_TIMESTAMP), value 181000
Event: time 1535633880.163159, -------------- SYN_REPORT ------------
Event: time 1535633880.170080, type 4 (EV_MSC), code 5 (MSC_TIMESTAMP), value 188000
Event: time 1535633880.170080, -------------- SYN_REPORT ------------
Event: time 1535633880.176995, type 4 (EV_MSC), code 5 (MSC_TIMESTAMP), value 195000
Event: time 1535633880.176995, -------------- SYN_REPORT ------------
Event: time 1535633880.183928, type 4 (EV_MSC), code 5 (MSC_TIMESTAMP), value 202000
Event: time 1535633880.183928, -------------- SYN_REPORT ------------
Event: time 1535633880.190837, type 3 (EV_ABS), code 53 (ABS_MT_POSITION_X), value 2932
Event: time 1535633880.190837, type 3 (EV_ABS), code 54 (ABS_MT_POSITION_Y), value 2107
Event: time 1535633880.190837, type 3 (EV_ABS), code 0 (ABS_X), value 2932
Event: time 1535633880.190837, type 3 (EV_ABS), code 1 (ABS_Y), value 2107
Event: time 1535633880.190837, type 4 (EV_MSC), code 5 (MSC_TIMESTAMP), value 209000
Event: time 1535633880.190837, -------------- SYN_REPORT ------------
Event: time 1535633880.197768, type 4 (EV_MSC), code 5 (MSC_TIMESTAMP), value 216000
Event: time 1535633880.197768, -------------- SYN_REPORT ------------
Event: time 1535633880.204666, type 4 (EV_MSC), code 5 (MSC_TIMESTAMP), value 223000
Event: time 1535633880.204666, -------------- SYN_REPORT ------------
Event: time 1535633880.211616, type 4 (EV_MSC), code 5 (MSC_TIMESTAMP), value 230000
Event: time 1535633880.211616, -------------- SYN_REPORT ------------
Event: time 1535633880.218767, type 4 (EV_MSC), code 5 (MSC_TIMESTAMP), value 237000
Event: time 1535633880.218767, -------------- SYN_REPORT ------------
Event: time 1535633880.225426, type 4 (EV_MSC), code 5 (MSC_TIMESTAMP), value 245000
Event: time 1535633880.225426, -------------- SYN_REPORT ------------
Event: time 1535633880.232392, type 3 (EV_ABS), code 53 (ABS_MT_POSITION_X), value 2935
Event: time 1535633880.232392, type 3 (EV_ABS), code 54 (ABS_MT_POSITION_Y), value 2106
Event: time 1535633880.232392, type 3 (EV_ABS), code 0 (ABS_X), value 2935
Event: time 1535633880.232392, type 3 (EV_ABS), code 1 (ABS_Y), value 2106
Event: time 1535633880.232392, type 4 (EV_MSC), code 5 (MSC_TIMESTAMP), value 251000
Event: time 1535633880.232392, -------------- SYN_REPORT ------------
Event: time 1535633880.239305, type 4 (EV_MSC), code 5 (MSC_TIMESTAMP), value 258000
Event: time 1535633880.239305, -------------- SYN_REPORT ------------
Event: time 1535633880.246184, type 3 (EV_ABS), code 53 (ABS_MT_POSITION_X), value 2936
Event: time 1535633880.246184, type 3 (EV_ABS), code 0 (ABS_X), value 2936
Event: time 1535633880.246184, type 4 (EV_MSC), code 5 (MSC_TIMESTAMP), value 265000
Event: time 1535633880.246184, -------------- SYN_REPORT ------------
Event: time 1535633880.253097, type 3 (EV_ABS), code 53 (ABS_MT_POSITION_X), value 2937
Event: time 1535633880.253097, type 3 (EV_ABS), code 54 (ABS_MT_POSITION_Y), value 2107
Event: time 1535633880.253097, type 3 (EV_ABS), code 0 (ABS_X), value 2937
Event: time 1535633880.253097, type 3 (EV_ABS), code 1 (ABS_Y), value 2107
Event: time 1535633880.253097, type 4 (EV_MSC), code 5 (MSC_TIMESTAMP), value 272000
Event: time 1535633880.253097, -------------- SYN_REPORT ------------
Event: time 1535633880.260019, type 3 (EV_ABS), code 53 (ABS_MT_POSITION_X), value 2940
Event: time 1535633880.260019, type 3 (EV_ABS), code 54 (ABS_MT_POSITION_Y), value 2108
Event: time 1535633880.260019, type 3 (EV_ABS), code 0 (ABS_X), value 2940
Event: time 1535633880.260019, type 3 (EV_ABS), code 1 (ABS_Y), value 2108
Event: time 1535633880.260019, type 4 (EV_MSC), code 5 (MSC_TIMESTAMP), value 279000
Event: time 1535633880.260019, -------------- SYN_REPORT ------------
Event: time 1535633880.266941, type 3 (EV_ABS), code 53 (ABS_MT_POSITION_X), value 2941
Event: time 1535633880.266941, type 3 (EV_ABS), code 54 (ABS_MT_POSITION_Y), value 2110
Event: time 1535633880.266941, type 3 (EV_ABS), code 0 (ABS_X), value 2941
Event: time 1535633880.266941, type 3 (EV_ABS), code 1 (ABS_Y), value 2110
Event: time 1535633880.266941, type 4 (EV_MSC), code 5 (MSC_TIMESTAMP), value 286000
Event: time 1535633880.266941, -------------- SYN_REPORT ------------
Event: time 1535633880.273854, type 3 (EV_ABS), code 53 (ABS_MT_POSITION_X), value 2943
Event: time 1535633880.273854, type 3 (EV_ABS), code 54 (ABS_MT_POSITION_Y), value 2111
Event: time 1535633880.273854, type 3 (EV_ABS), code 0 (ABS_X), value 2943
Event: time 1535633880.273854, type 3 (EV_ABS), code 1 (ABS_Y), value 2111
Event: time 1535633880.273854, type 4 (EV_MSC), code 5 (MSC_TIMESTAMP), value 293000
Event: time 1535633880.273854, -------------- SYN_REPORT ------------
Event: time 1535633880.280765, type 3 (EV_ABS), code 57 (ABS_MT_TRACKING_ID), value -1
Event: time 1535633880.280765, type 1 (EV_KEY), code 330 (BTN_TOUCH), value 0
Event: time 1535633880.280765, type 1 (EV_KEY), code 325 (BTN_TOOL_FINGER), value 0
Event: time 1535633880.280765, type 4 (EV_MSC), code 5 (MSC_TIMESTAMP), value 300000
Event: time 1535633880.280765, -------------- SYN_REPORT ------------


Confirmed. Evtest does register the click event.
I get an EV_KEY event when running evtest and clicking either left, middle or the right physical button.

So what’s the main difference between evtest and libinput?
Could that be used to triage the problem?

Running the man page:

man evtest

It says: evtest is commonly used to debug issues with input devices in X.Org. The output of evtest shows the information presented by the kernel; based on this information it can be determined whether a bug may be a kernel or an X.Org issue.

So, the man page basically tells us this is an X.Org issue?

But what about having everything working with 4.17 kernel?

Wikipedia states this:

Since version 1.16 the xorg-xserver obtained support for libinput:

Linux kernel → libevdev → libinput → xf86-input-libinput → X server → X client

https://en.wikipedia.org/wiki/Evdev
The man page from evtest states that it displays information presented by the kernel.
When I boot the 4.17 kernel with grub, everything worked.
Currently I’m testing the 4.18.5-1 kernel and evtest is able to read the click button events.
So basically evtest is in the place of libevdev.

When I run libinput debug-events (as root), it doesn’t detect the click events, while it does detect the mouse movement.

If you read the libinput (1) manpage, you’ll see that the libinput tool takes place as libinput in the wikipedia overview of evdev.

So, I guess libevdev is working fine, but the bug is in libinput?

Could you also test this by running libinput debug-events and confirm that you have the same problem?

By doing this, I guess we can conclude that the issue is not in the kernel, but in libinput?

libinput debug-events does not see right click events as well as xev.


 event15  POINTER_BUTTON   +38.36s      BTN_LEFT (272) pressed, seat count: 1 
 event15  POINTER_BUTTON   +38.43s      BTN_LEFT (272) released, seat count: 0 
-event0   KEYBOARD_KEY     +40.38s      *** (-1) pressed 
 event0   KEYBOARD_KEY     +40.62s      *** (-1) pressed

left click is ok, but no middle or right click

I created an issue on the libinput page, please see https://gitlab.freedesktop.org/libinput/libinput/issues/129 .
TLDR; it will be fixed in kernel 4.19rc.

Great! Thanks!