[cups.general] Yet another HP backend fail (USBs fault)

Johannes Meixner jsmeix at suse.de
Thu Dec 8 00:21:01 PST 2011


Hello,

On Dec 7 13:58 edv wrote (excerpt):
> I'm running a perfectly "zypper up"ed OpenSUSE 11.4 with CUPS 1.4.6.
>
> I want to use a HP Business Inkjet 3000 printer connected via USB.
>
> Problem:
> DO
> - Print one job
> - "Paused - /usr/lib/cups/backend/hp failed"
> - Resume printer
> LOOP
....
> I eventually came up with connecting the printer via true LPT
> (no LPT-to-USB adapter here, pure oldschool).
> That, disturbingly, did the trick!

Different ways how to send data to the printer device
work different and therefore the outcome can be different.


> Error log for USB-connected printer:
....
> D [07/Dec/2011:22:22:10 +0100] [Job 29] envp[22]="DEVICE_URI=hp:/usb/hp_business_inkjet_3000?serial=SG29U11045"
....
> D [07/Dec/2011:22:22:10 +0100] [Job 29] Started backend /usr/lib/cups/backend/hp (PID 9863)
....
> D [07/Dec/2011:22:22:10 +0100] [Job 29] libusb couldn't open USB device /dev/bus/usb/005/002: Permission denied.
> D [07/Dec/2011:22:22:10 +0100] [Job 29] libusb requires write access to USB device nodes.
> D [07/Dec/2011:22:22:10 +0100] [Job 29] prnt/backend/hp.c 745: ERROR: open device failed stat=12: hp:/usb/hp_business_inkjet_3000?serial=SG29U11045
> D [07/Dec/2011:22:22:10 +0100] [Job 29] Backend returned status 1 (failed)

CUPS backends run as user 'lp' so that you need to make sure
'lp' has read and write permissions for the USB device file.

Usually this works out-of-the-box via appropriately predefined
udev rules but in your particular case it doesn't.

With nowadays kernels no static device file (like /dev/usb/lp0)
is used for the access via libusb. Rather, the entries in 
/proc/bus/usb/ or /dev/bus/usb/ (or wherever it actually is
for the current version) are generated anew every time
the system is booted and/or whenever a USB device is unplugged
and re-plugged to the USB (perhaps even when a USB device 
is switched off and on). Therefore, owner, group, and access
permissions can no longer be set permanently as usual with the
traditional "chown" and "chmod" commands - instead udev must
be used for this.

See
http://en.opensuse.org/SDB:How_to_set-up_a_HP_printer
in particular the "Troubleshooting" section.

I assume you need to add a udev rule to /etc/udev/rules.d/55-hpmud.rules
(and perhaps also to /etc/udev/rules.d/55-libsane.rules) for your
particular device (and then reboot) to make it work via udev.

If your particular device is missing in /etc/udev/rules.d/55-hpmud.rules
please file a report to the upstream HPLIP developers via
http://hplipopensource.com/hplip-web/support.html


Kind Regards
Johannes Meixner
-- 
SUSE LINUX Products GmbH -- Maxfeldstrasse 5 -- 90409 Nuernberg -- Germany
HRB 16746 (AG Nuernberg) GF: Jeff Hawn, Jennifer Guild, Felix Imendoerffer





More information about the cups mailing list