Bug 119970 - Usb printer lost when power-cycled
Usb printer lost when power-cycled
Status: CLOSED DUPLICATE of bug 81164
Product: Red Hat Raw Hide
Classification: Retired
Component: hotplug (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Bill Nottingham
David Lawrence
Depends On:
  Show dependency treegraph
Reported: 2004-04-04 08:11 EDT by Nicolas Mailhot
Modified: 2014-03-16 22:43 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2004-12-07 09:25:08 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Nicolas Mailhot 2004-04-04 08:11:34 EDT
I have a nice little usb printer (Brother HL 5050). Since I don't
print pages everyday, it's usually off (the computer OTOH is up 24h/24
7d/7 to do stuff like mail filtering).

What I found much to my annoyance is the only way the system will
recognize it is if it's up when the system boots, and never shut down
afterwards. If it's not (as it's the case 9 times out of ten here) the
only way to get printing working is to go into system-config-printer,
edit the printer queue and click on rescan devices.

You don't have to change the settings or whatever, just give a big
kick in the butt of the printing subsystem so it notices the printer
to which you've just sent jobs actually exists and (gosh) uses the
device (/dev/usb/lp0) that was configured before.

Can't the damn thing be smart enough to realise if we're printing the
printer has probably been powered on, and it probably uses the same
device as last time ? (ie do the rescan automatically whan it receives
a new print job, and retry every 5s if it fails ?)

This problem alone makes the system useless to small/home office
setups - there is no way printing a new page should require a full
system reboot to notice the printer and/or the root password.
Comment 1 Tim Waugh 2004-04-04 09:00:56 EDT
I see kudzu fail to see a USB printer that it saw at install, even
though it is powered on, too.

Perhaps this is a kudzu or kernel problem.
Comment 2 Nicolas Mailhot 2004-04-04 09:26:33 EDT
This is most certainly not a kudzu problem.

Kudzu is run at the computer startup time. A usb printer OTOH can be
powered on/off at any time. And the kernel notices new usb devices
just fine :

Apr  4 15:27:45 rousalka kernel: usb 1-2: new high speed USB device
using address 6
Apr  4 15:27:45 rousalka kernel: usb 1-2: Product: HL-5050
Apr  4 15:27:45 rousalka kernel: usb 1-2: Manufacturer: Brother
Apr  4 15:27:45 rousalka kernel: usb 1-2: SerialNumber: A3J144655
Apr  4 15:27:45 rousalka kernel: drivers/usb/class/usblp.c: usblp0:
USB Bidirectional printer dev 6 if 0 alt 0 proto 2 vid 0x04F9 pid 0x0017
Apr  4 15:27:45 rousalka usb.agent[25934]: ... no modules for USB
product 4f9/17/100
Apr  4 15:27:47 rousalka udev[25968]: creating device node '/dev/lp0'

If there is kernel/userspace actions to perform they belong in hotplug
not kudzu.

however the root of the problem is probably the printing subsystem
scans the configured devices at startup, and considers their state can
not change afterwards. This is plain false (even in parallel-land but
with usb there is really no excuse not to notice a power on)
Comment 3 Nicolas Mailhot 2004-04-04 09:33:41 EDT
Just power-cycling the printer just after printing successfully a page
results in :

[nim@rousalka]~% lpq
Babayaga is not ready
Rank    Owner   Job     File(s)                         Total Size
1st     nim     115     (stdin)                         40960 bytes

Even though the kernel successfully followed the whole operation and
notified userspace of it

ehci_hcd 0000:00:10.3: GetStatus port 2 status 001002 POWER sig=se0  CSC
hub 1-0:1.0: port 2, status 100, change 1, 12 Mb/s
usb 1-2: USB disconnect, address 6
usb 1-2: usb_disable_device nuking all URBs
usb 1-2: unregistering interface 1-2:1.0
drivers/usb/core/file.c: removing 0 minor
drivers/usb/core/file.c: release_usb_class_dev - lp0
drivers/usb/class/usblp.c: usblp0: removed
usb 1-2:1.0: hotplug
usb 1-2: unregistering device
usb 1-2: hotplug
ehci_hcd 0000:00:10.3: GetStatus port 2 status 001803 POWER sig=j  CSC
hub 1-0:1.0: port 2, status 501, change 1, 480 Mb/s
hub 1-0:1.0: debounce: port 2: delay 100ms stable 4 status 0x501
ehci_hcd 0000:00:10.3: port 2 high speed
ehci_hcd 0000:00:10.3: GetStatus port 2 status 001005 POWER sig=se0 
usb 1-2: new high speed USB device using address 7
usb 1-2: new device strings: Mfr=1, Product=2, SerialNumber=3
usb 1-2: default language 0x0409
usb 1-2: Product: HL-5050
usb 1-2: Manufacturer: Brother
usb 1-2: SerialNumber: A3J144655
usb 1-2: hotplug
usb 1-2: adding 1-2:1.0 (config #1, interface 0)
usb 1-2:1.0: hotplug
usblp 1-2:1.0: usb_probe_interface
usblp 1-2:1.0: usb_probe_interface - got id
drivers/usb/class/usblp.c: usblp0: USB Bidirectional printer dev 7 if
0 alt 0 proto 2 vid 0x04F9 pid 0x0017
drivers/usb/core/file.c: looking for a minor, starting at 0
Comment 4 Nicolas Mailhot 2004-04-04 09:36:42 EDT
The only workaround I know at this point to get the system notice the
printer is once again available is to ask for a device rexcan manually
as root in system-config-printer
Comment 5 Bill Nottingham 2004-04-05 15:14:58 EDT
How does one kick cups to tell it to rescan its available devices?
Comment 6 Tim Waugh 2004-12-07 09:25:08 EST

*** This bug has been marked as a duplicate of 81164 ***

Note You need to log in before you can comment on or make changes to this bug.