"Cold"-plugging my printer
Hello,
I sent this to the linux-usb list, but Greg K-H suggested this list might be more appropriate...
I've got an Epson Stylus Photo 870 USB printer. If I turn it on when my system's already booted up, the USB hot-plugging scripts do all the right things and load the appropriate drivers and all's well. OTOH, if the printer's already on when I power up my system, the printer isn't noticed and I either have to power-cycle my printer or load the printer module by hand. Okay, so it's not a big problem, but it's a little annoyance and I'm wondering if I'm forgetting something...
I'm use the vanilla 2.4.2 kernel with KDB 1.8 patched in. I'm using usbutils 0.7 (with the hotplug(?) patches), pciutils 2.1.8 (also with patches), modutils 2.4.3, and hotplug-2001_02_28.
Does anyone have any ideas? Is there any other information I can provide that'll help?
(I'm not subscribed to this list, so please be sure to include me directly in any responses.)
Thanks,
pete
Quoted 3 lines · Pete Toscano
I'm use the vanilla 2.4.2 kernel with KDB 1.8 patched in. I'm using usbutils 0.7 (with the hotplug(?) patches), pciutils 2.1.8 (also with patches), modutils 2.4.3, and hotplug-2001_02_28.
So the hotplug package starting up at init time doesn't take care of this? What happens if you do the following after booting:
/etc/rc.d/init.d/hotplug stop /etc/rc.d/init.d/hotplug start
Is the printer driver now loaded?
What distro is this?
thanks,
greg k-h
Signature · 6 lines
greg@(kroah|wirex).com _______________________________________________ Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net [email protected] http://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Quoted 6 lines
I've got an Epson Stylus Photo 870 USB printer. If I turn it on when my system's already booted up, the USB hot-plugging scripts do all the right things and load the appropriate drivers and all's well. OTOH, if the printer's already on when I power up my system, the printer isn't noticed and I either have to power-cycle my printer or load the printer module by hand.
I'd guess that the OS is doing some USB initialization a little strange, so that the "cold"-plugging code can't work. I've seen similar problems when OS init scripts don't mount "usbdevfs" before they modprobe the host controller drivers.
Or there could be something wrong in the boot-time init code, so that a bit of shell script debugging is in order on your system. Maybe you can boot in single-user mode and "sh -x /etc/hotplug/usb.rc start" to watch what it's doing wrong! (Called by "/etc/rc.d/init.d/hotplug start", as Greg suggested.)
- Dave
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
http://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Quoted 7 lines · Greg KH
Quoted 3 lines · Pete Toscano
I'm use the vanilla 2.4.2 kernel with KDB 1.8 patched in. I'm using usbutils 0.7 (with the hotplug(?) patches), pciutils 2.1.8 (also with patches), modutils 2.4.3, and hotplug-2001_02_28.
So the hotplug package starting up at init time doesn't take care of this?
I don't think it does. Right after booting, the following printing-related modules are loaded: parport, parport_pc, and lp. The kicker is, I don't have anything on the parallel port (the printer is USB).
Quoted 4 lines
What happens if you do the following after booting:
/etc/rc.d/init.d/hotplugstop/etc/rc.d/init.d/hotplugstart
Is the printer driver now loaded?
Nope. The only think stopping hotplug and restarting it did was cause the usb-uhci and usbcore modules to unload and reload.
Looking through /var/log/messages, starting up hotplug causes these errors to be printed (along with the normal(?) output):
/etc/hotplug/usb.agent: ... no drivers for USB product 0/0/0 /etc/hotplug/usb.agent: ... no drivers for USB product 4a6/180/108 /etc/hotplug/usb.agent: ... no drivers for USB product 451/1446/110 /etc/hotplug/usb.agent: ... no drivers for USB product 4a6/181/108 /etc/hotplug/usb.agent: ... no drivers for USB product 781/2/9 /etc/hotplug/usb.agent: ... no drivers for USB product 45e/29/108 /etc/hotplug/usb.agent: ... no drivers for USB product 4b8/5/100
Quoted 1 line
What distro is this?
RedHat 7.0.
If this will help any, this is my USB setup...
My mother board is a Tyan Tiger 133 with the Apollo Pro 133a chipset. There are two USB ports on the mobo. Attached to one port is my Nokia 446Xpro monitor which has a 4 port USB hub in the back. Attached to the other port is my Microsoft Natural Keyboard Pro, which has a 2 port hub. Nothing is normally attached to the keyboard hub. Attached to the monitor hub is my Microsoft Intellimouse Optical, Epson Stylus Photo 870, and Sandisk SDDR-31 compact flash reader.
Is there any more info I can provide that might help?
pete
This is weird... (Not a good sign, eh? =) I tried what you said. I rebooted into single-user mode and ran "sh -x /etc/..." Errrr, oops. I just realized that I ran /etc/init.d/hotplug start (which, in turn, ran /etc/hotplug/usb.rc start). After, when I ran lsof, I noticed that the printer module was indeed loaded. Being a little surprised by this, I ran hotplug stop and then start and this time, a lot more debugging was printed out (all that USB setup info) and the printer module was not loaded. I tried it again and the same thing happened.
pete
Quoted 5 lines · David Brownell
Or there could be something wrong in the boot-time init code, so that a bit of shell script debugging is in order on your system. Maybe you can boot in single-user mode and "sh -x
/etc/hotplug/usb.rcstart" to watch what it's doing wrong! (Called by "/etc/rc.d/init.d/hotplugstart", as Greg suggested.)
So what did the "sh -x" invocation tell you about exactly why the USB agent did nothing when it contemplated loading "printer"? We know the result is wrong. We don't know why, but the answer is surely in that part of your "sh -x" output.
- Dave
----- Original Message -----
From: "Pete Toscano" <[email protected]>
To: "David Brownell" <[email protected]>
Cc: <[email protected]>
Sent: Tuesday, March 06, 2001 7:09 PM
Subject: Re: "Cold"-plugging my printer
This is weird... (Not a good sign, eh? =) I tried what you said. I rebooted into single-user mode and ran "sh -x /etc/..." Errrr, oops. I just realized that I ran /etc/init.d/hotplug start (which, in turn, ran /etc/hotplug/usb.rc start). After, when I ran lsof, I noticed that the printer module was indeed loaded. Being a little surprised by this, I ran hotplug stop and then start and this time, a lot more debugging was printed out (all that USB setup info) and the printer module was not loaded. I tried it again and the same thing happened.
pete
Quoted 5 lines · David Brownell
Or there could be something wrong in the boot-time init code, so that a bit of shell script debugging is in order on your system. Maybe you can boot in single-user mode and "sh -x
/etc/hotplug/usb.rcstart" to watch what it's doing wrong! (Called by "/etc/rc.d/init.d/hotplugstart", as Greg suggested.)
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
http://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
I am _such_ an idiot. When I downloaded the hotplug package, I got the SRPM and rebuilt and intalled it. Something must have gone wrong somewhere because the hotplug script wasn't starting on boot anymore. I double-checked the SRPM, rebuild the package, reinstalled it and checked the startup script and it's in there now... I'm sure it was some of my own special brain damage.
I'm very sorry for taking up your time. Everything's working now.
/crawls back into his hole.
Thanks,
pete
Quoted 33 lines · David Brownell
So what did the "sh -x" invocation tell you about exactly why the USB agent did nothing when it contemplated loading "printer"? We know the result is wrong. We don't know why, but the answer is surely in that part of your "sh -x" output.
- Dave
----- Original Message -----
From: "Pete Toscano" <[email protected]>
To: "David Brownell" <[email protected]>
Cc: <[email protected]>
Sent: Tuesday, March 06, 2001 7:09 PM
Subject: Re: "Cold"-plugging my printerThis is weird... (Not a good sign, eh? =) I tried what you said. I rebooted into single-user mode and ran "sh -x
/etc/..." Errrr, oops. I just realized that I ran/etc/init.d/hotplugstart (which, in turn, ran/etc/hotplug/usb.rcstart). After, when I ran lsof, I noticed that the printer module was indeed loaded. Being a little surprised by this, I ran hotplug stop and then start and this time, a lot more debugging was printed out (all that USB setup info) and the printer module was not loaded. I tried it again and the same thing happened.pete
Quoted 5 lines · David Brownell
Or there could be something wrong in the boot-time init code, so that a bit of shell script debugging is in order on your system. Maybe you can boot in single-user mode and "sh -x
/etc/hotplug/usb.rcstart" to watch what it's doing wrong! (Called by "/etc/rc.d/init.d/hotplugstart", as Greg suggested.)
Quoted 10 lines · Pete Toscano
I am _such_ an idiot. When I downloaded the hotplug package, I got the SRPM and rebuilt and intalled it. Something must have gone wrong somewhere because the hotplug script wasn't starting on boot anymore. I double-checked the SRPM, rebuild the package, reinstalled it and checked the startup script and it's in there now... I'm sure it was some of my own special brain damage.
I'm very sorry for taking up your time. Everything's working now.
/crawls back into his hole.
Come on out of that hole, it's a bug in the rpm spec file, not your fault :)
When upgrading the rpm package, it turned off hotplug startup.
Miles mentioned this to me right after the last release, and I verified it. I made a change to the spec file in cvs which should fix the problem (Miles, did it?)
Very sorry about this and glad your machine works properly now,
greg k-h
Signature · 6 lines
greg@(kroah|wirex).com _______________________________________________ Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net [email protected] http://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel