How to configure touchpad tap sensitivity?

Solution 1:

Use the libinput measure touchpad-pressure tool provided by libinput. This tool will search for your touchpad device and print some pressure statistics, including whether a touch is/was considered logically down.

sudo libinput measure touchpad-pressure

By default, this tool uses the udev hwdb entries for the pressure range. To narrow down on the best values for your device, specify the 'logically down' and 'logically up' pressure thresholds with the `--touch-thresholds argument:

sudo libinput measure touchpad-pressure --touch-thresholds=10:8 --palm-threshold=20

Interact with the touchpad and check if the output of this tool matches your expectations.

Once the thresholds are decided on (e.g. 10 and 8), they can be enabled with the following hwdb file:

cat /etc/udev/hwdb.d/99-touchpad-pressure.hwdb
libinput:name:*SynPS/2 Synaptics TouchPad:dmi:*svnHewlett-Packard:*pnHPCompaq6910p*
LIBINPUT_ATTR_PRESSURE_RANGE=10:8

The first line is the match line and should be adjusted for the device name (see evemu-record's output) and for the local system, based on the information in /sys/class/dmi/id/modalias. The modalias should be shortened to the specific system's information, usually system vendor (svn) and product name (pn).

Once in place, you need to run the following to commands, adjusted for your device's event node:

sudo udevadm hwdb --update
sudo udevadm test /sys/class/input/eventX

If the pressure range property shows up correctly, restart X or the Wayland compositor and libinput should now use the correct pressure thresholds. The Helper tools can be used to verify the correct functionality first without the need for a restart.

Once the pressure ranges are deemed correct, report a bug to get the pressure ranges into the repository.

Note: Not a single word typed by me, this is all a quote.

Source: https://wayland.freedesktop.org/libinput/doc/latest/touchpad_pressure.html#touchpad_pressure_hwdb