Difference between revisions of "Troubleshooting:touchscreen"

From postmarketOS
Jump to: navigation, search
(Add link to patching guide)
m (corrected a typo on the previous modification)
 
Line 21: Line 21:
 
</pre>
 
</pre>
  
This message, which can be found in <codelibinput debug-events></code> indicates that the touchscreen driver in the kernel is misbehaving and that libinput won't accept the input.
+
This message, which can be found in <code>libinput debug-events</code> 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 <code>find /sys -name "input*"</code> or <code>find /sys -name "event*"</code>, use <code>grep</code> in your kernel source to find the line [https://github.com/djeman/android_kernel_samsung_sharkls/blob/e3381e42b00e1ff977815b365cea53f18afff7a8/drivers/input/touchscreen/ist30xxc/ist30xxc.c#L1449 line that contains <code>input_set_abs_params(input_dev, ABS_MT_PRESSURE, 0, 0);</code>], and comment it out. Rebuild the kernel and try again. See our [https://wiki.postmarketos.org/wiki/Patching patching] guide for more information about how to make these changes correctly.
 
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 <code>find /sys -name "input*"</code> or <code>find /sys -name "event*"</code>, use <code>grep</code> in your kernel source to find the line [https://github.com/djeman/android_kernel_samsung_sharkls/blob/e3381e42b00e1ff977815b365cea53f18afff7a8/drivers/input/touchscreen/ist30xxc/ist30xxc.c#L1449 line that contains <code>input_set_abs_params(input_dev, ABS_MT_PRESSURE, 0, 0);</code>], and comment it out. Rebuild the kernel and try again. See our [https://wiki.postmarketos.org/wiki/Patching patching] guide for more information about how to make these changes correctly.

Latest revision as of 08:51, 1 October 2019

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