How to Install HPLIP on Ubuntu 22.04 LTS
If the printer that used to print fine now refuses to cooperate after a system update, installing the HP Linux Imaging and Printing (HPLIP) driver can be your quick fix. This guide walks through the process on Ubuntu 22.04 LTS so you’ll get back to printing without hunting through forums.
Why HPLIP Matters
HP printers ship with generic drivers that cover basic text prints, but for duplexing, scanning, or high‑resolution photo mode you need the full driver bundle. Without it, those features stay locked behind a gray “unsupported” banner in the print dialog.
Step 1: Add the HP Repository
Open a terminal (Ctrl‑Alt‑T) and add HP’s official repository so you can grab the latest stable package:
sudo apt update
sudo apt install software-properties-common
sudo add-apt-repository ppa:hp-linux-firmware/ppa
The repository ensures you get the newest HPLIP release, which already includes fixes for 22.04’s kernel.
Step 2: Install HPLIP
Now pull in the driver and its utilities:
sudo apt update
sudo apt install hplip hplip-gui
hplip-gui is optional if you prefer command‑line tools, but it makes the “HP Device Manager” handy for troubleshooting.
Step 3: Verify the Installation
Run hp-setup. It launches a wizard that scans for connected HP devices:
hp-setup
If your printer shows up, follow the prompts to install the device. If the wizard says “No printers found,” double‑check the USB cable or ensure the network printer is reachable.
Step 4: Check Driver Version
After installation, confirm you’re on a supported version:
hp-info -v | grep "HPLIP"
You should see something like hplip-3.28.10. If it’s older than that, run:
sudo apt upgrade hplip
Common Pitfall: Conflicting Old Driver Packages
Ubuntu sometimes leaves a legacy HPLIP package from a previous release (e.g., hplip-0.94). These older packages can clash and cause the wizard to misbehave or print errors like “device not found.” Removing them clears the path:
sudo apt remove hplip-0.94
Then reinstall as shown above.
Real‑World Scenario
After a recent kernel upgrade, a user noticed that scanning stopped working while printing still worked. Installing HPLIP from the HP repository restored the scan feature because the new driver includes updated libusb bindings compatible with the newer kernel.
Final Touches
Once the device is configured, test each function—print a PDF, try duplex, and run a scan. If you hit a snag, check /var/log/hplip.log for clues; often it’s just a permission issue that can be solved with:
sudo adduser $(whoami) lpadmin
That grants print‑server access without touching your entire user profile.