reassign 730539 hplip
tags 730539 patch
thanks
Lawrence Woodman <[email protected]> writes:
>> Can you remove the scanner device, and reinsert it while running
>>
>> strace -o /tmp/udev-strace.out -f -p UDEVDPROCESSID
>>
>> where, of course, UDEVDPROCESSID is the pid of udevd, and send
>> /tmp/udev-strace.out. I have three udevd's running on my system, though,
>> and I'm not sure why or which one does what...
>
> I only have the one udevd and have attached the output of this command.
The problem is that the "hp-config_usb_printer" command is taking too
long, and udevd kills the worker handling the device insertion, so it
never gets to the part of the udev rules that allow access by the
scanner group or, for that matter, the active console user. See
<https://bugs.launchpad.net/hplip/+bug/1185866> for more details.
A fix given there is to modify "/lib/udev/rules.d/56-hpmud.rules" to
change
/usr/bin/hp-config_usb_printer $env{BUSNUM}:$env{DEVNUM} ; fi
to
/usr/bin/hp-config_usb_printer $env{BUSNUM}:$env{DEVNUM} >/dev/null 2>&1
</dev/null & fi
Patch from Gentoo attached.
--
Mark Buda <[email protected]>
I get my monkeys for nothing and my chimps for free.
--- data/rules/56-hpmud.rules 2013-11-30 10:17:19.113763341 +0100
+++ data/rules/56-hpmud.rules 2013-11-30 10:18:53.530770075 +0100
@@ -12,7 +12,7 @@
# This rule will add the printer and install plugin
-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'"
+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} >/dev/null 2>&1 </dev/null & fi'"
# If sane-bankends is installed add hpaio backend support to dll.conf if needed.
ENV{sane_hpaio}=="yes", RUN+="/bin/sh -c 'grep -q ^#hpaio /etc/sane.d/dll.conf;if [ $$? -eq 0 ];then sed -i -e s/^#hpaio/hpaio/ /etc/sane.d/dll.conf;else grep -q ^hpaio /etc/sane.d/dll.conf;if [ $$? -ne 0 ];then echo hpaio >>/etc/sane.d/dll.conf;fi;fi'"