Touchscreen on embedded Linux can't tap / click
Benjamin Tissoires
benjamin.tissoires at gmail.com
Sat May 28 12:08:53 UTC 2016
Hi Walter,
On Sat, May 28, 2016 at 1:13 PM, Walter Hofstädtler
<walter at hofstaedtler.com> wrote:
> Hi,
>
>
> I use a 7" display with resistive touchscreen, embedded Linux for ARM CPU. Manufacturer Engicam, design is similar to Freescale / NXP i.MX6 Sabre board.
>
>
> With Yocto 1.7.3 and Engicam board support package I created an X11 application, basically a Firefox browser. Most of this application work with one exception: I can't tap / click on any item. When I touch the screen and move around, cursor will follow my finger, unfortunately a tap / click will not work. I searched with Google and find some tips but nothing solved this issue.
>
>
> Kernel: Linux display 3.10.17-1.0.2_ga+g33597e3 #1 SMP PREEMPT Sun May 22 20:00:34 CEST 2016 armv7l GNU/Linux
>
>
> Doing some debugging, I found that ts_test gets the BTN_TOUCH events but evtest do *not* see any BTN_TOUCH events.
>
>
>
> # evtest
>
> No device specified, trying to scan all of /dev/input/event*
>
> Available devices:
>
> /dev/input/event0: max11801_ts
>
> Select the device event number [0-0]: 0
>
> Input driver version is 1.0.1
>
> Input device ID: bus 0x18 vendor 0x0 product 0x0 version 0x0
>
> Input device name: "max11801_ts"
>
> Supported events:
>
> Event type 0 (EV_SYN)
>
> Event type 1 (EV_KEY)
>
> Event code 330 (BTN_TOUCH)
>
> Event type 3 (EV_ABS)
>
> Event code 0 (ABS_X)
>
> Value 1308
>
> Min 0
>
> Max 4095
>
> Event code 1 (ABS_Y)
>
> Value 476
>
> Min 0
>
> Max 4095
>
> Event code 24 (ABS_PRESSURE)
>
> Value 0
>
> Min 0
>
> Max 1
>
> Properties:
>
> Testing ... (interrupt to exit)
>
> Event: time 1464027536.266584, type 3 (EV_ABS), code 0 (ABS_X), value 1167
>
> Event: time 1464027536.266584, type 3 (EV_ABS), code 1 (ABS_Y), value 2282
>
> Event: time 1464027536.266584, type 3 (EV_ABS), code 24 (ABS_PRESSURE), value 1
>
> Event: time 1464027536.266584, -------------- EV_SYN ------------
>
> Event: time 1464027536.282916, type 3 (EV_ABS), code 0 (ABS_X), value 1168
>
> Event: time 1464027536.282916, -------------- EV_SYN ------------
>
> Event: time 1464027536.299472, type 3 (EV_ABS), code 0 (ABS_X), value 1169
>
> Event: time 1464027536.299472, -------------- EV_SYN ------------
>
> Event: time 1464027536.315900, type 3 (EV_ABS), code 0 (ABS_X), value 1171
>
> Event: time 1464027536.315900, type 3 (EV_ABS), code 1 (ABS_Y), value 2281
>
> Event: time 1464027536.315900, -------------- EV_SYN ------------
>
> Event: time 1464027536.340587, type 3 (EV_ABS), code 0 (ABS_X), value 1172
>
> Event: time 1464027536.340587, -------------- EV_SYN ------------
>
> Event: time 1464027536.348821, type 3 (EV_ABS), code 0 (ABS_X), value 1173
>
> Event: time 1464027536.348821, -------------- EV_SYN ------------
>
> Event: time 1464027536.357047, type 3 (EV_ABS), code 0 (ABS_X), value 1174
>
> Event: time 1464027536.357047, type 3 (EV_ABS), code 1 (ABS_Y), value 2283
>
> Event: time 1464027536.357047, -------------- EV_SYN ------------
>
> Event: time 1464027536.365190, type 3 (EV_ABS), code 24 (ABS_PRESSURE), value 0
>
> Event: time 1464027536.365190, -------------- EV_SYN ------------
>
>
> While capturing this output, I touched the screen but I did *not* get BTN_TOUCH events.
Yep, that's a driver bug. Please check which driver you are using (I
guess not hid-multitouch given the bus is i2c and the VID/PID are
0/0), and check whether an updated driver fixes your problem.
>
>
> # TSLIB_TSDEVICE=/dev/input/touchscreen0 ts_test
>
> 1464048778.716232: 399 239 1
>
> 1464048778.724452: 399 239 1
>
> 1464048778.732621: 399 239 1
>
> 1464048778.740965: 399 238 1
>
> 1464048778.749177: 399 237 1
>
> 1464048778.757422: 399 236 0
>
>
> Fortunately ts_test gets BTN_TOUCH events, I assume last column are the BTN_TOUCH events.
Well, no, the last column would suggest that the client interprets the
finger as touch through the pressure information, not that it gets
actual BTN_TOUCH event. I believe ts_test is less strict regarding
BTN_TOUCH and consider pressure > 0 meanining touch.
>
>
> Worth to mention, ts_calibrate works (I am able to tap / click) but xinput_calibrator do not work, cursor follows pen but do not accept tap / click.
>
>
> As evtest do not see the BTN_TOUCH events I assume X11 will also not see BTN_TOUCH events so I can't tap / click in X11.
>
>
> Question why evtest do not see the BTN_TOUCH events? Is this an configuration issue or a bug?
Definitively kernel bug. 3.10 is quite old now, so it would be
interesting to upgrade the kernel first if possible, and also check if
the kernel driver has been updated since.
Cheers,
Benjamin
>
>
> Any help would be greatly appreciated.
>
>
> With best regards
>
> Walter
>
>
>
> _______________________________________________
> Input-tools mailing list
> Input-tools at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/input-tools
More information about the Input-tools
mailing list