HP Printer Rules

Posted by zbrom on June 29, 2021 · 1 min read

When I initially installed Arch Linux, I had some difficulty configuring my HP USB printer to properly work. Everyone said it would be easier to simply use it as a network printer, but I was persistent and eventually got it working. One of the final steps needed for the printer to be detected was to modify the 50-udev-default.rules file to give the printer permission to access the USB bus. Much of this tutorial may be outdated, therefore I am including it under the Misc category.

Make sure you first have the hplip package installed, which provides the appropriate drivers for HP printers.

pacman -S hplip

Modify /lib/udev/rules.d/50-udev-default.rules to comment out the line with MODE=”0664″ and make it MODE=”0666″ for the libusb section.

nano /lib/udev/rules.d/50-udev-default.rules

This suppresses most of the messages that looked like this when running xsane:

libusb couldn't open USB device /dev/bus/usb/001/001: Permission denied.

libusb requires write access to USB device nodes.

After applying this mod, a reboot is typically required; your 50-udev-default.rules files should look like this:

#libusb device nodes

#SUBSYSTEM==”usb”, ENV{DEVTYPE}==”usb_device”, NAME=”bus/usb/$env{BUSNUM}/$env{DEVNUM}”, MODE=”0664″

SUBSYSTEM==”usb”, ENV{DEVTYPE}==”usb_device”, NAME=”bus/usb/$env{BUSNUM}/$env{DEVNUM}”, MODE=”0666″

Additionally, make your user a member of the lp group.