This document applies to all levels of AIX.
The first test that was performed was to send a PCL reset command by itself to the printer and see if the printer would wake up. After a short delay, the print job was sent to the printer. This job seemed to print without the hang that had occurred earlier.
There are probably several ways to accomplish a delay but one of the easiest is to simply replace the backend program specified in the queue device definition in /etc/qconfig with a short shell script. The script included in this document is meant to work only with local printers. One of the reasons that this is easy to implement is that the stdout (Standard Out) for the printer backend goes directly to the printer. This means that we can use a simple echo command to send data out to the printer.
Use the following steps to solve the problem.
#!/usr/bin/ksh # Set up some traps. This probably isn't necessary trap "trap 15;kill -15 0;exit 0" 15 # This all works for a local printer because stdout is set # to the special file /dev/lp## in the "file = /dev/lp##" # line in /etc/qconfig where the queue is defined # Let's output the Escape sequence to wakeup the printer echo "\033E" if [ "$?" -ne 0 ] then exit 2 fi # Now we can sleep - this can be adjusted but start off large. sleep 10 # Now let the virtual printer do its job /usr/lib/lpd/piobe "$@" if [ "$?" -ne 0 ] then exit 64 fi |
chmod +x /usr/local/bin/delaybk
chown root:printq /usr/local/bin/delaybk
cp /etc/qconfig /etc/qconfig.bak1
* backend = /usr/lib/lpd/piobe backend = /usr/local/bin/delaybk
[ Doc Ref: 91747136617158 Publish Date: Feb. 01, 2001 4FAX Ref: 6486 ]