Bug 100571 - erratic touchpad behavior, seems too sensitive to stray palm touches
Summary: erratic touchpad behavior, seems too sensitive to stray palm touches
Status: RESOLVED INVALID
Alias: None
Product: Wayland
Classification: Unclassified
Component: libinput (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Wayland bug list
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 94236
Blocks:
  Show dependency treegraph
 
Reported: 2017-04-04 22:55 UTC by Chris Murphy
Modified: 2017-10-26 04:50 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
scroll.evemu (1.98 MB, application/x-xz)
2017-04-04 22:56 UTC, Chris Murphy
Details
scroll2.evemu (555.51 KB, text/plain)
2017-04-04 23:00 UTC, Chris Murphy
Details
scroll3.evemu (129.20 KB, text/plain)
2017-04-06 01:57 UTC, Chris Murphy
Details
scroll.evemu six line deleted (20.15 KB, text/plain)
2017-04-07 03:01 UTC, Chris Murphy
Details
scroll.evemu five lines deleted (68.43 KB, text/plain)
2017-04-07 18:44 UTC, Chris Murphy
Details
scroll.evemu.2017-05-19-10:14:27 (6.69 KB, text/plain)
2017-05-19 16:22 UTC, Chris Murphy
Details
scroll.evemu.2017-05-19 three recordings (2.13 KB, application/gzip)
2017-05-19 16:53 UTC, Chris Murphy
Details
normal tap pressure stats (548 bytes, text/plain)
2017-05-30 22:40 UTC, Chris Murphy
Details
palmtouch pressure stats (307 bytes, text/plain)
2017-05-30 22:41 UTC, Chris Murphy
Details
normal tap gnuplot screenshot (40.59 KB, image/png)
2017-05-30 22:41 UTC, Chris Murphy
Details
palmtouch gnuplot screenshot (42.28 KB, image/png)
2017-05-30 22:42 UTC, Chris Murphy
Details

Description Chris Murphy 2017-04-04 22:55:08 UTC
Problem: Seems like my palms are changing cursor position while I'm typing; more likely that I slightly pause while typing and a palm touch moves the cursor, but I'm not really sure. Also, sometimes the in-focus app changes as if I've clicked on another application.

Hardware:
	Manufacturer: HP
	Product Name: HP Spectre Notebook
	SKU Number: W2K28UA#ABA
	Family: 103C_5335KV G=N L=CON B=HP S=SPT 

Software:
        Fedora 26, libinput 1.7.0
        gnome-shell tap to click is enabled in preferences

[chris@f26h ~]$ udevadm info /dev/input/event5
P: /devices/platform/i8042/serio1/input/input5/event5
N: input/event5
E: DEVNAME=/dev/input/event5
E: DEVPATH=/devices/platform/i8042/serio1/input/input5/event5
E: ID_BUS=i8042
E: ID_INPUT=1
E: ID_INPUT_HEIGHT_MM=51
E: ID_INPUT_TOUCHPAD=1
E: ID_INPUT_TOUCHPAD_INTEGRATION=internal
E: ID_INPUT_WIDTH_MM=92
E: LIBINPUT_DEVICE_GROUP=11/2/7/1b1:isa0060/serio1
E: LIBINPUT_MODEL_SYNAPTICS_SERIAL_TOUCHPAD=1
E: MAJOR=13
E: MINOR=69
E: SUBSYSTEM=input
E: USEC_INITIALIZED=3816082



$ sudo cat /sys/class/dmi/id/modalias

dmi:bvnInsyde:bvrF.31:bd02/21/2017:svnHP:pnHPSpectreNotebook:pvrType1ProductConfigId:rvnHP:rn81A0:rvr48.54:cvnHP:ct10:cvrChassisVersion:
Comment 1 Chris Murphy 2017-04-04 22:56:37 UTC
Created attachment 130677 [details]
scroll.evemu

Several hours worth of collection.
Comment 2 Chris Murphy 2017-04-04 23:00:56 UTC
Created attachment 130678 [details]
scroll2.evemu

This is a short capture, about half minute.
Comment 3 Peter Hutterer 2017-04-05 00:20:35 UTC
(In reply to bugzilla from comment #1)
> Several hours worth of collection.

ran my pressure analysis scripts over it, the majority of pressure values fall into the 24-72 range. That's the range where we detect touches, so at least the issue isn't caused by the new pressure detection code.

(In reply to bugzilla from comment #2)
> This is a short capture, about half minute.

what am I looking at here? I looked at the pure touch output and it looks like normal finger movement. Is this one of the accidental palm events?
Comment 4 Chris Murphy 2017-04-05 00:26:59 UTC
 scroll2.evemu contains 30s of normal finger only movements

 scroll.evemu contains a few hours of real world usage which no doubt includes stray palm touches
Comment 5 Peter Hutterer 2017-04-05 00:41:44 UTC
whoah, we're crossing streams here :) as said in the email to the list, I need a short recording to figure out the stray palm touches, I can't replay hours in realtime here to find it

evemu-record has a --autorestart flag that creates a new file after X seconds of inactivity, I suggest using that to extract a short-enough recording
Comment 6 Chris Murphy 2017-04-06 01:57:19 UTC
Created attachment 130720 [details]
scroll3.evemu

I was in Firefox typing an email, and suddenly a line above had part of its text replaced with what I was currently typing.
Comment 7 Chris Murphy 2017-04-07 03:01:37 UTC
Created attachment 130738 [details]
scroll.evemu six line deleted

[chris@f26h evemutrackpad]$ sudo evemu-record --autorestart=3 /dev/input/event5 scroll.evemu


During the attached recording, I was typing and suddenly six lines were selected and deleted. This was not intended. I assume stray palm touching triggered this selection and then it was the typing while selected that caused an overwrite.
Comment 8 Chris Murphy 2017-04-07 18:44:11 UTC
Created attachment 130750 [details]
scroll.evemu five lines deleted

Similar to comment 7. Typing in firefox, when suddenly five lines are selected then overwritten by typing.
Comment 9 Peter Hutterer 2017-04-24 06:47:20 UTC
are there any normal finger movements in these recordings or just the palm touches?
Comment 10 Chris Murphy 2017-04-24 16:37:11 UTC
There are probably valid finger touches as well as palm.
Comment 11 Peter Hutterer 2017-04-24 22:07:41 UTC
that makes it too hard to debug then. I can't see your finger in the recordings, only the data the touchpad detects so it's hard to tell which one is a misdetection and which one isn't. Please attach an event recording without any finger data, palm data only.
Comment 12 Peter Hutterer 2017-05-19 05:36:35 UTC
ping?
Comment 13 Chris Murphy 2017-05-19 16:22:58 UTC
Created attachment 131416 [details]
scroll.evemu.2017-05-19-10:14:27

This event did not result in any kind of visible problem, but happened while I was typing so I'd call it a "latent unintended event". I think the central problem is that while I'm typing, the trackpad can accept input and if it's a particularly erratic input it ends up selecting a bunch of text which I then type over.
Comment 14 Chris Murphy 2017-05-19 16:53:42 UTC
Created attachment 131417 [details]
scroll.evemu.2017-05-19 three recordings

I have "sudo evemu-record --autostart=3 /dev/input/event5 scroll.evemu" running in a shell, and in another I have "watch ls -l" on the dir containing these files as they're created.

When I'm typing, I have absolutely no ability to record in my mind what I'm doing mechanically with my fingers. Once these files appear, I try to replay history in my mind, did I intentionally use the trackpad? Did I have to move the cursor somewhere? I have literally no idea, it's simply not how my mind works.

So these three events? Are they intentional? Or are they stray palm touches? I'm pretty sure they're stray palm touches because at the time I was typing I had no reason to move the cursor positioning. But I can't tell you with any certainty because I have zero mechanical memory of what I was doing; only the thought of what I was writing. It's probably the same thing as having a conversation with someone, and then asking them about the position of their tongue 5 seconds ago. They'd say, what? And then they'd have to think about what they were saying and what the position their tongue was in, and then they'd forget the whole thing. There's just no awareness of the mechanics as it's happening.

And I have no ideas how to increase the certainty other than setting up a video camera to simultaneously record my hands typing as well as the screen with "watch ls -l" running, and match files to movements, but I have no way of doing that.
Comment 15 Peter Hutterer 2017-05-23 04:06:49 UTC
I understand that it's hard to remember what exactly you did, but it's even harder to debug something without that information. The attachments look like pretty normal touches and they *should* be filtered by the disable-while-typing code but it's unclear why not. Maybe run libinput-debug-events --verbose on the side and look for events of "event4  - palm: keyboard timeout". If they happen just before your touch and you're typing slow enough, then this can cause the effects you're seeing.

I notice the pressure range is quite high, so this bug may be a candidate for bug 94236. Read through https://wayland.freedesktop.org/libinput/doc/latest/touchpad_pressure.html and try to gauge the pressure ranges for your finger during normal use and then again while you're typing. see if there's a reliable threshold where we can identify a palm.
Comment 16 Chris Murphy 2017-05-30 22:40:46 UTC
Created attachment 131586 [details]
normal tap pressure stats
Comment 17 Chris Murphy 2017-05-30 22:41:15 UTC
Created attachment 131587 [details]
palmtouch pressure stats
Comment 18 Chris Murphy 2017-05-30 22:41:47 UTC
Created attachment 131588 [details]
normal tap gnuplot screenshot
Comment 19 Chris Murphy 2017-05-30 22:42:04 UTC
Created attachment 131589 [details]
palmtouch gnuplot screenshot
Comment 20 Peter Hutterer 2017-06-02 05:42:37 UTC
Ok, there may be something we can do with the pressure, anything above ~75 can be interpreted as palm. That may help, though there are enough palm events with low pressure data so it's not a guarantee.
Comment 21 Chris Murphy 2017-06-02 15:33:22 UTC
Additionally I've noticed the trackpad input is honored an impractically short time after a key is pressed. So if I'm typing, and just pause the slightest amount within a word, suddenly the trackpad is active and highlights a bunch of text.

What's more realistic is what's the fastest practical time from key release to getting an index finger on the track pad. That time is maybe 0.7s. But for sure I see unprompted selection happening in between key strokes. So the "inactive trackpad while typing" rule is way too deferential to the trackpad.
Comment 22 Peter Hutterer 2017-06-06 23:11:31 UTC
fwiw, the timeout is currently 500ms (provided you pressed at least two non-modifier keys). Any touch that starts before the last key press is ignored, i.e. if you come to rest your palm on the keyboard while typing, that touch is ignored. Touches that start *after* the last key press however are released once the timeout expires, to avoid the touchpad not reacting.
Comment 23 Peter Hutterer 2017-06-29 06:09:04 UTC
Give the branch in bug 94236 a try please. You may need a custom threshold but hopefully that should help a lot with this bug.
Comment 24 Peter Hutterer 2017-08-23 06:08:14 UTC
ping? bug 94236 has been merged, so you can just test git master now
Comment 25 Peter Hutterer 2017-10-26 04:50:16 UTC
closing after silence for 2 months


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.