AutoAddDevices and Adding Known Devices

Peter Hutterer peter.hutterer at who-t.net
Wed Sep 26 20:49:35 PDT 2012


On Sun, Sep 23, 2012 at 06:16:15AM -0700, Mark Depto wrote:
> I am trying to manually configure a eGalax touchscreen using the evdev
> driver which is currently working great. The problem I am having is that
> allowing Xorg to autoconfigure the devices from udev results in ~100% cpu
> utilization as soon as the touchscreen is touched with the USB keyboard and
> mouse connected. I found a thread that this is a bug somewhere along the
> lines, but the the workaround is to use the "Option AutoAddDevices false". I
> have done this is and all is well, except for when I actually need to use a
> mouse or the keyboard while developing my applications. With AutoAddDevices
> set to off, I can't can't configure an InputClass to save my soul and I am
> all out of ideas. Would you have any insight how I could manually tell Xorg
> to use the keyboard and mouse when present? 

sigh. not to put too fine a point on it, but for virtually every issue
you'll ever have you can find a thread somewhere that gives you bad advice.
In general, stay away from sites that recommend disabling AutoAddDevices.

AutoAddDevices disables input device hotplugging. Without hotplugging, none
of the InputClass directives applies and you need to have a static section
for every device.

> Section "InputDevice"
>         Identifier  "Keyboard0"
>         Driver      "evdev"
>         Option     "xkb_rules"     "evdev"
>         Option     "xkb_model"     "pc105"
>         Option     "xkb_layout"    "us"
>         #Option "SendCoreEvents" "On"
> EndSection

This won't load anything because the Option Device is missing. Even if you
add that section, if you unplug the device it'll just go away and never come
back. Really, hotplugging is a feature that shouldn't be ignored these days.
 
> Section "InputClass"
>         Identifier  "MouseAll"
>         Driver      "evdev"
>         MatchIsPointer    "On"
>         MatchDevicePath   "/dev/input/event*"
>         MatchProduct      "Logitech Optical USB Mouse"
> EndSection

this won't be applied because the server won't see input devices.

> # This works well but requires AutoAddDevices to be off
> 
> Section "InputDevice"
>         Identifier "touchscreen0"
>         Driver "evdev"
>         #Option "CorePointer"
>         Option "Device" "/dev/input/touchscreen0"
>         Option "DeviceName" "touchscreen0"

this option doesn't do anything.

>         #Option "Emulate3Buttons"
>         #Option "Emulate3Timeout" "50"
>         Option "SwapAxes" "On"
>         Option "InvertX" "On"
>         Option "InvertY" "On"
>         #Option "Rotate" "CW"
>         #Option  "Calibration" "48 757 34 530"
>         #Option "Calibrate" "1"
>         #Option "SendCoreEvents" "On"
>         #Option "ReportingMode" "Raw"
> EndSection
 
first - do you have a udev rule that creates the touchscreen0 devices? by
default these devices don't exist, so what is creating them?

For anything else, I'd need to see your Xorg.log to get further.

running evtest on the device may also give you a hint on what's going on
that confuses the server.

Cheers,
   Peter




More information about the xorg mailing list