Comment 1 for bug 1185866

Revision history for this message
Timothy E. Harris (timkb4cq) wrote :

After a further look, I see it's a section in hp-config_usb_printer designed to remove unused printer queues - but it takes 1min 5 sec (12 loops with a wait 5 in each) to finish and it blocks udev - at least until udev times it out.

Using nohup to keep it from blocking udev seems to work - printer is set up correctly, log file in /var/log/hp looks right & udev doesn't hang anymore.

Patch to /lib/udev/rules.d/56-hpmud.rules

15c15
< ENV{hp_test}=="yes", PROGRAM="/bin/sh -c 'logger -p user.info loading HP Device $env{BUSNUM} $env{DEVNUM}'", RUN+="/bin/sh -c 'if [ -f /usr/bin/systemctl ]; then /usr/bin/systemctl --no-block start hplip-printer@$env{BUSNUM}:$env{DEVNUM}.service; else /usr/bin/hp-config_usb_printer $env{BUSNUM}:$env{DEVNUM}; fi'"
---
> ENV{hp_test}=="yes", PROGRAM="/bin/sh -c 'logger -p user.info loading HP Device $env{BUSNUM} $env{DEVNUM}'", RUN+="/bin/sh -c 'if [ -f /usr/bin/systemctl ]; then /usr/bin/systemctl --no-block start hplip-printer@$env{BUSNUM}:$env{DEVNUM}.service; else /usr/bin/nohup /usr/bin/hp-config_usb_printer $env{BUSNUM}:$env{DEVNUM}; fi'"