[Bug 1057824] [NEW] USB input device interfaces compete for the same symlink name in 60-persistent-input.rules

Launchpad Bug Tracker 1057824 at bugs.launchpad.net
Fri Sep 28 20:22:25 UTC 2012


You have been subscribed to a public bug by Ubuntu Foundation's Bug Bot (crichton):

The current rules in 60-persistent-input.rules do not produce a usable
symlink for the interface 0 device in multi-interface USB input devices.

These are the problematic rules:

KERNEL=="mouse*|js*", ENV{ID_BUS}=="?*", ENV{.INPUT_CLASS}=="?*", SYMLINK+="input/by-id/$env{ID_BUS}-$env{ID_SERIAL}-$env{.INPUT_CLASS}"
KERNEL=="event*", ENV{ID_BUS}=="?*", ENV{.INPUT_CLASS}=="?*", SYMLINK+="input/by-id/$env{ID_BUS}-$env{ID_SERIAL}-event-$env{.INPUT_CLASS}"

The above rules can be matched by multiple devices if a USB input device
has multiple USB interfaces (such as the Microsoft Wired Keyboard 600,
which has two keyboard interfaces).  Because the generated symlink names
do not include the USB interface number, the multiple devices will
compete over the same symlink name.  According to the udev man page, the
device that wins is undefined unless the devices are assigned different
link_priority values (which they are not).

There are other rules in 60-persistent-input.rules that do produce per-
interface symlinks.  These rules were introduced in git commit 5e9eb15
[1] for bug #626449.  Unfortunately, due to git commit 32567f8 [2], a
symlink for interface 0 is not produced by these per-interface rules.
Thus, if an interface other than 0 wins the competition for the
colliding symlink names, there won't be a persistent symlink for the
interface 0 device.  Even if device 0 does win the competition, it may
change, going against the intended persistence.

It seems like the correct fix is to give interface 0 a higher
link_priority value than the other interfaces.  This would guarantee
that interface 0 always wins the competition.

[1] http://cgit.freedesktop.org/systemd/systemd/commit/?id=5e9eb156c003dc7f8f92287bfad0251d6c5d0ef9
[2] http://cgit.freedesktop.org/systemd/systemd/commit/?id=32567f8c95290a8819c0bc7d57849b8abfba9554

$ lsb_release -rd
Description:    Ubuntu 12.04.1 LTS
Release:        12.04
$ apt-cache policy udev
udev:
  Installed: 175-0ubuntu9.1
  Candidate: 175-0ubuntu9.1
  Version table:
 *** 175-0ubuntu9.1 0
        500 http://us.archive.ubuntu.com/ubuntu/ precise-updates/main amd64 Packages
        100 /var/lib/dpkg/status
     175-0ubuntu9 0
        500 http://us.archive.ubuntu.com/ubuntu/ precise/main amd64 Packages

** Affects: udev (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: patch precise quantal
-- 
USB input device interfaces compete for the same symlink name in 60-persistent-input.rules
https://bugs.launchpad.net/bugs/1057824
You received this bug notification because you are a member of Ubuntu Sponsors Team, which is subscribed to the bug report.



More information about the Ubuntu-sponsors mailing list