[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Scanner stopped working



On Thu, 03 Feb 2011 19:55:48 -0800
Marc Shapiro <marcnshap@gmail.com> wrote:

> I have an Epson Stylus 7450 All-In-One type printer.  The last time
> that I tried to scan anything, a few months ago, everything worked
> just fine. I did my scanning from within the GIMP.  Yesterday, when I
> tried to scan a document, it would not work.
> 
> When I select (from the GIMP main menu):
> 
> 	File/Acquire/xscanimage/epkowa:libusb:004.003
> 
> I get a popup window with the message:
> 
> 	Failed to open device 'epkowa:libusb:004.003'. Invalid
> argument.
> 
> The only option is a large 'OK' button, which causes the window to
> close and does nothing else.
> 
> I remember having trouble getting the correct udev rules to get the 
> scanner working in the first place.  I don't think there were any
> rules for the Vendor/Product combination.  When I just ran grep in
> the /etc/udev/rules.d directory, however, looking for the product
> number, I get the following results:
> :/etc/udev/rules.d$ grep 0838 *
> z60_libsane-extras.rules:SYSFS{idVendor}=="04b8", 
> SYSFS{idProduct}=="0838", MODE="0664", GROUP="scanner", 
> ENV{libsane_matched}="yes"
> z60_libsane.rules:SYSFS{idVendor}=="04b8", SYSFS{idProduct}=="0838", 
> MODE="664", GROUP="scanner"
> z60_libsane.rules:#SYSFS{idVendor}=="04b8", SYSFS{idProduct}=="0838", 
> MODE="664", GROUP="scanner", ENV{libsane_matched}="yes"
> z60_libsane.rules.dpkg-new:SYSFS{idVendor}=="04b8", 
> SYSFS{idProduct}=="0838", MODE="0664", GROUP="scanner", 
> ENV{libsane_matched}="yes"
> 

From udev man page:

 Files in
       /etc/udev/rules.d/ have precedence over files with the same name
in /lib/udev/rules.d/

So if I were you I would create a file in /etc/udev/rules.d/  for your
scanner. I use 10-local.rules.  Once you get it right, you won't have
to mess with it again and it should override the system match.

Here's what I have for my scanner for example:

KERNEL=="sg[0-9]*", ATTRS{type}=="3", ATTRS{vendor}=="EPSON",
ATTRS{model}=="GT-9700", MODE="0664", GROUP="scanner",
ENV{libsane_matched}="yes"

To find out which rules to use : connect the scanner and run (as root):

udevadm info --name=/dev/DEVICENAME --attribute-walk

you can find out what /dev/DEVICENAME is by looking at dmesg.

What I haven't quite figured out is how to figure out that a rule
matched.

The other think to figure out is if you need to add a symlink for the
scanner so that it always shows up at the same place.  I did NOT do
that, but it seems to work fine.

HTH

Brian


Reply to: