hp-align
Align printheads for HP printers
SYNOPSIS
hp-align [-h | --help] [-d | --device=DEVICE_URI] [-P | --printer=PRINTER] [-g | --gui] [-m | --memory] [-D | --debug[=LEVEL]] [-v | --version] [-s | --symlink] [-l | --list] [-r | --recommended] [-p | --ppd=PPD_FILE] [-b | --batch]
PARAMETERS
-h, --help
Show help message and exit.
-d, --device=DEVICE_URI
Specify device URI (e.g., hp:/usb/HP_LaserJet_... or hp:/net/OfficeJet_...).
-P, --printer=PRINTER
Specify CUPS printer name.
-g, --gui
Launch graphical alignment dialog (requires Qt).
-m, --memory
Store alignment in printer memory (default: NVRAM).
-D, --debug[=LEVEL]
Set debug logging level (0-9; default 4).
-v, --version
Print HPLIP version info and exit.
-s, --symlink
Symlink HPLIP plugin path (rarely used).
-l, --list
List available HPLIP-supported devices.
-r, --recommended
Use recommended alignment pattern.
-p, --ppd=PPD_FILE
Specify PPD file for non-HP frontends.
-b, --batch
Batch mode: no user interaction (advanced).
DESCRIPTION
The hp-align command is a utility from the HPLIP (HP Linux Imaging and Printing) package designed to align printheads on supported HP inkjet printers. Printhead alignment corrects positional offsets between color and black printheads, ensuring sharp text, vibrant colors, and streak-free prints.
Typically run after installing new printheads, refilling cartridges, or when print quality degrades (e.g., blurry text, color bleeding). The process prints a alignment pattern page; users scan it using the printer's flatbed scanner or enter values manually for non-scanner models.
In console mode, it prompts for user input on pattern deviations. GUI mode (-g) provides an intuitive interface. It supports USB, network, and CUPS printers via device URI or printer name. Alignment data is stored in printer memory or NVRAM.
Requires HPLIP installed, printer powered on, and sufficient ink levels. Run as root or with sudo for device access. Improves print quality significantly on models like Deskjet, Officejet, and Photosmart series.
CAVEATS
Requires sudo/root for device access; ensure printer has ink and is idle. Not all HP models support alignment. GUI needs hplip-gui package. Scanner required for automatic alignment on all-in-ones.
EXAMPLE USAGE
hp-align -d hp:/usb/HP_Deskjet_2130 (console align via USB).
hp-align -P HP-Deskjet-2130 -g (GUI via CUPS printer).
After printing pattern, scan or input column numbers for best alignment.
TROUBLESHOOTING
If fails: run hp-check -t for HPLIP status. Update firmware with hp-firmware. Check /var/log/hp-check.log for errors.
HISTORY
Developed by HP as part of HPLIP (first released 2005). Evolved with printer models; current in HPLIP 3.24.x (2024). Initially console-only; GUI added in HPLIP 1.7+.
SEE ALSO
hp-testpage(1), hp-print(1), hp-setup(1), hp-check(1), hp-toolbox(1)


