In Apple clickpads, or at least in my specific clickpad (from a MacBook Air 13" mid 2013), I have response from the device when de finger is not touching the clickpad but is really close to it (a millimeter or less). I'm able to move the cursor by moving my finger steady over the clickpad without even touching it, there is even a visual separation between my finger and the clickpad. This causes many misbehaviour when using the clickpad: - Unintentional cursor moves. - Unintentional two finger tap when trying to do one finger tap (the middle finger is usually really close to the clickpad when doing a tap with the index finger). - I don't know if this is the cause of unintentional clicks when typing. I'll attach four evemu-record outputs for a move of the cursor through the X axis with different pressures: no-pressure.txt: I move the cursor trying to not touch de clickpad at all (I accidentally touched it for a moment though). low-pressure.txt: Touching the clickpad with lower pressure than I usually do in my regular usage. normal-pressure.txt: Touching the clickpad like a usually do in my regular usage. high-pressure.txt More pressure than I usually do in my regular usage. Using Fedora 23 with libinput-1.2.4-1.fc23.x86_64.
Created attachment 124366 [details] no-pressure.txt
Created attachment 124367 [details] low-pressure.txt
Created attachment 124368 [details] normal-pressure.txt
Created attachment 124369 [details] high-pressure.txt
basic problem: BTN_TOUCH is sent by the touchpad regardless of the pressure (afaict). That causes libinput to assume that there is a finger on the touchpad. we change this to support hovering, but that means we need a pressure threshold and they are notoriously had to get right and we don't have the hooks for this in libinput just yet. from what I can tell by looking at your recordings: no pressure: max 69 low pressure: max 108 normal pressure: max 156 high pressure: max 172 but there's a fair bit of overlap. I suspect the magic point is around the 100 mark. The ABS_MT_WIDTH_MAJOR/MINOR is effectively useless, the touches are all in the 20-23mm mark. No pressure has a few in the 18-19 mark but there's at least one with 24x22mm in there (which is more than any of the high-pressure ones) ABS_MT_TOUCH_MAJOR/MINOR may be useful, but I have yet to figure out what those numbers mean, they are always a bit random so to get anywhere here, we'd need a lower pressure threshold to support hovering on these devices.
Thanks, (In reply to Peter Hutterer from comment #5) > but there's a fair bit of overlap. I suspect the magic point is around the > 100 mark. I was doing an extra little test by grepping the word "ABS_PRESSURE" of the evemu-record output, so I can see effectively at which pressure I start to touch the clickpad. Just by resting my finger in the clickpad, without moving, I feel that I can touch it (with very little pressure, but touching it) around the ABS_PRESSURE = 60. Maybe that's a good threshold. Also, I can perform a tap with max pressures of 76. Anyway, once we have some way to test it, we could suggest a better number.
https://github.com/whot/input-data-analysis Have a look at this repo, it's a bunch of python scripts that analyse the events recorded by evemu. There's already one for touchpad pressure, if you know basic python it should be easy to knock up more scripts to look at and analyse whatever you want. I don't think 60 is a good threshold btw, as I said above your "no pressure" recording went to 69. If in doubt I'd rather have the threshold a bit higher so it requires a definitive touch rather, that's more useful than having phantom touches. And the use-case for moving the pointer with a ever-so-faint touch is limited anyway.
we have the pressure-detection bits in libinput now, so if you can provide me with a good number for touch detection, I can add that.
Created attachment 130022 [details] [review] 0001-touchpad-set-apple-specific-pressure-values.patch how's this one working?
Hello Peter. I'm on vacation now without my personal laptop so I couldn't tell just right now. I'm gonna be back on 14th so I can test it. Thanks for working on this.
please test this soon, the 1.7 release is currently stalling on this, thanks
Debugged this with Damián on IRC - problem is that the bcm5974 doesn't send ABS_MT_PRESSURE, only ABS_PRESSURE even though it is a multi-touch touchpad. So the pressure thresholds don't get used, libinput treats it as a non-pressure-capable touchpad. For the bcm5974 devices, the better solution is to rely on ABS_MT_WIDTH or ABS_MT_TOUCH_MAJOR/MINOR instead of hacking something up to use pressure across the slots. So this patch is obsolete for now until we have support for those bits.
https://lists.freedesktop.org/archives/wayland-devel/2017-March/033593.html
Patch is upstream, closing this bug. If it's still an issue we need to tweak the thresholds. commit 432fbc33cd6a2181ac213eeb66239df8312836a6 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Wed Mar 22 16:16:21 2017 +1000 touchpad: add touch-size based touch handling
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.