Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 193266 - udev rules cause multifunction printer to become inaccesible for printing
Summary: udev rules cause multifunction printer to become inaccesible for printing
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Printing (show other bugs)
Hardware: All Linux
: High normal
Assignee: Printing Team
URL:
Whiteboard:
Keywords:
: 215241 (view as bug list)
Depends on:
Blocks: 192507
  Show dependency tree
 
Reported: 2007-09-21 00:06 UTC by Joshua Clayton
Modified: 2008-04-08 19:31 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
the resuls of running udevinfo -a --name=/dev/usb/lp0 (udevinfo.log,3.01 KB, text/plain)
2007-09-26 01:13 UTC, Joshua Clayton
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Joshua Clayton 2007-09-21 00:06:21 UTC
The printer model I own is a Canon CX3200.
because it is both a printer and a scanner, there are multiple conflicting udev rules for it.
in the end udev rules change the permissions of /dev/usb/lp0 to
crw-rw---- 1 root scanner
which means that CUPS (or other non-root printing programs) cannot access the device.

My personal fix was to change 99-libsane.rules thus:
# EPSON CC-570L | EPSON Stylus CX3100 | EPSON Stylus CX3200 | Epson CX-3200
ATTRS{idVendor}=="04b8", ATTRS{idProduct}=="0802", MODE="666", GROUP="scanner"

so the MODE is "666"6 instead of "660"

I was unable to correct this with out changing udev rules.  i even tried making lp a member of the scanner group.

I am certain my model can't be the only one affected by this issue

Reproducible: Always

Steps to Reproduce:
1.  plug in Multifunction Printer
2.  check owner, group and permissions on /dev/usb/lp0
3.  Try to print.  CUPS can see the printer and reports it is ready, but no jobs ever get printed

Actual Results:  
pterodactyl ~ # ls -l /dev/usb/lp0
crw-rw-rw- 1 root scanner 180, 0 2007-09-20 17:21 /dev/usb/lp0

CUPS never prints.


Expected Results:  
either permission crw-rw-rw-  OR  owner root:lp crw-rw----

and cups able to print

This bug make hardware that functions with CUPS nonfunctional as soon as you emerge any sane variant.
Comment 1 Matthias Schwarzott gentoo-dev 2007-09-25 11:32:35 UTC
Please attach
1. udevinfo -a --name=/dev/usb/lp0
2. emerge --info
3. The version numbers of udev and libsane.
Comment 2 Doug Goldstein (RETIRED) gentoo-dev 2007-09-25 14:37:37 UTC
It looks like a SANE issue to me... CCing the SANE maintainer
Comment 3 Joshua Clayton 2007-09-26 01:13:40 UTC
Created attachment 131912 [details]
the resuls of running udevinfo -a --name=/dev/usb/lp0
Comment 4 Joshua Clayton 2007-09-26 01:20:53 UTC
media-gfx/sane-backends-1.0.18-r4
media-gfx/xsane-0.994
sys-fs/udev-114
net-print/cups-1.2.10-r1
Comment 5 Matthias Schwarzott gentoo-dev 2007-09-26 07:56:02 UTC
(In reply to comment #4)
> media-gfx/sane-backends-1.0.18-r4
> media-gfx/xsane-0.994
> sys-fs/udev-114
> net-print/cups-1.2.10-r1
> 
Well, the rules sane-backends-1.0.18-r4 installs here begin like this:
+ ACTION!="add", GOTO="libsane_rules_end"
This matches on add event.

+ SUBSYSTEMS=="scsi", ATTRS{type}=="6", MODE="660", GROUP="scanner"
This does not match.

+ SUBSYSTEM!="usb|usb_device", GOTO="libsane_rules_end"
This matches on our lp0 device, as it also has SUBSYSTEM==usb :(


Looking at package iscan gives an idea how to solve this. Please add this rule after the SUBSYSTEM check:
KERNEL=="lp[0-9]*", GOTO="libsane_rules_end"
Comment 6 Matthias Schwarzott gentoo-dev 2007-09-26 19:25:47 UTC
Does this rule also work (instead of the one from Comment #5):
SUBSYSTEM=="usb", ENV{DEVTYPE}!="usb_device", GOTO="libsane_rules_end"
Comment 7 Joshua Clayton 2007-09-29 15:25:50 UTC
inserted the line in comment 6 at the end of the other SUBSYSTEM rules.

Works for me.

pterodactyl daddio # ls -l /dev/usb
total 0
crw-rw---- 1 root lp 180, 0 2007-09-29 08:01 lp0


Both CUPS and xsane work after running udevstart
THANKS!
Comment 8 Matthias Schwarzott gentoo-dev 2007-10-05 07:32:41 UTC
Added sane-backends-1.0.18-r5 that contains this fixed rule.
Comment 9 Timo Gurr (RETIRED) gentoo-dev 2008-03-31 09:29:53 UTC
*** Bug 215241 has been marked as a duplicate of this bug. ***
Comment 10 Sébastien Benoit 2008-03-31 16:55:29 UTC
As I pointed out in  https://bugs.gentoo.org/show_bug.cgi?id=215241, it is also possible to add the line Group scanner in /etc/cups/cupsd.conf to force CUPS to send print jobs with the "right" permissions.  If you want to wait for sane-backends-1.0.18-r5 to be marked as stable or don't want to edit udev rules, it is a very quick workaround.
Comment 11 Sébastien Benoit 2008-04-08 19:31:56 UTC
As sane-backends-1.0.18-r6 is now marked sable, I report here that it works for me.