Bug 76722

Summary: Huge pointer jumps due to touchpad firmware bug
Product: Wayland Reporter: Alexander E. Patrakov <patrakov>
Component: libinputAssignee: Wayland bug list <wayland-bugs>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: medium CC: benjamin.tissoires, peter.hutterer
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments: Recording that contains the bug at second 249

Description Alexander E. Patrakov 2014-03-28 07:24:03 UTC
Created attachment 96513 [details]
Recording that contains the bug at second 249

To reproduce the bug, get the affected touchpad (e.g. "SynPS/2 Synaptics TouchPad", as described in the attachment), move the cursor as you would normally do using a finger on the right hand, then use the finger on the left hand to click in the bottom area of the touchpad. Usually the driver would register the click as expected, but sometimes it would move the pointer to the lower left corner and click there.

I have managed to capture one of these cases using evemu-record. The recording is attached. Please ignore the first 240 seconds or so, they contain some movements, scrolling and clicks that I am afraid to remove manually.

The interesting part is:

E: 249.206319 0000 0000 0000    # ------------ SYN_REPORT (0) ----------
E: 249.218008 0003 0035 3764    # EV_ABS / ABS_MT_POSITION_X    3764
E: 249.218008 0003 0036 2221    # EV_ABS / ABS_MT_POSITION_Y    2221
E: 249.218008 0003 003a 0065    # EV_ABS / ABS_MT_PRESSURE      65
E: 249.218008 0003 0000 3764    # EV_ABS / ABS_X                3764
E: 249.218008 0003 0001 2216    # EV_ABS / ABS_Y                2216
E: 249.218008 0003 0018 0065    # EV_ABS / ABS_PRESSURE         65
E: 249.218008 0000 0000 0000    # ------------ SYN_REPORT (0) ----------
E: 249.230881 0003 0035 3752    # EV_ABS / ABS_MT_POSITION_X    3752
E: 249.230881 0003 003a 0046    # EV_ABS / ABS_MT_PRESSURE      46
E: 249.230881 0003 0000 3758    # EV_ABS / ABS_X                3758
E: 249.230881 0003 0018 0046    # EV_ABS / ABS_PRESSURE         46
E: 249.230881 0000 0000 0000    # ------------ SYN_REPORT (0) ----------
E: 249.242648 0003 0035 1640    # EV_ABS / ABS_MT_POSITION_X    1640
E: 249.242648 0003 0036 4681    # EV_ABS / ABS_MT_POSITION_Y    4681
E: 249.242648 0003 003a 0025    # EV_ABS / ABS_MT_PRESSURE      25
E: 249.242648 0003 0000 1640    # EV_ABS / ABS_X                1640
E: 249.242648 0003 0001 4681    # EV_ABS / ABS_Y                4681
E: 249.242648 0003 0018 0025    # EV_ABS / ABS_PRESSURE         25
E: 249.242648 0000 0000 0000    # ------------ SYN_REPORT (0) ----------
E: 249.254568 0003 0035 1648    # EV_ABS / ABS_MT_POSITION_X    1648
E: 249.254568 0003 003a 0027    # EV_ABS / ABS_MT_PRESSURE      27
E: 249.254568 0003 0000 1644    # EV_ABS / ABS_X                1644
E: 249.254568 0003 0018 0027    # EV_ABS / ABS_PRESSURE         27

As you see, the touchpad reports a huge jump in the touch position
without getting a new tracking ID. I.e. produces garbage data. A
non-buggy touchpad would have recognized that this is in fact a
different finger.

So, I would like libinput to recognize such huge jumps (e.g. any
movements by more than 15% of the touchpad width in less than 0.03
seconds) as firmware bugs and treat them as if this indicated a
completely new touch.
Comment 1 Peter Hutterer 2014-03-31 01:23:55 UTC
Is this still your Sony VAIO VPC-Z23A4R? If not, pls post the model number here as well.
 

I notice that the pressure changes to 25 as well. That's lower than most other touches in this recording so we may have something extra to hook onto here. Is this an effect you can generally observe?
Comment 2 Alexander E. Patrakov 2014-03-31 03:42:46 UTC
Yes, it is the same laptop. As for low pressure, I don't know if it is a rule or an exception for such events.
Comment 3 Alexander E. Patrakov 2014-06-14 08:45:07 UTC
I have used the laptop for several hours while monitoring all events with a version of libinput's event-debug tool patched to report pressure along with any big jumps. Conclusion: such jumps are not limited to low pressure. Some manifest themselves with pressure as high as 72.
Comment 4 Peter Hutterer 2014-10-28 01:36:35 UTC
Update, Benjamin is fixing this at the kernel level, not in libinput.

Benjamin, please close this bug when the kernel patch is upstream.
Comment 5 Benjamin Tissoires 2015-02-06 13:11:34 UTC
The input tree has now the last patch of the series:
https://git.kernel.org/cgit/linux/kernel/git/dtor/input.git/commit/?h=next&id=6ab17a8484f03c188a93713369912f1545eb26e9

It will be in the next pull request. Closing the bug now.
Comment 6 Alexander E. Patrakov 2015-03-17 17:31:23 UTC
The commit has been reverted, reopening.

https://git.kernel.org/cgit/linux/kernel/git/dtor/input.git/commit/?h=for-linus&id=09d042a2eb90ee2c86d80c48ad096ae3f5776cef
Comment 7 Peter Hutterer 2015-03-17 22:22:18 UTC
for the archives, the fix for this is still planned to go into the kernel, we just need to re-do the kernel patch set.
Comment 8 Benjamin Tissoires 2015-04-07 14:13:11 UTC
A new version has been accepted upstream so the revert has been reverted:
https://git.kernel.org/cgit/linux/kernel/git/dtor/input.git/commit/?h=next&id=58fd9af6e1ccabec6bc799b32eea22a82103d5ae

It will be in 4.1-rc0, closing the bug.

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.