From mboxrd@z Thu Jan 1 00:00:00 1970 From: "PASCHAL,DAVID (HP-Roseville,ex1)" Date: Sat, 07 Jul 2001 01:10:14 +0000 Subject: RE: [hpoj-devel] Help, HP PSC-750 USB printer won't work after en Message-Id: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-hotplug@vger.kernel.org Hi, Ben. Ben McCann wrote: > Yesterday I had my new HP PSC-750 'all-in-one' printer/scanner/copier > working after a fashion. I could print to it if I booted my > server and > the PSC750 in the 'right' order. (I don't really know the > right order, > but I was able to get everything running). This morning I > embarked upon > making 'hot-plugging' work because one of the issues I had with the > printer is that the 'ptal-printd' process exits when the printer is > turned off. That would be a bug, not a feature. Are you sure that you're really running the latest ptal-printd code from CVS? If you happened to upgrade from 0.7 or CVS code from around the 0.7 timeframe, then you may be running an old version of ptal-printd, which had this problem. Try running "which ptal-printd" and see if multiple copies come up in different places. The old version was installed by default in /usr/local/bin, and now it's installed in /usr/local/sbin, so that's why I'm asking. If that doesn't help, then are any messages logged to /var/log/messages that say why it exits? If not, then it might be worth attaching gdb to the running process and see if it traps any segfaults. > Finally, I created the following script to start the > OfficeJet daemons > when the printer comes online (in /etc/hotplug/usb/printer): > #!/bin/sh > # Start the HP Office Jet Daemons > /usr/local/bin/ptal-mlcd usb:0 -hotplug -device /dev/usb/lp0 > /usr/local/bin/ptal-printd mlc:usb:0 -like /dev/lp0 & My recommendation would be to not start the daemons from a hotplug script, and instead try out the new method I announced last night (http://www.geocrawler.com/lists/3/SourceForge/5745/0/6115780) (see below). ... > Jul 6 07:15:41 canopus ptal-mlcd: ptal-mlcd: ERROR at > ExMgr.cpp:2940, dev=, pid03, errno=5 > llioGetDeviceID: ioctl failed! > Jul 6 07:15:41 canopus ptal-mlcd: ptal-mlcd: ERROR at > ExMgr.cpp:2351, dev=, pid03, errno% > llioOpenOne: llioGetDeviceID(/dev/usb/lp0) failed! ... > If I manually run ptal-mlcd and then attempt to run 'ptal-hp > mlc:usb:0 display' > then that also gets timeouts. (That was working yesterday). I'm not sure what's causing the timeout in getting the device ID or what would have changed to make this happen. Maybe there's a race condition in the kernel where if ptal-mlcd tries to activate too quickly in a hotplug script, that something in the kernel gets in a bad state such that it won't work again, even if you try running ptal-mlcd again manually. I've seen complete lockups when activating too quickly like this, so it's not too far-fetched. To test this hypothesis, try undoing your hotplug changes (such that the daemons don't get loaded), reboot, make sure the kernel modules (printer.o, etc.) get loaded, try running ptal-mlcd without the -hotplug option (i.e. "ptal-mlcd mlc:usb:0 -device /dev/usb/lp0"), and see if that works. If so, then you can proceed to try out the new ptal-init script, especially "ptal-init setup", which probes for USB printers and sets up the ptal-start.conf file. David _______________________________________________ Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net Linux-hotplug-devel@lists.sourceforge.net http://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel