1

I wrote a custom touchscreen driver and was successfully able to start the driver using inputattach and see touchscreen data with printk, but my mouse is still not moving. My assumption is that it requires setup with X11 as well.

The Xorg.0.log reports the following:

[ 38.639] (II) config/udev: Adding input device Mitsubishi Serial TouchScreen (/dev/input/event4)
[ 38.639] (II) No input driver specified, ignoring this device.
[ 38.639] (II) This device may have been added with another device file.

My xorg config file is as follows:

Section "InputClass"
    Identifier "evdev touchscreen catchall"
    MatchDevicePath "/dev/input/event*"
    MatchIsTouchscreen "on"
    Driver "evdev"
EndSection

My driver is named 'mitsubishi', but my assumption is that xorg is looking for an input driver to read in the events output by my driver and is only concerned with the /dev/input/event path.

xinput shows the following which does not include my touchscreen:

xinput

 Virtual core pointer                       id=2    [master pointer  (3)]
    Virtual core XTEST pointer              id=4    [slave  pointer  (2)]
    ImPS/2 Generic Wheel Mouse              id=9    [slave  pointer  (2)]
 Virtual core keyboard                      id=3    [master keyboard (2)]
     Virtual core XTEST keyboard            id=5    [slave  keyboard (3)]
     Power Button                           id=6    [slave  keyboard (3)]
     Power Button                           id=7    [slave  keyboard (3)]
     AT Translated Set 2 keyboard           id=8    [slave  keyboard (3)]

With the current state of my system, I am able to use tail -f /var/log/kern.log to see the touchscreen data, but do not get any response from the UI. Any suggestions on what to do with the xorg file or if the xorg is even required to move the mouse?

  • IIRC there are some issues with inputattach and the X evdev driver; you need to somehow force X to use it, but I forgot the details. Maybe googling will turn up something. – dirkt Feb 6 '18 at 4:37
1

I figured it out! My 'conf' file was wrong.

I changed the conf file to the settings below and it found my touchscreen and treated it as a mouse correctly. Note that the 'MatchProduct' is the same string as

[ 38.639] (II) config/udev: Adding input device Mitsubishi Serial TouchScreen (/dev/input/event4)

:

Section "InputClass"
Identifier "Mitsubishi TS Class"
MatchProduct "Mitsubishi Serial TouchScreen"
MatchDevicePath "/dev/input/event*"
Driver "evdev"
EndSection
1

The MatchIsTouchscreen is probably keying on environment variables assigned by the udev rules.

If you run

# udevadm info -q all -n /dev/input/event4

does the listing include a line E: ID_INPUT_TOUCHSCREEN=1? If not, you might want to add an udev rule that marks the appropriate device(s) handled by your driver with the touchscreen attribute. You'll probably find examples in existing udev rules.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.