[HARDY] 40-permissions.rules not used by udev

Bug #210421 reported by enguerran
2
Affects Status Importance Assigned to Milestone
udev (Ubuntu)
Invalid
Medium
Daniel Hahler

Bug Description

On a up to date hardy, I use a /etc/udev/rules.d/45-tuxdroid.rules to launch two deamons when some usb device is plugged.

My /etc/udev/rules.d/40-permissions.rules contains those lines :
# USB devices (usbfs replacement)
SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", MODE="0664"
SUBSYSTEM=="usb_device", GROUP="usb", MODE="0664"

But when the usb device is plugged, it gets the wrong permissions and my two previous deamons can't launch.

Revision history for this message
enguerran (enguerrangillet) wrote :
Revision history for this message
enguerran (enguerrangillet) wrote :
description: updated
Revision history for this message
Daniel Hahler (blueyed) wrote :

Have you checked using "udevmonitor" if the events are like you expect them to be and to debug this in general?

Changed in udev:
assignee: nobody → blueyed
importance: Undecided → Medium
status: New → Incomplete
Revision history for this message
Scott James Remnant (Canonical) (canonical-scott) wrote :

Your rules are for an older kernel than the one in Hardy.

You will need to make a similar change to that as has been made in 40-permissions.rules, ie. instead of matching SUBSYSTEM=="usb_device" you need to match SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device"

e.g.

SUBSYSTEM=="usb", ENV{devtype}=="usb_device", SYSFS{idVendor}=="03eb", SYSFS{idProduct}=="2ffd", MODE:="0666"

Changed in udev:
status: Incomplete → Invalid
Revision history for this message
enguerran (enguerrangillet) wrote :
Download full text (5.3 KiB)

Hi,

thanks for the tip.
Anyway, I made the neccessary change to my 45-tuxdroid.rules, but it doesn't help.
My deamons aren't launch :/

Here is to ouput of udevmonitor when I plug my USB device :
udevmonitor will print the received events for:
UDEV the event which udev sends out after rule processing
UEVENT the kernel uevent

UEVENT[1207154591.155446] add /devices/pci0000:00/0000:00:1d.1/usb2/2-2 (usb)
UEVENT[1207154591.188452] add /devices/pci0000:00/0000:00:1d.1/usb2/2-2/usb_endpoint/usbdev2.6_ep00 (usb_endpoint)
UDEV [1207154591.188907] add /devices/pci0000:00/0000:00:1d.1/usb2/2-2 (usb)
UDEV [1207154591.209818] add /devices/pci0000:00/0000:00:1d.1/usb2/2-2/usb_endpoint/usbdev2.6_ep00 (usb_endpoint)
UEVENT[1207154591.673400] add /devices/pci0000:00/0000:00:1d.1/usb2/2-2/2-2:1.0 (usb)
UEVENT[1207154591.707698] add /devices/pci0000:00/0000:00:1d.1/usb2/2-2/2-2:1.0/sound/card1 (sound)
UEVENT[1207154591.707759] add /devices/pci0000:00/0000:00:1d.1/usb2/2-2/2-2:1.0/sound/card1/pcmC1D0p (sound)
UEVENT[1207154591.707778] add /devices/pci0000:00/0000:00:1d.1/usb2/2-2/2-2:1.0/sound/card1/pcmC1D0c (sound)
UEVENT[1207154591.707796] add /devices/pci0000:00/0000:00:1d.1/usb2/2-2/2-2:1.0/sound/card1/dsp1 (sound)
UEVENT[1207154591.707814] add /devices/pci0000:00/0000:00:1d.1/usb2/2-2/2-2:1.0/sound/card1/audio1 (sound)
UEVENT[1207154591.707831] add /devices/pci0000:00/0000:00:1d.1/usb2/2-2/2-2:1.0/sound/card1/controlC1 (sound)
UEVENT[1207154591.707849] add /devices/pci0000:00/0000:00:1d.1/usb2/2-2/2-2:1.0/sound/card1/mixer1 (sound)
UEVENT[1207154591.727585] add /devices/pci0000:00/0000:00:1d.1/usb2/2-2/2-2:1.1 (usb)
UEVENT[1207154591.727624] add /devices/pci0000:00/0000:00:1d.1/usb2/2-2/2-2:1.2 (usb)
UEVENT[1207154591.727633] add /devices/pci0000:00/0000:00:1d.1/usb2/2-2/2-2:1.3 (usb)
UEVENT[1207154591.727640] add /devices/pci0000:00/0000:00:1d.1/usb2/2-2/2-2:1.3/usb_endpoint/usbdev2.6_ep84 (usb_endpoint)
UEVENT[1207154591.727649] add /devices/pci0000:00/0000:00:1d.1/usb2/2-2/2-2:1.3/usb_endpoint/usbdev2.6_ep05 (usb_endpoint)
UEVENT[1207154591.727657] add /devices/pci0000:00/0000:00:1d.1/usb2/2-2/2-2:1.4 (usb)
UEVENT[1207154591.739411] add /devices/pci0000:00/0000:00:1d.1/usb2/2-2/2-2:1.0/sound/card1/pcmC1D1p (sound)
UEVENT[1207154591.739444] add /devices/pci0000:00/0000:00:1d.1/usb2/2-2/2-2:1.0/sound/card1/adsp1 (sound)
UEVENT[1207154591.739453] add /devices/pci0000:00/0000:00:1d.1/usb2/2-2/2-2:1.5 (usb)
UDEV [1207154591.924170] add /devices/pci0000:00/0000:00:1d.1/usb2/2-2/2-2:1.0 (usb)
UDEV [1207154591.937488] add /devices/pci0000:00/0000:00:1d.1/usb2/2-2/2-2:1.0/sound/card1 (sound)
UDEV [1207154591.971527] add /devices/pci0000:00/0000:00:1d.1/usb2/2-2/2-2:1.1 (usb)
UDEV [1207154592.004204] add /devices/pci0000:00/0000:00:1d.1/usb2/2-2/2-2:1.0/sound/card1/pcmC1D0p (sound)
UDEV [1207154592.016631] add /devices/pci0000:00/0000:00:1d.1/usb2/2-2/2-2:1.0/sound/card1/pcmC1D0c (sound)
UDEV [1207154592.038583] add /devices/pci0000:00/0000:00:1d.1/usb2/2-2/2-2:1.0/sound/card1/dsp1 (sound)
UDEV [1207154592.063223] add ...

Read more...

Changed in udev:
status: Invalid → Incomplete
Revision history for this message
enguerran (enguerrangillet) wrote :

Here is the ouptut of a "udevmonitor --environment", when I plug my usb device.

Revision history for this message
Scott James Remnant (Canonical) (canonical-scott) wrote :

Err, sorry, replace SYSFS in above with ATTRS

Revision history for this message
enguerran (enguerrangillet) wrote :

Made those changes too.
My new 45-tuxdroid.rules is joined.

I still can't get my daemons run.

Thanks for your precious help (especially Scott) !

Revision history for this message
Scott James Remnant (Canonical) (canonical-scott) wrote :

The rules must be copied precisely.

It's ENV{DEVTYPE} not ENV{devtype}

Revision history for this message
enguerran (enguerrangillet) wrote :

You are right. This finally works.
I invalid the bug.

Thanks a lot for taking the time to explain.

Revision history for this message
enguerran (enguerrangillet) wrote :

It's was not udev bug.
As Scott James Remnant pointed out, the 45-tuxdroid.rules I used were for an older kernel. So I just had to update it.

Changed in udev:
status: Incomplete → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.