--- Begin Message ---
- To: Debian Bug Tracking System <submit@bugs.debian.org>
- Subject: cups: /usr/lib/cups/backend/usb removes /dev/usb/lpN
- From: Vladimir Lebedev-Schmidthof <dair.spb@gmail.com>
- Date: Sat, 31 Mar 2012 00:09:30 +0400
- Message-id: <20120330200930.30340.38623.reportbug@jbs>
Package: cups
Version: 1.5.2-9
Severity: normal
Dear Maintainer,
*** Please consider answering these questions, where appropriate ***
* What led up to the situation?
I was installing HP LaserKet P1006 printer using CUPS and printer-driver-foo2zjs (version 20120223dfsg0-1).
After installation, my printer didn't work and my /var/log/messages was full of messages:
-------------------------------- /var/log/messages BEGIN
Mar 30 21:54:34 jbs kernel: [ 165.508737] usblp0: USB Bidirectional printer dev 2 if 0 alt 0 proto 2 vid 0x03F0 pid 0x3E17
Mar 30 21:54:34 jbs /etc/hotplug/usb/hpljP1006: foo2zjs: usb://HP/LaserJet%20P1006?serial=AA0309W... download failed.
Mar 30 21:54:35 jbs /etc/hotplug/usb/hpljP1006: foo2zjs: loading HP LaserJet P1006 firmware /usr/share/foo2xqx/firmware/sihpP1006.dl to /dev/usb/lp0 ...
Mar 30 21:54:35 jbs kernel: [ 165.567435] usblp0: nonzero write bulk status received: -108
Mar 30 21:54:35 jbs kernel: [ 165.570203] usblp0: removed
Mar 30 21:54:35 jbs /etc/hotplug/usb/hpljP1006: foo2zjs: ... download failed.
-------------------------------- /var/log/messages END
I started the investigation;
First of all, I found out that printer-driver-foo2zjs udev file (/lib/udev/rules.d/85-hplj10xx.rules) calls its own script /usr/sbin/hpljP1006;
I got there and found out that it, subsequently,
1. Loads firmware into device file (function load_usblp(), line 218) in background
2. Loads same firmware into CUPS USB device (function load_cups(), line 238), also in background. It runs /usr/lib/cups/backend/usb to get the list of printers used in CUPS (as I get it) to put firmware in all of them. But it appears that /usr/lib/cups/backend/usb REMOVES usblp driver so removes device file.
This causes loading firmware into device file to fail (well, driver unloads in progress of firmware loading) so printer doesn't work without proper firmware.
Driver then loads back by hotplug or udev (I didn't digging this and it doesn't seem matter here) and that very script is loaded again causing flooding /var/log/messages with error messages.
I made a hotfix for my system by removing '&'s (i.e. making it working in foreground) in /usr/sbin/hpljP1006;
The result is that driver is reloading once in 3 seconds (cause /usr/sbin/hpljP1006 has ``sleep 3'' in it) and printer is highly unstable; but it's muich better that not working printer at all.
Proper solution I believe is make /usr/lib/cups/backend/usb to NOT reload usblp. I might dig into CUPS code if needed.
Another way to achieve correct result is to rewrite /usr/sbin/hpljP1006 script of printer-driver-foo2zjs package to catch driver reloading by calling /usr/lib/cups/backend/usb so maybe it should be passed to printer-driver-foo2zjs's maintainer.
-- System Information:
Debian Release: 6.0.4
APT prefers stable-updates
APT policy: (500, 'stable-updates'), (500, 'unstable'), (500, 'testing'), (500, 'stable')
Architecture: i386 (i686)
Kernel: Linux 3.2.0-2-686-pae (SMP w/1 CPU core)
Locale: LANG=ru_RU.UTF-8, LC_CTYPE=ru_RU.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages cups depends on:
ii adduser 3.112+nmu2
ii bc 1.06.95-2
ii cups-client 1.5.2-9
ii cups-common 1.5.2-8
ii cups-filters 1.0.11-1
ii cups-ppdc 1.5.2-9
ii debconf [debconf-2.0] 1.5.36.1
ii dpkg 1.15.8.12
ii ghostscript 9.05~dfsg-4
ii libavahi-client3 0.6.27-2+squeeze1
ii libavahi-common3 0.6.27-2+squeeze1
ii libc6 2.13-27
ii libcups2 1.5.2-8
ii libcupscgi1 1.5.2-9
ii libcupsimage2 1.5.2-8
ii libcupsmime1 1.5.2-9
ii libcupsppdc1 1.5.2-9
ii libdbus-1-3 1.2.24-4+squeeze1
ii libgcc1 1:4.7.0-1
ii libgnutls26 2.12.18-1
ii libgssapi-krb5-2 1.10+dfsg~beta1-2
ii libkrb5-3 1.10+dfsg~beta1-2
ii libldap-2.4-2 2.4.23-7.2
ii libpam0g 1.1.1-6.1+squeeze1
ii libpaper1 1.1.24+nmu1
ii libslp1 1.2.1-9
ii libstdc++6 4.7.0-1
ii libusb-1.0-0 2:1.0.9~rc3-3
ii lsb-base 3.2-23.2squeeze1
ii poppler-utils 0.16.7-3
ii procps 1:3.2.8-9
ii ssl-cert 1.0.28
Versions of packages cups recommends:
ii avahi-daemon 0.6.31-1
ii colord 0.1.18-1
ii foomatic-filters 4.0.15-1
ii ghostscript-cups 9.05~dfsg-4
ii printer-driver-gutenprint 5.2.7-5
Versions of packages cups suggests:
ii cups-bsd <none>
ii cups-pdf <none>
ii foomatic-db-compressed-ppds [foomatic-db] 20120322-1
ii hplip <none>
ii printer-driver-hpcups <none>
ii smbclient 2:3.5.6~dfsg-3squeeze6
ii udev 175-3.1
-- Configuration Files:
/etc/cups/cupsd.conf changed:
LogLevel warn
MaxLogSize 1m
SystemGroup lpadmin
Port 631
Listen /var/run/cups/cups.sock
Browsing On
BrowseOrder allow,deny
BrowseAllow all
BrowseLocalProtocols cups dnssd ldap slp
DefaultAuthType Basic
WebInterface yes
<Location />
# Allow remote administration...
Order allow,deny
Allow @LOCAL
</Location>
<Location /admin>
# Allow remote administration...
Order allow,deny
Allow @LOCAL
</Location>
<Location /admin/conf>
AuthType Default
Require user @SYSTEM
# Allow remote access to the configuration files...
Order allow,deny
Allow @LOCAL
</Location>
<Policy default>
JobPrivateAccess default
JobPrivateValues default
SubscriptionPrivateAccess default
SubscriptionPrivateValues default
<Limit Create-Job Print-Job Print-URI Validate-Job>
Order deny,allow
</Limit>
<Limit Send-Document Send-URI Hold-Job Release-Job Restart-Job Purge-Jobs Set-Job-Attributes Create-Job-Subscription Renew-Subscription Cancel-Subscription Get-Notifications Reprocess-Job Cancel-Current-Job Suspend-Current-Job Resume-Job Cancel-My-Jobs Close-Job CUPS-Move-Job CUPS-Get-Document>
Require user @OWNER @SYSTEM
Order deny,allow
</Limit>
<Limit CUPS-Add-Modify-Printer CUPS-Delete-Printer CUPS-Add-Modify-Class CUPS-Delete-Class CUPS-Set-Default CUPS-Get-Devices>
AuthType Default
Require user @SYSTEM
Order deny,allow
</Limit>
<Limit Pause-Printer Resume-Printer Enable-Printer Disable-Printer Pause-Printer-After-Current-Job Hold-New-Jobs Release-Held-New-Jobs Deactivate-Printer Activate-Printer Restart-Printer Shutdown-Printer Startup-Printer Promote-Job Schedule-Job-After Cancel-Jobs CUPS-Accept-Jobs CUPS-Reject-Jobs>
AuthType Default
Require user @SYSTEM
Order deny,allow
</Limit>
<Limit Cancel-Job CUPS-Authenticate-Job>
Require user @OWNER @SYSTEM
Order deny,allow
</Limit>
<Limit All>
Order deny,allow
</Limit>
</Policy>
<Policy authenticated>
JobPrivateAccess default
JobPrivateValues default
SubscriptionPrivateAccess default
SubscriptionPrivateValues default
<Limit Create-Job Print-Job Print-URI Validate-Job>
AuthType Default
Order deny,allow
</Limit>
<Limit Send-Document Send-URI Hold-Job Release-Job Restart-Job Purge-Jobs Set-Job-Attributes Create-Job-Subscription Renew-Subscription Cancel-Subscription Get-Notifications Reprocess-Job Cancel-Current-Job Suspend-Current-Job Resume-Job Cancel-My-Jobs Close-Job CUPS-Move-Job CUPS-Get-Document>
AuthType Default
Require user @OWNER @SYSTEM
Order deny,allow
</Limit>
<Limit CUPS-Add-Modify-Printer CUPS-Delete-Printer CUPS-Add-Modify-Class CUPS-Delete-Class CUPS-Set-Default>
AuthType Default
Require user @SYSTEM
Order deny,allow
</Limit>
<Limit Pause-Printer Resume-Printer Enable-Printer Disable-Printer Pause-Printer-After-Current-Job Hold-New-Jobs Release-Held-New-Jobs Deactivate-Printer Activate-Printer Restart-Printer Shutdown-Printer Startup-Printer Promote-Job Schedule-Job-After Cancel-Jobs CUPS-Accept-Jobs CUPS-Reject-Jobs>
AuthType Default
Require user @SYSTEM
Order deny,allow
</Limit>
<Limit Cancel-Job CUPS-Authenticate-Job>
AuthType Default
Require user @OWNER @SYSTEM
Order deny,allow
</Limit>
<Limit All>
Order deny,allow
</Limit>
</Policy>
FileDevice Yes
BrowseRemoteProtocols cups
-- debconf information:
cupsys/raw-print: true
cupsys/backend: ipp, lpd, socket, usb, snmp, dnssd
--- End Message ---
--- Begin Message ---
- To: 666447-done@bugs.debian.org
- Subject: Re: Bug#666447: cups: /usr/lib/cups/backend/usb removes /dev/usb/lpN
- From: Brian Potkin <claremont102@gmail.com>
- Date: Tue, 4 Jun 2013 11:14:06 +0100
- Message-id: <20130604101406.GA6670@desktop>
- In-reply-to: <20120330200930.30340.38623.reportbug@jbs>
- References: <20120330200930.30340.38623.reportbug@jbs>
Dear Debian User,
Further information on your issue was requested some time ago but there
has been no response from you. Use of our limited, volunteer supported
resources is best served by not keeping open inactive bugs any longer
than desirable, especially when the package concerned is older than the
current stable Debian version. Consequently, the report is now being
closed.
You may, of course, wish to review the reported problem. It would be
appreciated if any future investigation could be conducted using the
testing or unstable distributions. If considered necessary, this report
could be re-opened or a new bug report, possibly referencing this one,
submitted. Please note there are now separate cups and cups-filters
packages.
Thank you for your report.
Regards,
Brian.
--- End Message ---