HAL deprecated, replaced by udev

Bug #401091 reported by Till Kamppeter
This bug affects 1 person
Affects Status Importance Assigned to Milestone

Bug Description

HAL (Hardware Abstraction Layer) is deprecated. It is replaced by udev. HPLIP uses HAL to mark HPLIP-supported printers as having the scanner capability so that HAL opens access to their low-level USB device files (/dev/bus/usb/*/*) for the user currently logged in to the desktop.

Now udev rules have to take over this responsibility. For that upstream udev has now the rule


in /lib/udev/rules.d/70-acl.rules. This makes the ACLs for access of the non-printing functions by normal users being set for devices which are marked as HPLIP-supported.

HPLIP now only need to mark the supported devices with its own udev rules, for example with rules like this:

ACTION!="add", GOTO="hpmud_rules_end"
SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", GOTO="pid_test"
SUBSYSTEM!="usb_device", GOTO="hpmud_rules_end"


ATTRS{idVendor}=="03f0", ATTRS{idProduct}=="??11", GROUP="lp", ENV{ID_HPLIP}="1"



The complete 40-hplip.rules is attached.

Can you ship these rules with HPLIP? They will work for all distributions as the new rule in 70-acl.rules is already implemented in udev upstream.

Revision history for this message
Till Kamppeter (till-kamppeter) wrote :
Revision history for this message
Johannes Meixner (jsmeix) wrote :


A note when you revise the HPLIP udev rules regarding LABELs:

... GOTO="pid_test"

... GOTO="hpmud_pid_test"

Having unique labels in all udev files on the whole system is crucial.
The reason is that all udev files are concatenated to one single
big blob of data wherein all labels must be unique.
Otherwise GOTO="ambiguous_label" would jump to an
arbitrary LABEL="ambiguous_label" target.
Therefore one must make sure with appropriate name prefixes
that all labels in all udev files are unique.
Perhaps nowadays there might be this or that subtle exception
from the general rule but to be on the safe side, I recommend
to use appropriate name prefixes in any case.

Welcome to the hell of udev/HAL!

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers