All of lore.kernel.org
 help / color / mirror / Atom feed
* group is not set properly for usb printer for older kernels
@ 2009-10-08 17:12 Andreas Radke
  2009-10-08 17:26 ` Kay Sievers
                   ` (18 more replies)
  0 siblings, 19 replies; 20+ messages in thread
From: Andreas Radke @ 2009-10-08 17:12 UTC (permalink / raw)
  To: linux-hotplug

Hi, I'm maintaining the ArchLinux kernel 2.6.27.xx series + cups
packages.

We added the git fix for libusb "lp" group required by new cups 1.4.x
to our udev 146 pkg, this fix is working with kernels 2.6.30 
and 2.6.31 but fails with our 2.6.27.xx kernels. The kernel config 
is modified only in a few parts.

With kernel 2.6.27.xx the rule is well applied on cold boot 
but whenever I switch power off and on the printer devices stays in
root group. Every udev call done by hand like udevadm trigger or test
"fixes" the group permission.

usb 4-2: new full speed USB device using ohci_hcd and address 2
usb 4-2: configuration #1 chosen from 1 choice
[root@server64 andyrtr]# ls -lhR /dev/bus/usb/004/002 
crw-rw-r-- 1 root root 189, 385  8. Okt 19:01 /dev/bus/usb/004/002
[root@server64 andyrtr]# udevadm trigger
[root@server64 andyrtr]# ls -lhR /dev/bus/usb/004/002 
crw-rw---- 1 root lp 189, 385  8. Okt 19:01 /dev/bus/usb/004/002


Any idea what cause can this odd behaviour and how to fix it?

-Andy





run_command: calling: test
udevadm_test: version 146
This program is for debugging only, it does not run any program,
specified by a RUN key. It may show incorrect results, because
some values may be different, or not available at a simulation run.

parse_file: reading '/lib/udev/rules.d/40-alsa.rules' as rules file
parse_file: reading '/lib/udev/rules.d/40-infiniband.rules' as rules file
parse_file: reading '/lib/udev/rules.d/40-isdn.rules' as rules file
parse_file: reading '/lib/udev/rules.d/40-pilot-links.rules' as rules file
parse_file: reading '/lib/udev/rules.d/40-zaptel.rules' as rules file
parse_file: reading '/lib/udev/rules.d/50-firmware.rules' as rules file
parse_file: reading '/lib/udev/rules.d/50-udev-default.rules' as rules file
parse_file: reading '/lib/udev/rules.d/53-sane.rules' as rules file
parse_file: reading '/lib/udev/rules.d/60-cdrom_id.rules' as rules file
parse_file: reading '/lib/udev/rules.d/60-persistent-alsa.rules' as rules file
parse_file: reading '/lib/udev/rules.d/60-persistent-input.rules' as rules file
parse_file: reading '/lib/udev/rules.d/60-persistent-serial.rules' as rules file
parse_file: reading '/lib/udev/rules.d/60-persistent-storage-tape.rules' as rules file
parse_file: reading '/lib/udev/rules.d/60-persistent-storage.rules' as rules file
parse_file: reading '/lib/udev/rules.d/60-persistent-v4l.rules' as rules file
parse_file: reading '/lib/udev/rules.d/61-mobile-action.rules' as rules file
parse_file: reading '/lib/udev/rules.d/61-option-modem-modeswitch.rules' as rules file
parse_file: reading '/lib/udev/rules.d/61-persistent-storage-edd.rules' as rules file
parse_file: reading '/lib/udev/rules.d/64-device-mapper.rules' as rules file
parse_file: reading '/lib/udev/rules.d/64-md-raid.rules' as rules file
parse_file: reading '/lib/udev/rules.d/70-acl.rules' as rules file
parse_file: reading '/lib/udev/rules.d/70-hid2hci.rules' as rules file
parse_file: reading '/lib/udev/rules.d/75-net-description.rules' as rules file
parse_file: reading '/lib/udev/rules.d/75-tty-description.rules' as rules file
parse_file: reading '/lib/udev/rules.d/78-sound-card.rules' as rules file
parse_file: reading '/lib/udev/rules.d/79-fstab_import.rules' as rules file
parse_file: reading '/lib/udev/rules.d/80-drivers.rules' as rules file
parse_file: reading '/lib/udev/rules.d/81-arch.rules' as rules file
parse_file: reading '/lib/udev/rules.d/95-keymap.rules' as rules file
parse_file: reading '/lib/udev/rules.d/95-udev-late.rules' as rules file
udev_rules_new: rules use 60576 bytes tokens (5048 * 12 bytes), 15168 bytes buffer
udev_rules_new: temporary index used 24160 bytes (1208 * 20 bytes)
udev_device_new_from_syspath: device 0xb4c140 has devpath '/devices/pci0000:00/0000:00:04.0/usb4/4-2'
udev_device_new_from_syspath: device 0xb56000 has devpath '/devices/pci0000:00/0000:00:04.0/usb4/4-2'
udev_device_read_db: device 0xb56000 filled with db file data
udev_rules_apply_to_event: LINK 'char/189:386' /lib/udev/rules.d/50-udev-default.rules:4
udev_rules_apply_to_event: MODE 0664 /lib/udev/rules.d/50-udev-default.rules:54
udev_rules_apply_to_event: NAME 'bus/usb/004/003' /lib/udev/rules.d/50-udev-default.rules:54
udev_rules_apply_to_event: IMPORT 'usb_id --export /devices/pci0000:00/0000:00:04.0/usb4/4-2' /lib/udev/rules.d/50-udev-default.rules:65
util_run_program: 'usb_id --export /devices/pci0000:00/0000:00:04.0/usb4/4-2' started
util_run_program: '/lib/udev/usb_id' (stdout) 'ID_VENDOR=Lexmark_International__Inc.'
util_run_program: '/lib/udev/usb_id' (stdout) 'ID_VENDOR_ENC=Lexmark\x20International\x2c\x20Inc.'
util_run_program: '/lib/udev/usb_id' (stdout) 'ID_VENDOR_ID\x043d'
util_run_program: '/lib/udev/usb_id' (stdout) 'ID_MODEL=Lexmark_Optra_E312'
util_run_program: '/lib/udev/usb_id' (stdout) 'ID_MODEL_ENC=Lexmark\x20Optra\x20E312'
util_run_program: '/lib/udev/usb_id' (stdout) 'ID_MODEL_ID\00c'
util_run_program: '/lib/udev/usb_id' (stdout) 'ID_REVISION\x0100'
util_run_program: '/lib/udev/usb_id' (stdout) 'ID_SERIAL=Lexmark_International__Inc._Lexmark_Optra_E312_8050926'
util_run_program: '/lib/udev/usb_id' (stdout) 'ID_SERIAL_SHORT€50926'
util_run_program: '/lib/udev/usb_id' (stdout) 'ID_BUS=usb'
util_run_program: '/lib/udev/usb_id' (stdout) 'ID_USB_INTERFACES=:070102:'
util_run_program: 'usb_id --export /devices/pci0000:00/0000:00:04.0/usb4/4-2' returned with exitcode 0
udev_rules_apply_to_event: GROUP 7 /lib/udev/rules.d/50-udev-default.rules:66
udev_rules_apply_to_event: MODE 0660 /lib/udev/rules.d/50-udev-default.rules:66
udev_device_new_from_syspath: device 0xb58a00 has devpath '/devices/pci0000:00/0000:00:04.0/usb4'
udev_device_new_from_syspath: device 0xb58ce0 has devpath '/devices/pci0000:00/0000:00:04.0'
udev_device_new_from_syspath: device 0xb58f90 has devpath '/devices/pci0000:00'
udev_device_update_db: created db file for '/devices/pci0000:00/0000:00:04.0/usb4/4-2' in '/dev/.udev/db/\x2fdevices\x2fpci0000:00\x2f0000:00:04.0\x2fusb4\x2f4-2'
udev_node_add: creating device node '/dev/bus/usb/004/003', devnum\x189:386, mode\x0660, uid=0, gid=7
udev_node_mknod: preserve file '/dev/bus/usb/004/003', because it has correct dev_t
udev_node_mknod: chmod(/dev/bus/usb/004/003, 020660)
udev_node_mknod: chown(/dev/bus/usb/004/003, 0, 7)
update_link: found 2 devices with name '/dev/char/189:386'
udev_device_new_from_syspath: device 0xb59430 has devpath '/devices/pci0000:00/0000:00:04.0/usb4/4-2/usb_device/usbdev4.3'
udev_device_read_db: device 0xb59430 filled with db symlink data '/dev/usbdev4.3'
update_link: '/dev/char/189:386' with target '/dev/bus/usb/004/003' has the highest priority 0, create it
node_symlink: atomically replace '/dev/char/189:386'
udevadm_test: UDEV_LOG=6
udevadm_test: DEVPATH=/devices/pci0000:00/0000:00:04.0/usb4/4-2
udevadm_test: MAJOR\x189
udevadm_test: MINOR86
udevadm_test: DEVTYPE=usb_device
udevadm_test: DRIVER=usb
udevadm_test: DEVICE=/proc/bus/usb/004/003
udevadm_test: PRODUCTCd/c/100
udevadm_test: TYPE=0/0/0
udevadm_test: BUSNUM\04
udevadm_test: DEVNUM\03
udevadm_test: ACTION­d
udevadm_test: SUBSYSTEM=usb
udevadm_test: DEVLINKS=/dev/char/189:386
udevadm_test: ID_VENDOR=Lexmark_International__Inc.
udevadm_test: ID_VENDOR_ENC=Lexmark\x20International\x2c\x20Inc.
udevadm_test: ID_VENDOR_ID\x043d
udevadm_test: ID_MODEL=Lexmark_Optra_E312
udevadm_test: ID_MODEL_ENC=Lexmark\x20Optra\x20E312
udevadm_test: ID_MODEL_ID\00c
udevadm_test: ID_REVISION\x0100
udevadm_test: ID_SERIAL=Lexmark_International__Inc._Lexmark_Optra_E312_8050926
udevadm_test: ID_SERIAL_SHORT€50926
udevadm_test: ID_BUS=usb
udevadm_test: ID_USB_INTERFACES=:070102:
udevadm_test: DEVNAME=/dev/bus/usb/004/003
[root@server64 andyrtr]# uname -a
Linux server64 2.6.27.36-lts #1 SMP Tue Oct 6 17:43:43 UTC 2009 x86_64
AMD Athlon(tm) X2 Dual Core Processor BE-2300 AuthenticAMD GNU/Linux

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: group is not set properly for usb printer for older kernels
  2009-10-08 17:12 group is not set properly for usb printer for older kernels Andreas Radke
@ 2009-10-08 17:26 ` Kay Sievers
  2009-10-08 18:19 ` Andreas Radke
                   ` (17 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: Kay Sievers @ 2009-10-08 17:26 UTC (permalink / raw)
  To: linux-hotplug

On Thu, Oct 8, 2009 at 19:12, Andreas Radke <a.radke@arcor.de> wrote:
> Hi, I'm maintaining the ArchLinux kernel 2.6.27.xx series + cups
> packages.
>
> We added the git fix for libusb "lp" group required by new cups 1.4.x
> to our udev 146 pkg, this fix is working with kernels 2.6.30
> and 2.6.31 but fails with our 2.6.27.xx kernels. The kernel config
> is modified only in a few parts.
>
> With kernel 2.6.27.xx the rule is well applied on cold boot
> but whenever I switch power off and on the printer devices stays in
> root group. Every udev call done by hand like udevadm trigger or test
> "fixes" the group permission.

> update_link: found 2 devices with name '/dev/char/189:386'
> udev_device_new_from_syspath: device 0xb59430 has devpath '/devices/pci0000:00/0000:00:04.0/usb4/4-2/usb_device/usbdev4.3'
> udev_device_read_db: device 0xb59430 filled with db symlink data '/dev/usbdev4.3'
> update_link: '/dev/char/189:386' with target '/dev/bus/usb/004/003' has the highest priority 0, create it
> node_symlink: atomically replace '/dev/char/189:386'

Not sure if that is related, but it looks weird. How can two devices
claim the same major/minor?

What's in /dev/.udev/names/ for that device node/symlink?

Kay

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: group is not set properly for usb printer for older kernels
  2009-10-08 17:12 group is not set properly for usb printer for older kernels Andreas Radke
  2009-10-08 17:26 ` Kay Sievers
@ 2009-10-08 18:19 ` Andreas Radke
  2009-10-08 18:24 ` Kay Sievers
                   ` (16 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: Andreas Radke @ 2009-10-08 18:19 UTC (permalink / raw)
  To: linux-hotplug

should be this:

[root@server64 andyrtr]# ls -1hR /dev/.udev/names/usbdev4.5
/dev/.udev/names/usbdev4.5:
\x2fdevices\x2fpci0000:00\x2f0000:00:04.0\x2fusb4\x2f4-2\x2fusb_device\x2fusbdev4.5


udevadm monitor -e --udev shows this:

UDEV  [1255025639.950847] add      /devices/pci0000:00/0000:00:04.0/usb4/4-2 (usb)
UDEV_LOG=0
ACTION­d
DEVPATH=/devices/pci0000:00/0000:00:04.0/usb4/4-2
SUBSYSTEM=usb
DEVTYPE=usb_device
DEVICE=/proc/bus/usb/004/005
PRODUCTCd/c/100
TYPE=0/0/0
BUSNUM\04
DEVNUM\05
SEQNUM\x1919
ID_VENDOR=Lexmark_International__Inc.
ID_VENDOR_ENC=Lexmark\x20International\x2c\x20Inc.
ID_VENDOR_ID\x043d
ID_MODEL=Lexmark_Optra_E312
ID_MODEL_ENC=Lexmark\x20Optra\x20E312
ID_MODEL_ID\00c
ID_REVISION\x0100
ID_SERIAL=Lexmark_International__Inc._Lexmark_Optra_E312_8050926
ID_SERIAL_SHORT€50926
ID_BUS=usb
ID_USB_INTERFACES=:070102:
DEVNAME=/dev/bus/usb/004/005
MAJOR\x189
MINOR88
DEVLINKS=/dev/char/189:388

UDEV  [1255025639.952481] add      /devices/pci0000:00/0000:00:04.0/usb4/4-2/usb_endpoint/usbdev4.5_ep00 (usb_endpoint)
UDEV_LOG=0
ACTION­d
DEVPATH=/devices/pci0000:00/0000:00:04.0/usb4/4-2/usb_endpoint/usbdev4.5_ep00
SUBSYSTEM=usb_endpoint
SEQNUM\x1924
DEVNAME=/dev/usbdev4.5_ep00
MAJOR%3
MINOR\x10
DEVLINKS=/dev/char/253:10

UDEV  [1255025639.959575] add      /devices/pci0000:00/0000:00:04.0/usb4/4-2/usb_device/usbdev4.5 (usb_device)
UDEV_LOG=0
ACTION­d
DEVPATH=/devices/pci0000:00/0000:00:04.0/usb4/4-2/usb_device/usbdev4.5
SUBSYSTEM=usb_device
SEQNUM\x1923
DEVNAME=/dev/usbdev4.5
MAJOR\x189
MINOR88
DEVLINKS=/dev/char/189:388

UDEV  [1255025639.986799] add      /devices/pci0000:00/0000:00:04.0/usb4/4-2/4-2:1.0 (usb)
UDEV_LOG=0
ACTION­d
DEVPATH=/devices/pci0000:00/0000:00:04.0/usb4/4-2/4-2:1.0
SUBSYSTEM=usb
DEVTYPE=usb_interface
DEVICE=/proc/bus/usb/004/005
PRODUCTCd/c/100
TYPE=0/0/0
INTERFACE=7/1/2
MODALIAS=usb:v043Dp000Cd0100dc00dsc00dp00ic07isc01ip02
SEQNUM\x1920

UDEV  [1255025639.987745] add      /devices/pci0000:00/0000:00:04.0/usb4/4-2/4-2:1.0/usb_endpoint/usbdev4.5_ep81 (usb_endpoint)
UDEV_LOG=0
ACTION­d
DEVPATH=/devices/pci0000:00/0000:00:04.0/usb4/4-2/4-2:1.0/usb_endpoint/usbdev4.5_ep81
SUBSYSTEM=usb_endpoint
SEQNUM\x1922
DEVNAME=/dev/usbdev4.5_ep81
MAJOR%3
MINOR=9
DEVLINKS=/dev/char/253:9

UDEV  [1255025639.987812] add      /devices/pci0000:00/0000:00:04.0/usb4/4-2/4-2:1.0/usb_endpoint/usbdev4.5_ep01 (usb_endpoint)
UDEV_LOG=0
ACTION­d
DEVPATH=/devices/pci0000:00/0000:00:04.0/usb4/4-2/4-2:1.0/usb_endpoint/usbdev4.5_ep01
SUBSYSTEM=usb_endpoint
SEQNUM\x1921
DEVNAME=/dev/usbdev4.5_ep01
MAJOR%3
MINOR=8
DEVLINKS=/dev/char/253:8

[root@server64 andyrtr]# ls -lhR /dev/bus/usb/004/005
crw-rw-r-- 1 root root 189, 388  8. Okt 20:13 /dev/bus/usb/004/005

...
Andy

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: group is not set properly for usb printer for older kernels
  2009-10-08 17:12 group is not set properly for usb printer for older kernels Andreas Radke
  2009-10-08 17:26 ` Kay Sievers
  2009-10-08 18:19 ` Andreas Radke
@ 2009-10-08 18:24 ` Kay Sievers
  2009-10-08 18:33 ` Andreas Radke
                   ` (15 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: Kay Sievers @ 2009-10-08 18:24 UTC (permalink / raw)
  To: linux-hotplug

On Thu, Oct 8, 2009 at 20:19, Andreas Radke <a.radke@arcor.de> wrote:
> should be this:
>
> [root@server64 andyrtr]# ls -1hR /dev/.udev/names/usbdev4.5
> /dev/.udev/names/usbdev4.5:
> \x2fdevices\x2fpci0000:00\x2f0000:00:04.0\x2fusb4\x2f4-2\x2fusb_device\x2fusbdev4.5

usbdev4.5 should not exist with recent kernels, the device nodes are
provided by the usb bus device directly. Do you have:
CONFIG_USB_CLASS_DEVICE enabled?

Kay

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: group is not set properly for usb printer for older kernels
  2009-10-08 17:12 group is not set properly for usb printer for older kernels Andreas Radke
                   ` (2 preceding siblings ...)
  2009-10-08 18:24 ` Kay Sievers
@ 2009-10-08 18:33 ` Andreas Radke
  2009-10-08 19:05 ` Kay Sievers
                   ` (14 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: Andreas Radke @ 2009-10-08 18:33 UTC (permalink / raw)
  To: linux-hotplug

Am Thu, 8 Oct 2009 20:24:14 +0200
schrieb Kay Sievers <kay.sievers@vrfy.org>:

> On Thu, Oct 8, 2009 at 20:19, Andreas Radke <a.radke@arcor.de> wrote:
> > should be this:
> >
> > [root@server64 andyrtr]# ls -1hR /dev/.udev/names/usbdev4.5
> > /dev/.udev/names/usbdev4.5:
> > \x2fdevices\x2fpci0000:00\x2f0000:00:04.0\x2fusb4\x2f4-2\x2fusb_device\x2fusbdev4.5
> 
> usbdev4.5 should not exist with recent kernels, the device nodes are
> provided by the usb bus device directly. Do you have:
> CONFIG_USB_CLASS_DEVICE enabled?
> 
> Kay
> 

Yes. It's enabled:

config 2.6.27.31:

#
# Miscellaneous USB options
#
CONFIG_USB_DEVICEFS=y
CONFIG_USB_DEVICE_CLASS=y
CONFIG_USB_DYNAMIC_MINORS=y
CONFIG_USB_SUSPEND=y
# CONFIG_USB_OTG is not set
CONFIG_USB_MON=y

config 2.6.31.2:

#
# Miscellaneous USB options
#
CONFIG_USB_DEVICEFS=y
CONFIG_USB_DEVICE_CLASS=y
CONFIG_USB_DYNAMIC_MINORS=y
CONFIG_USB_SUSPEND=y
# CONFIG_USB_OTG is not set
CONFIG_USB_MON=m
CONFIG_USB_WUSB=m
CONFIG_USB_WUSB_CBAF=m
# CONFIG_USB_WUSB_CBAF_DEBUG is not set

-Andy

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: group is not set properly for usb printer for older kernels
  2009-10-08 17:12 group is not set properly for usb printer for older kernels Andreas Radke
                   ` (3 preceding siblings ...)
  2009-10-08 18:33 ` Andreas Radke
@ 2009-10-08 19:05 ` Kay Sievers
  2009-10-08 20:11 ` Andreas Radke
                   ` (13 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: Kay Sievers @ 2009-10-08 19:05 UTC (permalink / raw)
  To: linux-hotplug

On Thu, Oct 8, 2009 at 20:33, Andreas Radke <a.radke@arcor.de> wrote:
> Am Thu, 8 Oct 2009 20:24:14 +0200
> schrieb Kay Sievers <kay.sievers@vrfy.org>:
>
>> On Thu, Oct 8, 2009 at 20:19, Andreas Radke <a.radke@arcor.de> wrote:
>> > should be this:
>> >
>> > [root@server64 andyrtr]# ls -1hR /dev/.udev/names/usbdev4.5
>> > /dev/.udev/names/usbdev4.5:
>> > \x2fdevices\x2fpci0000:00\x2f0000:00:04.0\x2fusb4\x2f4-2\x2fusb_device\x2fusbdev4.5
>>
>> usbdev4.5 should not exist with recent kernels, the device nodes are
>> provided by the usb bus device directly. Do you have:
>> CONFIG_USB_CLASS_DEVICE enabled?
>>
>> Kay
>>
>
> Yes. It's enabled:

If you get rid of it, all should work.

Kay

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: group is not set properly for usb printer for older kernels
  2009-10-08 17:12 group is not set properly for usb printer for older kernels Andreas Radke
                   ` (4 preceding siblings ...)
  2009-10-08 19:05 ` Kay Sievers
@ 2009-10-08 20:11 ` Andreas Radke
  2009-10-08 22:38 ` Kay Sievers
                   ` (12 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: Andreas Radke @ 2009-10-08 20:11 UTC (permalink / raw)
  To: linux-hotplug

Am Thu, 8 Oct 2009 21:05:00 +0200
schrieb Kay Sievers <kay.sievers@vrfy.org>:

> On Thu, Oct 8, 2009 at 20:33, Andreas Radke <a.radke@arcor.de> wrote:
> > Am Thu, 8 Oct 2009 20:24:14 +0200
> > schrieb Kay Sievers <kay.sievers@vrfy.org>:
> >
> >> On Thu, Oct 8, 2009 at 20:19, Andreas Radke <a.radke@arcor.de>
> >> wrote:
> >> > should be this:
> >> >
> >> > [root@server64 andyrtr]# ls -1hR /dev/.udev/names/usbdev4.5
> >> > /dev/.udev/names/usbdev4.5:
> >> > \x2fdevices\x2fpci0000:00\x2f0000:00:04.0\x2fusb4\x2f4-2\x2fusb_device\x2fusbdev4.5
> >>
> >> usbdev4.5 should not exist with recent kernels, the device nodes
> >> are provided by the usb bus device directly. Do you have:
> >> CONFIG_USB_CLASS_DEVICE enabled?
> >>
> >> Kay
> >>
> >
> > Yes. It's enabled:
> 
> If you get rid of it, all should work.
> 
> Kay
> 

Sadly not.

#
# Miscellaneous USB options
#
CONFIG_USB_DEVICEFS=y
# CONFIG_USB_DEVICE_CLASS is not set
CONFIG_USB_DYNAMIC_MINORS=y
CONFIG_USB_SUSPEND=y
# CONFIG_USB_OTG is not set
CONFIG_USB_MON=y


[root@server64 andyrtr]# ls -lhR /dev/bus/usb/004/
/dev/bus/usb/004/:
insgesamt 0
crw-rw-r-- 1 root root 189, 384  8. Okt 22:03 001
crw-rw-r-- 1 root root 189, 387  8. Okt 22:09 004


UDEV  [1255032558.475180] add      /devices/pci0000:00/0000:00:04.0/usb4/4-2 (usb)
UDEV_LOG=0
ACTION­d
DEVPATH=/devices/pci0000:00/0000:00:04.0/usb4/4-2
SUBSYSTEM=usb
DEVTYPE=usb_device
DEVICE=/proc/bus/usb/004/004
PRODUCTCd/c/100
TYPE=0/0/0
BUSNUM\04
DEVNUM\04
SEQNUM\x1894
ID_VENDOR=Lexmark_International__Inc.
ID_VENDOR_ENC=Lexmark\x20International\x2c\x20Inc.
ID_VENDOR_ID\x043d
ID_MODEL=Lexmark_Optra_E312
ID_MODEL_ENC=Lexmark\x20Optra\x20E312
ID_MODEL_ID\00c
ID_REVISION\x0100
ID_SERIAL=Lexmark_International__Inc._Lexmark_Optra_E312_8050926
ID_SERIAL_SHORT€50926
ID_BUS=usb
ID_USB_INTERFACES=:070102:
DEVNAME=/dev/bus/usb/004/004
MAJOR\x189
MINOR87
DEVLINKS=/dev/char/189:387

UDEV  [1255032558.475831] add      /devices/pci0000:00/0000:00:04.0/usb4/4-2/usb_endpoint/usbdev4.4_ep00 (usb_endpoint)
UDEV_LOG=0
ACTION­d
DEVPATH=/devices/pci0000:00/0000:00:04.0/usb4/4-2/usb_endpoint/usbdev4.4_ep00
SUBSYSTEM=usb_endpoint
SEQNUM\x1898
DEVNAME=/dev/usbdev4.4_ep00
MAJOR%3
MINOR\x10
DEVLINKS=/dev/char/253:10

UDEV  [1255032558.504858] add      /devices/pci0000:00/0000:00:04.0/usb4/4-2/4-2:1.0 (usb)
UDEV_LOG=0
ACTION­d
DEVPATH=/devices/pci0000:00/0000:00:04.0/usb4/4-2/4-2:1.0
SUBSYSTEM=usb
DEVTYPE=usb_interface
DEVICE=/proc/bus/usb/004/004
PRODUCTCd/c/100
TYPE=0/0/0
INTERFACE=7/1/2
MODALIAS=usb:v043Dp000Cd0100dc00dsc00dp00ic07isc01ip02
SEQNUM\x1895

UDEV  [1255032558.505436] add      /devices/pci0000:00/0000:00:04.0/usb4/4-2/4-2:1.0/usb_endpoint/usbdev4.4_ep01 (usb_endpoint)
UDEV_LOG=0
ACTION­d
DEVPATH=/devices/pci0000:00/0000:00:04.0/usb4/4-2/4-2:1.0/usb_endpoint/usbdev4.4_ep01
SUBSYSTEM=usb_endpoint
SEQNUM\x1896
DEVNAME=/dev/usbdev4.4_ep01
MAJOR%3
MINOR=8
DEVLINKS=/dev/char/253:8

UDEV  [1255032558.505498] add      /devices/pci0000:00/0000:00:04.0/usb4/4-2/4-2:1.0/usb_endpoint/usbdev4.4_ep81 (usb_endpoint)
UDEV_LOG=0
ACTION­d
DEVPATH=/devices/pci0000:00/0000:00:04.0/usb4/4-2/4-2:1.0/usb_endpoint/usbdev4.4_ep81
SUBSYSTEM=usb_endpoint
SEQNUM\x1897
DEVNAME=/dev/usbdev4.4_ep81
MAJOR%3
MINOR=9
DEVLINKS=/dev/char/253:9


[root@server64 andyrtr]# ls -lhR  /dev/.udev/names/usbdev4.4*
/dev/.udev/names/usbdev4.4_ep00:
insgesamt 0
-rw-r--r-- 1 root root 0  8. Okt 22:09 \x2fdevices\x2fpci0000:00\x2f0000:00:04.0\x2fusb4\x2f4-2\x2fusb_endpoint\x2fusbdev4.4_ep00

/dev/.udev/names/usbdev4.4_ep01:
insgesamt 0
-rw-r--r-- 1 root root 0  8. Okt 22:09 \x2fdevices\x2fpci0000:00\x2f0000:00:04.0\x2fusb4\x2f4-2\x2f4-2:1.0\x2fusb_endpoint\x2fusbdev4.4_ep01

/dev/.udev/names/usbdev4.4_ep81:
insgesamt 0
-rw-r--r-- 1 root root 0  8. Okt 22:09 \x2fdevices\x2fpci0000:00\x2f0000:00:04.0\x2fusb4\x2f4-2\x2f4-2:1.0\x2fusb_endpoint\x2fusbdev4.4_ep81


another idea?

-Andy

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: group is not set properly for usb printer for older kernels
  2009-10-08 17:12 group is not set properly for usb printer for older kernels Andreas Radke
                   ` (5 preceding siblings ...)
  2009-10-08 20:11 ` Andreas Radke
@ 2009-10-08 22:38 ` Kay Sievers
  2009-10-09  3:36 ` Andreas Radke
                   ` (11 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: Kay Sievers @ 2009-10-08 22:38 UTC (permalink / raw)
  To: linux-hotplug

On Thu, Oct 8, 2009 at 22:11, Andreas Radke <a.radke@arcor.de> wrote:
> Am Thu, 8 Oct 2009 21:05:00 +0200
> schrieb Kay Sievers <kay.sievers@vrfy.org>:
>
>> On Thu, Oct 8, 2009 at 20:33, Andreas Radke <a.radke@arcor.de> wrote:
>> > Am Thu, 8 Oct 2009 20:24:14 +0200
>> > schrieb Kay Sievers <kay.sievers@vrfy.org>:
>> >
>> >> On Thu, Oct 8, 2009 at 20:19, Andreas Radke <a.radke@arcor.de>
>> >> wrote:
>> >> > should be this:
>> >> >
>> >> > [root@server64 andyrtr]# ls -1hR /dev/.udev/names/usbdev4.5
>> >> > /dev/.udev/names/usbdev4.5:
>> >> > \x2fdevices\x2fpci0000:00\x2f0000:00:04.0\x2fusb4\x2f4-2\x2fusb_device\x2fusbdev4.5
>> >>
>> >> usbdev4.5 should not exist with recent kernels, the device nodes
>> >> are provided by the usb bus device directly. Do you have:
>> >> CONFIG_USB_CLASS_DEVICE enabled?
>> >>
>> >> Kay
>> >>
>> >
>> > Yes. It's enabled:
>>
>> If you get rid of it, all should work.
>>
>> Kay
>>
>
> Sadly not.
>
> #
> # Miscellaneous USB options
> #
> CONFIG_USB_DEVICEFS=y
> # CONFIG_USB_DEVICE_CLASS is not set
> CONFIG_USB_DYNAMIC_MINORS=y
> CONFIG_USB_SUSPEND=y
> # CONFIG_USB_OTG is not set
> CONFIG_USB_MON=y
>
>
> [root@server64 andyrtr]# ls -lhR /dev/bus/usb/004/
> /dev/bus/usb/004/:
> insgesamt 0
> crw-rw-r-- 1 root root 189, 384  8. Okt 22:03 001
> crw-rw-r-- 1 root root 189, 387  8. Okt 22:09 004
>
>
> UDEV  [1255032558.475180] add      /devices/pci0000:00/0000:00:04.0/usb4/4-2 (usb)
> UDEV_LOG=0
> ACTION­d
> DEVPATH=/devices/pci0000:00/0000:00:04.0/usb4/4-2
> SUBSYSTEM=usb
> DEVTYPE=usb_device
> DEVICE=/proc/bus/usb/004/004
> PRODUCTCd/c/100
> TYPE=0/0/0
> BUSNUM\04
> DEVNUM\04
> SEQNUM\x1894
> ID_VENDOR=Lexmark_International__Inc.
> ID_VENDOR_ENC=Lexmark\x20International\x2c\x20Inc.
> ID_VENDOR_ID\x043d
> ID_MODEL=Lexmark_Optra_E312
> ID_MODEL_ENC=Lexmark\x20Optra\x20E312
> ID_MODEL_ID\00c
> ID_REVISION\x0100
> ID_SERIAL=Lexmark_International__Inc._Lexmark_Optra_E312_8050926
> ID_SERIAL_SHORT€50926
> ID_BUS=usb
> ID_USB_INTERFACES=:070102:
> DEVNAME=/dev/bus/usb/004/004
> MAJOR\x189
> MINOR87
> DEVLINKS=/dev/char/189:387
>
> UDEV  [1255032558.475831] add      /devices/pci0000:00/0000:00:04.0/usb4/4-2/usb_endpoint/usbdev4.4_ep00 (usb_endpoint)
> UDEV_LOG=0
> ACTION­d
> DEVPATH=/devices/pci0000:00/0000:00:04.0/usb4/4-2/usb_endpoint/usbdev4.4_ep00
> SUBSYSTEM=usb_endpoint
> SEQNUM\x1898
> DEVNAME=/dev/usbdev4.4_ep00
> MAJOR%3
> MINOR\x10
> DEVLINKS=/dev/char/253:10
>
> UDEV  [1255032558.504858] add      /devices/pci0000:00/0000:00:04.0/usb4/4-2/4-2:1.0 (usb)
> UDEV_LOG=0
> ACTION­d
> DEVPATH=/devices/pci0000:00/0000:00:04.0/usb4/4-2/4-2:1.0
> SUBSYSTEM=usb
> DEVTYPE=usb_interface
> DEVICE=/proc/bus/usb/004/004
> PRODUCTCd/c/100
> TYPE=0/0/0
> INTERFACE=7/1/2
> MODALIAS=usb:v043Dp000Cd0100dc00dsc00dp00ic07isc01ip02
> SEQNUM\x1895
>
> UDEV  [1255032558.505436] add      /devices/pci0000:00/0000:00:04.0/usb4/4-2/4-2:1.0/usb_endpoint/usbdev4.4_ep01 (usb_endpoint)
> UDEV_LOG=0
> ACTION­d
> DEVPATH=/devices/pci0000:00/0000:00:04.0/usb4/4-2/4-2:1.0/usb_endpoint/usbdev4.4_ep01
> SUBSYSTEM=usb_endpoint
> SEQNUM\x1896
> DEVNAME=/dev/usbdev4.4_ep01
> MAJOR%3
> MINOR=8
> DEVLINKS=/dev/char/253:8
>
> UDEV  [1255032558.505498] add      /devices/pci0000:00/0000:00:04.0/usb4/4-2/4-2:1.0/usb_endpoint/usbdev4.4_ep81 (usb_endpoint)
> UDEV_LOG=0
> ACTION­d
> DEVPATH=/devices/pci0000:00/0000:00:04.0/usb4/4-2/4-2:1.0/usb_endpoint/usbdev4.4_ep81
> SUBSYSTEM=usb_endpoint
> SEQNUM\x1897
> DEVNAME=/dev/usbdev4.4_ep81
> MAJOR%3
> MINOR=9
> DEVLINKS=/dev/char/253:9
>
>
> [root@server64 andyrtr]# ls -lhR  /dev/.udev/names/usbdev4.4*
> /dev/.udev/names/usbdev4.4_ep00:
> insgesamt 0
> -rw-r--r-- 1 root root 0  8. Okt 22:09 \x2fdevices\x2fpci0000:00\x2f0000:00:04.0\x2fusb4\x2f4-2\x2fusb_endpoint\x2fusbdev4.4_ep00
>
> /dev/.udev/names/usbdev4.4_ep01:
> insgesamt 0
> -rw-r--r-- 1 root root 0  8. Okt 22:09 \x2fdevices\x2fpci0000:00\x2f0000:00:04.0\x2fusb4\x2f4-2\x2f4-2:1.0\x2fusb_endpoint\x2fusbdev4.4_ep01
>
> /dev/.udev/names/usbdev4.4_ep81:
> insgesamt 0
> -rw-r--r-- 1 root root 0  8. Okt 22:09 \x2fdevices\x2fpci0000:00\x2f0000:00:04.0\x2fusb4\x2f4-2\x2f4-2:1.0\x2fusb_endpoint\x2fusbdev4.4_ep81
>
>
> another idea?

What does:
  udevadm test /devices/pci0000:00/0000:00:04.0/usb4/4-2
print?

Kay

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: group is not set properly for usb printer for older kernels
  2009-10-08 17:12 group is not set properly for usb printer for older kernels Andreas Radke
                   ` (6 preceding siblings ...)
  2009-10-08 22:38 ` Kay Sievers
@ 2009-10-09  3:36 ` Andreas Radke
  2009-10-09  9:29 ` Kay Sievers
                   ` (10 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: Andreas Radke @ 2009-10-09  3:36 UTC (permalink / raw)
  To: linux-hotplug

Am Fri, 9 Oct 2009 00:38:18 +0200
schrieb Kay Sievers <kay.sievers@vrfy.org>:

> What does:
>   udevadm test /devices/pci0000:00/0000:00:04.0/usb4/4-2
> print?
> 
> Kay
> 

[root@server64 andyrtr]# udevadm test /devices/pci0000:00/0000:00:04.0/usb4/4-2
run_command: calling: test
udevadm_test: version 146
This program is for debugging only, it does not run any program,
specified by a RUN key. It may show incorrect results, because
some values may be different, or not available at a simulation run.

parse_file: reading '/lib/udev/rules.d/40-alsa.rules' as rules file
parse_file: reading '/lib/udev/rules.d/40-infiniband.rules' as rules file
parse_file: reading '/lib/udev/rules.d/40-isdn.rules' as rules file
parse_file: reading '/lib/udev/rules.d/40-pilot-links.rules' as rules file
parse_file: reading '/lib/udev/rules.d/40-zaptel.rules' as rules file
parse_file: reading '/lib/udev/rules.d/50-firmware.rules' as rules file
parse_file: reading '/lib/udev/rules.d/50-udev-default.rules' as rules file
parse_file: reading '/lib/udev/rules.d/53-sane.rules' as rules file
parse_file: reading '/etc/udev/rules.d/54-gphoto.rules' as rules file
parse_file: reading '/lib/udev/rules.d/60-cdrom_id.rules' as rules file
parse_file: reading '/lib/udev/rules.d/60-persistent-alsa.rules' as rules file
parse_file: reading '/lib/udev/rules.d/60-persistent-input.rules' as rules file
parse_file: reading '/lib/udev/rules.d/60-persistent-serial.rules' as rules file
parse_file: reading '/lib/udev/rules.d/60-persistent-storage-tape.rules' as rules file
parse_file: reading '/lib/udev/rules.d/60-persistent-storage.rules' as rules file
parse_file: reading '/lib/udev/rules.d/60-persistent-v4l.rules' as rules file
parse_file: reading '/lib/udev/rules.d/61-mobile-action.rules' as rules file
parse_file: reading '/lib/udev/rules.d/61-option-modem-modeswitch.rules' as rules file
parse_file: reading '/lib/udev/rules.d/61-persistent-storage-edd.rules' as rules file
parse_file: reading '/lib/udev/rules.d/64-device-mapper.rules' as rules file
parse_file: reading '/lib/udev/rules.d/64-md-raid.rules' as rules file
parse_file: reading '/lib/udev/rules.d/70-acl.rules' as rules file
parse_file: reading '/lib/udev/rules.d/70-hid2hci.rules' as rules file
parse_file: reading '/lib/udev/rules.d/75-net-description.rules' as rules file
parse_file: reading '/lib/udev/rules.d/75-tty-description.rules' as rules file
parse_file: reading '/lib/udev/rules.d/78-sound-card.rules' as rules file
parse_file: reading '/lib/udev/rules.d/79-fstab_import.rules' as rules file
parse_file: reading '/lib/udev/rules.d/80-drivers.rules' as rules file
parse_file: reading '/lib/udev/rules.d/81-arch.rules' as rules file
parse_file: reading '/etc/udev/rules.d/90-hal.rules' as rules file
parse_file: reading '/lib/udev/rules.d/95-keymap.rules' as rules file
parse_file: reading '/lib/udev/rules.d/95-udev-late.rules' as rules file
parse_file: reading '/etc/udev/rules.d/device-mapper.rules' as rules file
udev_rules_new: rules use 118668 bytes tokens (9889 * 12 bytes), 18685 bytes buffer
udev_rules_new: temporary index used 37200 bytes (1860 * 20 bytes)
udev_device_new_from_syspath: device 0x2328140 has devpath '/devices/pci0000:00/0000:00:04.0/usb4/4-2'
udev_device_new_from_syspath: device 0x2332dc0 has devpath '/devices/pci0000:00/0000:00:04.0/usb4/4-2'
udev_device_read_db: device 0x2332dc0 filled with db file data
udev_rules_apply_to_event: LINK 'char/189:388' /lib/udev/rules.d/50-udev-default.rules:4
udev_rules_apply_to_event: MODE 0664 /lib/udev/rules.d/50-udev-default.rules:54
udev_rules_apply_to_event: NAME 'bus/usb/004/005' /lib/udev/rules.d/50-udev-default.rules:54
udev_rules_apply_to_event: IMPORT 'usb_id --export /devices/pci0000:00/0000:00:04.0/usb4/4-2' /lib/udev/rules.d/50-udev-default.rules:65
util_run_program: 'usb_id --export /devices/pci0000:00/0000:00:04.0/usb4/4-2' started
util_run_program: '/lib/udev/usb_id' (stdout) 'ID_VENDOR=Lexmark_International__Inc.'
util_run_program: '/lib/udev/usb_id' (stdout) 'ID_VENDOR_ENC=Lexmark\x20International\x2c\x20Inc.'
util_run_program: '/lib/udev/usb_id' (stdout) 'ID_VENDOR_ID\x043d'
util_run_program: '/lib/udev/usb_id' (stdout) 'ID_MODEL=Lexmark_Optra_E312'
util_run_program: '/lib/udev/usb_id' (stdout) 'ID_MODEL_ENC=Lexmark\x20Optra\x20E312'
util_run_program: '/lib/udev/usb_id' (stdout) 'ID_MODEL_ID\00c'
util_run_program: '/lib/udev/usb_id' (stdout) 'ID_REVISION\x0100'
util_run_program: '/lib/udev/usb_id' (stdout) 'ID_SERIAL=Lexmark_International__Inc._Lexmark_Optra_E312_8050926'
util_run_program: '/lib/udev/usb_id' (stdout) 'ID_SERIAL_SHORT€50926'
util_run_program: '/lib/udev/usb_id' (stdout) 'ID_BUS=usb'
util_run_program: '/lib/udev/usb_id' (stdout) 'ID_USB_INTERFACES=:070102:'
util_run_program: 'usb_id --export /devices/pci0000:00/0000:00:04.0/usb4/4-2' returned with exitcode 0
udev_rules_apply_to_event: GROUP 7 /lib/udev/rules.d/50-udev-default.rules:66
udev_rules_apply_to_event: MODE 0660 /lib/udev/rules.d/50-udev-default.rules:66
udev_device_new_from_syspath: device 0x23357c0 has devpath '/devices/pci0000:00/0000:00:04.0/usb4'
udev_device_new_from_syspath: device 0x2335aa0 has devpath '/devices/pci0000:00/0000:00:04.0'
udev_device_new_from_syspath: device 0x2335d50 has devpath '/devices/pci0000:00'
udev_rules_apply_to_event: PROGRAM 'check-ptp-camera 06/01/01' /etc/udev/rules.d/54-gphoto.rules:967
util_run_program: 'check-ptp-camera 06/01/01' started
util_run_program: 'check-ptp-camera 06/01/01' returned with exitcode 1
udev_rules_apply_to_event: RUN 'socket:@/org/freedesktop/hal/udev_event' /etc/udev/rules.d/90-hal.rules:2
udev_device_update_db: created db file for '/devices/pci0000:00/0000:00:04.0/usb4/4-2' in '/dev/.udev/db/\x2fdevices\x2fpci0000:00\x2f0000:00:04.0\x2fusb4\x2f4-2'
udev_node_add: creating device node '/dev/bus/usb/004/005', devnum\x189:388, mode\x0660, uid=0, gid=7
udev_node_mknod: preserve file '/dev/bus/usb/004/005', because it has correct dev_t
udev_node_mknod: chmod(/dev/bus/usb/004/005, 020660)
udev_node_mknod: chown(/dev/bus/usb/004/005, 0, 7)
update_link: '/dev/char/189:388' with target '/dev/bus/usb/004/005' has the highest priority 0, create it
node_symlink: preserve already existing symlink '/dev/char/189:388' to '../bus/usb/004/005'
udevadm_test: UDEV_LOG=6
udevadm_test: DEVPATH=/devices/pci0000:00/0000:00:04.0/usb4/4-2
udevadm_test: MAJOR\x189
udevadm_test: MINOR88
udevadm_test: DEVTYPE=usb_device
udevadm_test: DRIVER=usb
udevadm_test: DEVICE=/proc/bus/usb/004/005
udevadm_test: PRODUCTCd/c/100
udevadm_test: TYPE=0/0/0
udevadm_test: BUSNUM\04
udevadm_test: DEVNUM\05
udevadm_test: ACTION­d
udevadm_test: SUBSYSTEM=usb
udevadm_test: DEVLINKS=/dev/char/189:388
udevadm_test: ID_VENDOR=Lexmark_International__Inc.
udevadm_test: ID_VENDOR_ENC=Lexmark\x20International\x2c\x20Inc.
udevadm_test: ID_VENDOR_ID\x043d
udevadm_test: ID_MODEL=Lexmark_Optra_E312
udevadm_test: ID_MODEL_ENC=Lexmark\x20Optra\x20E312
udevadm_test: ID_MODEL_ID\00c
udevadm_test: ID_REVISION\x0100
udevadm_test: ID_SERIAL=Lexmark_International__Inc._Lexmark_Optra_E312_8050926
udevadm_test: ID_SERIAL_SHORT€50926
udevadm_test: ID_BUS=usb
udevadm_test: ID_USB_INTERFACES=:070102:
udevadm_test: DEVNAME=/dev/bus/usb/004/005
udevadm_test: run: 'socket:@/org/freedesktop/hal/udev_event'
[root@server64 andyrtr]# 

after that permission is fixed.

[root@server64 andyrtr]# ls -lhR /dev/bus/usb/004/
/dev/bus/usb/004/:
insgesamt 0
crw-rw-r-- 1 root root 189, 384  8. Okt 22:03 001
crw-rw---- 1 root lp   189, 388  9. Okt 05:34 005


Andy

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: group is not set properly for usb printer for older kernels
  2009-10-08 17:12 group is not set properly for usb printer for older kernels Andreas Radke
                   ` (7 preceding siblings ...)
  2009-10-09  3:36 ` Andreas Radke
@ 2009-10-09  9:29 ` Kay Sievers
  2009-10-09 10:33 ` Andreas Radke
                   ` (9 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: Kay Sievers @ 2009-10-09  9:29 UTC (permalink / raw)
  To: linux-hotplug

On Fri, Oct 9, 2009 at 05:36, Andreas Radke <a.radke@arcor.de> wrote:
> Am Fri, 9 Oct 2009 00:38:18 +0200
> schrieb Kay Sievers <kay.sievers@vrfy.org>:
>
>> What does:
>>   udevadm test /devices/pci0000:00/0000:00:04.0/usb4/4-2
>> print?
> udev_node_add: creating device node '/dev/bus/usb/004/005', devnum\x189:388, mode\x0660, uid=0, gid=7
> udev_node_mknod: preserve file '/dev/bus/usb/004/005', because it has correct dev_t
> udev_node_mknod: chmod(/dev/bus/usb/004/005, 020660)
> udev_node_mknod: chown(/dev/bus/usb/004/005, 0, 7)
>
> after that permission is fixed.

If the usbdev* devices, and /sys/class/usb_device/ are gone, are you
sure you don't have anything else running that mangles permissions of
device nodes?

Kay

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: group is not set properly for usb printer for older kernels
  2009-10-08 17:12 group is not set properly for usb printer for older kernels Andreas Radke
                   ` (8 preceding siblings ...)
  2009-10-09  9:29 ` Kay Sievers
@ 2009-10-09 10:33 ` Andreas Radke
  2009-10-11 18:48 ` Andreas Radke
                   ` (8 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: Andreas Radke @ 2009-10-09 10:33 UTC (permalink / raw)
  To: linux-hotplug

Am Fri, 9 Oct 2009 11:29:55 +0200
schrieb Kay Sievers <kay.sievers@vrfy.org>:

> If the usbdev* devices, and /sys/class/usb_device/ are gone, are you
> sure you don't have anything else running that mangles permissions of
> device nodes?
> 
> Kay

Sorry, I don't understand what you mean. There are not many services
running on the server and no other devices connected to usb.

Please try to catch me on irc or jabber/icq/msn for a quick talk.
thanks.

Andy

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: group is not set properly for usb printer for older kernels
  2009-10-08 17:12 group is not set properly for usb printer for older kernels Andreas Radke
                   ` (9 preceding siblings ...)
  2009-10-09 10:33 ` Andreas Radke
@ 2009-10-11 18:48 ` Andreas Radke
  2009-10-13  3:30 ` Evangelos Foutras
                   ` (7 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: Andreas Radke @ 2009-10-11 18:48 UTC (permalink / raw)
  To: linux-hotplug

Am Fri, 9 Oct 2009 12:33:36 +0200
schrieb Andreas Radke <a.radke@arcor.de>:

> Am Fri, 9 Oct 2009 11:29:55 +0200
> schrieb Kay Sievers <kay.sievers@vrfy.org>:
> 
> > If the usbdev* devices, and /sys/class/usb_device/ are gone, are you
> > sure you don't have anything else running that mangles permissions
> > of device nodes?
> > 
> > Kay
> 
> Sorry, I don't understand what you mean. There are not many services
> running on the server and no other devices connected to usb.
> 
> Please try to catch me on irc or jabber/icq/msn for a quick talk.
> thanks.
> 
> Andy
> --
> To unsubscribe from this list: send the line "unsubscribe
> linux-hotplug" in the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 


Solved it now with a custom udev rule. Haven't found out why the
generic one fails here.

SYSFS{idVendor}="043d", SYSFS{idProduct}="000c", GROUP="lp", MODE="0664"

Thanks anyway. If you have an idea how to find out the real reason drop me a mail.

-Andy

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: group is not set properly for usb printer for older kernels
  2009-10-08 17:12 group is not set properly for usb printer for older kernels Andreas Radke
                   ` (10 preceding siblings ...)
  2009-10-11 18:48 ` Andreas Radke
@ 2009-10-13  3:30 ` Evangelos Foutras
  2009-10-13  8:22 ` Kay Sievers
                   ` (6 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: Evangelos Foutras @ 2009-10-13  3:30 UTC (permalink / raw)
  To: linux-hotplug

I set udev's loglevel to "debug" and saw something interesting in my 
logs [1] after turning on the printer. Specifically, the following line 
appears to be of interest:

  Oct 12 19:38:26 foutboxd udevd-work[7541]: '/lib/udev/usb_id' (stderr) 
'error opening USB device 'descriptors' file'

Maybe the 'descriptors' file hasn't been created when the udev rules 
fire? I think this would explain why subsequent calls to udevadm 
test/trigger apply the correct group to the printer.

Random coincidence, my Canon PIXMA iP3000's print head died soon after I 
noticed the above error, more than three years after the printer was 
bought. Time to get a cheap laser printer (I'm considering the Samsung 
ML-1640) I guess, since getting a new print head for my old inkjet 
printer would cost more. :<

PS: Sorry for going a bit off-topic about my dead printer, I felt like 
talking about it a little. :(

----
[1] http://omploader.org/vMmphMg

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: group is not set properly for usb printer for older kernels
  2009-10-08 17:12 group is not set properly for usb printer for older kernels Andreas Radke
                   ` (11 preceding siblings ...)
  2009-10-13  3:30 ` Evangelos Foutras
@ 2009-10-13  8:22 ` Kay Sievers
  2009-10-15 13:28 ` Andreas Radke
                   ` (5 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: Kay Sievers @ 2009-10-13  8:22 UTC (permalink / raw)
  To: linux-hotplug

On Tue, Oct 13, 2009 at 05:30, Evangelos Foutras <foutrelis@gmail.com> wrote:
> I set udev's loglevel to "debug" and saw something interesting in my logs
> [1] after turning on the printer. Specifically, the following line appears
> to be of interest:
>
>  Oct 12 19:38:26 foutboxd udevd-work[7541]: '/lib/udev/usb_id' (stderr)
> 'error opening USB device 'descriptors' file'
>
> Maybe the 'descriptors' file hasn't been created when the udev rules fire? I
> think this would explain why subsequent calls to udevadm test/trigger apply
> the correct group to the printer.

Yes, that might be. There have been numerous fixes to recent kernel
versions to address issues like this. You could try to set up rules
with WAIT_FOR_SYSFS="..." to possibly work around that on older kernel
versions.

The real fix though, is to run a kernel that matches the time the
system-level tools are developed and used with in the major distros.
Only these combinations are well tested and debugged. Mixing older
kernel versions with newer system-level tools usually works fine, but
there are many things that can go wrong, because nobody really tests
the combinations in this direction. People usually only make sure,
that newer kernels run on older systems, not the other way around.

Kay

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: group is not set properly for usb printer for older kernels
  2009-10-08 17:12 group is not set properly for usb printer for older kernels Andreas Radke
                   ` (12 preceding siblings ...)
  2009-10-13  8:22 ` Kay Sievers
@ 2009-10-15 13:28 ` Andreas Radke
  2009-10-15 14:33 ` Evangelos Foutras
                   ` (4 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: Andreas Radke @ 2009-10-15 13:28 UTC (permalink / raw)
  To: linux-hotplug



On Tue, 13 Oct 2009, Kay Sievers wrote:

> On Tue, Oct 13, 2009 at 05:30, Evangelos Foutras <foutrelis@gmail.com> wrote:
> The real fix though, is to run a kernel that matches the time the
> system-level tools are developed and used with in the major distros.
> Only these combinations are well tested and debugged. Mixing older
> kernel versions with newer system-level tools usually works fine, but
> there are many things that can go wrong, because nobody really tests
> the combinations in this direction. People usually only make sure,
> that newer kernels run on older systems, not the other way around.
>
> Kay

Hm. I think a little different. I know developement goes fast but at least 
all officially supported kernels and especially the ones with long life 
support should also be supported by all userland tools.

IMHO minimum required kernel version should stay 2.6.27.xx until there 
will be a new long life kernel declared.

Please take care about rolling release distributions and people that want 
to take advantage of LTS kernels.

If you can't stay compatible in main developement tree separated 
frozen bugfix branches would be nice. But probably you will think this is 
a distributione task (that we small distributors cannot provide).

-Andy

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: group is not set properly for usb printer for older kernels
  2009-10-08 17:12 group is not set properly for usb printer for older kernels Andreas Radke
                   ` (13 preceding siblings ...)
  2009-10-15 13:28 ` Andreas Radke
@ 2009-10-15 14:33 ` Evangelos Foutras
  2009-10-20  8:05 ` Matthias Schwarzott
                   ` (3 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: Evangelos Foutras @ 2009-10-15 14:33 UTC (permalink / raw)
  To: linux-hotplug

Kay Sievers wrote:
> On Tue, Oct 13, 2009 at 05:30, Evangelos Foutras <foutrelis@gmail.com> wrote:
>   
>> I set udev's loglevel to "debug" and saw something interesting in my logs
>> [1] after turning on the printer. Specifically, the following line appears
>> to be of interest:
>>
>>  Oct 12 19:38:26 foutboxd udevd-work[7541]: '/lib/udev/usb_id' (stderr)
>> 'error opening USB device 'descriptors' file'
>>
>> Maybe the 'descriptors' file hasn't been created when the udev rules fire? I
>> think this would explain why subsequent calls to udevadm test/trigger apply
>> the correct group to the printer.
>>     
>
> Yes, that might be. There have been numerous fixes to recent kernel
> versions to address issues like this. You could try to set up rules
> with WAIT_FOR_SYSFS="..." to possibly work around that on older kernel
> versions.
>   

I tried your suggestion and placing WAIT_FOR_SYSFS="descriptors" before 
the IMPORT does produce the desired behavior (awesome!). If it's not 
clear, I'm referring to line 69 in 50-udev-default.rules [1].

Any chance of applying this modification to udev.git? :)

----
[1] 
http://git.kernel.org/?p=linux/hotplug/udev.git;a=blob;f=rules/rules.d/50-udev-default.rules;h§9073b90e6f2d2e1c47d0daf02345f7726b3193;hb=HEAD#l69

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: group is not set properly for usb printer for older kernels
  2009-10-08 17:12 group is not set properly for usb printer for older kernels Andreas Radke
                   ` (14 preceding siblings ...)
  2009-10-15 14:33 ` Evangelos Foutras
@ 2009-10-20  8:05 ` Matthias Schwarzott
  2009-10-20 11:59 ` Evangelos Foutras
                   ` (2 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: Matthias Schwarzott @ 2009-10-20  8:05 UTC (permalink / raw)
  To: linux-hotplug

On Donnerstag, 15. Oktober 2009, Evangelos Foutras wrote:
> Kay Sievers wrote:
> > On Tue, Oct 13, 2009 at 05:30, Evangelos Foutras <foutrelis@gmail.com> 
wrote:
> >> I set udev's loglevel to "debug" and saw something interesting in my
> >> logs [1] after turning on the printer. Specifically, the following line
> >> appears to be of interest:
> >>
> >>  Oct 12 19:38:26 foutboxd udevd-work[7541]: '/lib/udev/usb_id' (stderr)
> >> 'error opening USB device 'descriptors' file'
> >>
> >> Maybe the 'descriptors' file hasn't been created when the udev rules
> >> fire? I think this would explain why subsequent calls to udevadm
> >> test/trigger apply the correct group to the printer.
> >
> > Yes, that might be. There have been numerous fixes to recent kernel
> > versions to address issues like this. You could try to set up rules
> > with WAIT_FOR_SYSFS="..." to possibly work around that on older kernel
> > versions.
>
> I tried your suggestion and placing WAIT_FOR_SYSFS="descriptors" before
> the IMPORT does produce the desired behavior (awesome!). If it's not
> clear, I'm referring to line 69 in 50-udev-default.rules [1].
>
> Any chance of applying this modification to udev.git? :)
>
So adding this rule anywhere before line 69 will help?
SUBSYSTEM="usb", ENV{DEVTYPE}="usb_device", WAIT_FOR_SYSFS="descriptors"

If yes, I am going to add it to the gentoo ruleset.

Regards
Matthias

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: group is not set properly for usb printer for older kernels
  2009-10-08 17:12 group is not set properly for usb printer for older kernels Andreas Radke
                   ` (15 preceding siblings ...)
  2009-10-20  8:05 ` Matthias Schwarzott
@ 2009-10-20 11:59 ` Evangelos Foutras
  2009-10-20 12:07 ` Matthias Schwarzott
  2009-10-20 19:11 ` Kay Sievers
  18 siblings, 0 replies; 20+ messages in thread
From: Evangelos Foutras @ 2009-10-20 11:59 UTC (permalink / raw)
  To: linux-hotplug

Matthias Schwarzott wrote:
> On Donnerstag, 15. Oktober 2009, Evangelos Foutras wrote:
>   
>> Kay Sievers wrote:
>>     
>>> On Tue, Oct 13, 2009 at 05:30, Evangelos Foutras <foutrelis@gmail.com> 
>>>       
> wrote:
>   
>>>> I set udev's loglevel to "debug" and saw something interesting in my
>>>> logs [1] after turning on the printer. Specifically, the following line
>>>> appears to be of interest:
>>>>
>>>>  Oct 12 19:38:26 foutboxd udevd-work[7541]: '/lib/udev/usb_id' (stderr)
>>>> 'error opening USB device 'descriptors' file'
>>>>
>>>> Maybe the 'descriptors' file hasn't been created when the udev rules
>>>> fire? I think this would explain why subsequent calls to udevadm
>>>> test/trigger apply the correct group to the printer.
>>>>         
>>> Yes, that might be. There have been numerous fixes to recent kernel
>>> versions to address issues like this. You could try to set up rules
>>> with WAIT_FOR_SYSFS="..." to possibly work around that on older kernel
>>> versions.
>>>       
>> I tried your suggestion and placing WAIT_FOR_SYSFS="descriptors" before
>> the IMPORT does produce the desired behavior (awesome!). If it's not
>> clear, I'm referring to line 69 in 50-udev-default.rules [1].
>>
>> Any chance of applying this modification to udev.git? :)
>>
>>     
> So adding this rule anywhere before line 69 will help?
> SUBSYSTEM="usb", ENV{DEVTYPE}="usb_device", WAIT_FOR_SYSFS="descriptors"
>
> If yes, I am going to add it to the gentoo ruleset.
>
> Regards
> Matthias
>   

That works too.

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: group is not set properly for usb printer for older kernels
  2009-10-08 17:12 group is not set properly for usb printer for older kernels Andreas Radke
                   ` (16 preceding siblings ...)
  2009-10-20 11:59 ` Evangelos Foutras
@ 2009-10-20 12:07 ` Matthias Schwarzott
  2009-10-20 19:11 ` Kay Sievers
  18 siblings, 0 replies; 20+ messages in thread
From: Matthias Schwarzott @ 2009-10-20 12:07 UTC (permalink / raw)
  To: linux-hotplug

[-- Attachment #1: Type: text/plain, Size: 403 bytes --]

On Dienstag, 20. Oktober 2009, Evangelos Foutras wrote:
> Matthias Schwarzott wrote:
> > On Donnerstag, 15. Oktober 2009, Evangelos Foutras wrote:
> >
> > So adding this rule anywhere before line 69 will help?
> > SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device",
> > WAIT_FOR_SYSFS="descriptors"
> >
> > If yes, I am going to add it to the gentoo ruleset.
> >

Hi Kay!

Please commit this patch.

Matthias

[-- Attachment #2: udev-147-fix-libusb-lp-group-older-kernels.patch --]
[-- Type: text/x-diff, Size: 320 bytes --]

--- a/rules/gentoo/30-kernel-compat.rules
+++ b/rules/gentoo/30-kernel-compat.rules
@@ -3,6 +3,13 @@
 ACTION!="add|change", GOTO="kernel_compat_end"
 
 #
+# sysfs timing rules
+#
+
+# needed for kernels <2.6.30
+SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", WAIT_FOR_SYSFS="descriptors"
+
+#
 # naming device rules
 #
 

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: group is not set properly for usb printer for older kernels
  2009-10-08 17:12 group is not set properly for usb printer for older kernels Andreas Radke
                   ` (17 preceding siblings ...)
  2009-10-20 12:07 ` Matthias Schwarzott
@ 2009-10-20 19:11 ` Kay Sievers
  18 siblings, 0 replies; 20+ messages in thread
From: Kay Sievers @ 2009-10-20 19:11 UTC (permalink / raw)
  To: linux-hotplug

On Tue, Oct 20, 2009 at 21:07, Matthias Schwarzott <zzam@gentoo.org> wrote:
> On Dienstag, 20. Oktober 2009, Evangelos Foutras wrote:
>> Matthias Schwarzott wrote:
>> > On Donnerstag, 15. Oktober 2009, Evangelos Foutras wrote:
>> >
>> > So adding this rule anywhere before line 69 will help?
>> > SUBSYSTEM="usb", ENV{DEVTYPE}="usb_device",
>> > WAIT_FOR_SYSFS="descriptors"
>> >
>> > If yes, I am going to add it to the gentoo ruleset.
>> >
>
> Hi Kay!

Done, but seems kernel.org does not accept git push requests at the
moment. Will try again later.

Kay

^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2009-10-20 19:11 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-10-08 17:12 group is not set properly for usb printer for older kernels Andreas Radke
2009-10-08 17:26 ` Kay Sievers
2009-10-08 18:19 ` Andreas Radke
2009-10-08 18:24 ` Kay Sievers
2009-10-08 18:33 ` Andreas Radke
2009-10-08 19:05 ` Kay Sievers
2009-10-08 20:11 ` Andreas Radke
2009-10-08 22:38 ` Kay Sievers
2009-10-09  3:36 ` Andreas Radke
2009-10-09  9:29 ` Kay Sievers
2009-10-09 10:33 ` Andreas Radke
2009-10-11 18:48 ` Andreas Radke
2009-10-13  3:30 ` Evangelos Foutras
2009-10-13  8:22 ` Kay Sievers
2009-10-15 13:28 ` Andreas Radke
2009-10-15 14:33 ` Evangelos Foutras
2009-10-20  8:05 ` Matthias Schwarzott
2009-10-20 11:59 ` Evangelos Foutras
2009-10-20 12:07 ` Matthias Schwarzott
2009-10-20 19:11 ` Kay Sievers

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.