
Printing on Linux is usually boring, and that’s a good thing. Then a fresh Ubuntu install meets an HP LaserJet or OfficeJet and the boredom ends. The printer shows up in the dialog but prints blank pages. The scanner is invisible. A plugin prompt demands a download that fails. Anyone who has supported an office full of HP devices has seen all of this.
HPLIP, the HP Linux Imaging and Printing project, is the piece that fixes most of it. It supplies drivers, the hp-setup wizard, scanning support through SANE, ink and toner status, and fax tools for supported models. On Ubuntu 26.04 LTS (codename Resolute) it is a short install. The real decisions come before and after the install: which version you run, how the printer connects, and what you do when something misbehaves.
One point shapes everything else in this guide. The repository version is usually the right one. Ubuntu 26.04 ships the 3.24.x branch of HPLIP, and one third-party guide lists the candidate as 3.24.4+dfsg0-0ubuntu8, against HP’s newer 3.25.8 release. A UbuntuUpdates listing dated November 2026 shows 3.24.4+dfsg0-0ubuntu8.4 as the current Resolute security build. Newer is not automatically better. Manually built HPLIP on a long-term-support release tends to cause trouble later.
This guide covers the clean APT install, the manual route for when you truly need it, a snap alternative, network printer setup, hardening, and a troubleshooting section built from the failures that come up most.
What HPLIP Actually Does
HPLIP is a bundle, not one program. Knowing the parts makes troubleshooting much easier.
- CUPS integration: HPLIP provides the backends and PPD driver files that CUPS uses to talk to HP devices.
- hp-setup: the wizard that discovers a printer, picks a driver and creates the queue.
- hp-toolbox: the GUI Device Manager, showing ink levels, cleaning and alignment utilities.
- SANE backend: the
hpaiobackend for scanning, used by Simple Scan and XSane. - Plugins: proprietary binary blobs some printers need, such as firmware or halftoning code.
Many modern HP printers don’t need HPLIP at all. If a printer supports driverless IPP Everywhere, CUPS can print to it without HPLIP. In practice, though, HPLIP still matters for scanning on multifunction devices, for ink level reporting, and for older models that never learned driverless printing.
Check What You Already Have
Before installing anything, look at what’s on the machine. Desktop Ubuntu installs often include parts of the stack already.
dpkg -l | grep -i hplip
apt-cache policy hplip
lsb_release -a
HP’s own documentation recommends the same first step on Debian-based systems, running dpkg -l hplip to see whether it’s installed, and then trying hp-setup if it is. The apt-cache policy output tells you which version your enabled repositories will provide.
Then confirm the printer is visible to the system:
lsusb | grep -i hewlett
lpstat -p -d
systemctl status cups
If CUPS isn’t running, fix that before blaming HPLIP.
Method 1: Install HPLIP from the Ubuntu Repositories
This is the recommended method for nearly everyone. It’s signed, tracked by apt, and receives security updates.
Step 1: Refresh the package index
sudo apt update
sudo apt upgrade -y
Skipping the upgrade is how people end up with dependency conflicts on a freshly installed machine. A few extra minutes here saves a lot more later.
Step 2: Install the packages
For a desktop that needs the GUI tools:
sudo apt install hplip hplip-gui
For a headless server or a print-only box, the core package is enough:
sudo apt install hplip
The hplip-gui package pulls in Qt dependencies. On a server there’s no reason to carry them. A print server managed over SSH and the CUPS web interface runs fine without a graphical stack.
Optional documentation:
sudo apt install hplip-doc
Step 3: Make sure CUPS is enabled
sudo systemctl enable --now cups
systemctl is-active cups
Step 4: Add the printer with hp-setup
For a USB printer, plug it in and run:
hp-setup -i
The -i flag runs interactive text mode, which works over SSH. On a desktop you can run hp-setup without it to get the GUI wizard. Pick the connection type, select the detected device, accept or choose a PPD, and print a test page when asked.
Step 5: Verify
lpstat -t
hp-info -i
lp -d YOUR_PRINTER_NAME /etc/hosts
The last command prints a short text file and costs one sheet of paper. hp-info reports the device URI, model and driver details, which is useful to capture before you start changing things.
Method 2: Network Printers
Most real-world HP printers sit on the network, not on a USB cable. The setup differs in a few important ways.
Give the printer a stable address
DHCP leases change. A printer that moves from 192.168.1.50 to .73 breaks every client that stored its IP. Reserve the address in your router or DHCP server, or set a static IP on the printer. A hostname with a DNS record is better still.
Discover and add it
hp-probe -b net
hp-setup -i 192.168.1.50
If discovery fails but the printer answers pings, the cause is often multicast filtering on a managed switch or a VLAN boundary. Passing the IP directly to hp-setup bypasses discovery entirely.
Test the ports
nc -zv 192.168.1.50 9100
nc -zv 192.168.1.50 631
Port 9100 is raw JetDirect and 631 is IPP. If neither answers, no driver will fix the problem. Check the printer’s network settings and any firewall in between.
Method 3: Manual Build or the HP Installer
Sometimes the repository version doesn’t recognize a newer printer model. HP publishes newer HPLIP releases through its developer portal, and the official page lists a range of Ubuntu releases for automatic installer support. In the version of that page indexed here the list ends at 24.04. Ubuntu 26.04 is not named, so treat the automatic installer as unsupported there unless HP’s release notes say otherwise.
A third-party guide makes the same recommendation: on Ubuntu 26.04, keep the APT packages or use the printer application snap unless a newer HP release explicitly adds 26.04 support. That matches what experienced admins do. Mixing a source-built tree into /usr on an LTS machine makes future upgrades harder.
If you still need it, for instance for a brand new model, do it deliberately:
- Check whether the model is actually listed in the HPLIP supported devices database and which version first supports it.
- Remove the packaged version so two copies don’t fight:
sudo apt remove hplip hplip-gui. - Install the build dependencies from HP’s manual instructions for Ubuntu.
- Download the tarball, extract it, then run
./configure,makeandsudo make installas HP documents.
Expect to chase missing development headers for Python, CUPS, libusb and SANE. Record every package you add so you can reverse the process.
A tip from experience: do this in a test VM first, not on the production print server. A broken manual install during a Monday morning print queue is miserable.
About third-party PPAs
Community PPAs for HPLIP exist. One example is ppa:kelebek333/hplip, which is community maintained and not provided by HP. A PPA built for an older release may not have packages for Resolute at all, and it replaces a package that otherwise gets Ubuntu security updates. On a managed fleet, avoid it. On a personal laptop, check that the PPA actually publishes for 26.04 before adding it.
Method 4: The HPLIP Printer Application Snap
Ubuntu’s printing stack has been moving toward printer applications, which run a driver as a network service and present a driverless IPP printer to CUPS. The Snap Store lists hplip-printer-app, and its stable channel was at 3.22.10-10 when indexed, with Ubuntu 26.04 among the listed distributions using it.
sudo snap install hplip-printer-app
This is worth trying when the packaged PPD driver gives poor output or an unsupported model fails to print. It has trade-offs. The snap’s HPLIP version is older than the repository’s, and it won’t give you the Device Manager. Treat it as a fallback for printing, not a replacement for the full toolchain.
Installing the Proprietary Plugin
Some printers need HP’s binary plugin. Symptoms include a “plugin required” message in hp-setup, or a printer that accepts jobs and then outputs nothing.
hp-plugin -i
The tool downloads a plugin matching your installed HPLIP version. If you run the repository’s 3.24.x, the plugin must also be 3.24.x. A mismatch between HPLIP and plugin versions is a classic cause of failure. Check the installed version with:
hp-check -t
dpkg -l hplip | tail -1
hp-check is an underused tool. It reports missing dependencies, service status and permission issues in one pass.
Configuring CUPS Properly
CUPS holds the queue, and many “HPLIP problems” are CUPS problems.
Useful commands:
lpstat -v # device URIs
lpstat -o # active jobs
cancel -a # clear all jobs
sudo cupsctl --debug-logging
sudo tail -f /var/log/cups/error_log
Set a default printer and sensible options:
sudo lpadmin -d YOUR_PRINTER_NAME
lpoptions -p YOUR_PRINTER_NAME -o media=A4 -o sides=two-sided-long-edge
In Indonesia, and anywhere else that uses A4, make A4 the default paper size. A Letter default quietly causes clipped margins and scaling complaints. Also check /etc/papersize.
Scanning with HPLIP
For multifunction printers, scanning goes through SANE.
sudo apt install sane-utils simple-scan
scanimage -L
If scanimage -L lists your device, the backend works. Test with:
scanimage --format=png --resolution 300 > test.png
For network scanners, check that /etc/sane.d/dll.conf has hpaio enabled and that the printer’s IP is reachable. Scans that stall mid-page are usually network or power-saving issues on the printer side, not Ubuntu.
Security Considerations
A printer is a computer sitting on your network, and usually an unpatched one. Treat it that way.
- Firewall: if the Ubuntu machine shares printers, allow only the local subnet to port 631. With UFW:
sudo ufw allow from 192.168.1.0/24 to any port 631 proto tcp. - Don’t expose CUPS to the internet: check
cupsctloutput and/etc/cups/cupsd.conf. Listening onlocalhost:631is the safe default for workstations. - Disable unused discovery: on servers that don’t browse for printers, consider
sudo systemctl disable --now cups-browsed. CUPS browsing components have had serious vulnerabilities in the past, so running fewer network-facing services is sensible. - Group membership: add admins who manage printers to
lpadmin, not tosudofor printing tasks alone:sudo usermod -aG lpadmin username. - Keep it patched: repository HPLIP receives security updates through normal channels, which is another strong argument against manual builds. Run
sudo unattended-upgrades --dry-runto confirm automatic updates are working. - Printer firmware: update it from HP’s site. Disable unused protocols such as Telnet, FTP or WSD on the printer itself.
Troubleshooting Common Problems
“HPLIP-Error: No device found” or printer not detected
Check the cable and lsusb. Restart services: sudo systemctl restart cups. For USB, try another port, avoid hubs, and check dmesg | tail. On network devices, test ports 9100 and 631 as shown earlier.
“Plugin is required” but download fails
The plugin must match the installed HPLIP version. Run hp-plugin -i and check connectivity. If the installed HPLIP is 3.24.x, don’t try to use a 3.25 plugin. If downloads keep failing, confirm DNS and proxy settings.
Printer prints blank pages or garbage characters
Usually the wrong driver or PPD. Remove and recreate the queue:
sudo lpadmin -x YOUR_PRINTER_NAME
hp-setup -i
Select the exact model PPD. Garbage text on a PostScript-less laser often means a PCL driver mismatch.
hp-setup GUI will not launch
Install the GUI package and Python Qt dependencies:
sudo apt install hplip-gui
hp-check -t
On Wayland sessions, a missing display variable over SSH is another cause. Use hp-setup -i remotely.
Permission denied on USB device
Check group membership and udev rules:
groups
sudo usermod -aG lp,lpadmin $USER
Log out and in afterward. Group changes don’t apply to existing sessions.
Scanner not found
Run scanimage -L, verify hpaio in /etc/sane.d/dll.conf, and confirm the plugin if the model needs one. Also check that the printer isn’t asleep or in an error state.
Jobs stuck in the queue
lpstat -o
sudo cancel -a
sudo systemctl restart cups
Look at /var/log/cups/error_log for the real reason. The log is clear more often than people expect.
Dependency errors during apt install
sudo apt --fix-broken install
sudo dpkg --configure -a
If a manual HPLIP install left leftovers, remove them before reinstalling the packaged version.
Python errors from hp-* tools
HPLIP’s tools depend on system Python modules. Avoid activating a virtual environment, or conda, when running them. Open a clean shell and try again.