Resolving HP LaserJet 1020 Printer Driver Issues on Linux
Background
Most Linux distributions include printer drivers by default, such as HPLIP for HP printers. However, the HP LaserJet 1020 requires an additional proprietary plugin. While attempting to install this plugin, I encountered issues, which are detailed below.
Problem
Error Message:
hp laserjet 1020, hpcups 3.17.10, requires proprietary plugin
Solution 1: Using HPLIP
- Install HPLIP:
sudo apt-get install hplip hplip-gui
- Install the Plugin:
- Connect the printer and run:
hp-plugin
- Follow the GUI prompts to download and install the plugin. However, if you face a 404 error (possibly due to network restrictions in China), proceed to the manual installation.
- Connect the printer and run:
- Manual Plugin Installation:
- Download the required plugin from here.
- Use the
hp-plugin
command to load the downloaded plugin file locally.
- Test the Printer:
- Once the plugin is installed, your printer should work as expected.
Solution 2: Using foo2zjs
foo2zjs
is an open-source library compatible with HP LaserJet 1020 and a good alternative to HPLIP.
- Remove HPLIP:
sudo apt-get remove --assume-yes hplip hpijs hplip-cups hplip-data libhpmud0 foomatic-db-hpijs
- Install
foo2zjs
:sudo apt-get install cupsys-bsd foo2zjs make build-essential wget http://support.ideainformatica.com/hplj1020/foo2zjs-patched.tar.gz tar zxvf foo2zjs-patched.tar.gz cd foo2zjs make sudo make install sudo make install-udev sudo udevstart
- Restart Printing Service:
sudo /etc/init.d/cupsys restart
- Adjust Print Settings (Optional):
For better text formatting, run:
sudo lpoptions -o cpi-12 -o lpi=7 -o page-left=36 -o page-right=36 -o page-top=36 -o page-bottom=36
- Configure Printer Model:
- Open your system’s printer manager.
- Set the HP printer model to
foo2zjs
. - Select the appropriate
.ppd
file for your printer from thefoo2zjs/ppd
directory.
- Modify
.ppd
File (if needed): If you encounter issues, such as page size defaults, manually edit the.ppd
file:sudo gedit foo2zjs/ppd/LaserJet-1020.ppd
Example: Change the default page size from “Letter” to “A4.”
- Test and Enjoy: Your printer should now work seamlessly.
By following either of these methods, you can successfully set up your HP LaserJet 1020 on Linux.
Comments