cosmetic udev glitches

Dan Nicholson dbn.lists at gmail.com
Tue Mar 2 13:01:53 PST 2010


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.

--
Dan



More information about the xorg mailing list