SDB:How to set-up a HP printer

Jump to: navigation, search
HPLIP
Download for openSUSE


Developer: HPLIP - HP Linux Imaging and Printing
License: GNU General Public License (GPL) v2; MIT license; BSD license (Licensing information)
Web: https://developers.hp.com/hp-linux-imaging-and-printing

This article will show an easy way how to install HP (Hewlett-Packard) printers and all-in-one devices (with fax and scanner) with the HPLIP software. An other way would be via YaST → Printers.
As installing and using a HP printer is the most important purpose of HPLIP this article is also the article about the application HPLIP (HP Linux Imaging and Printing System).

This article is for CUPS up to version 2.x under Linux with the traditional filtering system and backends there.

The nowadays driverless printing workflow is rather different.

Needed Software

Open YaST's Software Management and make sure HPLIP is installed. The hplip packages are included in the default repositories ("OSS" or "Update"). Nowadays by default only the plain HPLIP printer drivers (HPCUPS and HPIJS) and the scanner driver (HPAIO) in the packages hplip-hpijs and hplip-sane are installed (like other plain printer drivers and scanner drivers) but not the full HPLIP software with all its graphical tools and other HP-specific optional software in the hplip main package. When you have a HP printer, you may like to install the hplip main package to use HP-specific software like HP's printer setup tool "hp-setup" and HP's desktop application "hp-toolbox" (the HP Device Manager).

If you have a brand-new HP printer and before you buy one verify on the HPLIP upstream supported printers page at https://developers.hp.com/hp-linux-imaging-and-printing/supported_devices/index that your particular model is actually supported (see also "HP printers" at SDB:Printer buying guide). If it is supported check what HPLIP minimum version is required. If needed you may have to search for more recent hplip packages on the openSUSE buildservice e.g. via http://software.opensuse.org/search?q=hplip (see also "Version upgrades for printer driver packages" at SDB:Installing a Printer). Select your openSUSE version for the search in the infobox above.

Newer hplip packages are usually in the "Printing" repository. You could take a look at how to add package repositories in the SDB. The PackMan repository may provide newer hplip packages as well.


Some devices require a proprietary HPLIP plugin

Several HP printers that are supported by HPLIP require a non-free driver software "plugin" (i.e. proprietary software and firmware) from HP for HPLIP (cf. SDB:Printer buying guide). Because the plugin is non-free software it cannot be provided in the free software HPLIP. The plugin must be downloaded from HP and installed on the computer when needed. The plugin is only available for the x86_64 architecture.

It is recommended to use the hp-setup tool from the hplip package to set up HP devices that need the proprietary plugin. Alternatively, modern network printing devices that support the AirPrint protocol can be set up in CUPS driverless mode without using the HPLIP software at all.

A list of HP devices that require HP's proprietary HPLIP plugin (unfortunately, not up-to-date) is available at https://developers.hp.com/hp-linux-imaging-and-printing/binary_plugin.html. As of 2024, printing is possible on most recent HP devices without the plugin, with the notable exception of the "Color Laserjet Pro MFP" series. But for scanning, most recent HP multifunction devices require the binary plugin. Again, AirScan-compatible devices may work with the open source sane-airscan driver, without using the HPLIP package at all.

Firmware upload interferes with normal printer usage

Some HP USB printers (e.g. HP LaserJet 1018) need first and foremost firmware upload when switched on. Those devices show up at the USB as regular USB printers but as long as those devices do not have their specific firmware they do not behave as regular USB printers. All they can do without firmware is receiving firmware and if they receive something else they basically "hang up".

The firmware is provided by the proprietary HPLIP plugin and gets uploaded to the printer (by udev via 56-hpmud.rules) when the printer appears at the USB (i.e. when the printer is connected to the computer via USB and switched on).

When a HP USB printer that needs firmware upload is switched on and there are already pending print jobs, the pending jobs will be sent to the printer (because it shows up at the USB as if it was regular USB printer) but that interferes with the firmware upload. Thus if you use a HP printer that needs firmware upload, ensure there are no pending print jobs before you switch on the printer (plain "cancel -a" removes all pending print jobs from all print queues).

Firmware upload interferes with automatic printer configuration utilities like udev-configure-printer. Thus if you use a HP USB printer that needs firmware upload, the udev-configure-printer package should be uninstalled. See bug#1151174

The plugin version must match the HPLIP version

Because the HPLIP plugin is not installed as RPM package but via a separated and different method it is possible to do a HPLIP version upgrade via RPM packages without doing an automated matching HPLIP plugin upgrade (because there cannot be RPM dependencies in this case). Therefore after a HPLIP version upgrade via RPM packages one must manually also upgrade the HPLIP plugin (if a plugin is used). The installed HPLIP plugin version is listed in /var/lib/hp/hplip.state and the version there must match the version of the installed HPLIP RPM packages. Otherwise things could fail in arbitrary and possibly inexplicable and obscure ways. See bug#1187232

HPLIP installs firmware and plugin files into various directories like

/usr/share/hplip/data/firmware
/usr/share/hplip/data/plugins
/usr/share/hplip/prnt/plugins
/usr/share/hplip/scan/plugins
/usr/share/hplip/fax/plugins

cf. comment 14 in bug#1187232

Setting-up

Terminal initiation

Open a terminal (see: SDB:What is a console), write

su - -c "hp-setup"

and push the "ENTER" tab.

This will ask for the 'root' password of your system and then start the graphical installer which will guide you through the installation process.

For more details you may take a look at the documentation at the HPLIP project like https://developers.hp.com/hp-linux-imaging-and-printing/downloads

Initiation via "hp-toolbox"

An other way to begin the same graphical installer is to start the application "hp-toolbox" (the HP Device Manager).

Once your printer is installed, you can also use this to add additional hp printers to your printer list.

Initiation via YaST printer module

Since openSUSE 11.3 you can launch the same graphical installer from the YaST printer module via the buttons "Add" and then "Run hp-setup".

Special Cases

Printer connected via network (LAN or WLAN)

When you install a HP printer that is connected to your computer via network (LAN or wireless LAN) you may need the IP address of your printer. The easiest way to get that information will be via your printer's setup menu.

To set up HP network printers, some knowledge of network setup is required. The best way of setting up the printer's IP address is to specity a fixed IP address in the printer (like with servers in a network because a network printer is a server that provides a printing service). This can be done either from a direct USB cable connection to the printer or via the printer's setup menu.

Network Printer Setup:
1. From the hp-setup menu choose the option "Network/Ethernet..."
2. Click the "Show Advanced Options" button, check the "Manual Discovery" checkbox and enter the printer's IP address
3. Click "Next" and continue setting up the printer as described above

Troubleshooting

As a workaround it may help to temporarily disable the firewall for network printers to be found. Once the printer has been found and added, the firewall should be re-enabled. The right solution is to properly set up networking and firewall. For more information see SDB:CUPS and SANE Firewall settings in particular the section "What is Specific Regarding Firewall Setup for Printing".

Make sure that the packages which provide the HPLIP software come from one same repository (i.e. do not mix packages from PackMan with those from openSUSE). You can check the repository of the package in Versions tab of YaST's software management. openSUSE provides HPLIP in the packages hplip and hplip-hpijs and since openSUSE 12.1 additionally in the package hplip-sane. PackMan provides HPLIP in the packages hplip and hplip-hpcups.

If it works for root but not as normal user, the usual reason is that your user account has insufficient permissions to access the device. By default the device file should be owned by root and belong to the group lp according to the udev rules for HP USB devices. To determine the device file, run "lsusb" and remember bus and device number for your device. The matching device file is "/dev/bus/usb/<bus-number>/<device-number>".
A workaround is to add the required user account to the 'lp' group via YaST → Security and users. Alternatively have a look at SDB:Configuring Scanners in particular the section "USB scanner access permissions via udev".

For HP all-in-one USB devices there is a special complication in the udev rules because HP all-in-one devices have additional udev rules from the sane-backends package to set read/write permissions via ACL (run "getfacl /dev/bus/usb/<bus-number>/<device-number>" to show them) for the one normal desktop user who is currently logged in locally (i.e. logged in via graphical XDM/Kdm) so that the currently logged in desktop user gets sufficient permissions to use the scanner unit as normal user.

The rules from the hplip package are in /etc/udev/rules.d/55-hpmud.rules and the udev rules from the sane-backends package are /etc/udev/rules.d/55-libsane.rules which are set after /etc/udev/rules.d/55-hpmud.rules so that entries in /etc/udev/rules.d/55-libsane.rules could overwrite settings in /etc/udev/rules.d/55-hpmud.rules. Since some time the udev rules in the hplip package are in /etc/udev/rules.d/56-hpmud.rules so that they are set after the udev rules from the sane-backends package.

In general regarding issues with HPLIP:

In general we (i.e. openSUSE) distribute the various printer driver packages from the various upstream projects but we do not develop printer drivers so that usually we cannot do anything when a particular printer driver does not work. In particular usually we cannot reproduce issues with printer drivers.

In case of issues with printer drivers see SDB:How to Report a Printing Issue for basic tests and basic operations how to diagnose the cause of an issue.

If things do not work with HPLIP, additionall run "hp-check -r" in a terminal to track the issue.

In case of issues with HPLIP please report them directly to HP as described at

https://developers.hp.com/hp-linux-imaging-and-printing/about

When at the HPLIP upstream web page https://developers.hp.com/hp-linux-imaging-and-printing/supported_devices/index it is listed that your particular printer model is supported but it does not work for you with the HPLIP version that we provide in an openSUSE release you should check if a newer version is already available and try out if the newer version may work for your particular model, see "Version upgrades for printer driver packages" at SDB:Installing a Printer.

I.e. before you report an issue to the driver authors at the HPLIP upstream project you may have to upgrade the hplip RPM packages to the one from the openSUSE "Printing" project and verify that the issue also happens with the currently latest HPLIP release.

See also

Other pages

The Printing Portal

YaST Printer (openSUSE's standard printer installation)

SDB:Configuring Scanners

Printers, Section: Hewlett-Packard in the Hardware Compatibility List

Links from Novell and openSUSE

Novell's Bugzilla: Search in Bugzilla for resolved and unresolved bugs (you may refine the search for your openSUSE version)

The openSUSE forums: Search for threads that were manually tagged with hplip or use the advanced search.

Other external links

HP Linux Imaging and Printing (HPLIP) https://developers.hp.com/hp-linux-imaging-and-printing (external links in the text go to subpages of this HPLIP project)