https://bugs.freedesktop.org/show_bug.cgi?id=105535

--- Comment #7 from Matthias Baur <thats+freedesk...@matthiasbaur.me> ---
Thanks, I've patched the measurement tool as following:

diff --git a/tools/libinput-measure-touchpad-pressure
b/tools/libinput-measure-touchpad-pressure
index 89dd117f..7ea44bee 100755
--- a/tools/libinput-measure-touchpad-pressure
+++ b/tools/libinput-measure-touchpad-pressure
@@ -155,7 +155,7 @@ class Device(object):
         # then extract the pressure absinfo from that
         all_caps = self.device.capabilities(absinfo=True)
         caps = all_caps.get(evdev.ecodes.EV_ABS, [])
-        p = [cap[1] for cap in caps if cap[0] == evdev.ecodes.ABS_MT_PRESSURE]
+        p = [cap[1] for cap in caps if cap[0] in
[evdev.ecodes.ABS_MT_PRESSURE, evdev.ecodes.ABS_PRESSURE] ]
         if not p:
             raise InvalidDeviceError("device does not have ABS_MT_PRESSURE")

@@ -226,6 +226,10 @@ def handle_abs(device, event):
         s = device.current_sequence()
         s.append(Touch(pressure=event.value))
         print("\r{}".format(s), end="")
+    elif event.code == evdev.ecodes.ABS_PRESSURE:
+        s = device.current_sequence()
+        s.append(Touch(pressure=event.value))
+        print("\r{}".format(s), end="")


 def handle_event(device, event):


Seems to work now :) I'm currently experimenting with it, but think 32:25
should be a good value to start with.

What I found kind of strange are the hwdb default values:

s0me0ne@s0me0ne-Thinkpad:~/Sources/libinput$ sudo
./tools/libinput-measure-touchpad-pressure
Using SynPS/2 Synaptics TouchPad: /dev/input/event15

Ready for recording data.
Pressure range used: 25:30
Palm pressure range used: 130
Place a single finger on the touchpad to measure pressure values.
Ctrl+C to exit
^C

The man page of libinput-measure-touchpad-pressure says "The thresholds have to
be in device-specific pressure values and it is required that down >= up.".
"down >= up." seems to be not fulfilled.

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
wayland-bugs mailing list
wayland-bugs@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/wayland-bugs

Reply via email to