Bug 101979

Summary: kernel: Keeping two fingers pressed on the touchpad results in multiple and continuous clicks and paste events
Product: Wayland Reporter: Harish <harish.hyma>
Component: libinputAssignee: Wayland bug list <wayland-bugs>
Status: RESOLVED NOTOURBUG QA Contact:
Severity: major    
Priority: high CC: benjamin.tissoires, harish.hyma, peter.hutterer
Version: unspecified   
Hardware: x86-64 (AMD64)   
OS: Linux (All)   
See Also: https://bugs.freedesktop.org/show_bug.cgi?id=102270
Whiteboard:
i915 platform: i915 features:
Attachments: evemu recording of the problem

Description Harish 2017-07-31 10:18:43 UTC
I've noticed that with the latest libinput version 1.8.1-1 on arch linux, resting two fingers on the touch pad results in multiple continuous right click and paste events. This is immediately noticeable when browsing using firefox.

When reverting to previous libinput version 1.7.3, the bug disappears. Need to test whether the bug disappears on version 1.8.0-2. Will confirm this soon.

I'm currently using thinkpad x250.
DE: Gnome on wayland
Comment 1 Harish 2017-07-31 10:29:22 UTC
I can confirm that the issue is not there in version 1.8.0-2. This means it has to be version 1.8.1 that is faulty.
Comment 2 Harish 2017-07-31 11:16:47 UTC
Actually it seems now that this happens in version 1.7.3 also. I noticed that the problem occurs after using a 3 finger touch. To replicate, use three finger touch and then after use two finger touch. This opens multiple tabs in a browser if the mouse pointer is on a link. If a text box is focused, two finger touch results in continuous pasting of clipboard contents.
Comment 3 Peter Hutterer 2017-08-15 08:05:32 UTC
Please attach an evemu-record of a sequence that triggers that bug, thanks
Comment 4 Harish 2017-08-23 01:23:31 UTC
Hello, thanks for reply. I am a total noob to do this. Unfortunately I currently can't risk changing my kernel again to replicate this issue.

However, here is a good post to look at to show how libinput behaves under different kernels. 

https://bbs.archlinux.org/viewtopic.php?id=228673

I'm not sure if this is an issue with libinput or the kernel. It could be that libinput does not play well with the new kernel changes.
Comment 5 Harish 2017-08-23 05:55:58 UTC
I've updated the "See Also" section. Bug appears to be related to https://bugs.freedesktop.org/show_bug.cgi?id=102270

Thanks. Perhaps evmu-record of his could be of help?
Comment 6 Peter Hutterer 2017-08-23 05:56:44 UTC
evemu merely records the sequence of events that libinput and other drivers will see. the kernel is unchanged. see https://wayland.freedesktop.org/libinput/doc/latest/reporting_bugs.html

(In reply to Harish from comment #4)
> I'm not sure if this is an issue with libinput or the kernel. It could be
> that libinput does not play well with the new kernel changes.

the evemu recording will tell us where the problem is, then we can work from there.
Comment 7 Harish 2017-08-23 06:07:34 UTC
Sorry for the misunderstanding Peter, I meant that I can only send the recording report when I've upgraded my kernel to the latest 4.12.x series where the bug occurs. 

However this may take a while because I do not want to risk my laptop crashing because I'm working on important stuff. If there are any volunteers who are currently using the 4.12.x kernel, could you please confirm this and/or attach the evemu recording?
Comment 8 Harish 2017-08-24 06:39:54 UTC
Created attachment 133737 [details]
evemu recording of the problem

Here is the evemu recording. Please do let me know what other information I can provide :)
Comment 9 Peter Hutterer 2017-08-25 06:13:11 UTC
whoah, confirmed. There's a flurry of BTN_MIDDLE presses when replaying this with libinput debug-events --enable-tap.

Looks like this is a kernel bug though, the kernel tells us the fingers are continuously lifted/put down again. Benjamin, have a look at the events around e.g. 2.920499, every frame ends one touch and starts a new one. That's not right.
Comment 10 Harish 2017-08-25 07:10:08 UTC
Thanks for the confirmation. I've also opened a bug report at https://bugzilla.kernel.org/show_bug.cgi?id=196735

Would that be the right place to report this bug? I'm new to reporting kernel buys :)

Hopefully someone looks into this for the next kernel release. Until then I'm going to remain on the 4.9.x series LTS kernel.
Comment 11 Harish 2017-08-29 08:52:02 UTC
It appears that reloading the mouse kernel module using:

rmmod psmouse
modprobe psmouse synaptics_intertouch=0

Apparently temporarily solves the problem. See https://bbs.archlinux.org/viewtopic.php?id=229349 for more information.
Comment 12 Harish 2017-09-05 10:07:11 UTC
Just an update. Kernel 4.12.10 does not appear to fix the problem.
Comment 13 Harish 2017-09-05 10:17:02 UTC
A reliable temporary fix for this issue can be found in https://bbs.archlinux.org/viewtopic.php?id=229349. Can confirm that this fix works in 4.12.10. However this is not a proper fix since this needs to be implemented in the kernel itself.

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.