Public bug reported:

Binary package hint: udev

Hi,

I use custom made usb board for research. It uses a Cypress FX 2 usb
chip for communication with the host computer. While trying to configure
it I found that udev does not refresh the rules in /etc/udev/rules.d
when replugging the device but only when rebooting the computer.

Here is a minimal example consisting of 3 steps.

A) Check where the device is located and then find its properties

$ lsusb
...
Bus 002 Device 002: ID 04b4:1236 Cypress Semiconductor Corp.
... 

$ ls -l /dev/bus/usb/002/
...
crw-rw-r-- 1 root root 189, 130 2009-12-09 05:54 002
...

$ udevadm info -a -p $(udevadm info -q path -n /dev/bus/usb/002/002)

Udevadm info starts with the device specified by the devpath and then
walks up the chain of parent devices. It prints for every device
found, all possible attributes in the udev rules key format.
A rule to match, can be composed by the attributes of the device
and the attributes from one single parent device.

  looking at device '/devices/pci0000:00/0000:00:1d.7/usb2/2-5':
    KERNEL=="2-5"
    SUBSYSTEM=="usb"
    DRIVER=="usb"
    ATTR{configuration}==""
    ATTR{bNumInterfaces}==" 1"
    ATTR{bConfigurationValue}=="1"
    ATTR{bmAttributes}=="c0"
    ATTR{bMaxPower}=="  2mA"
    ATTR{urbnum}=="10"
    ATTR{idVendor}=="04b4"
    ATTR{idProduct}=="1236"
    ATTR{bcdDevice}=="0101"
    ATTR{bDeviceClass}=="ff"
    ATTR{bDeviceSubClass}=="ff"
    ATTR{bDeviceProtocol}=="ff"
    ATTR{bNumConfigurations}=="1"
    ATTR{bMaxPacketSize0}=="64"
    ATTR{speed}=="480"
    ATTR{busnum}=="2"
    ATTR{devnum}=="2"
    ATTR{version}==" 2.00"
    ATTR{maxchild}=="0"
    ATTR{quirks}=="0x0"
    ATTR{authorized}=="1"
    ATTR{manufacturer}=="C.Kurtsiefer/CQT"
    ATTR{product}=="DDS interface board Rev. 0"
    ATTR{serial}=="Test device 1"
...

B) Create a minimal rule with that information, e.g. this one that
should change the group of that device

$ cat /etc/udev/rules.d/10-local.rules 
SUBSYSTEM=="usb", ATTR{idVendor}=="04b4", ATTR{idProduct}=="1236", GROUP="users"

After unplugging and plugging in the  device under question (now 004) the group 
is still root
$ ls -l /dev/bus/usb/002/
...
crw-rw-r-- 1 root root 189, 131 2009-12-08 22:02 004
...


C) Reboot, after that the new rule was obeyed.

$ lsusb
...
Bus 002 Device 002: ID 04b4:1236 Cypress Semiconductor Corp.
...

$ ls -l /dev/bus/usb/002/
...
crw-rw-r-- 1 root users 189, 129 2009-12-09 06:05 002
...


Cheers,

Markus

ProblemType: Bug
Architecture: i386
CustomUdevRuleFiles: 40-usrp.rules 40-usrp.rules~ 10-local.rules
Date: Tue Dec  8 22:17:28 2009
DistroRelease: Ubuntu 9.10
InstallationMedia: Ubuntu 9.10 "Karmic Koala" - Release i386 (20091028.5)
MachineType: Dell Inc. OptiPlex 960
Package: udev 147~-6.1
ProcCmdLine: BOOT_IMAGE=/boot/vmlinuz-2.6.31-16-generic 
root=UUID=ba1bf298-f214-4e83-8db5-6c52da1bfdc0 ro quiet splash
ProcEnviron:
 LANG=en_SG.UTF-8
 SHELL=/bin/bash
ProcVersionSignature: Ubuntu 2.6.31-16.52-generic
SourcePackage: udev
Uname: Linux 2.6.31-16-generic i686
XsessionErrors:
 (gnome-settings-daemon:1874): GLib-CRITICAL **: g_propagate_error: assertion 
`src != NULL' failed
 (gnome-settings-daemon:1874): GLib-CRITICAL **: g_propagate_error: assertion 
`src != NULL' failed
 (nautilus:1974): Eel-CRITICAL **: eel_preferences_get_boolean: assertion 
`preferences_is_initialized ()' failed
 (polkit-gnome-authentication-agent-1:1996): GLib-CRITICAL **: 
g_once_init_leave: assertion `initialization_value != 0' failed
dmi.bios.date: 07/31/2009
dmi.bios.vendor: Dell Inc.
dmi.bios.version: A05
dmi.board.name: 0G261D
dmi.board.vendor: Dell Inc.
dmi.board.version: A00
dmi.chassis.type: 15
dmi.chassis.vendor: Dell Inc.
dmi.modalias: 
dmi:bvnDellInc.:bvrA05:bd07/31/2009:svnDellInc.:pnOptiPlex960:pvr:rvnDellInc.:rn0G261D:rvrA00:cvnDellInc.:ct15:cvr:
dmi.product.name: OptiPlex 960
dmi.sys.vendor: Dell Inc.

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


** Tags: apport-bug i386

-- 
udev does not refresh rules when replugging device
https://bugs.launchpad.net/bugs/494033
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to