HPLIP/ru

HPLIP (HP Linux Imaging and Printing) предоставляет драйвера для принтеров HP. Также, она включает в себя поддержку сканера и факса, а также сервисные инструменты для различных периферийных устройств различного назначения.

Действительно ли нужен HPLIP?
Использование HPLIP рекомендуется для большинства принтеров HP inkjet и laserjet. Однако, бывают устройства, работающие со стандартной установкой CUPS, которая предоставляет соответствующие драйвера или PPD файлы.

Некоторые устройства имеют возможности, которые можно использовать только когда включен бинарный плагин. Этот плагин должен быть установлен в дополнение к драйверам. Поэтому, он является необходимым, когда используются эти возможности (например, лучшее качество печати, более быстрая печать или сканирование). Для более подробной информации см. раздел бинарные плагины.

Установка
Для поддержки печатания, рекомендуется использовать новые драйвера hpcups, которые могут быть задействованы USE-флагом. Старый драйвер hpijs всё ещё включен, если HPLIP компилируется с USE-флагом.

Стандартная установка разрешает динамически генерировать PPD файлы во время выполнения. Некоторые принтеры всё же могут требовать статические PPD файлы. Если возникают проблемы с, попробуйте активировать USE-флаг  и переустановить HPLIP.

Для USB принтеров должен быть собран с USE-флагом. Таким образом он использует инструмент пользовательского пространства, который заменяет поддержку USB принтера в ядре. В случае возникновения проблем отключите USE-флаг  для  и заново активируйте функциональность в ядре.

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 the device, go to the SANE project's 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 :

Ядро
Устройства, подключённые через USB, требуют базовой поддержки USB в ядре. При использовании старого драйвера USB принтера, что означает не использовать USE-флаг  в, должны быть включены следующие опции ядра:

If preferred this driver can be enabled as module which will be called. This also makes testing the  USE flag easier as one can simply switch between the two methods by either disabling the USE flag and loading the kernel module, or enabling the USE flag and unloading the kernel module via. This saves kernel recompilations and reboots; only HPLIP needs to be recompiled for the USE flags changes to take effect. If the module should be permanently disabled, it can be blacklisted to prevent automatic loading at boot time.

Загрузите модуль ядра :

Выгрузите модуль ядра :

Добавьте модуль ядра  в чёрный список:

Устройства, подключенные через параллельный порт требуют следующих опций ядра:

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.

Программное обеспечение
Следующая таблица показывает текущие USE-флаги для :

Установите :

Принтеры и факсы
If HPLIP was installed with the  USE flag enabled, use the "HP Device Manager" to configure the devices.

Alternatively run in a terminal:

Для сетевого принтера, также укажите его IP-адрес:

После этого, перезапустите CUPS:

Сканеры
Overall, scanners should just work and will be detected with XSane, etc.

Принтер
After completing it should allow for printing a test page. This can be done later as well using the "HP Device Manager" or the CUPS web interface which is located at http://localhost:631/.

Сканер
Use and then press the preview button to ensure the scanner driver is installed and working properly.

Обновление
Every time after upgrading HPLIP it is advised to run hp-setup -r to remove all printers and configure them again as described above in the configuration section.

Бинарные плагины
There are some devices which require a binary plugin to use all functions the device provides. A list with devices requiring a 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 with or  fails, the plugin installer is available for download at the openprinting site. To install the plugin the downloaded file has to executed in a shell:

Afterwards follow the instructions of the installer similar to or.

Печать приостановлена
Проблема: Печать начинается не сразу после отправки задания печати.

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

Ошибка при установке "File "./plugin_install.py", line 78 except ImportError, e:"
Проблема: Происходит следующая ошибка:

Solution: Python 3 is set as the main python interpreter. HPLIP currently does not work correctly with Python 3. Switch to Python 2 by using to fix this.

This is further documented at

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: segmentation faults might occur 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: Lately, 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 cannot handle Postscript Level 3 output. To work around this, edit the printer's PPD file and change  to.

See which was opened in 2008 and  for more information.

SANE/XSANE not finding hpaio scanner
Problem: SANE or XSANE can still not find a hpaio-based scanner.

Solution: 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.

It may be prudent 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, so ensure that the configuration is adapted towards the newer format.

More current and relevant areas to check for resolving this specific problem: make sure the user is in the, and/or  groups of the  file. If and the HPLIP  work as root, something must be awry with permissions. If even scanning as root fails, especially with HPLIP's, check to ensure the plugin is properly installed/updated and the device is connected.

One more area to check when all of the above is set up correctly: make sure the user can read files within (specifically the  file).

When all else fails, (as provided by ) may provide more in-depth feedback, but explaining how to work with strace is out of scope for this document.

Смотрите также

 * Руководство по печати Gentoo

Внешние ресурсы

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