CUPS "stops" a printer if it is turned off when you print

Please post any bugs you have found
Post Reply
Message
Author
disciple
Posts: 6984
Joined: Sun 21 May 2006, 01:46
Location: Auckland, New Zealand

CUPS "stops" a printer if it is turned off when you print

#1 Post by disciple »

I know this is an ecomoney style "bug", but it is a real weakness for a lot of users:

If you print something when your printer is turned off (or perhaps when it is out of paper if it is a printer without an OK/Resume button), the stupid CUPS scheduler "stops" the printer. A lot of people think it is too complicated to have to "start" the printer again, so CUPS should be able to automatically restart printers.

Workaround:

A script like this can check for any stopped printers and restart them.

Code: Select all

#!/bin/sh
cut -d "|" -s -f1 /etc/printcap |while read line
 do lpstat -p ${line} 2 |grep -E 'not|disabled' && /usr/sbin/lpadmin -p ${line} -E
 done
You can make a cron job to run it automatically, using pschedule. I don't know if you can make a cron job run more often than once a minute though. I guess otherwise you'd need to write an nasty script with an infinite loop in it, to run at startup.
Or perhaps it would be possible to automatically start a printer when it is turned on / plugged in...
Do you know a good gtkdialog program? Please post a link here

Classic Puppy quotes

ROOT FOREVER
GTK2 FOREVER

disciple
Posts: 6984
Joined: Sun 21 May 2006, 01:46
Location: Auckland, New Zealand

#2 Post by disciple »

There is a more "proper" solution to this: http://murga-linux.com/puppy/viewtopic.php?t=75584
Do you know a good gtkdialog program? Please post a link here

Classic Puppy quotes

ROOT FOREVER
GTK2 FOREVER

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#3 Post by rcrsn51 »

disciple wrote:N.B. I have not tested in Puppy, and don't know if it would require any other changes to Puppy's udev system.
Are you confirming that this works in Puppy? If so, could you give more details?

If not, the method here does work.

disciple
Posts: 6984
Joined: Sun 21 May 2006, 01:46
Location: Auckland, New Zealand

#4 Post by disciple »

No, I haven't tested in Puppy, but I think in theory it should work - Puppy does use udev these days, after all.

Your solution does not address the problem I described - you talked about starting the printer on boot (is that even a problem? I've never encountered it), but it is necessary to start it when the printer is turned on/plugged in, or comes back on line after running out of paper, or when you send it a print job.
Do you know a good gtkdialog program? Please post a link here

Classic Puppy quotes

ROOT FOREVER
GTK2 FOREVER

wadmalaw
Posts: 7
Joined: Tue 16 May 2017, 20:34

#5 Post by wadmalaw »

re: disciple's suggested script from post dated Fri 28 Aug 2009, 20:47
re: HP laserjet 1320 with PeeBee's LxPupSc64 18.04

Usually have to stand on my ear to get this to print but it worked OTB with LxPupSc64 18.04... except for the issue with printing one page perfectly then unable to print subsequent till reboot.

"Workaround script" worked perfectly.

I don't print much, happy to have a solution. Thanks to all.

addendum: May have spoken too soon... didn't work second subsequent attempt same session... most likely user error. :roll:

Post Reply