[sane-devel] Help needed diagnosing strange failure to scan with Samsung SCX-4500W

Thorsten Müller t.mueller at die-apis.de
Thu Jun 13 13:26:46 UTC 2013


Hello,

> I made a typo in my last post which I will correct below:
> > I am wondering now about udev more than libusb -
> > 
> > In /lib/udev/rules.d/53-sane.rules
> > 
> > there is a rule for the scanner:
> > 
> > # Samsung SCX-4500W
> > ATTRS{idVendor}=="04e8", ATTRS{idProduct}=="342b", MODE="0664",
> > GROUP="scanner", ENV{libsane_matched}="yes"
> > 
> > and I amended the rule that I have in
> > /etc/udev/rules.d/70-printers.rules
> > 
> > # Samsung SCX-4500W
> > #ATTRS{idVendor}=="04e8", ATTRS{idProduct}=="342b", MODE="0664",
> > GROUP="scanner", ENV{libsane_matched}="yes"
> 
> The lines that are active in the 70-printers-rules file are not the
> above two but:
> # Samsung SCX-4500W printer MFP
> ATTR{idVendor}=="04e8", ATTR{idProduct}=="342b", MODE:="0664",
> GROUP:="lp", ENV{libsane_matched}:="yes"
> 
> This MFP printer was previously in use up to 6 months ago with both
> the
> printer and scanner functions working without any need to tinker on a
> desktop computer running Fedora F16 which was using udev although of
> course in the interim both udev as well as the kernels and systemd
> have been updated significantly since then, and this is now connected
> to an arch linux system.
> 
> However I do wonder if there is a way to get the udev rules changed so
> that the two functions of this device can work alongside each other. 
> If this can be resolved then it may well also lead to a solution for
> your camera multifunction problem also.

I don't know if your problem still exists since it's about a month back 
you wrote about it, but I did not find any post regarding a solution.

Since the automagic setup by your distro's predefined udev rules seems 
to fail, we have to force udev doing our biding.

First, comment out the above line in 70-printers-rules.
Second, create a file /etc/udev/rules.d/99-samsung-scx4500w.rules

Third, add the follwing lines to the newly created file:

--- Start here ---
# ACL settings for Samsung SCX-4500W printer MFP
ATTR{idVendor}=="04e8", ATTR{idProduct}=="342b", GOTO="samsung"
GOTO="samsung_end"

LABEL="samsung"
RUN+="/bin/setfacl -m g:scanner:rw -m g:lp:rw $env{DEVNAME}"
TEST=="/var/run/ConsoleKit/database", \
	RUN+="udev-acl --action=$env{ACTION} --device=$env{DEVNAME}"

LABEL="samsung_end"
--- Stop here ---

You can copy and paste the aboce lines. That should set the permissions 
for your multi function device so that sane, cups and your logged in 
users have complete access. Unplug and plug in again and see if that 
works.

Greetings
Thorsten



More information about the sane-devel mailing list