Touchscreen on embedded Linux can't tap / click

Benjamin Tissoires benjamin.tissoires at gmail.com
Thu Jun 23 06:32:17 UTC 2016


On Thu, Jun 23, 2016 at 8:24 AM, Walter Hofstädtler
<walter at hofstaedtler.com> wrote:
> Benjamin,
>
> sorry for the long delay, I tried to install evemu-record into my image.
> I did not found an evemu.bb file, so I created my own "evemu_1.0.bb" file.
>
>  ~~~
> SUMMARY = "Kernel evdev device emulation"
> DESCRIPTION = "The evemu library and tools are used to describe devices, record data, create devices and replay data from kernel evdev devices. "
> HOMEPAGE = "https://www.freedesktop.org/wiki/Evemu/"
>
> LICENSE = "GPLv3"
> LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552"
>
> inherit autotools
>
> # this is the rev of your recipe. Bumping it will toss the cache and redo everything
> PR = "r2"
>
> # pick up latest svn rev for this module. Note this a deferred evaluation!
> SRCREV = "${AUTOREV}"
>
> # ${PV} is pulled from the recipe filename, e.g. helloworld_2.7.bb -> ${PV} expands to "2.7".
> # We use immediate evaluation to define a new var PVBASE holding the original value of ${PV}.
> PVBASE := "${PV}"
>
> # We need to tell bitbake about our current directory structure or we won't be able to find patches after we mess with ${PV}
> FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}-${PVBASE}:"
>
> # Then redefine PV to tack the svn rev onto the base version. This is evaluated at fetch time.
> # Then the package will get rebuilt any time the relevant part of the source tree changes.
> PV = "${PVBASE}.${SRCPV}"
>
> # Now we format the source code URI.
> SRC_URI = "git://git.freedesktop.org/git/evemu"
>
> # build will fail without this; it specifies where in the workdir to find the source. The
> # name must be the same as the "module" name in SRC_URI.
> # S = "${WORKDIR}/example"
> S = "${WORKDIR}/git"
>
> PARALLEL_MAKE = ""
>  ~~~
>
> But this will not compile, I always see this error:
>
>  ---
> | /home/user/yocto_daisy/fsl-community-bsp/WH_icedtea/tmp/work/cortexa9hf-vfp-neon-poky-linux-gnueabi/evemu/1.0.AUTOINC+4fc604554c-r2/git/configure: line 16167: syntax error near unexpected token `LIBEVDEV,'
> | /home/user/yocto_daisy/fsl-community-bsp/WH_icedtea/tmp/work/cortexa9hf-vfp-neon-poky-linux-gnueabi/evemu/1.0.AUTOINC+4fc604554c-r2/git/configure: line 16167: `PKG_CHECK_MODULES(LIBEVDEV, libevdev >= 1.2.99.902)'
> | Configure failed. The contents of all config.log files follows to aid debugging
> | ERROR: oe_runconf failed
> | WARNING: exit code 1 from a shell command.
> | ERROR: Function failed: do_configure (log file is located at /home/user/yocto_daisy/fsl-community-bsp/WH_icedtea/tmp/work/cortexa9hf-vfp-neon-poky-linux-gnueabi/evemu/1.0.AUTOINC+4fc604554c-r2/temp/log.do_configure.13923)
> ERROR: Task 329 (/home/user/yocto_daisy/fsl-community-bsp/sources/meta-wh/recipes-core/evemu/evemu_1.0.bb, do_configure) failed with exit code '1'
> NOTE: Tasks Summary: Attempted 5583 tasks of which 5582 didn't need to be rerun and 1 failed.
> No currently running tasks (3816 of 5593)
>  ---
>
> Do you know how to fix this error: " syntax error near unexpected token `LIBEVDEV,'" ?

libevdev is a hard dependency for evemu. You need to have the
development files for this lib installed too
(https://www.freedesktop.org/wiki/Software/libevdev/).

Cheers,
Benjamin

>
>
> Walter
>
>
> -----Ursprüngliche Nachricht-----
> Von: Benjamin Tissoires [mailto:benjamin.tissoires at gmail.com]
> Gesendet: Mittwoch, 1. Juni 2016 09:56
> An: Walter Hofstädtler
> Cc: Input Tools
> Betreff: Re: Touchscreen on embedded Linux can't tap / click
>
> On Tue, May 31, 2016 at 9:21 PM, Walter Hofstädtler <walter at hofstaedtler.com> wrote:
>> Benjamin,
>>
>> attached you find dmesg log.
>>
>> Touch driver is a: max11801_ts.
>
> OK thanks.
> The max11801_ts driver has basically had no changes since its inclusion in 3.0. And there, it reports BTN_TOUCH correctly. So both the 3.10 and 3.14 reports correct events according to the sources:
> http://git.yoctoproject.org/cgit/cgit.cgi/linux-yocto-3.10/tree/drivers/input/touchscreen/max11801_ts.c#n139
> http://git.yoctoproject.org/cgit/cgit.cgi/linux-yocto-3.14/tree/drivers/input/touchscreen/max11801_ts.c#n138
>
> Now, the weird part is that your evtest output shows ABS_PRESSURE events while nothing in the code suggests that the driver will report those events.
>
> So either you are using a different max11801_ts driver (which seems unlikely), or maybe something in userspace corrupts the event node (with some udev rules), or evtest is just lost as it's not maintained anymore.
>
> Please try recording the event node through evemu-record[1] which is known to work better.
>
>>
>> I tried other touch tools and find some of this tools are working.
>> The most interesting part is: ts_calibrate, this tool works but xinput_calibrator do not work.
>
> xinput_calibrator works at the X level, while ts_calibrate might not.
> If X is not happy because it doesn't see the BTN_TOUCH events, xinput_calibrator will not be happy either.
>
>> All of this programs uses the same /dev/input/event0 device.
>> I am curious about why ts_calibrate works (sees tap / click events) but other programs like xinput_calibrator do not work?
>
>
> Cheers,
> Benjamin
>
> [1] https://www.freedesktop.org/wiki/Evemu/
>
>>
>>
>> With best regards
>>
>> Walter
>>
>>
>> -----Ursprüngliche Nachricht-----
>> Von: Benjamin Tissoires [mailto:benjamin.tissoires at gmail.com]
>> Gesendet: Dienstag, 31. Mai 2016 17:06
>> An: Walter Hofstädtler
>> Cc: input-tools at lists.freedesktop.org
>> Betreff: Re: Touchscreen on embedded Linux can't tap / click
>>
>> On Sat, May 28, 2016 at 3:05 PM, Walter Hofstädtler <walter at hofstaedtler.com> wrote:
>>> Benjamin,
>>>
>>>
>>> thank you for your answer.
>>>
>>> The issue about updating is, the board support package supports Yocto
>>> 1.7 with kernel 3.10.17 and some tests are done with Yocto 1.8 with
>>> kernel 3.14.38.
>>>
>>> Kernel 3.14.38 is also quite old. Do you believe that kernel 3.14.38
>>> fixes this issue?
>>>
>>
>> Well, I know nothing about your touchscreen so I can't give you more information. At least please provide a dmesg or the name of the actual module used so we can check whether it has been updated between 3.10 and 3.14.
>> Worse case, you are not using an upstream driver, and you will have to request the Yocto community to fix it.
>>
>> Cheers,
>> Benjamin
>>
>>>
>>> Walter
>>>
>>>
>>>
>>>
>>>
>>> -----Ursprüngliche Nachricht-----
>>> Von: Benjamin Tissoires <benjamin.tissoires at gmail.com>
>>> Gesendet: Sam 28 Mai 2016 14:09
>>> An: Walter Hofstädtler <walter at hofstaedtler.com>
>>> CC: input-tools at lists.freedesktop.org
>>> Betreff: Re: Touchscreen on embedded Linux can't tap / click
>>>
>>> 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