From postmarketOS
Revision as of 13:51, 1 October 2019 by Afontain (talk | contribs) (corrected a typo on the previous modification)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Generic debugging steps

Test with evtest

You can test if the touchscreen emits any events with evtest.

Test with libinput debug-events

You can check if libinput understands the events your touchscreen driver emits with libinput debug-events.

For example it's possible that libinput doesn't get any events or that it doesn't get TOUCH_DOWN/TOUCH_UP events. You can see the raw events libinput receives with libinput record.

Mediatek devices

Some touchscreen drivers on Mediatek devices have issues because they don't follow the standards. You can compare the driver source of your driver (especially the functions tpd_up and tpd_down) with the Fairphone 1 touchscreen driver and see if adjusting your touchscreen driver to mostly match that behavior helps.

sec_touchscreen: kernel bug

event3 - sec_touchscreen: kernel bug: device has min == max on ABS_MT_PRESSURE from libinput debug-events

This message, which can be found in libinput debug-events indicates that the touchscreen driver in the kernel is misbehaving and that libinput won't accept the input.

In this case, solving the issue means patching the touchscreen driver, which will require you to modify your kernel code. While the device is running, figure out which driver is being used, perhaps by running find /sys -name "input*" or find /sys -name "event*", use grep in your kernel source to find the line line that contains input_set_abs_params(input_dev, ABS_MT_PRESSURE, 0, 0);, and comment it out. Rebuild the kernel and try again. See our patching guide for more information about how to make these changes correctly.

See also