Bug 23692

Summary: device's group differs on boot and on "run-time" plugging-in
Product: Branch 4.1 Reporter: Ivan Zakharyaschev <imz>
Component: udevAssignee: Nobody's working on this, feel free to take it <nobody>
Status: CLOSED WONTFIX QA Contact: qa-4.1 <qa-4.1>
Severity: major    
Priority: P3    
Version: unspecified   
Hardware: all   
OS: Linux   

Description Ivan Zakharyaschev 2010-06-29 20:30:10 MSD
udev-118-alt1
udev-rules-118-alt1
udev-initramfs-118-alt1

When I plug in the webcamera when the system is already running (with a KDE session), the group of /dev/video0 is set to "video":


# l /dev/video*
lrwxrwxrwx 1 root root      6 Jun 29 16:07 /dev/video -> video0
crw-rw---- 1 imz  video 81, 0 Jun 29 16:07 /dev/video0
# 

When the system is booted with the camera plugged in, the group is "radio".

Not only synchronizing the behaviour in this particular case of /dev/video0 is wanted, but also it would be nice if in general there were some guarantee that all such behaviour of this kind produces the same results during the booting of the system or when the device is plugged in.

The camera:


# lsusb -d :928 -v

Bus 001 Device 003: ID 046d:0928 Logitech, Inc. Quickcam Express
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               1.10
  bDeviceClass          255 Vendor Specific Class
  bDeviceSubClass       255 Vendor Specific Subclass
  bDeviceProtocol         0 
  bMaxPacketSize0         8
  idVendor           0x046d Logitech, Inc.
  idProduct          0x0928 Quickcam Express
  bcdDevice            0.00
  iManufacturer           1         
  iProduct                2 Camera
  iSerial                 0 
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength          233
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0 
    bmAttributes         0x80
      (Bus Powered)
    MaxPower              100mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass      0 
      bInterfaceProtocol      0 
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            1
          Transfer Type            Isochronous
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0000  1x 0 bytes
        bInterval               1
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       1
      bNumEndpoints           1
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass      0 
      bInterfaceProtocol      0 
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            1
          Transfer Type            Isochronous
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0080  1x 128 bytes
        bInterval               1
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       2
      bNumEndpoints           1
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass      0 
      bInterfaceProtocol      0 
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            1
          Transfer Type            Isochronous
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0370  1x 880 bytes
        bInterval               1
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       3
      bNumEndpoints           1
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass      0 
      bInterfaceProtocol      0 
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            1
          Transfer Type            Isochronous
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               1
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       4
      bNumEndpoints           1
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass      0 
      bInterfaceProtocol      0 
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            1
          Transfer Type            Isochronous
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0280  1x 640 bytes
        bInterval               1
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       5
      bNumEndpoints           1
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass      0 
      bInterfaceProtocol      0 
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            1
          Transfer Type            Isochronous
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0300  1x 768 bytes
        bInterval               1
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       6
      bNumEndpoints           1
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass      0 
      bInterfaceProtocol      0 
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            1
          Transfer Type            Isochronous
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0380  1x 896 bytes
        bInterval               1
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       7
      bNumEndpoints           1
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass      0 
      bInterfaceProtocol      0 
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            1
          Transfer Type            Isochronous
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x03ff  1x 1023 bytes
        bInterval               1
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       8
      bNumEndpoints           1
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass      0 
      bInterfaceProtocol      0 
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            1
          Transfer Type            Isochronous
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0220  1x 544 bytes
        bInterval               1
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       9
      bNumEndpoints           1
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass      0 
      bInterfaceProtocol      0 
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            1
          Transfer Type            Isochronous
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0290  1x 656 bytes
        bInterval               1
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting      10
      bNumEndpoints           1
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass      0 
      bInterfaceProtocol      0 
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            1
          Transfer Type            Isochronous
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x02c0  1x 704 bytes
        bInterval               1
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting      11
      bNumEndpoints           1
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass      0 
      bInterfaceProtocol      0 
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            1
          Transfer Type            Isochronous
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0360  1x 864 bytes
        bInterval               1
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting      12
      bNumEndpoints           1
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass      0 
      bInterfaceProtocol      0 
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            1
          Transfer Type            Isochronous
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x03c0  1x 960 bytes
        bInterval               1
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting      13
      bNumEndpoints           1
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass      0 
      bInterfaceProtocol      0 
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            1
          Transfer Type            Isochronous
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x034d  1x 845 bytes
        bInterval               1
Device Status:     0x0000
  (Bus Powered)
# 

More info:


# rpm -qa '*udev*'
libudev-141-alt9
udev-initramfs-118-alt1
udev_static-addon-0.1-alt1
udev-118-alt1
libgudev-150-alt7
udev-rules-118-alt1
udev-extras-0.20090516-alt4

# rpm -qa '*udev*' -l | xargs fgrep radio -r 
/lib/udev/keymaps/module-ibm:0x04 radio # Fn+F5
/lib/udev/keymaps/module-lenovo:0x4 radio # Fn+F5
Binary file /lib/udev/v4l_id matches
/etc/udev/initramfs-rules.d/50-udev-default.rules:KERNEL=="radio0",		SYMLINK+="radio"
/etc/udev/initramfs-rules.d/50-udev-default.rules:KERNEL=="winradio*",		GROUP="audio"
/etc/udev/rules.d/50-udev-default.rules:KERNEL=="radio0",		SYMLINK+="radio"
/etc/udev/rules.d/50-udev-default.rules:KERNEL=="winradio*",		GROUP="audio"
/etc/udev/initramfs-rules.d/50-udev-default.rules:KERNEL=="radio0",		SYMLINK+="radio"
/etc/udev/initramfs-rules.d/50-udev-default.rules:KERNEL=="winradio*",		GROUP="audio"
/etc/udev/initramfs-rules.d/50-udev-default.rules:KERNEL=="radio0",		SYMLINK+="radio"
/etc/udev/initramfs-rules.d/50-udev-default.rules:KERNEL=="winradio*",		GROUP="audio"
/etc/udev/rules.d/50-udev-default.rules:KERNEL=="radio0",		SYMLINK+="radio"
/etc/udev/rules.d/50-udev-default.rules:KERNEL=="winradio*",		GROUP="audio"
/etc/udev/rules.d/50-udev-default.rules:KERNEL=="radio0",		SYMLINK+="radio"
/etc/udev/rules.d/50-udev-default.rules:KERNEL=="winradio*",		GROUP="audio"
/lib/udev/keymaps/module-ibm:0x04 radio # Fn+F5
/lib/udev/keymaps/module-lenovo:0x4 radio # Fn+F5
/lib/udev/keymaps/module-ibm:0x04 radio # Fn+F5
/lib/udev/keymaps/module-lenovo:0x4 radio # Fn+F5
Binary file /lib/udev/v4l_id matches
# 

I have found no udev logs so that I could attach them. The camera is recognized the same way in any of the 2 cases:

# dmesg | egrep '(1-1|spca)'
[   11.721872] usb 1-1: new full speed USB device using uhci_hcd and address 2
[   11.917201] usb 1-1: New USB device found, idVendor=046d, idProduct=0928
[   11.917207] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[   11.917212] usb 1-1: Product: Camera
[   11.917215] usb 1-1: Manufacturer:         
[   11.917406] usb 1-1: configuration #1 chosen from 1 choice
[   16.752713] gspca: main v2.5.0 registered
[   16.761454] gspca: probing 046d:0928
[   16.826321] gspca: probe ok
[   16.826350] usbcore: registered new interface driver spca561
[   16.826356] spca561: registered
[61824.336102] usb 1-1: USB disconnect, address 2
[61824.336405] gspca: disconnect complete
[61837.080054] usb 1-1: new full speed USB device using uhci_hcd and address 3
[61837.275100] usb 1-1: New USB device found, idVendor=046d, idProduct=0928
[61837.275109] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[61837.275117] usb 1-1: Product: Camera
[61837.275122] usb 1-1: Manufacturer:         
[61837.275348] usb 1-1: configuration #1 chosen from 1 choice
[61837.279392] gspca: probing 046d:0928
[61837.343322] gspca: probe ok
#
Comment 1 Ivan Zakharyaschev 2010-07-01 00:29:31 MSD
This is also true with 

udev-118-alt1.M41.2
udev-rules-118-alt1.M41.2
udev-initramfs-118-alt1.M41.2

from current branch 4.1.

(In reply to comment #0)
> udev-118-alt1
> udev-rules-118-alt1
> udev-initramfs-118-alt1
Comment 2 Michael Shigorin 2014-11-05 20:43:20 MSK
В 4.1/branch исправления не будут вноситься уже технически (заглушена очередь на сборку), поэтому прошу ошибки, актуальные для sisyphus/p7/t7, перевесить на текущие ветки или сизиф.