Recent hotplugs in rawhide (since hotplug-1.9-1) do not
cause the usb printer support to be loaded at boot time
if it is a module. This seems really bone-headed since
RedHat has recently gone out of its way to make every
other bit of the usb kernel support a module. Either the
current hotplug should be modified to load
drivers/usb/print.o when need (as 1.9 did) or initscripts
needs to be changed to load drivers/usb/print.o if it
is aliased or such.
The old hotplug was broken, and caused all USB modules to be loaded and was
obviously broken. Which version are you running?
I am using hotplug-2001_02_14-15.src.rpm when I get this problem. I also have
the initscripts-5.82-1.src.rpm installed. I am using a fairly stock 2.4.3 kernel
(with a .config that corresponds to what your rawhide kernel srpm uses). I
you aren't apply any funky nonstandard patches for the hotplug behavior to work.
If so you should avoid that.
ps Again the problem occurs when the lpd init.d script causes /dev/usb/lp0 to
be used which I assume should trigger usb printer.o to load but doesn't under
the newest hotplug srpms.
These have nothing to do with whether or not you access /dev/usb/lp0 - it
inserts the module if it recognizes your attached printer. What messages do you
get in your /var/log/messages when hotplugging your printer?
when I boot with my Epson 740i unattached and then hotplug it I get
the following in /var/log/messages
Apr 7 23:44:11 bogus kernel: hub.c: USB new device connect on bus1/1/2,
assigned device number 5
Apr 7 23:44:11 bogus kernel: usb.c: USB device 5 (vend/prod 0x4b8/0x1) is not
claimed by any active driver.
Apr 7 23:44:11 bogus /etc/hotplug/usb.agent: ... no drivers for USB product
This occurs although I see the following in /proc/bus/usb/devices...
T: Bus=01 Lev=02 Prnt=02 Port=01 Cnt=02 Dev#= 5 Spd=12 MxCh= 0
D: Ver= 1.00 Cls=07(print) Sub=01 Prot=02 MxPS=64 #Cfgs= 1
P: Vendor=04b8 ProdID=0001 Rev= 1.00
S: Product=USB Printer
C:* #Ifs= 1 Cfg#= 1 Atr=40 MxPwr= 2mA
I: If#= 0 Alt= 0 #EPs= 2 Cls=07(print) Sub=01 Prot=02 Driver=(none)
E: Ad=01(O) Atr=02(Bulk) MxPS= 64 Ivl= 0ms
E: Ad=82(I) Atr=02(Bulk) MxPS= 64 Ivl= 0ms
Is it possible that the printer.o module really doesn't recognize this printer?
One more note...if I enable debugging output in /sbin/hotplug I get the
following when I hotplug the Epson 740i printer to my G4/450 under Linux
Apr 8 00:08:50 bogus /sbin/hotplug: arguments (usb) env (PWD=/etc/hotplug
HOSTNAME=bogus.bogusnet DEVICE=/proc/bus/usb/001/005 ACTION=remove DEBUG=yes
OLDPWD=/ DEVFS=/proc/bus/usb TYPE=7/1/2 SHLVL=1 SHELL=/bin/bash HOSTTYPE=powerpc
OSTYPE=linux-gnu HOME=/ TERM=dumb PATH=/bin:/sbin:/usr/sbin:/usr/bin
Apr 8 00:08:50 bogus /sbin/hotplug: invoke /etc/hotplug/usb.agent
Apr 8 00:08:54 bogus kernel: hub.c: USB new device connect on bus1/1/2,
assigned device number 6
Apr 8 00:08:54 bogus kernel: usb.c: USB device 6 (vend/prod 0x4b8/0x1) is not
claimed by any active driver.
Apr 8 00:08:54 bogus /sbin/hotplug: arguments (usb) env (PWD=/etc/hotplug
HOSTNAME=bogus.bogusnet DEVICE=/proc/bus/usb/001/006 ACTION=add DEBUG=yes
MACHTYPE=powerpc-redhat-linux-gnu OLDPWD=/ DEVFS=/proc/bus/usb TYPE=7/1/2
SHLVL=1 SHELL=/bin/bash HOSTTYPE=powerpc OSTYPE=linux-gnu HOME=/ TERM=dumb
PATH=/bin:/sbin:/usr/sbin:/usr/bin PRODUCT=4b8/1/100 _=/usr/bin/env)
Apr 8 00:08:54 bogus /sbin/hotplug: invoke /etc/hotplug/usb.agent
Apr 8 00:08:55 bogus /etc/hotplug/usb.agent: ... no drivers for USB product
OK, so the kernel driver doesn't know it works with this driver... if you insert
it manually, does it work then?
If I do a '/sbin/modprobe printer' it will load the usb printer.o module
and works correctly. I think the handling of usb printer.o should be
regressed to the behavior in hotplug-1.9-1 since it appears that printer.o
may not be able to recognize enough printers (I have a Epson 740i which
leads me to wonder if printer.o would load for a stock Epson 740 either).
Since your kernel now builds a module this issue is going to cause a lot
of grief for your tech support folks when Redhat 7.1 ships since it appears
a quite a few usb printers (if not all) won't force the driver to load.
Wouldn't it make more sense to hand the loading of the usb printing module
in /etc/rc.sysinit like you do for the sound driver support?
I'll not revert it to loading all modules: That was a bug. However, it should be
fixed to load it for your printer. Attach your /proc/bus/usb/devices.
I'll reassign this to the kernel.
I seem to have found a solution that works. If I build
and install both usbutils-0.7-101.src.rpm and
hotplug-2001_02_28-1.src.rpm from the
linux-hotplug.sourceforge.net web site on my machine
I find that the usb print module gets loaded as expected
on boot. This action appears to require the usbutils
rpm to be installed so I doubt it is generically installing
all modules. Interestingly if I replace the newer generic
hotplug with your hotplug_2001_02_14_15 version this doesn't
work and the print module is not loaded as before. Is this
because you aren't running the initscript?
Trond, what do you want me to do with this?
I do not understand, what change in drivers
would help the situation. Please explain it to me
like you would to a UNIX BSD 4.3 user. I am a bit
behind times, you see.
BTW. For many devices the policy script does not do
anything and instead users add "alias char-major-180-0 printer"
to /etc/modules.conf. I wonder if this one line may help
without any hotplug.
Please upgrade hotplug to a more recent version for RawHide
at some point.
I'll do that, but there's a lot of patches to go through...
The main thing is to make sure the device identifiers show up in modules.usbmap,
so hotplug can find it. If it is correctly entered there, it should work with
The devel tree has been updated to 2001-04-24, but as that won't have any effect
without sufficient info in modules.usbmap, I'm reassigning,
TYPE=7/1/2 -> This is in modules.usbmap !
Adding EVERY device that is of this type sounds strange if you have a class
Although I don't have rawhide on my linuxppc machine at the moment, I found
that usbutils was essential for the stock hotplug to work properly. Why don't
you just make hotplug depend on usbutils and add that to the rpm set? From
my conversations with the hotplug maintainers it seems that usbutils is
expected to be present. In my case, hotplug would never load the usb printer.o
module for my Epson 740i printer to work unless usbutils was installed. It seems
like a much simplier fix to me.
Do I understand correctly that the requestor have lost
insterest in the resolution?
("Although I don't have rawhide on my linuxppc machine at the moment")
The requester is currently running Debian (since RedHat isn't
supporting the powerpc this shouldn't be an issue). The point
is that the hotplug maintainers don't believe RedHat's approach
to hotplug is the correct one (at least from the conversations
I have had with them). It is still unclear to me why RedHat
insists on diverging from the approach of using hotplug (that
is with usbutils) that the hotplug maintainers have designed.
Again, the most current hotplug srpms from the hotplug maintainers
would flawlessly with rawhide as long as usbutils is installed.
Closing out of the way - requestor seems disinterested.
BTW, Trond has a much upgraded hotplug these days
(for 7.2 release). Seems to work well for printers.