Mailinglist Archive: opensuse-bugs (4753 mails)

< Previous Next >
[Bug 594812] udev-configure-printer uses "usb/..." device URI for HP printers
  • From: bugzilla_noreply@xxxxxxxxxx
  • Date: Thu, 8 Apr 2010 17:06:12 +0000
  • Message-id: <20100408170612.555B8245520@xxxxxxxxxxxxxxxxxxxxxx>

--- Comment #3 from Johannes Meixner <jsmeix@xxxxxxxxxx> 2010-04-08 17:06:10
UTC ---
do you know if udev-configure-printer uses the "hp" backend on
other systems so that this issue could be an exceptional case?

I changed /etc/udev/rules.d/70-printers.rules so that it executes
.. RUN+="/bin/sh -c 'sleep 60 ; /lib/udev/udev-configure-printer add %p'"
to avoid a possible race condition.

Furthermore I used the one minute sleep to set read/write permissions
for any user:
# lsusb | grep LaserJet
Bus 004 Device 007: ID 03f0:0417 Hewlett-Packard LaserJet 1200 series

# ls -l /dev/bus/usb/004/007
crw-rw-rw- 1 root lp 189, 390 2010-04-08 18:39 /dev/bus/usb/004/007

Nevertheless the udev-configure-printer queue is still the same
and I get the same strange
"io/hpmud/musb.c 2007: invalid usb_open: Permission denied"
errors in /var/log/messages

According to the "ps auxw" what /etc/udev/rules.d/70-printers.rules
actually runs is (one line wrapped here):
/bin/sh -c sleep 60 ; /lib/udev/udev-configure-printer
add /devices/pci0000:00/0000:00:1a.1/usb4/4-2/4-2:1.0/usb/lp0

I don't know what this exactly means but what looks suspicious
from my unaware point of view is the "/usb/lp0" addendum because
"/usb/lp0" matches to the usblp kernel module which is still
used by our CUPS "usb" backend while the "hp" backend uses
the usbfs/libusb kernel module.

This might - again from my unaware point of view - also explain
why io/hpmud/musb.c gets an invalid usb_open when the usblp driver
is already using the device so that the usbfs/libusb driver
can no longer access the device - there is also a
"udev-configure-printer: failed to claim interface"
message (compare bug #184825) - but this is just a blind guess...

It seems udev-configure-printer does USB printer detection
on its own which would be wrong because to work in compliance
to CUPS it should use CUPS' printer detection, i.e.
run "lpinfo -l -v" or equivalent CUPS library calls, compare
"Strict Compliance With CUPS".

Configure bugmail:
------- You are receiving this mail because: -------
You are on the CC list for the bug.

< Previous Next >