cosmetic udev glitches

Peter Hutterer peter.hutterer at who-t.net
Tue Mar 2 14:37:39 PST 2010


On Tue, Mar 02, 2010 at 01:01:53PM -0800, Dan Nicholson wrote:
> On Tue, Mar 2, 2010 at 9:28 AM, Julien Cristau <jcristau at debian.org> wrote:
> > On Tue, Mar  2, 2010 at 17:57:04 +0100, Simon Thum wrote:
> >
> >> Hi all,
> >>
> >> I just upgraded my X to use udev. It generally went fine, but  I noticed
> >> two minor issues:
> >>
> >> At first, the device names have quotation marks. As in
> >>
> >> xinput list
> >> ...
> >> ⎜     "ImExPS/2 Logitech Wheel Mouse"           id=7    [slave  pointer
> >>  (2)]
> >>
> >> I looked up the source, but found nothing obvious. Is this expected
> >> behavior?
> >>
> > Yes, the device names we get from udev have quotations marks.  I don't
> > know why, and I didn't feel like mangling them.
> 
> It seems to come straight from the kernel (drivers/input/input.c),
> which adds the quotes around the value in NAME to the uevent. Maybe we
> should ask them not to do that. Looks like this was changed back in
> 2005, commit a7fadbe10ccf430e7a8add8b45c561d864087343.
> 
> However, I think we should try to be compatible with info.product from
> hal. This would require some amount of mangling. What hal does is:
> 
> 1. Get the name directly from the sysfs name file (no quotes there)
> 2. Strip trailing whitespace
> 
> >> Second, udev seems to add my mouse (and others) twice, resulting in some
> >> log spam. Excerpt:
> >>
> >> [  5571.537] (II) config/udev: Adding input device "ImExPS/2 Logitech
> >> Wheel Mouse" (/dev/input/event3)
> >> (...)
> >> [  5571.538] (II) XINPUT: Adding extended input device ""ImExPS/2
> >> Logitech Wheel Mouse"" (type: MOUSE)
> >> [  5571.538] (II) "ImExPS/2 Logitech Wheel Mouse": initialized for
> >> relative axes.
> >> [  5571.538] (II) config/udev: Adding input device "ImExPS/2 Logitech
> >> Wheel Mouse" (/dev/input/mouse0)
> >> [  5571.538] (**) "ImExPS/2 Logitech Wheel Mouse": Applying InputClass
> >> "evdev catchall"
> >> [  5571.538] (**) "ImExPS/2 Logitech Wheel Mouse": always reports core
> >> events
> >> [  5571.538] (**) "ImExPS/2 Logitech Wheel Mouse": Device:
> >> "/dev/input/mouse0"
> >> [  5571.539] (EE) ioctl EVIOCGNAME failed: Inappropriate ioctl for device
> >> [  5571.539] (II) UnloadModule: "evdev"
> >> [  5571.539] (EE) PreInit returned NULL for ""ImExPS/2 Logitech Wheel
> >> Mouse""
> >>
> >>
> >> Things work fine here, I just wanted to make sure whether my
> >> configuration is broken or these are known issues.
> >>
> > This is also expected at the moment.  The enumeration of devices gives
> > us /dev/input/event* (which evdev can handle), and
> > /dev/input/{mouse,kbd}* (which it doesn't).  This results in a couple
> > error messages for the latter.  It should be possible to tone those down
> > so users don't get scared…
> 
> The other thing hal does here is ignore all devices except those where
> the sysfs path ends in event%d. Maybe we should do the same.

not really, this is a configration issue. by default the server doesn't do
anything unless an input class is specified. In this case, the evdev driver
shouldn't be assigned to the mouse0 device.
In Fedora we ship the evdev catchall rule with MatchDevicePatch
"/dev/input/event*" to avoid the above error messages.

Cheers,
  Peter



More information about the xorg mailing list