HPLIP

HPLIP (HP Linux Imaging and Printing) provides printer drivers for HP devices. It also includes scanner, fax support as well as service tools for various multi-purpose peripherals.

Is HPLIP required
Using HPLIP is recommended for most HP inkjet or laserjet based printers. There may however be devices which work with a default CUPS install, which provides adequate drivers or PPD files.

For some devices the driver is needed because a binary plugin which is installed with the driver is required to be able to use all features of the device (i. e. printing or scanning is not possible without the plugin), to achieve a better printing quality or to speed up printing. See the binary plugins section for more information.

Installation
For printing support, it is recommended to use the new hpcups driver, which you can enable with the  USE flag. The old hpijs driver is still included when you build HPLIP with the  USE flag.

The default install enables dynamically generated ppd files at runtime. Some printers may still require static ppd files. If you encounter problems when using try enabling the   USE flag and rebuild HPLIP.

For USB printers has to be built with the   USE flag. This way it makes use of the user space tool which replaces kernel usb printer support. In case of problems you can disable the  USE flag for  and activate the kernel functionality again.

To be able to set up a network printer has to be built with USE   or. The 1.6 series of has dropped slp support and one can choose to build it with USE   or. To be able to print on a network printer HPLIP needs to be built with USE.

For some scanner devices the appropriate sane backend needs to be activated. To find out which backend is required for your device go to the sane projects driver search engine and search for 'HEWLETT-PACKARD' as manufacturer. This provides a list of all supported devices including the required backend. For instance if the device needs the hp backend the following must be added to the portage configuration to build it when installing :

Kernel
USB port connected devices require basic kernel USB support. When using the old kernel USB printer driver which means not using the  USE flag on  the following kernel options must be set:

If preferred this driver can be enabled as module which will be called usblp. This also makes testing the  USE flag easier as one can simple switch between both methods by either disabling the USE flag and load the kernel module or enable the USE flag and unload the kernel module via. This saves kernel recompilations and machine restarts and only HPLIP needs to be recompiled for the USE flags changes to take effect. If the module should permanently disabled it can be blacklisted to prevent automatic loading at boot time.

Load the usblp kernel module:

Unload the usblp kernel module:

Blacklist the usblp kernel module:

Parallel port connected devices require the following kernel options:

The above two methods are usually already enabled within most kernels.

Network connected devices do not require special kernel drivers but basic kernel network support.

Software
Install :

Printers and faxes
If installed with enabled  USE flag, use the "HP Device Manager" to configure your devices.

Alternatively you can run in a terminal:

For network printer also specify the printer's IP address:

Afterwards you should restart the CUPS daemon:

Scanners
Overall, scanners should just work and will be detected with XSane etc.

Printer
After completing you should be provided with the option of printing a test page. You can do this later using the "HP Device Manager" or the CUPS web interface which is located at http://localhost:631/.

Scanner
Use and then press the preview button to ensure the scanner driver is installed and working properly.

Upgrading
Every time when upgrading HPLIP run hp-setup -r to remove all printers and configure them again as described above in the configuration section.

Binary plugins
There are some devices which require a binary plugin to use all functions the device provides. A list with devices requiring the binary plugin including the reasons why it is needed is available at the project's homepage. Gentoo currently does not support the binary plugin. however tries to automatically install the plugin. The installed files are out of portage's control and are located under, and. For installing just the plugin without configuring printer queues is available. If installing the plugin fails with or  the plugin installer is available for download here. To install the plugin the downloaded *.run file has to executed in a shell:

Afterwards follow the instructions of the installer similar to or.

Printing paused
PROBLEM: Printing does not immediately start after submitting a job.

SOLUTION: Check the CUPS printer administration interface and make sure the printer is not in a paused state.

Error on install "File "./plugin_install.py", line 78 except ImportError, e:"
PROBLEM: A snipping of the error follows.

SOLUTION: Python 3 is set as main python interpreter. HPLP currently does not work correct with Python 3. Switching back to Python 2 by using eselect python fixes this.

This is further documented at the

HPLIP ebuild upgrades do not upgrade binary plugin(s)
PROBLEM: The HPLIP ebuild itself does not upgrade the binary plugin(s) when the ebuild is upgraded. A symptom of this problem, you may get segfaults when starting XSane. (i.e. The HP LaserJet M1522nf requires a binary plugin for using the scanning feature.)

SOLUTION 1: Following the upgrade instructions should take care of this as tries to upgrade the plugin. If there are still problems HPLIP comes with which can be used for installing the plugin. As a last resort one can download the plugin from OpenPrinting and install it manually.

SOLUTION 2: As of lately, also running (with HPLIP built with the   USE Flag) via a user terminal will eventually auto detect the version conflict of the binary part of the installed driver and ask the user to automatically upgrade, including issuing a prompt for the root password via a qt4 widget prompt.

Printing weird characters
PROBLEM: The printout contains weird looking characters.

SOLUTION: The printer likely can not handle Postscript Level 3 output. To work around, the printer's PPD file needs to be edited by replacing '*LanguageLevel: "3"' with '*LanguageLevel: "2"'.

See which was initially opened in the year 2008 and  for more information.

SANE/XSANE not finding hpaio scanner
First some history, if I'm correct on the sane-backend for accessing HPLIP hpaio devices.

SANE/XSANE  or  used to require   or the   USE Flag. Currently, the 'hp' sane-backend appears no longer needed for accessing HPLIP hpaio devices. Also, if no  devices are specified within the, almost all sane-backend devices are compiled by default during compilation of  package. This appears to go against the main purpose of the USE flag function and inhibits a very long compilation on x86 platforms. So it may be privy to still insert  (or at least some driver even though it is not needed) within the  file or within the package USE Flags. There also used to be an older  format as well, so ensure you've updated to the newer format.

More current and relevant areas to check for resolving this specific problem, check and make sure the user is within the scanner, and/or  groups of the /etc/groups file. If and the HPLIP  works as root, something must be awry with permissions! If you cannot even scan as root, especially with HPLIP's, check to ensure the plugin is properly installed/updated and the device is connected.

One more area to check and you know you likely have all your group permissions correct by performing test file writes, and you're able to scan as root but still not as a user; make sure files within the folder (more specifically the  file) are able to be read as a user!

When all else fails, (i.e. ) is your friend and may further help.

External resources

 * HPLIP at launchpad
 * Lauchpad bug tracker
 * Launchpad answers
 * Troubleshooting section of the HPLIP knowledge database