The following sections cover some of the most frequently encountered printer hardware and software problems and ways to solve or circumvent these problems.
Printers that do not support any common printer language and can only be addressed with special control sequences are called GDI printers. These printers only work with the operating system versions for which the manufacturer delivers a driver. GDI is a programming interface developed by Microsoft for graphics devices. The actual problem is not the programming interface, but the fact that GDI printers can only be addressed with the proprietary printer language of the respective printer model.
Some printers can be switched to operate either in GDI mode or one of the standard printer languages. Some manufacturers provide proprietary drivers for their GDI printers. The disadvantage of proprietary printer drivers is that there is no guarantee that these will work with the installed print system and that they are suitable for the various hardware platforms. In contrast, printers that support a standard printer language do not depend on a special print system version or a special hardware platform.
Instead of spending time trying to make a proprietary Linux driver work, it may be more cost-effective to purchase a supported printer. This would solve the driver problem once and for all, eliminating the need to install and configure special driver software and obtain driver updates that may be required due to new developments in the print system.
If the manufacturer-PPDs package does not contain any suitable PPD file for a PostScript printer, it should be possible to use the PPD file from the driver CD of the printer manufacturer or download a suitable PPD file from the web page of the printer manufacturer.
If the PPD file is provided as a zip archive (.zip) or a self-extracting zip archive (.exe), unpack it with unzip. First, review the license terms of the PPD file. Then use the cupstestppd utility to check if the PPD file complies with the "Adobe PostScript Printer Description File Format Specification, version 4.3". If the utility returns "FAIL", the errors in the PPD files are serious and are likely to cause major problems. The problem spots reported by cupstestppd should be eliminated. If necessary, ask the printer manufacturer for a suitable PPD file.
If the printer cannot be addressed on the parallel port despite these settings, enter the I/O address explicitly in accordance with the setting in the BIOS in the form 0x378 in /etc/modprobe.conf. If there are two parallel ports that are set to the I/O addresses 378 and 278 (hexadecimal), enter these in the form 0x378,0x278.
If interrupt 7 is free, it can be activated with the entry shown in Example 12.1. “ /etc/modprobe.conf: Interrupt Mode for the First Parallel Port ”. Before activating the interrupt mode, check the file /proc/interrupts to see which interrupts are already in use. Only the interrupts currently being used are displayed. This may change depending on which hardware components are active. The interrupt for the parallel port must not be used by any other device. If you are not sure, use the polling mode with irq=none.
netcat -z <host> 515 && echo ok || echo failed
echo -e "\004<queue>" \ | netcat -w 2 -p 722 <host> 515
If the lpd does not respond, it may not be active or there may be basic network problems. If lpd responds, the response should show why printing is not possible on the queue on host. If you receive a response like that in Example 12.2. “Error Message from the lpd”, the problem is caused by the remote lpd.
By default, the CUPS network server should broadcast its queues every thirty seconds on UDP port 631. Accordingly, the following command can be used to test whether there is a CUPS network server in the network.
netcat -u -l -p 631 & PID=$! ; sleep 40 ; kill $PID
netcat -z <host> 631 && echo ok || echo failed
lpstat -h <host> -l -t
echo -en "\r" \ | lp -d <queue> -h <host>
Spoolers running in a print server box sometimes cause problems when they have to deal with a lot of print jobs. Because this is caused by the spooler in the print server box, there is nothing you can do about it. As a workaround, circumvent the spooler in the print server box by addressing the printer connected to the print server box directly via TCP socket (see 12.4.2. “Network Printers”).
In this way, the print server box is reduced to a converter between the various forms of data transfer (TCP/IP network and local printer connection). To use this method, you need to know the respective TCP port on the print server box. If the printer is connected to the print server box and powered on, this TCP port can usually be determined with the nmap utility from the nmap package some time after the print server box is powered on.
Port State Service 23/tcp open telnet 80/tcp open http 515/tcp open printer 631/tcp open cups 9100/tcp open jetdirect
This output indicates that the printer connected to the print server box can be addressed via TCP socket on port 9100. By default, nmap only checks a number of commonly known ports listed in /usr/share/nmap/nmap-services. To check all possible ports, use the command nmap -p from_port-to_port IP-address. This may take some time. For further information, refer to man nmap.
echo -en "\rHello\r\f" | netcat -w 1 <IP-address> <port> cat <file> | netcat -w 1 <IP-address> <port>
For the print system, the print job is completed when the CUPS back-end completes the data transfer to the recipient (printer). If the further processing on the recipient fails, for example, if the printer is not able to print the printer-specific data, the print system does not notice this. If the printer is not able to print the printer-specific data, select a different PPD file that is more suitable for the printer.
If the data transfer to the recipient fails entirely after several attempts, the CUPS back-end, such as usb or socket, reports an error to the print system (more precisely: to cupsd). The back-end decides whether and how many attempts make sense until the data transfer is reported as impossible. As further attempts would be in vain, cupsd disables printing for the respective queue (disable). After eliminating the cause of the problem, the system administrator must reenable printing with the command /usr/bin/enable.
If a CUPS network server broadcasts its queues to the client hosts via browsing and a suitable local cupsd is active on the client hosts, the client cupsd accepts print jobs from the applications and forwards them to the cupsd on the server. When cupsd accepts a print job, it is assigned a new job number. Therefore, the job number on the client host is different from the job number on the server. Because a print job is usually forwarded immediately, it cannot be deleted with the job number on the client host, because the client cupsd regards the print job as completed as soon as it has been forwarded to the server cupsd. To delete the print job on the server, use a command such as the following to determine the job number on the server, provided the server has not already completed the print job (that is, sent it to the printer):
lpstat -h <print-server> -o
Using this job number, the print job on the server can be deleted:
cancel -h <print-server> <queue>-<jobnnumber>
Print jobs remain in the queues and printing resumes if you switch the printer off and on or shut down and reboot the computer during the printing process. Defective print jobs must be removed from the queue with cancel.
If a print job is defective or an error occurs in the communication between the host and the printer, the printer prints numerous sheets of paper with unintelligible characters, because it is unable to process the data correctly.
The print job may still be in the queue, because jobs are only removed after they are sent completely to the printer. Use lpstat -o (or lpstat -h print-server -o) to check which queue is currently printing. Delete the print job with cancel queue-jobnumber (or cancel -h print-server queue-jobnumber).
Some data may still be transferred to the printer even though the print job has been deleted from the queue. Check if a CUPS back-end process is still running for the respective queue and terminate it. For example, for a printer connected to the parallel port, the command fuser -k /dev/lp0 can be used to terminate all processes that are still accessing the printer (more precisely: the parallel port).
Use the following procedure to locate problems in the CUPS print system: