I had an old HP LaserJet 1022 lying around with some spare toners. It still works perfectly and it would’ve been a waste to throw it out. Unfortunately the printer doesn’t play nicely with Windows 10 (it seems it doesn’t even recognize it). Even back in the day with Windows 7 you had to jump through some hoops to get it working correctly.
So I decided to put an old laptop to use as a dedicated print server, using Ubuntu 18.04 and CUPS. But that also gave me some trouble.
Setting up CUPS
For the uninitiated, CUPS manages print jobs and queues on most Linux distributions. It also comes with network printing/print server capabilities and has very nice web interface to manage the print server.
How to set up Ubuntu and CUPS is beyond the scope of this article, but here are some nice resources:
First issue: printer “restarting” after every page
Even when printing multi-page documents, the printer would stop printing, and then immediately restart, instead of printing the pages in one go. I’m not sure how to describe this behavior, but its like its spinning down and then spinning up again. While normally it would just keep spitting out pages one after the other.
This can be remedied by installing the foo2zjs printer driver. This driver is a generic driver for the following printers using the ZjStream protocol:
- Minolta/QMS magicolor 2300 DL
- Minolta/QMS magicolor 2200 DL
- Konica Minolta magicolor 2430
- Minolta Color PageWorks/Pro L
- HP LaserJet P2035
- HP LaserJet Pro P1606dn
- HP LaserJet Pro P1566
- HP LaserJet Pro P1102
- HP LaserJet Pro M12a
- HP LaserJet Pro M12w
- HP LaserJet Pro P1102w
- HP LaserJet Pro CP1025nw
- HP LaserJet 1022
- HP LaserJet 1022n
- HP LaserJet 1022nw
- HP LaserJet 1020
- HP LaserJet 1018
- HP LaserJet 1005
- HP LaserJet 1000
- HP LaserJet M1319 MFP
- (And maybe some others)
To install it:
sudo apt-get install printer-driver-foo2zjs
Now the CUPS configuration has to be adjusted to use the new driver. On the CUPS web interface, go to Printers, and select the appropriate printer. In the Administration dropdown, select “Modify Printer”.
You can press Continue till you get to the drivers page. By default CUPS will use the CUPS+Gutenprint driver. Change it to the Foomatic/foo2zjs-z1 driver and you’ll be good to go!
If this driver isn’t on the list, temporarily switch to another/make manufacturer, then switch back and the list should be refreshed.
Second issue: printer not discovered on Windows 10
I’m in a shared office building and the laptop running the print server is connected to the network over WiFi (Yes… I know… But I’m not going to pay the $100 to get the network socket in my office patched in, ha.).
The WiFi network is a private network, which is only accessible to me.
To let Windows 10 automatically discover the printer, enable “Share printers connected to this system” and additionally “Allow printing from the Internet” in the CUPS web interface. I doubt the lather will allow anyone to print to my printer, but I guess we’ll find out sooner or later.
Either way, enabling “Allow printing from the Internet” made Windows 10 instantly discover the printer. While it couldn’t find it when it was disabled.
So, we’ve saved an old printer and a laptop from the landfill. Time to print a years’ worth of saved up company finances!