Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 119970 - Usb printer lost when power-cycled
Summary: Usb printer lost when power-cycled
Status: CLOSED DUPLICATE of bug 81164
Alias: None
Product: Red Hat Raw Hide
Classification: Retired
Component: hotplug
Version: 1.0
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Bill Nottingham
QA Contact: David Lawrence
Depends On:
TreeView+ depends on / blocked
Reported: 2004-04-04 12:11 UTC by Nicolas Mailhot
Modified: 2014-03-17 02:43 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2004-12-07 14:25:08 UTC

Attachments (Terms of Use)

Description Nicolas Mailhot 2004-04-04 12:11:34 UTC
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 13:00:56 UTC
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 13:26:33 UTC
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 13:33:41 UTC
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 13:36:42 UTC
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 19:14:58 UTC
How does one kick cups to tell it to rescan its available devices?

Comment 6 Tim Waugh 2004-12-07 14:25:08 UTC

*** 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.