Installing HP printer driver for Arch Linux

With system-config-printer

Following these steps, I can now print documents using Evince on Arch Linux 4.16.9 with an HP LaserJet P1102 connected via USB:

  1. Install CUPS: sudo pacman -Sy cups
  2. Start and enable (make it start after boot) the CUPS printing service: sudo systemctl start org.cups.cupsd && sudo systemctl enable org.cups.cupsd
  3. Install HP Linux Imaging and Printing: sudo pacman -S hplip
  4. Install a driver plug-in via sudo hp-setup -i. Root privileges are important here, otherwise it says "error: No device selected/specified or that supports this functionality." when selecting a connection method. During installation of the plug-in, I selected the default option each time.
  5. Install system-config-printer, a GUI tool to configure printers.
  6. Start system-config-printer and click the button to add a printer. Select your printer and choose HPLIP as the connection method (see screenshot).
  7. system-config-printer should now allow you to print a test page.
  8. In order for a GTK application like Evince to show your printer in the printing dialog, you need to install gtk3-print-backends as well.

system-config-printer screenshot


With CUPS web interface

Instead of system-config-printer described above, you can use CUPS' web interface, reachable at localhost:631.

Before administrating printers, you have to add your user to the group sys, otherwise you'll run into errors in the web interface like "Unable to modify printer: Forbidden".

gpasswd -a theUser sys

Alternatively, use vigr to edit /etc/group.

The web interface will prompt for this user and their password.

/etc/cups/cups-files.conf defines that members of groups sys (and root) can administrate printers:

SystemGroup sys root

After taking care of group membership, you can add printers and perform other administrative tasks:

add printer via web interface

After selecting a printer in localhost:631/printers, you can also print a test page via the web interface:

print test page via web interface


Troubleshooting

Keep lib in sync with driver

The library hplip from pacman and the driver plug-in installed via hp-setup -i have to have the same version, otherwise you'll be unable to print and see this error message in your systemd journal (inspect it with journalctl -e):

validate_plugin_version() Plugin version[3.17.7] mismatch with HPLIP version[3.18.4]

To fix this, you can run hp-setup -i again which will download and install the current driver.

I added the following to ~/.bash_aliases to prevent the driver and the library getting out of sync:

alias upgrade-ignore-hp="(set -x; sudo pacman -Syu --ignore hplip)"

Serial number changed

Recently, my printer would refuse to print; system-config-printer as well as the CUPS web interface would show it as paused and lpc status, yielded that the printer has "printing disabled".

cupsenable Hewlett-Packard-HP-LaserJet-Professional-P1102 didn't help.

I solved this by changing the printer's connection. Using the CUPS web interface mentioned before, I selected my printer and clicked "Modify Printer" in the drop-down list. Here, I changed the connection from

hp:/usb/HP_LaserJet_Professional_P1102?serial=000000000Q80X0EGPR1a

to

HP LaserJet Professional P1102 USB 000000000Q80X0EGSI1c HPLIP (HP LaserJet Professional P1102)

Note that those two serial numbers differ.

I don't know where this serial number belongs to and why it changed since I didn't get a new printer; it's not the one on the label on the printer's back.

This serial number does show up in the output of hp-info, though.

"error: No device selected/specified or that supports this functionality."

This error persisted when calling sudo hp-setup -i and I'm not sure the printer is supported anymore by HP for Arch Linux. I've since ditched the HP LaserJet P1102 and got a Brother DCP-L3550CDW whose monochrome printing feature worked out of the box on Arch Linux 5.3.12: In system-config-printer, I selected "LPD/LPR queue 'BINARY_P1" as the connection and "PCL Laser" as the driver. I used this driver to enable color printing.

To get the device's built-in scanner working, I followed these instructions.

A second Brother printer/scanner that I got working on Arch Linux is the DCP-1610W. Here are some notes to make it print and scan using Wi-Fi.


Initially I installed KDE on Arch Linux. After many hours of trying to configure my HP LaserJet professional, I reinstalled Arch Linux with the Xfce desktop. Pacman installed hplip and wget. Check with the ArchWiki to make sure all the dependencies are installed. Update the system frequently. Make sure your printer is visible to your system. I rebooted three or four times. Finally, I was able to print. Final thought. It seems that Arch needed wget to communicate with HP, while "hp-setup" did its job. Final suggestion: Never buy an HP LaserJet professional that needs an hplip-plugin. I'll never do that again. Good luck.