Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Bug#821389: xinput: please support distinct device IDs

59 views
Skip to first unread message

Harald Dunkel

unread,
Apr 18, 2016, 7:50:03 AM4/18/16
to
Package: xinput
Version: 1.6.1-1

Seems that xinput doesn't really know how to identify
the devices, either. Sample session:

% xinput list-props "Logitech USB Receiver"
Warning: There are multiple devices matching 'Logitech USB Receiver'.
To ensure the correct one is selected, please use the device ID, or prefix the
device name with 'pointer:' or 'keyboard:' as appropriate.

unable to find device Logitech USB Receiver

% xinput list-props pointer:"Logitech USB Receiver"
Warning: There are multiple devices matching 'pointer:Logitech USB Receiver'.
To ensure the correct one is selected, please use the device ID, or prefix the
device name with 'pointer:' or 'keyboard:' as appropriate.

unable to find device pointer:Logitech USB Receiver


You have to admit that this is weird.

The device ID might change on the next reboot with other USB
devices plugged in, so using the ID is no option for a config
line in my .xinitrc.

Using device nodes doesn't work, either:

% xinput list-props /dev/input/by-id/usb-Logitech_USB_Receiver-event-mouse
unable to find device /dev/input/by-id/usb-Logitech_USB_Receiver-event-mouse

% xinput list-props /dev/input/by-id/usb-Logitech_USB_Receiver-mouse
unable to find device /dev/input/by-id/usb-Logitech_USB_Receiver-mouse

% xinput list-props usb-Logitech_USB_Receiver-mouse
unable to find device usb-Logitech_USB_Receiver-mouse

% xinput list-props usb-Logitech_USB_Receiver-event-mouse
unable to find device usb-Logitech_USB_Receiver-event-mouse

% ls -al /dev/input/by-id
total 0
drwxr-xr-x 2 root root 120 Apr 11 13:39 .
drwxr-xr-x 4 root root 440 Apr 11 13:39 ..
lrwxrwxrwx 1 root root 9 Apr 11 13:39 usb-Logitech_USB_Receiver-event-if01 -> ../event1
lrwxrwxrwx 1 root root 9 Apr 11 13:39 usb-Logitech_USB_Receiver-event-mouse -> ../event0
lrwxrwxrwx 1 root root 9 Apr 11 13:39 usb-Logitech_USB_Receiver-mouse -> ../mouse0
lrwxrwxrwx 1 root root 9 Apr 11 13:39 usb-Unicomp_Inc_Ruffian6_x_Kbrd_v3_xx-event-kbd -> ../event2


So how can I tell xinput to configure my mouse in a
reproducible way, regardless which and how many other
peripheral devices are plugged into the USB port?


Regards
Harri

Julien Cristau

unread,
Apr 20, 2016, 5:50:03 AM4/20/16
to
On Mon, Apr 18, 2016 at 13:40:31 +0200, Harald Dunkel wrote:

> Package: xinput
> Version: 1.6.1-1
>
> Seems that xinput doesn't really know how to identify
> the devices, either. Sample session:
>
> % xinput list-props "Logitech USB Receiver"
> Warning: There are multiple devices matching 'Logitech USB Receiver'.
> To ensure the correct one is selected, please use the device ID, or prefix the
> device name with 'pointer:' or 'keyboard:' as appropriate.
>
> unable to find device Logitech USB Receiver
>
I don't think there's an xinput bug here. xinput just doesn't have any
more information about the devices...

Cheers,
Julien

Harald Dunkel

unread,
Apr 22, 2016, 2:20:03 AM4/22/16
to
Hi Julien,

On 04/20/16 11:41, Julien Cristau wrote:
> I don't think there's an xinput bug here. xinput just doesn't have any
> more information about the devices...
>
> Cheers,
> Julien
>

There is only one "Logitech USB Receiver" plugged in. At
least the "mouse:Logitech USB Receiver" recommended by
xinput itself should work. Does it stumble over the space
chars?

BTW, the man page says

device can be the device name as a string or the XID of the device.

, but thats broken, too:

% lsusb -d 046d:c525
Bus 003 Device 002: ID 046d:c525 Logitech, Inc. MX Revolution Cordless Mouse

% xinput list-props 046d:c525
unable to find device 046d:c525


Please reassign, if necessary. Thanx very much
Harri

Julien Cristau

unread,
Apr 22, 2016, 6:00:04 AM4/22/16
to
On Fri, Apr 22, 2016 at 08:15:20 +0200, Harald Dunkel wrote:

> Hi Julien,
>
> On 04/20/16 11:41, Julien Cristau wrote:
> > I don't think there's an xinput bug here. xinput just doesn't have any
> > more information about the devices...
>
> There is only one "Logitech USB Receiver" plugged in. At
> least the "mouse:Logitech USB Receiver" recommended by
> xinput itself should work. Does it stumble over the space
> chars?
>
> BTW, the man page says
>
> device can be the device name as a string or the XID of the device.
>
> , but thats broken, too:
>
> % lsusb -d 046d:c525
> Bus 003 Device 002: ID 046d:c525 Logitech, Inc. MX Revolution Cordless Mouse
>
> % xinput list-props 046d:c525
> unable to find device 046d:c525
>
That's not an XID. What's the output from "xinput list"?

Cheers,
Julien

Julien Cristau

unread,
Apr 25, 2016, 11:00:04 AM4/25/16
to
On Mon, Apr 25, 2016 at 16:39:59 +0200, Harald Dunkel wrote:
> % xinput list
> ⎡ Virtual core pointer id=2 [master pointer (3)]
> ⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)]
> ⎜ ↳ Logitech USB Receiver id=6 [slave pointer (2)]
> ⎜ ↳ Logitech USB Receiver 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=7 [slave keyboard (3)]
> ↳ Power Button id=8 [slave keyboard (3)]
> ↳ Unicomp Inc Ruffian6_x Kbrd v3_xx id=10 [slave keyboard (3)]
>
>
> I had hoped for some "extended id".
>
So there's two "Logitech USB Receiver" pointer devices, and you need to
use the id (6 or 9) to disambiguate.

Cheers,
Julien

Harald Dunkel

unread,
Apr 25, 2016, 11:00:09 AM4/25/16
to
On 04/22/16 11:48, Julien Cristau wrote:
% xinput list
⎡ Virtual core pointer id=2 [master pointer (3)]
⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)]
⎜ ↳ Logitech USB Receiver id=6 [slave pointer (2)]
⎜ ↳ Logitech USB Receiver 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=7 [slave keyboard (3)]
↳ Power Button id=8 [slave keyboard (3)]
↳ Unicomp Inc Ruffian6_x Kbrd v3_xx id=10 [slave keyboard (3)]


I had hoped for some "extended id".


Regards
Harri

Julien Cristau

unread,
Apr 26, 2016, 3:40:04 AM4/26/16
to
On Tue, Apr 26, 2016 at 09:31:03 +0200, Harald Dunkel wrote:

> On the previous reboot it was 4 and 6 (IIRC), thats the
> point of this ticket. And the suggested "pointer:Logitech
> USB Receiver" doesn't work either. Not to mention that
> there is only one USB receiver plugged in.
>
> Using xorg.conf to configure the device there was no
> problem like this. I could write
>
> Section "InputDevice"
> Identifier "Logitech USB Receiver"
> Driver "evdev"
> Option "Dev Name" "Logitech USB Receiver"
> Option "Device" "/dev/input/by-id/usb-Logitech_USB_Receiver-event-mouse"
> Option "Emulate3Buttons" "yes"
> Option "ButtonMapping" "1 8 3 5 4 6 7 2 9 10 11 12 13 14 15 16 17 18 19 20"
> EndSection
>
> to configure the mouse. Since this configuration scheme has
> been deprecated with xinput2, its the job of /usr/bin/xinput
> to take over.
>
No it's not... You can still configure things in xorg.conf, replace
InputDevice with InputClass, remove the "driver", "device" and "dev
name" lines, and you can use MatchUSBID or MatchProduct/MatchVendor to
select the device. xinput can't do that on the client side.

Cheers,
Julien

Harald Dunkel

unread,
Apr 26, 2016, 3:40:04 AM4/26/16
to
On the previous reboot it was 4 and 6 (IIRC), thats the
point of this ticket. And the suggested "pointer:Logitech
USB Receiver" doesn't work either. Not to mention that
there is only one USB receiver plugged in.

Using xorg.conf to configure the device there was no
problem like this. I could write

Section "InputDevice"
Identifier "Logitech USB Receiver"
Driver "evdev"
Option "Dev Name" "Logitech USB Receiver"
Option "Device" "/dev/input/by-id/usb-Logitech_USB_Receiver-event-mouse"
Option "Emulate3Buttons" "yes"
Option "ButtonMapping" "1 8 3 5 4 6 7 2 9 10 11 12 13 14 15 16 17 18 19 20"
EndSection

to configure the mouse. Since this configuration scheme has
been deprecated with xinput2, its the job of /usr/bin/xinput
to take over.


Regards
Harri

Julien Cristau

unread,
Apr 26, 2016, 4:50:02 AM4/26/16
to
On Tue, Apr 26, 2016 at 10:41:41 +0200, Harald Dunkel wrote:

> On 04/26/16 09:36, Julien Cristau wrote:
> > No it's not... You can still configure things in xorg.conf, replace
> > InputDevice with InputClass, remove the "driver", "device" and "dev
> > name" lines, and you can use MatchUSBID or MatchProduct/MatchVendor to
> > select the device. xinput can't do that on the client side.
> >
>
> xinput can, using the ambiguous device id. But since its
> ambiguous it is not very useful.
>
> What do I have to do to get this fixed?
>
Patches welcome, I guess.

Cheers,
Julien

Harald Dunkel

unread,
Apr 26, 2016, 4:50:03 AM4/26/16
to
On 04/26/16 09:36, Julien Cristau wrote:
> No it's not... You can still configure things in xorg.conf, replace
> InputDevice with InputClass, remove the "driver", "device" and "dev
> name" lines, and you can use MatchUSBID or MatchProduct/MatchVendor to
> select the device. xinput can't do that on the client side.
>

0 new messages