How to Install HP Printer Drivers (`hplip`) on Arch Linux

How to Install HP Printer Drivers (hplip) on Arch Linux

Setting up a printer on Arch Linux might seem like a daunting task, especially for those new to the ecosystem. Fortunately, HP provides a robust open-source printing solution known as HPLIP (HP Linux Imaging and Printing), which supports a wide range of HP printers and multifunction devices.

In this guide, we will walk through the step-by-step process to install and configure HPLIP on Arch Linux, ensuring your HP printer is ready for action — whether you’re printing documents or scanning images.


What is HPLIP?

HPLIP stands for HP Linux Imaging and Printing. It is an open-source project sponsored by HP to provide drivers for their printers and multifunction devices under Linux. It includes:

  • Printer drivers
  • Scanning support
  • Fax capabilities (on supported devices)
  • Graphical and command-line configuration utilities

The HPLIP package integrates seamlessly with CUPS (Common Unix Printing System) and SANE (Scanner Access Now Easy), both of which are standard in Linux printing and scanning.


Check Printer Compatibility

Before installing HPLIP, it’s wise to ensure your printer is supported.

Visit the official HPLIP supported devices page: 👉 https://developers.hp.com/hp-linux-imaging-and-printing/supported_devices/index

Look up your printer model and check for the following:

  • Driver support status (Fully / Mostly / Partially Supported)
  • Whether a proprietary plugin is required (denoted by “Requires plugin”)

Prerequisites

To ensure a smooth setup, make sure your system is up-to-date and essential packages are installed.

1. Update your system

sudo pacman -Syu

2. Install dependencies

Ensure the following core packages are installed:

sudo pacman -S cups ghostscript gsfonts hplip sane python-pyqt5

Additionally, for GUI-based setup or scanning, you might need:

sudo pacman -S xsane simple-scan

Note: Some HP printers require the HPLIP plugin, which includes binary-only components. We’ll cover that separately.


Installing HPLIP on Arch Linux

Arch Linux provides hplip in the official repositories. You can install it directly via pacman:

sudo pacman -S hplip

This package includes:

  • Printer drivers
  • hp-setup tool for installation
  • GUI tools like hp-toolbox
  • SANE backend for scanning

If you prefer the latest development version of HPLIP, you can try building from AUR:

yay -S hplip-git

But the stable version from the official repo works well for most users.


Starting and Enabling CUPS

CUPS is the printing system that manages print jobs on Linux. Ensure it’s running and enabled:

sudo systemctl start cups.service
sudo systemctl enable cups.service

To verify CUPS is running:

systemctl status cups.service

Once CUPS is active, you can access its web interface at:

http://localhost:631

This web UI lets you manage printers and print jobs.


Connecting the Printer

USB Printers

For USB printers, simply connect the device to your system. Arch Linux should automatically detect it.

Verify device detection:

lsusb

Network Printers

If your printer supports Wi-Fi or Ethernet, ensure it’s connected to the same network as your PC. You can find the IP address via the printer’s control panel or router settings.


Using the hp-setup Utility

The hp-setup tool helps configure HP printers.

For USB Printers

sudo hp-setup -i

For Network Printers

sudo hp-setup -i <IP_ADDRESS>

The -i flag invokes the interactive command-line mode, suitable for headless systems or when you prefer a terminal.

If you want a graphical interface (assuming you have a desktop environment and the required dependencies):

hp-setup

You will be guided through selecting the connection type, discovering the printer, and installing the driver.


Installing HPLIP Plugin (If Required)

Some HP printers require proprietary binary plugins (e.g., for firmware, scanning, or color printing). During hp-setup, you might see a prompt saying:

This printer requires the proprietary plugin.

To install the plugin:

Automatic Method (GUI or CLI)

  • Follow the on-screen prompts during hp-setup.
  • The utility will attempt to download the plugin from HP.

If it fails (due to SSL issues or HP’s site structure), use the manual method.

Manual Method

  1. Download the plugin directly from: https://developers.hp.com/hp-linux-imaging-and-printing/plugins

  2. Then install it using:

hp-plugin -i

You may be prompted to accept a license agreement and provide the downloaded .run file.

Note: You can also use --required to install plugins only for the detected hardware:

hp-plugin --required

Scanning Support

If you have an HP all-in-one printer, it likely includes a scanner. To verify scan support:

  1. Install the scanning utilities:
sudo pacman -S sane xsane
  1. List connected scanners:
scanimage -L

If the scanner is detected, you’re good to go.

To scan:

xsane

Or use:

simple-scan

If the scanner isn’t detected:

  • Ensure saned and required backends are installed.
  • Some devices may require the proprietary plugin.

Troubleshooting Tips

1. hp-setup can’t detect printer

  • Make sure printer is powered on and connected.
  • Use lsusb (USB) or ping <IP> (network) to check connectivity.
  • Try running hp-setup with --debug to get more output.

2. Plugin installation fails

  • Manually download and install the plugin using hp-plugin.
  • Check for certificate errors (sometimes SSL libraries cause issues).

3. Printer not showing in CUPS

  • Visit http://localhost:631 to verify CUPS config.
  • Restart CUPS:
sudo systemctl restart cups
  • Re-run hp-setup.

4. Scanning doesn’t work

  • Try running as root: sudo xsane.
  • Check for permission issues (/dev/bus/usb access).
  • Add your user to the scanner group if applicable.

Conclusion

Installing and configuring HP printers on Arch Linux using HPLIP is quite straightforward, provided you have the right tools and follow the correct steps. The Arch package repository makes it easy to get the software you need, and the HPLIP utilities handle most of the heavy lifting — including driver setup, plugin installation, and device configuration.

Whether you’re using a USB or network-connected HP printer, HPLIP provides robust support for printing and scanning. Even if your model requires a proprietary plugin, the hp-plugin utility simplifies the process.

By following this guide, you should be able to get your HP printer fully operational on Arch Linux in a matter of minutes.


If you have any specific printer models or encounter errors during the process, feel free to look for help on the Arch Wiki or the HPLIP documentation.