evdev fails with "Couldn't open mtdev device"

Peter Hutterer peter.hutterer at who-t.net
Tue Jul 12 15:40:57 PDT 2011


On Tue, Jul 12, 2011 at 01:48:53PM +0200, Florian Echtler wrote:
> On Mon, 2011-07-11 at 16:07 -0700, walt wrote:
> > Have you read about the new "InputClass" Section?  It has some advantages
> > over the older "InputDevice", including the important ability to identify
> > devices by their plug-n-play names instead the "event" number.
> > 
> > As an example, here's my input section for a non-standard mouse:
> > 
> > #cat /etc/X11/xorg.conf.d/10-trackball.conf 
> > Section "InputClass"   <--------------- note the new name
> >         Identifier "trackball"   <----- I made this name up
> >         MatchProduct "ImExPS"    <----- important: I did not make this up
> >         Option "AutoServerLayout" "on"
> >         Option "Emulate3Buttons" "on"
> >         Option "EmulateWheel" "on"
> >         Option "EmulateWheelButton" "8"
> > EndSection
> Thanks for the hint - I've also stumbled across that in the manpage and
> it actually does provide sort of a solution for my problem:
> 
> Section "InputDevice"
> 	Identifier "nullpointer"
> 	Driver "void"
> 	Option "CorePointer" "true"
> EndSection
> 
> Section "InputClass"
> 	Identifier "mimoTouch"
> 	MatchIsTouchscreen "true"
> 	Option "InvertY" "true"
> 	Option "Calibration" "1252 31534 1598 31680"
> EndSection
> 
> Section "InputClass"
> 	Identifier "nokeyboard"
> 	MatchIsKeyboard "true"
> 	Option "Ignore" "true"
> EndSection
> 
> Section "InputClass"
> 	Identifier "nomouse"
> 	MatchIsPointer "true"
> 	Option "Ignore" "true"
> EndSection
> 
> Section "ServerFlags"
> 	Option "AllowEmptyInput" "true"
> 	Option "AutoAddDevices" "true"
> 	Option "AutoEnableDevices" "false"
> EndSection
> 
> So I have 3 InputClasses - 2 to disable standard devices, 1 to configure
> the touchscreen and one "void" InputDevice to disable the default core
> pointer (which would otherwise use /dev/input/mice). Looks a bit like a
> hack to me, but works.

input classes accumulate in lexical sort order (for the filenames). So you
could have a class that ignores _all_ input devices and then set Option
Ignore "false" for the ones you want to enable.

Cheers,
  Peter



More information about the xorg mailing list