Installing a HP Laserjet P2015DN printer

The P2015DN is a duplex ('D') network ('N') printer.

Setting the IP address

Most jetdirects can be set to a particular IP address by means of a 'ping of life'. The build-in P2015 jedirect however, does not. It more or less expects a DHCP server. This is how to set the IP address without a DHCP server;
The printer has a default address somewhere in the - range. On a computer with a web browser, set a route to your LAN. On your default gateway, also set a route to your LAN. Switch on the printer and do a tcpdump. Look for addresses in the 169.254/16 range. Once you found your printers address, use the browser to set the printers desired IP address. Ping the new address to make sure that this actually works.
After setting the IP address, you can set all sorts of other stuff. A password for instance. And the default print quality. I set mine to 1200 DPI.


The standard amount of memory is 32 MB. This is sufficient for 600 DPI, but not for a graphics intensive 1200 print out. Kingston produces DDR2 modules for this printer;

SizePart Number
64 MBKTH-LJ2015/64
128 MBKTH-LJ2015/128
256 MBKTH-LJ2015/256

The 256 MB modules are easier to get then the 64 or 128 and cost only slightly more. Adding 256 MB extends to boot time to ca 75 s.

Installing the driver

This printer is capable of postscript; If you want to print a postscript file, just send it to the printer.


I use the following entry in /etc/printcap;


lp|lj|ljraw|HP Laserjet P2015DN:\

'' is the printers name. Substitute with the name of your printer.
You may need to add a line with ':bk:' (strict BerKeley).

Using port 9100 / Jetdirect

Apparently printing via port 9100 is faster, but sometimes a bit less reliable.
If you experience slow printing, you might want to try this;

lp|HP Laserjet P2015DN:\\

Most other print daemons use a slightly different printcap syntax;

lp|HP Laserjet P2015DN:\\

Unicode printing

My default charset is UTF-8. The 2015 does not support UTF-8 but can be made to print UTF-8 text anyway.
See Printing UTF-8 plain text for more info.


Most drivers support 600x600 DPI. Not all support 1200x1200 DPI. Make sure you have got the right driver!
This driver does support 1200x1200 DPI; 'HP_LaserJet_P2015.ppd(.gz)'

I told cups to send the data to the postscript queue on my server;

Device URI: lpd://

This seems to be more reliable.
Substitute '' with the name or IP address of your server.

Upgrading from Debian Squeeze to Wheezy made printing very slow; gs run at 100% CPU for several minutes before printing!
I resolved this by switching to the Windows PPD; 'english-hpb20154.ppd(.gz)'.


Cups-bsd adds some BSD LPD like functionality to CUPS. My experience is that standalone implementations are more flexible.

Using Xpdf

I put a 'psDuplex yes' in '~/.xpdfrc'. This way Xpdf will print duplex by default. As print command I simply use 'lpr'.

psDuplex yes
psFile   "|lpr"

My default queue is a postscript queue. I yours isn't, specify queue with '-P';

psDuplex yes
psFile   "|lpr -PName_Of_Postscript_Queue"


Sometimes the printer crashes, and I have to power toggle it to get it to go. The script below pings the printer once and then sends it a reset. It is run from /etc/cron.daily/.

ping -c 1 printer
lynx -connect_timeout=2 -read_timeout=5 -head -dump http://printer/
echo -ne "\eE" | lpr