HPMUD udev rule should not set libsane_matched
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
HPLIP |
New
|
Undecided
|
Unassigned | ||
hplip (Gentoo Linux) |
New
|
Undecided
|
Unassigned |
Bug Description
I use both an HP printer and an Epson scanner on my Linux machine. The HPLIP package installs "/lib/udev/
The hpmud rules run first and include this line:
ATTR{idVendor}
And the iscan rules have:
ENV{libsane_
As a result, when I plug in the HP printer, the hpmud rules set libsane_matched, and then the iscan rules see the libsane_matched and set the group of /dev/bus/
I have worked around this by creating an override rule for my specific printer model, in "/etc/udev/
ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}
A better solution would be to not blindly set libsane_matched for all HP products. In fact, we probably don't need to set it at all. Its only use in the hpmud rules file is to disable USB autosuspend, so let's give it a unique name like "hpmud_
Only FYI:
I think using GROUP="scanner" by default cannot work well nowadays.
I think nowadays GROUP="lp" should be set by default both for
printers and scanners.
I think in 99-iscan.rules EPSON should also use GROUP="lp".
I think using GROUP="lp" by EPSON would also make their
all-in-one devices "just work".
Reasoning:
For all-in-one devices (i.e. printer + scanner)
the group must be "lp" so that the CUPS usb backend
which runs as user "lp" (who is member of the group "lp")
can send printing data to the printer unit.
It is sufficiently secure and reasonable easy to use by default
the same group "lp" for printers and scanners because
both kind of devices usually require physical user access
(to get the printed paper or to place a paper on the scanner)
so that both kind of devices should usually require the same
kind of security.
I think the SANE upstream default is still GROUP="scanner"
but as explained above I think nowadays this does no longer
work well and should be replaced by GROUP="lp" (even for
plain scanners to keep it simple).
Note that I only talk about the defaults.
Expert users who like separated permission settings for
plain scanners versus plain printers versus all-in-one devices
can modify the defaults as they need in their particular case.