# Problems with scanner (Epson CX 6600) 2.6.13 KO 2.6.12 OK

## xlekox

Hi,

I'm trying to set up my scanner : http://gentoo-wiki.com/HOWTO_Install_a_USB_scanner

In /etc/make.conf I couldn't set SANE_BACKENDS= because I need to use epkowa drivers: http://www.avasys.jp/english/linux_e/index.html

```

* media-gfx/sane-backends Installed:           1.0.16-r2

* media-gfx/xsane     Installed:           0.97

```

Once dowloaded and installed the drivers epkowa

In /etc/hotplug/usb/libsane.usermap

```
# Epson Corp.|Stylus CX6600

libusbscanner             0x0003      0x04b8   0x0813    0x0000       0x0000

0x00         0x00            0x00            0x00            0x00               0x00      
```

#lsusb

```

Bus 005 Device 015: ID 04b8:0813 Seiko Epson Corp.
```

In /etc/sane.d/epkowa

```

usb 0x04b8 0x0813x

```

#sane-find-scanner 

```

[sanei_usb] sanei_usb_init: found libusb device (0x04b8/0x0813) interface 0  at libusb:005:015

[sanei_usb] sanei_usb_init: found 1 devices

found USB scanner (vendor=0x04b8 [EPSON], product=0x0813 [USB2.0 MFP(Hi-Speed)]) at libusb:005:015

```

#ls -l /proc/bus/usb/005/

```

total 0

-rw-rw-rw-  1 root usb     43 sep  3 18:07 001

-rw-rw----  1 root scanner 96 sep  3 18:07 015

```

It seems that everything run fine, but when I try to run xsane or scanimage -L:

```
[sanei_usb] sanei_usb_find_devices: vendor=0x04b8, product=0x0813

[sanei_usb] sanei_usb_open: trying to open device `libusb:005:015'

USB error: could not set config 1: Device or resource busy

[sanei_usb] sanei_usb_open: libusb complained: could not set config 1: Device or resource busy

[sanei_usb] Maybe the kernel scanner driver claims the scanner's interface?

```

I don't know what I have to do now  :Sad:   :Rolling Eyes:  Thanks in advance!

#uname -a

```
Linux XeniPheR 2.6.13-gentoo #1 Wed Aug 31 11:26:47 CEST 2005 i686 Intel(R) Pentium(R) 4 CPU 3.00GHz GenuineIntel GNU/Linux
```

Last edited by xlekox on Sun Sep 04, 2005 11:09 pm; edited 1 time in total

----------

## NeddySeagoon

xlekox,

Is your user in the scanner group?

You may find it works for root but no other users. As you say, it all looks good.

I use the epkowa driver with a Perfection 1650. It works well.

----------

## xlekox

 *NeddySeagoon wrote:*   

> xlekox,
> 
> Is your user in the scanner group?
> 
> You may find it works for root but no other users. As you say, it all looks good.
> ...

 

Nobody could use the scanner  :Sad:  all are members of the scanner group.

----------

## NeddySeagoon

xlekox,

Your /etc/hotplug/usb/libsane.usermap entry as posted has a field missing at the end, it should finish with 

```
0x00000000
```

I din't have the benifit of the Wiki and found that I had to set up two symbolic links in

/usr/lib/sane like this 

```
ls libsane-e* -l

lrwxrwxrwx  1 root root     43 Dec  5  2004 libsane-epkowa.so -> /usr/local/lib/sane/libsane-epkowa.so.1.0.6

lrwxrwxrwx  1 root root     43 Dec  5  2004 libsane-epkowa.so.1 -> /usr/local/lib/sane/libsane-epkowa.so.1.0.6

-rwxr-xr-x  1 root root    970 May 21 16:09 libsane-epson.la

lrwxrwxrwx  1 root root     23 May 21 16:09 libsane-epson.so -> libsane-epson.so.1.0.15

lrwxrwxrwx  1 root root     23 May 21 16:09 libsane-epson.so.1 -> libsane-epson.so.1.0.15

-rwxr-xr-x  1 root root 114668 May 21 16:09 libsane-epson.so.1.0.15
```

so that sane could find the epkowa drivers. The setup was modeled on the epson links which I have included.

How does sane find your epkowa driver?

----------

## xlekox

Hi again,

libsane.usermap is correctly, maybe I miss something in the copy->paste here  :Very Happy: 

```
ls libsane-e* -l

-rwxr-xr-x  1 root root    971 ago 25 04:59 libsane-epkowa.la

lrwxrwxrwx  1 root root     44 sep  4 14:04 libsane-epkowa.so -> /usr/local/lib/sane/libsane-epkowa.so.1.0.15

lrwxrwxrwx  1 root root     44 sep  4 14:04 libsane-epkowa.so.1 -> /usr/local/lib/sane/libsane-epkowa.so.1.0.15

-rwxr-xr-x  1 root root 138824 ago 25 04:59 libsane-epkowa.so.1.0.15

-rwxr-xr-x  1 root root    944 sep  3 14:32 libsane-epson.la

lrwxrwxrwx  1 root root     23 sep  3 14:32 libsane-epson.so -> libsane-epson.so.1.0.16

lrwxrwxrwx  1 root root     23 sep  3 14:32 libsane-epson.so.1 -> libsane-epson.so.1.0.16

-rwxr-xr-x  1 root root 123716 sep  3 14:32 libsane-epson.so.1.0.16

```

Still doen's work  :Sad:  arggg

I get this messages:

#xsane

```
usb 5-2: usbfs: interface 1 claimed by usblp while 'xsane' sets config #1
```

#scanimage -L

```
usb 5-2: usbfs: interface 1 claimed by usblp while 'scanimage' sets config #1
```

----------

## NeddySeagoon

xlekox,

Do /usr/local/lib/sane/libsane-epkowa.so.1.0.15 and /usr/local/lib/sane/libsane-epkowa.so.1.0.15 both exist?

Looks like I should get an epkowa update.

What USB devices do you have?

Its a bad idea to mix USB 1.1 and USB 2.0 devices on the same root hub. That forces the USB 2.0 devices to fall back and some don't do it very gracefully.

Try your scanner connected directly to the PC with no other usb devices connected at all. If thats not possible, ensure that any USB 1.1 devices are on their own root hub. usbview will show you whats connected where.

For testing, you could remove USB printer support from the kernel but its not practical long term if you have a usb printer.

----------

## xlekox

 *Quote:*   

> Do /usr/local/lib/sane/libsane-epkowa.so.1.0.15 and /usr/local/lib/sane/libsane-epkowa.so.1.0.15 both exist? 

 

/usr/local/lib/sane

```
ls -l

total 576

-rw-r--r--  1 root root 321230 sep  2 14:21 libsane-epkowa.a

-rwxr-xr-x  1 root root   1022 sep  2 14:21 libsane-epkowa.la

lrwxrwxrwx  1 root root     24 sep  2 14:21 libsane-epkowa.so -> libsane-epkowa.so.1.0.15

lrwxrwxrwx  1 root root     24 sep  2 14:21 libsane-epkowa.so.1 -> libsane-epkowa.so.1.0.15

-rwxr-xr-x  1 root root 259322 sep  2 14:21 libsane-epkowa.so.1.0.15

```

 *Quote:*   

> 
> 
> What USB devices do you have? 

 

```
Bus 005 Device 019: ID 04b8:0813 Seiko Epson Corp. <--- Epson Stylus CX6600

Bus 002 Device 003: ID 046d:c505 Logitech, Inc. Cordless Mouse+Keyboard Receiver
```

 *Quote:*   

> Its a bad idea to mix USB 1.1 and USB 2.0 devices on the same root hub.

 Each one is in diferent root hub, I don't think that's the problem here.

 *Quote:*   

>  usbview will show you whats connected where

 

I think that sane is trying to get the scanner on the interface 1, but it's the printer... How do I reasign the interface ?

CX6600 has three interfaces:

 *usbview wrote:*   

> USB2.0 MFP(Hi-Speed)
> 
> Manufacturer: EPSON
> 
> Serial Number: ND0150407270433510
> ...

 

----------

## NeddySeagoon

xlekox,

Can you post your /proc/bus/usb/devices file please, so I can look at it in usbview.

Take a snapshot with all of your USB devices plugged oin and powered up.

----------

## xlekox

Here we go  :Very Happy: 

```
cat /proc/bus/usb/devices

T:  Bus=05 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=480 MxCh= 8

B:  Alloc=  0/800 us ( 0%), #Int=  0, #Iso=  0

D:  Ver= 2.00 Cls=09(hub  ) Sub=00 Prot=01 MxPS= 8 #Cfgs=  1

P:  Vendor=0000 ProdID=0000 Rev= 2.06

S:  Manufacturer=Linux 2.6.13-gentoo ehci_hcd

S:  Product=Intel Corporation 82801EB/ER (ICH5/ICH5R) USB2 EHCI Controller

S:  SerialNumber=0000:00:1d.7

C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=  0mA

I:  If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub

E:  Ad=81(I) Atr=03(Int.) MxPS=   2 Ivl=256ms

T:  Bus=05 Lev=01 Prnt=01 Port=01 Cnt=01 Dev#= 20 Spd=480 MxCh= 0

D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1

P:  Vendor=04b8 ProdID=0813 Rev= 1.00

S:  Manufacturer=EPSON

S:  Product=USB2.0 MFP(Hi-Speed)

S:  SerialNumber=ND0150407270433510

C:* #Ifs= 3 Cfg#= 1 Atr=c0 MxPwr=  2mA

I:  If#= 0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none)

E:  Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms

E:  Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms

I:  If#= 1 Alt= 0 #EPs= 2 Cls=07(print) Sub=01 Prot=02 Driver=usblp

E:  Ad=04(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms

E:  Ad=85(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms

I:  If#= 2 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage

E:  Ad=07(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms

E:  Ad=88(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms

T:  Bus=04 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=12  MxCh= 2

B:  Alloc=  0/900 us ( 0%), #Int=  0, #Iso=  0

D:  Ver= 1.10 Cls=09(hub  ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1

P:  Vendor=0000 ProdID=0000 Rev= 2.06

S:  Manufacturer=Linux 2.6.13-gentoo uhci_hcd

S:  Product=Intel Corporation 82801EB/ER (ICH5/ICH5R) USB UHCI Controller #4

S:  SerialNumber=0000:00:1d.3

C:* #Ifs= 1 Cfg#= 1 Atr=c0 MxPwr=  0mA

I:  If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub

E:  Ad=81(I) Atr=03(Int.) MxPS=   2 Ivl=255ms

T:  Bus=03 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=12  MxCh= 2

B:  Alloc=  0/900 us ( 0%), #Int=  0, #Iso=  0

D:  Ver= 1.10 Cls=09(hub  ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1

P:  Vendor=0000 ProdID=0000 Rev= 2.06

S:  Manufacturer=Linux 2.6.13-gentoo uhci_hcd

S:  Product=Intel Corporation 82801EB/ER (ICH5/ICH5R) USB UHCI #3

S:  SerialNumber=0000:00:1d.2

C:* #Ifs= 1 Cfg#= 1 Atr=c0 MxPwr=  0mA

I:  If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub

E:  Ad=81(I) Atr=03(Int.) MxPS=   2 Ivl=255ms

T:  Bus=02 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=12  MxCh= 2

B:  Alloc=236/900 us (26%), #Int=  2, #Iso=  0

D:  Ver= 1.10 Cls=09(hub  ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1

P:  Vendor=0000 ProdID=0000 Rev= 2.06

S:  Manufacturer=Linux 2.6.13-gentoo uhci_hcd

S:  Product=Intel Corporation 82801EB/ER (ICH5/ICH5R) USB UHCI Controller #2

S:  SerialNumber=0000:00:1d.1

C:* #Ifs= 1 Cfg#= 1 Atr=c0 MxPwr=  0mA

I:  If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub

E:  Ad=81(I) Atr=03(Int.) MxPS=   2 Ivl=255ms

T:  Bus=02 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#=  3 Spd=1.5 MxCh= 0

D:  Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1

P:  Vendor=046d ProdID=c505 Rev=17.21

S:  Manufacturer=Logitech

S:  Product=USB Receiver

C:* #Ifs= 2 Cfg#= 1 Atr=a0 MxPwr= 98mA

I:  If#= 0 Alt= 0 #EPs= 1 Cls=03(HID  ) Sub=01 Prot=01 Driver=usbhid

E:  Ad=81(I) Atr=03(Int.) MxPS=   8 Ivl=10ms

I:  If#= 1 Alt= 0 #EPs= 1 Cls=03(HID  ) Sub=01 Prot=02 Driver=usbhid

E:  Ad=82(I) Atr=03(Int.) MxPS=   8 Ivl=10ms

T:  Bus=01 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=12  MxCh= 2

B:  Alloc=  0/900 us ( 0%), #Int=  0, #Iso=  0

D:  Ver= 1.10 Cls=09(hub  ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1

P:  Vendor=0000 ProdID=0000 Rev= 2.06

S:  Manufacturer=Linux 2.6.13-gentoo uhci_hcd

S:  Product=Intel Corporation 82801EB/ER (ICH5/ICH5R) USB UHCI Controller #1

S:  SerialNumber=0000:00:1d.0

C:* #Ifs= 1 Cfg#= 1 Atr=c0 MxPwr=  0mA

I:  If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub

E:  Ad=81(I) Atr=03(Int.) MxPS=   2 Ivl=255ms
```

----------

## jniklast

I had a similiar problem with my Epson Stylos Photo RX 420. While sane-find-scanner found the device, scanimage and xsane didn't, no matter if I'm logged in as root or not. 

It seems to be a problem with the new 2.6.13 kernel as a downgrade back to 2.6.12 solved the issue. I don't know what causes this problem so this seems to be the only possible solution at the moment.

----------

## xlekox

 *Quote:*   

> It seems to be a problem with the new 2.6.13 kernel as a downgrade back to 2.6.12 solved the issue

 

wops, same problem here, back to 2.6.12 and everything runs fine. If I could get it working in 2.6.13 I'll post here  :Wink: 

Thanks for the help  :Very Happy: 

----------

## The Fallen Weeble

Hey, I'm not sure if this is still an issue for you guys, but I did a long hunt and think I may have found a solution.  Also posted here:

After a looooong hunt through forums and newsgroups and mail archives, I found this mail archive message. Basically, check to see if you have a /var/lib/lock/sane directory. If not, run these two commands:

```
mkdir -p /var/lib/lock/sane

chown root:scanner /var/lib/lock/sane
```

The second command is necessary to get your scanner working for more than just root.

Hope this helps!

----------

## srbamber

the lock file thing is a red herring, this is actually down to a bug in xsane 

see https://alioth.debian.org/tracker/index.php?func=detail&aid=302207&group_id=30186&atid=410366 for details

basically until xsane is fixed, if you using a 2.6.13 kernel you need to remove the usblp module before you can scan e.g.

```
rmmod usblp
```

as root - of course you'll then need to reload it if you want to print  :Smile: 

```
modprobe usblp
```

----------

## reynolds531

"rmmod usblp" didn't work for me (usblp hadn't been loaded). Besides, how would a problem in xsane explain the fact that sane-find-scanner sees my scanner, but not scanimage?

----------

## srbamber

the problem's actually with sane not xsane (the x just sneaked in when i wasn't looking!) - check the link

do you have usb printer support compiled into the kernel?

----------

## reynolds531

srbamber,

You were right about this problem, at least in my case. I didn't see it at first because my printer (epson cx4600) is a three-in-one device -- printer, scanner and memory-card reader. To fix the problem, I had to compile both usblp and usb-storage as modules and then kill both when I want to use the scanner. Thanks for your help.

----------

## Chickpea

Just as an FYI, I had this same problem and I searched and searched and searched for a solution because there was no way that I was the only one not getting this installed.  I finally ran into a post from another forum which suggested to compile USB printer and USB Mass Storage as modules and make sure those modules are not loaded when I want to scan.  Supposedly, this issue is fixed in the CVS version of sane-backends but I didn't have any luck.  And because I am using the epkowa backend, this could be the reason.  I have not done more investigating other than that.  So for now I have to "unload" the modules before scanning.

----------

## lmcogs

Hi

I did as garyyoung3 advised and this worked for me.  I have a epson rx620 3 in1, not the epkowa driver.

Please don't add solved until this problem is solved.  Where is the problem?  I also tried to emerge sane-backends-1.0.16-r4 but it failed due to a patch problem which I could not find answer for.

lmcogs

----------

## tachas

 *jniklast wrote:*   

> I had a similiar problem with my Epson Stylos Photo RX 420. While sane-find-scanner found the device, scanimage and xsane didn't, no matter if I'm logged in as root or not. 
> 
> It seems to be a problem with the new 2.6.13 kernel as a downgrade back to 2.6.12 solved the issue. I don't know what causes this problem so this seems to be the only possible solution at the moment.

 

I have the same problem and the same solution. I agree, it looks like a matter of the kernel 2.6.13 .

----------

## lanalyst

I made some progress with this on my Epson CX3810 and kernel 2.6.14-gentoo-r2

Suse has posted a temporary fix at http://portal.suse.com/sdb/en/2005/09/jsmeix_scanner-setup-100.html

It appears they patched libusb in sane-backends to ignore EBUSY

I checked the Suse FTP site and in the sane directory he had the patched version and a 1.0.16 version

I installed the masked media-gfx/sane-backends-1.0.16-r4 and now scanimage -L detects the scanner with usblp loaded:

```
# scanimage -L

device `epson:libusb:001:003' is a Epson CX3800 flatbed scanner

# lsmod | grep usblp

usblp                  13952  0

usbcore               126208  8 usblp,sl811_hcd,ohci_hcd,uhci_hcd,usb_storage,usbhid,ehci_hcd

```

xsane works now. gimp needed sane-frontends (stable) recompiled but works fine.

Right now, the only issue here is my v4l tv tuner card is no longer detected in scanimage.

----------

## kernja

 *lanalyst wrote:*   

> I made some progress with this on my Epson CX3810 and kernel 2.6.14-gentoo-r2
> 
> Suse has posted a temporary fix at http://portal.suse.com/sdb/en/2005/09/jsmeix_scanner-setup-100.html
> 
> It appears they patched libusb in sane-backends to ignore EBUSY
> ...

 

I see you have the same printer as me. How did you get it working (assuming you got it working)?

----------

## S3tH

Hello-

I have also determined that the usblp and usb-storage modules conflict with the scanner being seen by scanimage -L (lsusb and sane-find-scanner both see it)  I just compiled a new kernel 2.6.14-r4 with the usblp and usb-storage as modules, and as long as i rmmod both of them before I use the scanner it works just peachy.

Note:  Earlier in this forum they said that 2.6.12 worked without any changes.  I can't comment on that, but .14 does require that you remove the other modules.

Seth

----------

## reynolds531

 *S3tH wrote:*   

> I have also determined that the usblp and usb-storage modules conflict with the scanner being seen by scanimage -L (lsusb and sane-find-scanner both see it)  I just compiled a new kernel 2.6.14-r4 with the usblp and usb-storage as modules, and as long as i rmmod both of them before I use the scanner it works just peachy.

 

Have you tried the latest unstable build of sane-backends? That solved the problem for me -- I no longer have to remove the modules.

----------

## S3tH

 *Quote:*   

> Have you tried the latest unstable build of sane-backends? That solved the problem for me -- I no longer have to remove the modules.

 

No, I havn't tried that, but I'll give it a shot when I get some time.  Thanks for the suggestion.

----------

## Shazam

i'm getting a similar problem, however, using gentoo-kernel 2.6.16-r9, sane 1.0.15 and an epson cx5400.

now, when i'm rmmod usblp, the scanner works, if usblp is still loaded, the scanner is claimed by it.

for me it wouldn't be that big of a deal, however, the whole thing is set up for my parents, which have almost no clue of computers nor root access to rmmod the printer, and modprobe it, if they'll need it again.

has anybody found a solution?

----------

## lmcogs

Hi

I had the same problem but having emerged the latest 

Calculating dependencies ...done!

[ebuild   R   ] media-gfx/xsane-0.991  -gimp +jpeg +nls +png +tiff 0 kB

[ebuild   R   ] media-gfx/sane-backends-1.0.17  +gphoto2 +ipv6 +usb +v4l 0 kB

[ebuild   R   ] media-gfx/sane-frontends-1.0.14  -gimp 0 kB

it seems to work now.  I have an epson stylus photo rx620 and working on a 

Linux DesktopAltec 2.6.16-gentoo-r7 #1 SMP Sun May 21 20:16:31 GMT 2006 x86_64 AMD Athlon(tm) 64 X2 Dual Core Processor 4400+ GNU/Linux

I also had to add to /etc/portage/package.keywords

media-gfx/xsane ~amd64

media-gfx/sane-backends ~amd64

media-gfx/sane-frontends ~amd64

Hope this helps

----------

