Bug 103970

Summary: Apple Magic Trackpad sensitivity too low (does not detect touches unless pressing hard)
Product: Wayland Reporter: zilla
Component: libinputAssignee: Wayland bug list <wayland-bugs>
Severity: major    
Priority: medium CC: daniel.van.vugt, peter.hutterer
Version: unspecified   
Hardware: x86-64 (AMD64)   
OS: Linux (All)   
See Also: https://launchpad.net/bugs/1751190
i915 platform: i915 features:
Attachments: evemu output

Description zilla 2017-11-29 13:57:56 UTC
Created attachment 135798 [details]
evemu output

After a recent update, possibly October 2017, the Apple Wireless Trackpad on my Arch Linux system doesn't work reliably anymore.

It seems the sensitivity is too low because in order to somehow work with the trackpad I have to almost place my fingers flat on the trackpad and move them. Before it worked in pretty much any position even with just my fingertips touching the trackpad.

I'll attach the test results below.

Thank you


P: /devices/pci0000:00/0000:00:14.0/usb3/3-2/3-2.7/3-2.7:1.0/bluetooth/hci0/hci0:70/0005:05AC:030E.0007/input/input24/event20
N: input/event20
E: DEVNAME=/dev/input/event20
E: DEVPATH=/devices/pci0000:00/0000:00:14.0/usb3/3-2/3-2.7/3-2.7:1.0/bluetooth/hci0/hci0:70/0005:05AC:030E.0007/input/input24/event20
E: ID_BUS=bluetooth
E: LIBINPUT_DEVICE_GROUP=5/5ac/30e:00:1a:7d:da:71:02
E: USEC_INITIALIZED=353337145634

evemu output attached as file
Comment 1 Peter Hutterer 2017-11-30 04:22:32 UTC
Have a read of this one please: https://wayland.freedesktop.org/libinput/doc/latest/touchpad_pressure.html

And then run the libinput measure touch-size tool please, thanks
Comment 2 zilla 2017-12-13 11:52:39 UTC
Did see that page and tried but I get a:

=> Error: device does not have ABS_MT_PRESSURE

I also get the feeling that it's mostly related to tap sensitivity. Whenever I move my finger it starts selecting things. So maybe the touch sensitivity is ok but understands everything as double taps?
Comment 3 Peter Hutterer 2017-12-15 04:28:18 UTC
There are two tools, 'libinput measure touchpad-pressure' and 'libinput measure touch-size'. The latter is for apple touchpads that don't have pressure, I think you ran the former?
Comment 4 Peter Hutterer 2018-01-16 06:40:46 UTC
a month in needinfo, closing
Comment 5 Daniel van Vugt 2018-02-23 03:00:25 UTC
Bug confirmed (using libinput 1.10) now. I will collect the required information...
Comment 6 Daniel van Vugt 2018-02-23 03:10:44 UTC
$ sudo libinput measure touch-size
Using Apple Wireless Trackpad: /dev/input/event15

Ready for recording data.
Touch sizes used: 130:150
Palm size used: 800
Place a single finger on the device to measure touch size.
Ctrl+C to exit

Sequence: major: [  0.. 92] minor: [  0..148] 
Sequence: major: [  0..102] minor: [  0..156] 
Sequence: major: [  0..102] minor: [  0..168] 
Sequence: major: [  0..124] minor: [  0..200] 
Sequence: major: [  0..120] minor: [  0..192] 
Sequence: major: [  0..124] minor: [  0..204] 

$ sudo libinput measure touchpad-pressure
Using Apple Wireless Trackpad: /dev/input/event15

Error: device does not have ABS_MT_PRESSURE
Comment 7 Peter Hutterer 2018-02-23 07:07:48 UTC
Thanks. Unfortunately this isn't just a tool you can run once, you need to experiment with --touch-thresholds and --palm-threshold to figure out the right setting, it's an interactive tool. Make sure that when the thresholds are set, the 'down' and 'palm' tags show up correctly as you're interacting with the device.
Comment 8 Daniel van Vugt 2018-02-23 11:27:49 UTC
The --touch-thresholds option seems to always be rejected as an "unrecognized option". Can you check that it really works on your end?

Regardless, what I've found is one-finger touches can be as small as size 20, and frequently 70 or lower. The existing palm size of 800 seems to work just fine.
Comment 9 Peter Hutterer 2018-02-24 02:41:17 UTC
sudo ./tools/libinput-measure-touch-size --touch-thresholds 2:1 
Using ELAN Touchscreen: /dev/input/event8

Ready for recording data.
Touch sizes used: 2:1
Palm size used: 0
Place a single finger on the device to measure touch size.
Ctrl+C to exit

seems to work here?
Comment 10 Daniel van Vugt 2018-02-26 02:49:11 UTC
OK, that's a parsing bug 105246.

Back on topic here...

One-finger touches range in sizes 20-861 (yes big enough to be confused for a palm). Palm touches range in sizes 700-1100.

So I recommend:
--touch-thresholds 20:10 --palm-threshold 800
or even:
--touch-thresholds 2:1 --palm-threshold 800
Comment 11 Daniel van Vugt 2018-02-26 06:35:12 UTC
Wait a sec... this is a standalone touchpad so palm detection is generally pointless here (and also spurious per the above numbers since it can be confused for large flat fingers).

So this works best:

--touch-thresholds 2:1 --palm-threshold 900

or any higher value of palm-threshold, since we don't need palm detection at all.
Comment 12 Peter Hutterer 2018-02-26 10:14:24 UTC
any chance you can provide a patch? given that you'd have to test any patch anyway... thanks
Comment 13 Daniel van Vugt 2018-02-27 01:32:11 UTC
I will gladly try patching it (whatever/wherever I don't know yet) when I have time soon.

Sorry, I thought you were doing it. :)
Comment 14 Peter Hutterer 2018-02-27 05:11:10 UTC
oh, come on mate. in case it wasn't obvious I'm flooded with bugs and still the only regular libinput developer. I'm the main bottleneck as-is, having me implement every trivial patch and then wait for reporter feedback (which often never arrives) doesn't help improving my efficiency.
Comment 15 Daniel van Vugt 2018-02-27 05:16:20 UTC
Peace. I don't mind doing it.
Comment 16 Mario 2018-02-27 06:31:32 UTC
I got the same problem. We were working on bug report #103572 (https://bugs.freedesktop.org/show_bug.cgi?id=103572). We can try to fix it here. 

I'm doing some test with some values in order to restore the previous behavior. I tried to use bigger values than ones used by Daniel (following what is reported by the touch-size experiments). At this moment I'm testing testing values 60:40: I'll keep it for the today.

Peter, should the two values be a bit distant in order to properly detect the raise of the finger? How can be usable a 2:1 pair?

Daniel, if we agree on a new official pair of values, I can prepare the patch. I don't know if you already did it but, you can test the new values on whole system (for a better feedback) changing the hwdb (see other report for some instructions).

I'm used to exploit the touchpad gesture using libinput-gestures. The most tricky point for me was to restore the previous feeling with gestures. The single click or drag action are easy to restore and they works with very different range of values.
Comment 17 zilla 2018-02-27 07:19:14 UTC
Hey guys, sorry I let you down in the first place. I do read all comments but all this hardware testing is above my head. I'll happily try all patces and see if it works. Thank you very much for all your hard work, Peter. This is a great library and you're doing a trmendous job here!
Comment 18 Daniel van Vugt 2018-02-27 07:23:15 UTC
You caught me out to lunch, but yes I plan on fixing it today.

Let's use bug 103572 since it is older. It wins :)

*** This bug has been marked as a duplicate of bug 103572 ***
Comment 19 Peter Hutterer 2018-02-27 08:06:57 UTC
(In reply to Daniel van Vugt from comment #18) 
> Let's use bug 103572 since it is older. It wins :)

as a general rule please always use the more *useful* bug, not just the older one.
Comment 20 Daniel van Vugt 2018-02-27 08:11:52 UTC
I normally agree, but was trying to be polite to Mario. Especially since we basically know the solution in both cases.

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.