Mailinglist Archive: opensuse (4547 mails)

< Previous Next >
Re: [SLE] Scanning problem in 9.1
  • From: Jason <jglane@xxxxxxxxxxxxxxx>
  • Date: Sun, 9 May 2004 23:31:23 +0100
  • Message-id: <200405092331.23559.jglane@xxxxxxxxxxxxxxx>
Hi,

Sorry about the longish reply, but I've just been through this with trying to
get my film scanner working as a normal user. Strangely my Epson 1640SU works
fine configured using YaST, and survives the reboot.

On Sunday 09 May 2004 12:53, Keith Powell wrote:
<snip>
> However, the main problem I have found is that I can't get my Epson 1240U
> scanner to work. SUSE 9.0 found it and it worked perfectly.

The scanner kernel module is no more -- I've been having a few fun and games
getting my head around how things are done in 9.1, kernel 2.6...

> If I run xsane or xscanimage, they can't find the scanner. So I have set it
> up with YAST (installation didn't find it!). If I run xsane as a user, it
> still can't find the scanner. However, using a terminal and ignoring all
> the error messages, if I run xsane as ROOT, it runs and scans. After that,
> I can run it as a user until I shut down the computer. When I start the
> computer again, I have to run xsane as ROOT again before I can run it as a
> user. Very frustrating!

This is most likely a permissions problem in the /sys/bus/usb virtual
filesystem managed by hotplugging - permissions aren't set when the scanner
is detected by hotplug. Root only has read/write access to the 'file' that's
created there. There's some info about how this works at:
http://www.freecolormanagement.com/sane/libusb.html

> I have re-installed 9.1 three times, and each time I get the same problems.
> I then did a clean installation of 9.0. Everything (including the scanner)
> worked. But after an upgrade, the scanner had disappeared again and I was
> back to manually installing it and running ROOT first.

I have a Minolta film scanner that's supported by Vuescan, and had this
problem with it not being accessible to ordinary user. To solve this I put a
variant of what was discussed in the link above in /etc/hotplug/usb ... a
file I called minolta-ds5400.usermap with the following line in it:

minolta-ds5400 0x0003 0x0686 0x400e 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00
0x00 0x0

(ignore wrapping). The third and fourth entry: 0x0686 0x400e are the
manufacturer and model codes obtained by running sane-find-scanner as root.
The first entry minolta-ds5400 is the name of the config script to call --
this script is also placed in /etc/hotplug/usb/ -- make sure it's chmodded
executable:

#!/bin/bash
if [ "${ACTION}" = "add" ] && [ -f "${DEVICE}" ]
then
chown root.users "${DEVICE}"
chmod 660 "${DEVICE}"
fi

This works for me -- when the scanner is switched on or plugged in the script
runs, setting permissions so all users can access the scanner.

> I have checked and re-checked permissions in xsane, sane.d and the epson
> config file in sane.d. They are all OK.

It is counterintuitive, but it's done using the hotplugging system. There is a
file called sane-hardcoded.usermap in /etc/hotplug/usb which I think is a
list of all the scanners supported by Sane -- and calls a script called
desktopdev which does the necessary voodoo to set permissions -- but I
couldn't get it to work with the Minolta, by adding the usermap codes to this
file. I think it may link somehow with YaST which doesn't recognise my
Minolta as a scanner!

> I'm lost! Has anyone else come across this problem, please?

Hope this helps!

Now I can scan with both scanners using Vuescan, or with the 1640 using xsane.

Jason

< Previous Next >
References