Bug 15532

Summary: Reboot just to kill a print job?
Product: Base System Reporter: Juergen Lock <nox>
Component: kernAssignee: freebsd-bugs (Nobody) <bugs>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: 3.3-STABLE   
Hardware: Any   
OS: Any   

Description Juergen Lock 1999-12-17 19:50:02 UTC
	I just lpr'd a page and then heared strange sounds from
the printer:  paper jam...  Now i cannot remember when this printer
last had a paper jam in all the years i have it (if ever, it is
_old_, ink jet printers weren't even invented when i got it i
believe), but one day it had to happen i guess...  Anyway i hit
offline, teared off the offending page (i said the printer is
old :), killed the job and powecycled the printer (there's no other
way to reset it i believe), but when i then sent the job again the
printer only got garbage.  so i had to hit offline again...

	Well turned out the filter processes (gs...) from the jammed
job were still around, and i couldn't kill them either because they
were hanging on the (now offline again) printer device.  So the
only fix seemed to be a reboot. :/  (Or is there some way for a
device on the parallel port to indicate a reset/poweroff that this
printer just doesn't use?)

Fix: 

??  Maybe add a `wakeup everyone waiting and flush and
ignore all output until close' ioctl to the lpt driver that lprm
could use when killing an active job?
How-To-Repeat: 
	Switch offline and reset printer and kill the job when the
filter isn't yet finished sending data?
Comment 1 alex 1999-12-18 10:06:09 UTC
Also sprach Juergen Lock (nox@jelal.kn-bremen.de):

> old :), killed the job and powecycled the printer (there's no other
> way to reset it i believe), but when i then sent the job again the
> printer only got garbage.  so i had to hit offline again...

Yes, that happens to me every time I get those problems.
Also try booting the machine while the printer prints. The same
result.

If you reboot your Windows box while the printer prints, the print-job
is completed at exactly this page where it stopped next boot.

> only fix seemed to be a reboot. :/  (Or is there some way for a
> device on the parallel port to indicate a reset/poweroff that this
> printer just doesn't use?)

I usually use a combination of
lpc down all
lpc disable all
killall lpd

switch of the printer
restart lpd

switch on the printer
lpc up all
lpc enable all

Soemthink _like_ this usually fixes it.

Alex
Comment 2 Juergen Lock 1999-12-18 16:31:38 UTC
On Sat, Dec 18, 1999 at 11:06:09AM +0100, Alexander Langer wrote:
> Also sprach Juergen Lock (nox@jelal.kn-bremen.de):
> 
> > old :), killed the job and powecycled the printer (there's no other
> > way to reset it i believe), but when i then sent the job again the
> > printer only got garbage.  so i had to hit offline again...
> 
> Yes, that happens to me every time I get those problems.

Sounds like you get paper jam often?  (What printer is that?)

> Also try booting the machine while the printer prints. The same
> result.
> 
 Oh.  even if you reset the printer too?

> If you reboot your Windows box while the printer prints, the print-job
> is completed at exactly this page where it stopped next boot.

 Whow :)  sounds like one thing that M$ did get right.
(Well of course a unix box isn't supposed to be rebooted as often
as you need to reboot a crashed wintendo box...  Or like, `The
mouse cursor has moved.  Please reboot for the change to take
effect.')
> 
> > only fix seemed to be a reboot. :/  (Or is there some way for a
> > device on the parallel port to indicate a reset/poweroff that this
> > printer just doesn't use?)
> 
> I usually use a combination of
> lpc down all
> lpc disable all
> killall lpd
> 
> switch of the printer
> restart lpd
> 
> switch on the printer
> lpc up all
> lpc enable all
> 
> Soemthink _like_ this usually fixes it.

 Hmm.  Does that also help when the filter still hangs blocking on
the printer device like in my case, with no signal being able to
kill it?  Somehow i doubt it...

 Regards,
-- 
Juergen Lock <nox.foo@jelal.kn-bremen.de>
(remove dot foo from address to reply)
Comment 3 alex 1999-12-19 11:11:55 UTC
Also sprach Juergen Lock (nox@jelal.kn-bremen.de):

> > > old :), killed the job and powecycled the printer (there's no other
> > > way to reset it i believe), but when i then sent the job again the
> > > printer only got garbage.  so i had to hit offline again...
> > Yes, that happens to me every time I get those problems.
> Sounds like you get paper jam often?  (What printer is that?)

HP Laserjet 4, but I sometimes use print to both pages, and if the
page has been printed already ones paper jams occur often.
It's the bad paper that makes these appear.

> > Also try booting the machine while the printer prints. The same
> > result.
>  Oh.  even if you reset the printer too?

Can't remember.

>  Hmm.  Does that also help when the filter still hangs blocking on
> the printer device like in my case, with no signal being able to
> kill it?  Somehow i doubt it...

Yes, I doubt it, too.

Alex
Comment 4 Juergen Lock 1999-12-20 22:33:55 UTC
On Sun, Dec 19, 1999 at 12:11:55PM +0100, Alexander Langer wrote:
> Also sprach Juergen Lock (nox@jelal.kn-bremen.de):
> 
> > > > old :), killed the job and powecycled the printer (there's no other
> > > > way to reset it i believe), but when i then sent the job again the
> > > > printer only got garbage.  so i had to hit offline again...
> > > Yes, that happens to me every time I get those problems.
> > Sounds like you get paper jam often?  (What printer is that?)
> 
> HP Laserjet 4, but I sometimes use print to both pages, and if the
> page has been printed already ones paper jams occur often.
> It's the bad paper that makes these appear.
> 
Ooh.  Yes, feeding a laserprinter/photocopier its pages again to print
on the other side often ends with paper jam.  Somtimes waiting a
while before the second pass helps if you do have to do this, to let
the paper cool down...

> > > Also try booting the machine while the printer prints. The same
> > > result.
> >  Oh.  even if you reset the printer too?
> 
> Can't remember.
> 
 If that Laserjet 4 is the same/similar model than the one we
have at work then reset is a two-button combination, no need
to powercycle.

 Regards,
-- 
Juergen Lock <nox.foo@jelal.kn-bremen.de>
(remove dot foo from address to reply)
Comment 5 Poul-Henning Kamp freebsd_committer freebsd_triage 2001-03-28 20:17:29 UTC
State Changed
From-To: open->closed

Antique PR.