HP LaserJet printers printing slowly through print server

Just a quick note for anybody that has run into this problem.  We bought 2 new HP LaserJet printers.  A M601n model and a CP4025.  When printing directly to them (via direct ethernet connection) they print perfectly fast, takes about 5 seconds for the printer to start printing and another 3 seconds for the first page to come out (so 8 seconds total print time).  When printing through a print server (i.e. one computer talks to the printers, the rest of the workstations talk to the print server computer) printing takes about 30 seconds for the first page to come out.

When doing troubleshooting it was determined that the HP print driver itself was causing the delay.  The print job never hit the print server until about 22 seconds after clicking Print.  It appears the print driver tries to communicate via SNMP with the printer for some reason.  Because the IP address of the “printer” is for the print server, the driver cannot communicate with the printer and is instead talking to the print server.  Since the print server doesn’t understand the SNMP request coming in, the driver just keeps trying and eventually times out and prints anyway.

HP is “investigating” the issue.  Hopefully they will actually fix it.  In the mean time, I have found a work-around.  I won’t go into details and step-by-step directions but I will give the overview of how to fix it.

First you need to enable SNMP on your server.  Once that is enabled and running edit the /etc/snmp/snmpd.conf file (assuming you are on Mac, Linux might be elsewhere) and add this line towards the end:

pass . /bin/sh /usr/local/bin/snmp_printer

When receiving a request for that OID it will pass it on to the shell script at /usr/local/bin/snmp_printer, whose contents should be:


echo “.”
echo “string”
echo “MFG:Hewlett-Packard;CMD:PJL,PCLXL,PCL,PDF,POSTSCRIPT;CID:HPLJPDLV1;1284.4DL:4d,4e,1;MDL:Generic Printer;CLS:PRINTER;DES:Generic Printer;”

Once that is done you will need to either restart the SNMP agent or reboot the server.  After that printing should be normal speed.  Basically, we are answering the HP driver and pretending to be a “Generic Printer”.  This seems to be enough to get it to move on with the print job. (note: that last echo line that looks like 3 is actually all one line, word wrap is a pain sometimes)

1 comment for “HP LaserJet printers printing slowly through print server

  1. September 20, 2013 at 5:26 am

    Wow! Great detective work Daniel. It makes me wonder if something similar was going on when we tried configuring our Zebra printers to print through another server other than the local server before eventually making its way to the attached Zebra Print Server.

Leave a Reply

Your email address will not be published. Required fields are marked *