Weston 1.8.0: touch input using evdev not working

Benjamin Tissoires benjamin.tissoires at gmail.com
Fri Sep 25 06:08:14 PDT 2015


On Fri, Sep 25, 2015 at 8:20 AM, Vikas Patil <vikasmpatil at gmail.com> wrote:
> Hi Benjamin,
>
> First of all thank a lot for your quick response.
>
> It means since weston 1.7.0 libinput is by default enabled and only the
> input backend. I need not to set any specific build switch for it. So in
> that case I am using libinput. I thought "BUILD_LIBINPUT_BACKEND" still
> exists and as I haven't set it so thought not using libinput.

OK makes sense. But since 1.7.0, the code supporting non libinput devices
has been pruned from weston, so the BUILD_LIBINPUT_BACKEND flags does not
apply anymore.

>
> What do  you mean by we need to fix the kernel? Does that mean libinput
> support also requires modification in linux kernel (i.e tocuhscreen driver
> or evedev or somethign else)?

Normally, there is no need to fix the kernel in 90% of the cases. I thought
your device was not exported properly by the kernel, and the udev internal
rule for input was not picking it up as it should.

However, after looking at your records, it seems your kernel is fine. The
problem you are seeing is that udev does not tag your device as a
touchscreen and libinput ignores it.

> How should I start doing this? Do I need to upgrade to latest version of
> libudev/libevedev?

Please update udev or add a custom udev rule to add:
 ID_INPUT=1
 ID_INPUT_TOUCHSCREEN=1

To your device.


>
> Attached here the output of following two commands.
>
> root at linux# evemu-describe /dev/input/event0 > mydevice.desc
> root at linux# evemu-record /dev/input/event0 > mydevice.events
>
> Just for information, Touch screen works fine with weston 1.6.0/weston
1.5.0
> with this kernel.

Yes. It kind of makes sense. However, switching to a full udev discovery
allows us to remove the heuristics to decide whether a device is a mouse,
keyboard, touchscreen, etc... to udev, and allows the user to override it
if the heuristic fails.
That's why we use udev.

In previous weston builds, the heuristic was in weston, and that's why it
was working.

Cheers,
Benjamin

>
> Thanks & Regards,
> Vikash
>
> On Fri, Sep 25, 2015 at 4:48 PM, Benjamin Tissoires
> <benjamin.tissoires at gmail.com> wrote:
>>
>> On Fri, Sep 25, 2015 at 2:22 AM, Vikas Patil <vikasmpatil at gmail.com>
>> wrote:
>> > Dear Members,
>> >
>> > I am trying Weston 1.8.0 on i.MX6 with Freescale linux 3.14.28 and
seems
>> > that touch input is not working for me. Weston.log show the following
>> > messages. I am not using llibinput backend yet.
>>
>> That's weird. Since Weston 1.7.0, there are no other backend than
>> libinput for handling input devices. Or maybe I am missing something?
>>
>> >
>> > Could anyone give some inputs/suggestion to fix this? Is this due to
>> > following ckeck-in?
>> >
>> >
>> >
http://lists.freedesktop.org/archives/wayland-devel/2015-June/022411.html
>> >
>>
>> Yes it is, but believe me, it is for the better. Your touchscreen is
>> not properly tagged by udev, so we need to fix the kernel to make it
>> look like a touchscreen that libinput could understand.
>>
>> >
>> >
>> > [00:00:50.248] input device 'mxt540e_i2c', /dev/input/event0 not tagged
>> > as
>> > input
>> > [00:00:50.248] failed to create input device '/dev/input/event0'.
>> > [00:00:50.249] warning: no input devices on entering Weston. Possible
>> > causes:
>> >         - no permissions to read /dev/input/event*
>> >         - seats misconfigured (Weston backend option 'seat', udev
device
>> > propert
>> >
>> > I can see “/dev/input/event0” already there and all the touch drivers
>> > and
>> > dependencies (i.e. mxt540e.ko, input_polldev.ko, evdev.ko) are loaded.
>> >
>> > root at linux:~# udevadm info /dev/input/event0
>> > P: /devices/virtual/input/input0/event0
>> > N: input/event0
>> > E: DEVNAME=/dev/input/event0
>> > E: DEVPATH=/devices/virtual/input/input0/event0
>> > E: MAJOR=13
>> > E: MINOR=64
>> > E: SUBSYSTEM=input
>>
>> You are missing all the important bits here. For instance, on my
>> touchscreen I have:
>> $ sudo udevadm info /dev/input/event6
>> P:
>> /devices/pci0000:00/INT3433:00/i2c-8/i2c-ATML0001:01/input/input6/event6
>> N: input/event6
>> S: input/by-path/platform-INT3433:00-event
>> E: DEVLINKS=/dev/input/by-path/platform-INT3433:00-event
>> E: DEVNAME=/dev/input/event6
>> E:
>>
DEVPATH=/devices/pci0000:00/INT3433:00/i2c-8/i2c-ATML0001:01/input/input6/event6
>> E: EVDEV_ABS_00=::10
>> E: EVDEV_ABS_01=::10
>> E: EVDEV_ABS_35=::10
>> E: EVDEV_ABS_36=::10
>> E: ID_INPUT=1
>> E: ID_INPUT_TOUCHSCREEN=1
>> E: ID_PATH=platform-INT3433:00
>> E: ID_PATH_TAG=platform-INT3433_00
>> E: LIBINPUT_DEVICE_GROUP=18/0/0/0:i2c-8-004b
>> E: MAJOR=13
>> E: MINOR=70
>> E: SUBSYSTEM=input
>> E: USEC_INITIALIZED=3206730
>>
>> The device is tagged with ID_INPUT_TOUCHSCREEN which makes libinput
>> handling it.
>>
>> Could you attach an evemu-record of your touchscreen that we
>> understand why udev ignores it?
>>
>> Cheers,
>> Benjamin
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/wayland-devel/attachments/20150925/f34a8996/attachment.html>


More information about the wayland-devel mailing list