Weston 1.8.0: touch input using evdev not working

Vikas Patil vikasmpatil at gmail.com
Mon Sep 28 01:06:22 PDT 2015


Hi Benjamin,


I tried to create the custom rule to new file
"/etx/udev/rules.d/01-touchscreen.rules" and also with exixting file with
following content but it is not showing with udevadm and touch still not
working.

ACTION=="add", KERNEL=="input[0-9]*", SUBSYSTEM=="input",
ENV{ID_INPUT}=="1", ENV{ID_INPUT_TOUCHSCREEN}=="1" ATTRS{name}
=="mxt540e_i2c"
or
ACTION=="add", KERNEL=="input*", SUBSYSTEM=="input", ENV{ID_INPUT}=="1",
ENV{ID_INPUT_TOUCHSCREEN}=="1" ATTRS{name} =="mxt540e_i2c"
or
ACTION=="change", KERNEL=="event*", SUBSYSTEM=="input", ENV{ID_INPUT}=="1",
ENV{ID_INPUT_TOUCHSCREEN}=="1" ATTRS{name} =="mxt540e_i2c"
or
ACTION=="change", KERNEL=="event[0-9]*", SUBSYSTEM=="input",
ENV{ID_INPUT}=="1", ENV{ID_INPUT_TOUCHSCREEN}=="1" ATTRS{name}
=="mxt540e_i2c"

and some many more options too.

Is there anything wrong with above lines? or Could you help me to create
the custom rule for my touch device?

I am using systemd (version 208).


Some more information on touch device on platform

root at llinux:/etc/udev/rules.d# udevadm info -a -n /dev/input/event0

Udevadm info starts with the device specified by the devpath and then
walks up the chain of parent devices. It prints for every device
found, all possible attributes in the udev rules key format.
A rule to match, can be composed by the attributes of the device
and the attributes from one single parent device.

  looking at device '/devices/virtual/input/input0/event0':
    KERNEL=="event0"
    SUBSYSTEM=="input"
    DRIVER==""

  looking at parent device '/devices/virtual/input/input0':
    KERNELS=="input0"
    SUBSYSTEMS=="input"
    DRIVERS==""
    ATTRS{name}=="mxt540e_i2c"
    ATTRS{phys}==""
    ATTRS{uniq}==""
    ATTRS{properties}=="2"

root at linux:~# cat /proc/bus/input/devices
I: Bus=0000 Vendor=0000 Product=0000 Version=0000
N: Name="mxt540e_i2c"
P: Phys=
S: Sysfs=/devices/virtual/input/input0
U: Uniq=
H: Handlers=event0
B: PROP=2
B: EV=b
B: KEY=400 0 0 0 0 0 0 0 0 0 0
B: ABS=6618000 3


Thanks & Regards,
Vikash

On Fri, Sep 25, 2015 at 6:38 PM, Benjamin Tissoires <
benjamin.tissoires at gmail.com> wrote:

>
>
> 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/20150928/994da176/attachment-0001.html>


More information about the wayland-devel mailing list