# epson scanner and libusb

## imesg

I have an 'Epson Perfection 2450 Photo' scanner. I have not been able to get it to work with libusb. Kernel 2.6.3-rc2-mm1 no longer has a USB scanner option so it off to libusb. The scanner did work with the kernel module when it was available.

I have checked the forums etc for the answer to this problem with no solution. I have also tried the configuration from:

http://www.freecolormanagement.com/sane/libusb.html

to no avail. There is no device created in /dev.

sane-find-scanner finds the scanner:

root@go2:/dev# sane-find-scanner

 ...

found USB scanner (vendor=0x04b8 [EPSON], product=0x0112 [EPSON Scanner]) at libusb:001:013

 ...

/etc/hotplug/usb.usermap entry:

epson_scanner        0x0003 0x04b8 0x0112 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0

/usr/hotplug/usb/epson_scanner contents:

#!/bin/bash

if [ "${ACTION}" = "add" ] && [ -f "${DEVICE}" ]

then

        chown root "${DEVICE}"

        chgrp scanner "${DEVICE}"

        chmod 660 "${DEVICE}"

fi

The scanner does not appear in /sys. At least I can't find it.

It does appear in /proc/bus/usb/:

T:  Bus=01 Lev=01 Prnt=01 Port=03 Cnt=01 Dev#= 13 Spd=480 MxCh= 0

D:  Ver= 2.00 Cls=ff(vend.) Sub=ff Prot=ff MxPS=64 #Cfgs=  1

P:  Vendor=04b8 ProdID=0112 Rev= 1.01

S:  Manufacturer=EPSON

S:  Product=EPSON Scanner

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

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

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

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

I have seen this problem a lot in the forums etc but no answer. 

Does anyone have a clue?

Thanks,

Gene Imes[/quote]

----------

## fredor

have exactly the same problem with kernels 2.6.3 and 2.6.3-mm1 but the earlier kernels such as  2.6.2-rc2-mm1 were OK and my scanner showed up in /dev and /sys.

----------

## imesg

 *fredor wrote:*   

> have exactly the same problem with kernels 2.6.3 and 2.6.3-mm1 but the earlier kernels such as  2.6.2-rc2-mm1 were OK and my scanner showed up in /dev and /sys.

 

Who do I tell about this? Andrew Morton? I sure would like to get this fixed.

Thanks,

Gene Imes

----------

## fredor

imesg wrote

 *Quote:*   

> Who do I tell about this? Andrew Morton? I sure would like to get this fixed.
> 
> 

 

I guess he's your man but I'm relatively new to this. Alternatively you could post a kernel bug.

Best of Luck

----------

## geophagus

I got the same problem with my Canon Scanner and I solved it like this

1) create /etc/hotplug/usb/scanner.usermap

```
scanner 0x0003 0x04a9 0x220d 0x0100 0x0000 0xff 0x00 0x00 0xff 0x00 0xff 0x00000000
```

(most of the non-zero values can probably changed to zero)

2) make a copy of /etc/hotplug/usb/usbcam and name it /etc/hotplug/usb/scanner

3) you might want to modify the "chown" and "chmod" commands in the newly created /etc/hotplug/usb/scanner. In my case the essential part looks like this:

```
if [ "${ACTION}" = "add" ] && [ -f "${DEVICE}" ]

then

    # New code, using lock files instead of copying /dev/console permissions

    # This also works with non-gdm logins (e.g. on a virtual terminal)

    # Idea and code from Nalin Dahyabhai <nalin@redhat.com>

    if [ -f /var/run/console.lock ]

    then

        CONSOLEOWNER=`cat /var/run/console.lock`

    elif [ -f /var/lock/console.lock ]

    then

        CONSOLEOWNER=`cat /var/lock/console.lock`

    else

        CONSOLEOWNER=

    fi

    if [ -n "$CONSOLEOWNER" ]

    then

        chmod 0000 "${DEVICE}"

        chown "$CONSOLEOWNER":video "${DEVICE}"

        chmod 0660 "${DEVICE}"

    fi

fi

```

The ebuild version I use are:

gentoo-dev-sources-2.6.3-r1

libusb-0.1.7-r1

xsane-0.91

BTW: don't forget to comment out "brother" in /etc/sane.d/dll.conf

----------

## fredor

Thanks Geophagus for your input.

I have more or less the same hotplug files as you except for the CONSOLEOWNER items.

With kernel 2.6.3-mm1, the scanner shows in /proc/bus/usb/devices and with lsusb but no device nodes are made and it does not show during the boot sequence. Previously there was a line:-

drivers/usb/core/usb.c: registered new driver usbscanner.

There is a new kernel version out, but at the moment for me, this hangs at the parport_pc module.

----------

## imesg

 *geophagus wrote:*   

> I got the same problem with my Canon Scanner and I solved it like this
> 
> 

 

Thanks, geophagus, no workee for me. I am still trying.

Gene Imes

----------

## Elm0

Woah, back up guys  :Smile:  I had similar problems, but after a lot of fiddling I understand how this whole new way of accessing scanners works

libusb is a way of accessing usb devices from within userspace using the /proc/usb filesystem. You DO NOT need a /dev/ device for your scanner to work now. FYI, my scanner is an Epson Perfection 1260 which uses the Plustek backend.

First thing you need is the latest ~x86 version of sane-backends compiled with the USB use flag. You also (obviously) need the latest version of libusb. Get rid of the scanner module in your kernel, obviously keep all your other USB stuff  :Smile:  Remove all the hotplug modifications you've made, you really don't need them!

For my plustek backend the settings in /etc/sane.d/plustek are

```

[usb]

device auto

```

This is standard so you probably won't need to modify anything. I don't know the syntax for epson.conf, but its definetly on these forums somewhere, so have a search. I'm thinking maybe just 'usb' on a line will work.

Restart your PC with the new kernel, and run sane-find-scanner, and you'll get output as the original poster did.

```

found USB scanner (vendor=0x04b8 [EPSON], product=0x0112 [EPSON Scanner]) at libusb:001:013 

```

Now here is the not so obvious part: permissions on the /proc/usb filesystem.

In my /etc/conf.d/local.start file I have:

```

chmod 660 /proc/bus/usb/003/002

chgrp users /proc/bus/usb/003/002

```

I always have my scanner plugged in at the same place (you need to adjust the numbers to point to your scanner device), but I reckon you could just do the following and forget about it:

```

chmod 660 /proc/bus/usb/ -R

chgrp users /proc/bus/usb/ -R

```

This will allow people in the users group to access the scanner.

All your userspace scanner apps like xsane should work flawlessly now  :Smile: 

----------

## Niko_K

Hi,

i did the same as Elm0, but I really think that this is a very dirty solution!

It only works, when the scanner is connected at boot time.

If i disconnect the scanner while using gentoo i have to reboot!!!

Is there a better way to solve this problem (without hotplug)?

Niko

----------

## Elm0

I don't have my scanner to hand atm, however...

What happens when you plug in after boot time? Do the /proc/bus/usb entries lose their permissions and revert to root,root ownership?

If that is the problem, I'm thinking maybe a hotplug script which would take the position of the device on the usb bus and then correctly chmod the /proc/bus/usb entry would solve the problem.

Niko_k - whats the problem with hotplug? I've found it (in conjunction with udev) to be a very powerful combination.

----------

## geophagus

@imesg:  *Quote:*   

> There is no device created in /dev.
> 
> The scanner does not appear in /sys. At least I can't find it. 
> 
> 

 

Same for /dev on my system. But some devices and device information are created below /sys/bus/usb. They information can easily be displayed using 

```
# systool -v -b usb
```

 (systool is part of sysfsutils)

The output from my /proc/bus/usb/devices looks similar to yours

What output does "scanimage -L" give on your system? On my system the output is 

```
device `plustek:libusb:002:003' is a Canon N670U/N676U/LiDE20 USB flatbed scanner
```

 Before I made the changes to /etc/hotplug/usb only root could run this command.

Some additional information concerning my system (they might not be of importance): I'm running hotplug-20040105 and udev-016-r1 (udev is a replacement for devfsd. In the past I used it to create a device /dev/usbscanner0. But his no longer works with kernel 2.6.3 because it needs the scanner.ko which is no longer available with 2.6.3)

----------

## marc

ElmO wrote:

 *Quote:*   

> In my /etc/conf.d/local.start file I have: 
> 
> Code:
> 
>  chmod 660 /proc/bus/usb/003/002 
> ...

 

note: 660 does not hand because exec-right are necessary

770 and it works fine for me.

----------

## Niko_K

I am emerging hotplug right now, ...

The "problem" ist, that there is another boot-sktipt, which takes quite some time...

Niko

EDIT: Don't forget to set the right Permissions for /etc/hotplug/usb/epson_scanner. At the moment I use 660 - and it works

----------

## fredor

I tried Elm0's solution but it didn't work for me.

I take it you are using a 2.6.3 type kernel. Kernels prior to 2.6.2-rc3 worked fine with the /dev/scanner0 showing up but with this and subsquent kernels, I have been unable to get them working.

My scanner is Epson Perfection 1640SU

Using udev018 with no /lib/udev-states/devices file

libusb version 0.1.7-r1

----------

## fredor

I re-emerge sane-backends with USE=usb and scanimage -L now gives

device 'epson:libusb:003:003' is Epson Perfection1640 flatbed scanner

many thanks to geophagus and Elm0

No /dev node but Xsane works OK

----------

## Bob Paddock

 *fredor wrote:*   

> I re-emerge sane-backends with USE=usb and scanimage -L now gives
> 
> 

 

I have been following along trying to get my Epson Perfection 1240USB working, using

UDEV-018/2.6.3-gentoo-r1.

 sane-find-scanner says:

```
found USB scanner (vendor=0x04b8 [EPSON], product=0x010b [Perfection1240]) at libusb:002:003

  # Your USB scanner was (probably) detected. It may or may not be supported by

  # SANE. Try scanimage -L and read the backend's manpage.
```

Alas scanimage -L says "No scanners were identified". 

 :Sad: 

This was scanner was working fine with scanner module under 2.4.x, so I'm sure it is all hooked up correctly.

What should I try next?

----------

## imesg

 *Elm0 wrote:*   

> Woah, back up guys 
> 
> ...
> 
> This is standard so you probably won't need to modify anything. I don't know the syntax for epson.conf, but its definetly on these forums somewhere, so have a search. I'm thinking maybe just 'usb' on a line will work.
> ...

 

I had tried this before and 'scanimage -L' appeared to be hung but it was not. I was impatient and killed it. However now that I tried the 'usb' line in /etc/sane.d/epson.conf again and waited for 'scanimage -L' to complete I get:

root@go2:/etc# scanimage -L

device `epson:libusb:001:002' is a Epson GT-9700 flatbed scanner

However this takes about two minutes to complete. And this:

root@go2:/etc# scanimage -L

device `epson:libusb:001:002' is a Epson GT-9700 flatbed scanner

root@go2:/etc# scanimage -L

device `epson:libusb:001:002' is a Epson Unknown model flatbed scanner

root@go2:/etc# scanimage -L

device `epson:libusb:001:002' is a Epson GT-9700 flatbed scanner

root@go2:/etc# scanimage -L

device `epson:libusb:001:002' is a Epson Unknown model flatbed scanner

root@go2:/etc# scanimage -L

device `epson:libusb:001:002' is a Epson GT-9700 flatbed scanner

As you can see the commands complete but alternating commands cannot find the model number. These commands also take about two minutes to complete. 

The same thing happens in gimp and OpenOffice also, about two minutes to get the xsane dialog.

All of this started about two or three days ago when I did an 'emerge -update world'. I also started having printer problems at what seems to me the same time, you never know sometimes when exactly something goes wrong because you are not using these thing constantly. 

After writing all this and trying again I get 'no devices available'. However an 'lsusb' returns this:

Bus 008 Device 002: ID 0409:0058 NEC Corp. USB2.0 Hub Controller

Bus 008 Device 001: ID 0000:0000

Bus 007 Device 003: ID 051d:0002 American Power Conversion Back-UPS Pro 500

Bus 007 Device 002: ID 099a:610c

Bus 007 Device 001: ID 0000:0000

Bus 006 Device 001: ID 0000:0000

Bus 005 Device 001: ID 0000:0000

Bus 004 Device 002: ID 046d:c501 Logitech, Inc. Cordless Mouse Receiver

Bus 004 Device 001: ID 0000:0000

Bus 003 Device 001: ID 0000:0000

Bus 002 Device 001: ID 0000:0000

Bus 001 Device 002: ID 04b8:0112 Seiko Epson Corp. Perfection 2450

Bus 001 Device 001: ID 0000:0000

Anyone know why the long delay?

Thanks again,

Gene Imes

----------

## Elm0

This sounds like a bug to me, very odd behavior. Its difficult to say where the problem lies but as your having problems with your printer it might be in the kernel or in libusb rather than sane.

Pretty much reached by problem solving skills on this one, sorry   :Sad: 

----------

## imesg

 *imesg wrote:*   

> 
> 
> The same thing happens in gimp and OpenOffice also, about two minutes to get the xsane dialog.
> 
> All of this started about two or three days ago when I did an 'emerge -update world'. I also started having printer problems at what seems to me the same time, you never know sometimes when exactly something goes wrong because you are not using these thing constantly. 
> ...

 

Bus 008 Device 003: ID 0409:0058 NEC Corp. USB2.0 Hub Controller

Bus 008 Device 001: ID 0000:0000

Bus 007 Device 003: ID 051d:0002 American Power Conversion Back-UPS Pro 500

Bus 007 Device 002: ID 099a:610c

Bus 007 Device 001: ID 0000:0000

Bus 006 Device 001: ID 0000:0000

Bus 005 Device 001: ID 0000:0000

Bus 004 Device 002: ID 046d:c501 Logitech, Inc. Cordless Mouse Receiver

Bus 004 Device 001: ID 0000:0000

Bus 003 Device 002: ID 0924:fff3 Xerox

Bus 003 Device 001: ID 0000:0000

Bus 002 Device 001: ID 0000:0000

Bus 001 Device 002: ID 04b8:0112 Seiko Epson Corp. Perfection 2450

Bus 001 Device 001: ID 0000:0000

Ok, when reverting back to kernel 2.6.3-rc2-mm1 the printer resumes normal function but the scanner continues to misbehave.

Thanks,

Gene

----------

## fredor

I was getting some interference with other usb devices so I commented out everything in /etc/sane.d/dll.conf except 'epson'. This stopped the interference.

There's no /dev node for the scanner but everything works perfectly now.

----------

## Bob Paddock

 *fredor wrote:*   

> I was getting some interference with other usb devices so I commented out everything in /etc/sane.d/dll.conf except 'epson'. This stopped the interference.
> 
> There's no /dev node for the scanner but everything works perfectly now.

 

That fixed it, thank you. 

This is also a good place to look for Epson scanners with libusb/udev:

http://www.khk.net/sane/libusb.html

----------

## kurtb

Ok, the issue here seems to be that the scanner kernel module has been removed as per these lines from teh 2.6.3 kernel changelog.

```

<trini@kernel.crashing.org>

   [PATCH] USB: mark the scanner driver BROKEN

   

   Greg, I think this now makes 2 distinct bugs in the scanner kernel

   driver.  Maybe it should be protected with a BROKEN:

<bunk@fs.tum.de>

   [PATCH] USB: remove USB_SCANNER from the build

   

   USB_SCANNER is obsolete, and it's now marked as BROKEN.

   

   I there a good reason to keep it in the kernel?

<greg@kroah.com>

   [PATCH] USB: remove scanner driver files.

```

I have an epson perfection 2400 and here is what I did to get things working with libusb which is what you will have to use.

1.  run sane-find-scanner

```

 sane-find-scanner 

  # No SCSI scanners found. If you expected something different, make sure that

  # you have loaded a SCSI driver for your SCSI adapter.

found USB scanner (vendor=0x04b8 [EPSON], product=0x011b [EPSON Scanner]) at libusb:001:003

  # Your USB scanner was (probably) detected. It may or may not be supported by

  # SANE. Try scanimage -L and read the backend's manpage.

  # Scanners connected to the parallel port or other proprietary ports can't be

  # detected by this program.

```

2.  Hopefully your scanner is deteced as mine was.

3.  Edit your /etc/saned/epson.conf file and add a line like the following using your output from find-sane-scanner.

```

usb libusb:001:003

```

4.  Next, we need to set permissions for the devices.  This info taken from $man sane-usb.

```

The permissions for the device files used by libusb  must  be  adjusted

       for  user  access. Otherwise only root can use SANE devices. For Linux,

       the devices are located in /proc/bus/usb/. There are directories  named

       e.g.  "001"  (the  bus  name)  containing  files "001", "002" etc. (the

       device files). The right device files can be found out by running scan-

       image  -L  as  root. Setting permissions with "chmod" is not permanent,

       however. They will be resetted after reboot or replugging the  scanner.

       It's  also  possible to mount the usbfs with the option "devmode=0666",

       e.g. by using the following line in /etc/fstab:

              none /proc/bus/usb usbfs defaults,devmode=0666  0  0

```

So I then just did a chmod 660 /proc/bus/usb/001/*  and then chgrp users /proc/bus/usb/001/* since my device was 001/003.  

This will probably not work if you disconnect and then reconnect the device so I need to figure out a way to do this with hotplug seemlessly.  I'll post back when I have figured that out, but this is a workaround for now.  Hope this helps somebody!

----------

## imesg

 *kurtb wrote:*   

> Ok, the issue here seems to be that the scanner kernel module has been removed as per these lines from teh 2.6.3 kernel changelog.
> 
> ...
> 
> I have an epson perfection 2400 and here is what I did to get things working with libusb which is what you will have to use.
> ...

 

geophagus has the thing mostly right in about the fifth post in this thread. His method takes care of ownership and permissions. However you need to add the group scanner and change the group in the /etc/hotplug/usb/scanner to 'scanner'.

Check out:

http://khk.net/sane/libusb.html

Look at this:

root@go2:/proc/bus/usb/001# ls -l *

-rw-r--r--    1 root     root           43 Feb 25 17:18 001

-rw-rw----    1 gene     scanner        50 Feb 25 17:24 002

This is from the setup the way geophagus did it and from the link above. In epson.conf just put 'usb' I don't think you need the libusb:001:003 part.

I say this works for me but there is one problem. Whenever the scannner is called it takes about one minute or so for the scanner to be found. I am not completely happy with it but it works.

Goodluck,

Gene

----------

## kurtb

 *Quote:*   

> geophagus has the thing mostly right in about the fifth post in this thread. His method takes care of ownership and permissions. However you need to add the group scanner and change the group in the /etc/hotplug/usb/scanner to 'scanner'. 
> 
> 

 

I found the link you mentioned shortly after making my post  and yes that is definitely the better way to handle things.  The method I posted was a quick kludge that worked and was by no means a final solution as I mentioned.  

However, I have set things up as mentioned in the link and I'm seeing some very peculiar weirdness.  Sometimes when I run xsane or scanimage it works just fine.  But most of the time it sits there quite a while and either says no devices found or it eventually works.  While xsane is sitting there I see the following in my log files.:

```

usb 1-2: bulk timeout on ep1in

usbfs: USBDEVFS_BULK failed dev 3 ep 0x81 len 1 ret -110

usb 1-2: bulk timeout on ep2out

usbfs: USBDEVFS_BULK failed dev 3 ep 0x2 len 2 ret -110

usb 1-2: bulk timeout on ep1in

usbfs: USBDEVFS_BULK failed dev 3 ep 0x81 len 1 ret -110

```

Anyone else experiencing this?  Might this be a kernel bug?

----------

## imesg

 *kurtb wrote:*   

> 
> 
> ...
> 
> However, I have set things up as mentioned in the link and I'm seeing some very peculiar weirdness.  Sometimes when I run xsane or scanimage it works just fine.  But most of the time it sits there quite a while and either says no devices found or it eventually works.  While xsane is sitting there I see the following in my log files.:
> ...

 

Yes, I have this problem however, maybe not as bad as you describe. I do not know the problem. I suspect the kernel. I had to revert to a previous kernel to get my printer to work. All usb of course.

Gene

----------

## patrickfo

i have a epson scanner perfection 1660 photo and see what i have done to make it work:

1) in dll.conf # before all backends except epson

2) in epson.conf i put usb VENDOR PRODUCT for me:

```
usb 0x4b8 0x11e
```

note: if you put a think like libusb:001:002 in epson.conf, every time you disconnect and reconnect the scanner the last number change and you must reedit epson.conf  :Wink: 

other note: to find VENDOR and PRODUCT see result of sane-find-scanner or cat /proc/bus/usb/devices.

3) then i put in usb.usermap

```
epson_scanner       0x0003 0x04b8   0x011e    0x0000       0x0000       0x00         0x00            0x00            0x00            0x00            0x00            0x00000000
```

you need this to set the perms with a script named epson_scanner evrytime the scanner is connected

4)i wrote the script ( fully copied from the net   :Embarassed:  )

```
#!/bin/bash

if [ "${ACTION}" = "add" ] && [ -f "${DEVICE}" ]

then

        chown root "${DEVICE}"

        chgrp users "${DEVICE}"

        chmod 660 "${DEVICE}"

fi

```

( i have just changed the group users  :Very Happy:   )

5) and now my scanner work for the users group but i have a pb: i have to wait more than 1 minute for xsane to initialise my scanner. i have tried with libusb-1.8

( in /usr/local/portage/dev-libs/libusb you just have to copy libusb-1.7-r1.ebuild to libusb-1.8.ebuild then

```
emerge -uD world

revdep-rebuild
```

the last line is needed because sane-backends, xsane and some other progs must be linked to the new library libusb.so, and don't miss to put in you /etc/make.conf the "usb" flag in USE="..."   :Very Happy:  )

... but the delay is the same... any idea?

----------

## Sudrien

 *patrickfo wrote:*   

> 
> 
> 2) in epson.conf i put usb VENDOR PRODUCT for me:
> 
> ```
> ...

 

actually, you could put several instances - like

usb libusb:001:002

usb libusb:001:003

usb libusb:001:004

usb libusb:001:005

but putting in the sane-find-scanner info is more sophisticated.   :Smile: 

 *patrickfo wrote:*   

> 
> 
> 4)i wrote the script ( fully copied from the net   )
> 
> ```
> ...

 

If you aren't picky of who uses the scanner, I would shorten it more;

```

if [ "${ACTION}" = "add" ] && [ -f "${DEVICE}" ]

then

        chmod 666 "${DEVICE}"

fi

```

See if that speeds it up any.

Oh yeah- If that doesn't work, remove the commenting in the conf file. Sane may be trying to find those files.

One more thing- are you sure that adding "usb" isn't for supporting the old kernel driver? My libusb / sane-backends work fine without.

-Sud.

----------

## patrickfo

i have tried 2.6.4-rc1 to see if pb disapeared but... no

so i have walked the web with google and found that sane-backend was not for my scanner   :Shocked: 

see http://www.buzzard.org.uk/jonathan/scanners-usb.html for more info

and then found that a backend and a frontend was written for it   :Shocked: 

see http://www.epkowa.co.jp/english/linux_e/index.html

i am not at home for now, but i will give it a try this night, or perhaps tomorrow  :Rolling Eyes: 

 ah, and for 2.6.4-rc1 my scanner is allways found by sane-find-scanner but only found with "usb libusb:XXX:XXX" in epson.conf

scanimage -L return immediatly with "no scanner found..." if no "usb..." line and after a long delay and the same answer if "usb VENDOR PRODUCT"...   :Smile: 

and only epson.conf is uncommented in dll.conf

friendly

ps: it seems that for some epson scanners, plustek backend works, but not for mine   :Sad: 

----------

## lyz

 *patrickfo wrote:*   

> i have a epson scanner perfection 1660 photo and see what i have done to make it work:
> 
> 1) in dll.conf # before all backends except epson
> 
> 2) in epson.conf i put usb VENDOR PRODUCT for me:
> ...

 

Did all of this, but I forgot one important detail that I though I'de share.  Make sure the epson_scanner script has execute permissions or it won't execute.    :Rolling Eyes: 

The first time I try to access the scanner as a member of the users group after it hotplugs fails.  About every other time I try it works ok.  It's kinda funky.

----------

## dopey

I'm having the same problem with an Epson 1660 USB scanner and 2.6.3 kernel.  I haven't been able to get it to work since going to a 2.6.x kernel.  Worked fine with the old scanner module in 2.4.x.

scanimage -L and sane-find-scanner both find the scanner.  My epson.conf file is configured with the proper device id and everything.  The hotplug scripts are properly setting the permissions on the /proc nodes.

However scanimage -T fail.  xsane detects the scanner, but when i try to scan or acquire a preview it just hangs with a bunch of the same error messages in my kernel log.  I've tried libusb 0.17 and 0.18 with no luck.

What kernel version were you able to revert to in order to get this to work?

 *imesg wrote:*   

>  *kurtb wrote:*   
> 
> ...
> 
> However, I have set things up as mentioned in the link and I'm seeing some very peculiar weirdness.  Sometimes when I run xsane or scanimage it works just fine.  But most of the time it sits there quite a while and either says no devices found or it eventually works.  While xsane is sitting there I see the following in my log files.:
> ...

 

----------

## okram

I'm also still battling with this problem, with an Epson 2400 Photo. I'm using development-sources 2.6.4-rc1, libusb-0.1.8, sane-backends-1.0.13-r3, but have tried downgrades in various permutations  :Sad: 

I've written an executable script called epson_scanner in /etc/hotplug/usb/, with logger lines inserted  to check when and whether the script is called. It is, and works: soon as I turn on the scanner, the permissions on the device are changed. In dll.conf all but epson.conf are commented out. In epson.conf only the line "usb  0x04b8 0x011b" is uncommented.

1) sane-find-scanner finds the scanner.

2) scanimage -L doesn't. Or rather, it mostly doesn't find the scanner -- plenty of log messages about "bulk timeout on ep1in" and "usbfs: USBDEVFS_BULK failed dev 3 ep 0x81 len 4 ret -110" -- but sometimes does after more than two minutes wait and, on rare occasions, finds it immediately. 

3) When scanimage -L finds the scanner, xsane will start and recognise the scanner by its internal name GT9300,  but scanning will fail with "Failed to start scanner. Error during device I/O."

Any help?

----------

## okram

Well, just to let others know who might have the same problem: after downgrading libusb to libusb-0.1.7-r1 and recompiling sane-backends-1.0.13-r3, it now works. Also recompiled kdegraphics, media-gfx/xsane-0.91  and sane-frontends for good measure.

It's still painfully slow, but works.

----------

## dopey

so wanna hear something crazy  :Smile: .  scanimage fails. scanimage -L finds the scanner, but it refuses to scan.

However now xscanimage and xsane both work properly unless the scanner goes to sleep (light goes off).  if the scanner is sleeping and i fire up xscanimage or xsane, it hanges the programs for a couple of minutes before they finally start up and things work.

however, CLI scanimage does not work at all.  I did nothing to change anyhthing other than set a bunch of SANE_DEBUG_* environment variables.

I'm wondering if part of the DEBUG stuff sent some kind of extra initialization to the scanner.  I'm planning on powering the scanner down and rebooting tonight to see if my luck holds.

----------

## tucolino

got my perfection 1260 working with linux-2.6.3-gentoo-r1.

it works with both iscan and xsane. for xsane, i am using the plustek backend. make sure that you have "plustek" in /etc/sane.d/dll.conf

for iscan, which i find better with coors, you need ot make sure that /etc/sane.d/dll.conf has "epkowa" in it. also, it is also important that you add "usb libusb:004:002" to /etc/sane.d/epkowa.conf

hope this helps. 

tuco

----------

## patrickfo

i don't change anything from my previous post and now it work with kernel 2.6.5-rc3 even if i plug and unplug the scanner and IMMEDIATLY  and VERY WELL like before module was removed from kernel  :Very Happy:   :Very Happy:   :Very Happy: 

just try it and tell us

ps: i am in ~x86 with hotplug-20040329

good luck  :Wink: 

----------

## alfie

I have a similar problem in 2.6.4-gentoo-r1 with a usb scanner (Epson 2450, libusb) where scanimage -L is flakey, and scanning is erratic and slow, sometimes freezing up the entire usb system.  (My other usb devices no longer are accessible)   I use Epson's iscan, scanimage -L, xsane.  epson or epkowa backend.

tail -f /var/log/messages reveals timeout errors with the scanner.

Here is a reference to a post in linux-usb-users, where the errors went away when hotplug was disabled. 

http://www.mail-archive.com/linux-usb-users@lists.sourceforge.net/msg09945.html

----------

## Säck

Hi,

After reading this post, I got my scanner partially working. 

I can scan now as root, but I just don't get to change the permissions automatically. 

I tried with the script:

the file is stored under /etc/hotplug/usb/epson_scanner and is executable.

```
#!/bin/bash

if [ "${ACTION}" = "add" ] && [ -f "${DEVICE}" ]

then

        chown root "${DEVICE}"

        chgrp users "${DEVICE}"

        chmod 660 "${DEVICE}"

fi 
```

but somehow I doesn't get executet when I plug my scanner in.

my /etc/hotplug/usb.usermap

```
# usb module         match_flags idVendor idProduct bcdDevice_lo bcdDevice_hi bDeviceClass bDeviceSubClass bDeviceProtocol bInterfaceClass bInterfaceSubClass bInterfaceProtocol driver_info

#Epson Perfection 1660 Flatbed Scanner

epson_scanner      0x0003 0x04b8 0x011e 0x0000 0x0000 0x0000 0x0000 0x0000 0x0000 0x0000 0x000 0x000000000
```

The second comment is all one line only epson_scanner is not #

ah, when i change permission by hand it works

```
chmod 666 /proc/bus/usb/001/*

```

WHY isn't the script working as it should?

----------

## patrickfo

try to:

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

and look if  Vendor and ProdID are the sames as mines  :Wink: 

or do an

```
rc-update add hotplug default

/etc/init.d/hotplug start
```

good luck  :Wink: 

----------

## Säck

```

gentdell root # cat /proc/bus/usb/devices

....

T:  Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#=  5 Spd=12  MxCh= 0

D:  Ver= 2.00 Cls=ff(vend.) Sub=ff Prot=ff MxPS=64 #Cfgs=  1

P:  Vendor=04b8 ProdID=011e Rev= 1.00

S:  Manufacturer=EPSON

S:  Product=EPSON Scanner

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

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

E:  Ad=81(I) Atr=02(Bulk) MxPS=  64 Ivl=0ms

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

gentdell root #

```

I didn't just copy blindly, we just seem to have the same scanner. 1660 photo.

hotplug is enebled per default.

?? I don't know why it doesn't work. I don't have any problems unpluging and repluging my mouse, pda or external hd (firewire) ??

----------

## patrickfo

seems that something wrong in hotplug:

in fact i have epson_scanner in 2 places:

1) /etc/hotplug/usb/epson_scanner

2) /etc/hotplug/epson_scanner

surely a mistake when i installed my scanner  :Wink:  but... if i remove the second,

perms are unsets UNTIL I DO under root:

```
scanimage -L
```

if i put epson_scanner in the two places perms are ok when i plug in my scanner.

could you test it, if you find same things like me i will try to find where is the bug  :Wink: 

----------

## Säck

@patrickfo:

No luck.  :Sad: 

I'm wondering what could be the cause of that. 

Maybe the kernel I use? I'm using 2.6.6-mm6 with some ieee1394 and the move-__this_module-to-modpost.patch patch so that i can load the nvidia dirvers. 

But I seriously have no idea what could be the cause.

I still use libusb-1.7-rc1 but I don't think this is the cause. I was thinking about upgrading to version 1.8 as you suggestet, but I couldn't find the programm: 

```
revdep-rebuild
```

what package does it belong to?

????

edit: oh and another question: what are perms?

----------

## Säck

changed to the 2.6.6-rc1 kernel, same problem (i didn't think that this is the case)

I'm wondering if i should see any output in /var/log/messages when i plug in the scanner (like which scripts are executed or something)

is there a log-file i can watch and see what hotplug is doing?

i also realized that i had some hex numbers in the usb.usermap set to the wrong amount of bytes, I changed it, but it didn't do anything. It looks now like that:

```
epson_scanner              0x0003 0x04b8   0x011e    0x0000       0x0000       0x00         0x00            0x00            0x00            0x00            0x00            0x00000000
```

----------

## patrickfo

ok Säck

perms are the flags you change with chmod chown or chgrp, that is what the script epson_scanner do  :Wink: 

revdep-rebuild belong to gentoolkit and is needed when you upgrade some package needed by other packages: it find libraries needed by a package and no more present on your computer. exemple libusb-0.1.so.3 replaced by libusb-0.1.so.4 ( perhaps;) ) by upgrading to libusb-1.8.

to merge libusb-1.8 do an

```
echo "dev-libs/libusb ~x86" >> /etc/portage/portage.keywords

emerge -Dp libusb         # to see if needed packages don't block you

                                    # and if all seems ok ;)

emerge -D libusb

revdep-rebuild               # normaly sane-backends will be rebuilt
```

i'm in ~x86 and kernel 2.6.5 with linux-headers-2.6.5

if your scanner work for root, i think that you just have a pb with "perms" in /proc/bus/usb directory, anyway try to do an revdep-rebuild to see how your installation is  :Wink: 

good luck

----------

## Säck

as a matter of fact, i don't get it to work.

I don't know why, but i agree that it's a problem with "perms"   :Laughing:  wow, i learned something, thanks. well, i tried with different kernels, with different version of libusb and hotplug, no luck.

anyone an idea?

----------

## twilight

Hi folks,

ive got the same problem and i have still

no solution!

Neither creating a scanner-group and changing

the permissions nor creating a hotplug-script

or else brought a solution to me!

My usb is working fine... digi-cam, printer, mouse...

since the new kernel i have to use libusb... okidoke...

as root "sane-finde-scanner" is able to find the scanner

```
found USB scanner (vendor=0x04a9, product=0x2204 [CanoScan FB630U]) at libusb:002:002

```

but as user i don`t get any result

```
  # No USB scanners found. If you expected something different, make sure that

  # you have loaded a driver for your USB host controller and have installed a

  # kernel scanner module.

```

so, my permissions of /proc/bus/usb

```
bash-2.05b# ls -lisa /proc/bus/usb/

total 0

5279 0 drwxrwx---  4 root scanner 0 May  4 18:44 .

4130 0 dr-xr-xr-x  5 root root    0 May  4 18:44 ..

6119 0 drwxrwx---  2 root scanner 0 May  4 16:44 001

6191 0 drwxrwx---  2 root scanner 0 May  4 16:44 002

6117 0 -rwxrwx---  1 root scanner 0 May  4 16:44 devices

```

my user is member of the group scanner...

but i don`t have permission to read the

proc-folder  :Sad: (

any help is welcome!!

Greetz,

twilight

----------

## Gentree

Hi ,

you need to post the contents of /proc/bus/usb/002, we cant see the scanner device from your post.

BTW what kernel are you running? 

```
uname -a
```

 *Quote:*   

> but i don`t have permission to read the 
> 
> proc-folder 

 

so do it as root, the permissions wont change depending upon who is looking.  :Cool: 

----------

## twilight

Hi,

sure, i`ve done everything as root and i am aware that the

permissions will reset after reboot, but for that i could use

that hotplug-script...

after a reboot the content of my /proc/bus/usb/002

looks like:

```

6254 0 -rw-r--r--  1 root root 43 May  5 21:59 001

6472 0 -rw-r--r--  1 root root 50 May  5 22:00 002

6660 0 -rw-r--r--  1 root root 50 May  5 22:00 003

```

my kernel is version 2.6.5 from (so, with!!) gentoo-patches.

after resetting the permissions of the 002-file (the scanner)

the content looks like:

```

6254 0 -rw-r--r--  1 root root    43 May  5 21:59 001

6472 0 -rwxrwx---  1 root scanner 50 May  5 22:00 002

6660 0 -rw-r--r--  1 root root    50 May  5 22:00 003

```

so, as you can see i was setting the permissions to 770 instead

of 660, which won`t work either...

no i test sane-find-scanner again as root and he`s detecting the

scanner properly... a scanimage -L reports the perfect right

scanner!!

now i exit that su-console and try again as user and... wow,

look there, sane-find-scanner finds it and scanimage -L reports

the right scanner also...

ahm... ok, gimp-2.0, plugin for xsane works... finds the scanner

and...

ah, odd, i can`t scan... it says that the device is busy!

ok maybe the environment wasn`t properly updated after i

created that scanner-group so that i couldn`t scan... i will

now try that boot-script and tell you if it works after a reboot...

kindest regards,

twilight

----------

## twilight

hi again,

so, now that i got this "to work" i created that bootscript

and it seems to work fine... the permissions are set exactly

the way they need to be!

But still there`s the problem with "can not start scanner: device busy"

Maybe anybody has an idea for that??

Greetings,

twilight

----------

## Gentree

OK, you have moved forwards. 

However the device busy is another issue intirely. The usb is there and the hotplugging is working and you have all the permissions correct. So in this respect your system is setup correctly.

When you said your scanner was working as root , I thought you meant your scanner was *working*. 

Sadly I have exactly the same pb !!  :Evil or Very Mad: 

I did have this hardware working at one stage and got decent scans so there is hope for this scanner. Hwvr, something changed and I got back to the "device busy" syndome.

I have been changing loads of stuff around trying to get various hardware sorted so I am unable to say exactly what borked the scanner driver or to go back to a working state.

What I can tell you is that it was recent ck-sources that got it working.

Usually I use love-sources and it was when I first tested ck that it magically fixed the scanner. It didnot last though and I now have exactly the same pb with ck sources as well.

You may like to try ck and see if it does some magic for you, it is reputed to be good on difficult usb pbs.

If something changes for you let me know. I would love to get my scanner working again but it isnot my top priority. :Crying or Very sad: 

PS check you hotplugging script by pulling the usb lead and replugging , you should see the scanner move to 002/003 , checks perms.

 :Cool: 

----------

## kurtb

Ok, here is what I did to get my Epson Perfection 2400 Photo usb scanner going.  First off I'm running 2.6.5-gentoo-r1, libusb-0.1.8, sane-backends-1.0.13-r3, and xsane-0.91.

My /etc/saned/epson.conf looks like:

```

# epson.conf

#

# here are some examples for how to configure the EPSON backend

#

# SCSI scanner:

#scsi EPSON

#

# Parallel port scanner:

#pio 0x278

#pio 0x378

#pio 0x3BC

#

# USB scanner - only enable this if you have an EPSON scanner. It could

#               otherwise block your non-EPSON scanner from being 

#               recognized.

#               Depending on your distribution, you may need either the

#               first or the second entry.

usb

```

Now, I set my scanner up with hotplug.

My /etc/hotplug/usb.usermap looks like:

```

# usb module         match_flags idVendor idProduct bcdDevice_lo bcdDevice_hi bDeviceClass bDeviceSubClass bDeviceProtocol bInterfaceClass bInterfaceSubClass bInterfaceProtocol driver_info

epson_scanner 0x0003 0x04b8 0x011b 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000

```

Now I initially tried the following script for /etc/hotplug/usb/epson_scanner which can be found online:

```

#!/bin/bash

if [ "${ACTION}" = "add" ] && [ -f "${DEVICE}" ]

then

        chown root "${DEVICE}"

        chgrp users "${DEVICE}"

        chmod 660 "${DEVICE}"

fi

```

However, on boot up for some reason the DEVICE variable doesn't get set so it fails to execute the body of the if statement so scanning doesn't work because the permissions are wrong.  I'm not sure if this is a libusb bug or hotplug bug.  However, I came up with an ugly little hack that will work.  Its not the cleanest way to get the job done but it works.  Basically, I use lsusb to grab the device info and then set the permissions.

So now my /etc/hotplug/usb/epson_scanner looks like:

```
#!/bin/bash

scanner=/proc/bus/usb

scanner=$scanner/`/usr/sbin/lsusb | grep 04b8 | awk '{print $2 "/" $4}' | cut -c1-7`

chown root:users $scanner

chmod 660 $scanner

```

I'm just using users for the group here since that works for me.  This always works for me and I don't have that weird problem where xsane would hang there for a bit anymore.  I grepped for 04b8 because that is the vendor id for all epson scanners so I can count on it being there for my scanner.  That value can be gathered from sane-find-scanner.

```

 sane-find-scanner 

  # No SCSI scanners found. If you expected something different, make sure that

  # you have loaded a SCSI driver for your SCSI adapter.

found USB scanner (vendor=0x04b8 [EPSON], product=0x011b [EPSON Scanner]) at libusb:001:003

  # Your USB scanner was (probably) detected. It may or may not be supported by

  # SANE. Try scanimage -L and read the backend's manpage.

  # Scanners connected to the parallel port or other proprietary ports can't be

  # detected by this program.

```

  Like I said it ain't pretty, but it works.  If that helps out somebody then it was worth sharing.

----------

## Gentree

Oh God, I stuffed xsane!

I tried to align with your versions in an attempt to get my scanner working.

I had xsane 0.93 since I have unmasked it to ~x86

I commented out the unmast and emerge -p xsane showed 0.91 like yours , so I went adhead.

It failed saying it needed at least sane 1.0.0 , fine.

Now when I try to go back to 0.93 I get same msg. 

Any idea waht this is about??

Thx  :Rolling Eyes: 

----------

## twilight

hi  :Smile: 

so, now we are both stucked at our current state... hmm...

thx for help coming this far, anyway  :Smile: 

for your problem, you could emerge -C the versions you don`t want

and then do a completly new merge of them with the other

version...

kindest regards,

twilight

----------

## Gentree

I wont recount why I was up until 9am this morning but things have stabalised.

There is a pb with ~x86 libusb (0.1.8 )  in that it does not smylink libusb-0.1.so.4 to anything so dozens of packages dont compile and revdep-rebuild will lead you on a merry wild goose-chase if you have gnome-core and not gnome-desktop.

Also something has done serious damage to my win partition (poss unmerging wine??). That put a dent in faith in Linux using VFAT and I mount it 'ro' from now on!  :Evil or Very Mad: 

Getting back to CanoScan I think this must be some sort of driver/software conflict rather than a config pb.

Like I said I have seen it work for a couple of days so all is possible.

Probably should go back to vanilla kernel and file a bug to xsane if it persists.

 :Cool: 

----------

## ravingsanity

 *Quote:*   

>  Like I said it ain't pretty, but it works. If that helps out somebody then it was worth sharing.

 

Praise the lord, hallelujah!  Your script actually works the way it should so that the permissions are properly set upon boot!  This was my last stumbling block to getting my scanner working seamlessly (been beating my brains out trying to figure out *why* the setup didn't work right).  Thankyouthankyouthankyou, kurtb.   :Smile: 

----------

## neysx

I have just spent a few hours trying to make iscan work with my Epson 1640 SU Photo scanner. It turned out all my problems were due to an old version of iscan libs that were still in the way. Bugger!

While all is still fresh in my memory, I'll try to sum up what I have done.

Config: gcc-3.3.3 kernel 2.6.x (no scanner.ko module)

Installed software

```
# emerge -vp libusb hotplug xsane sane-backends sane-frontends

These are the packages that I would merge, in order:

Calculating dependencies ...done!

[ebuild   R   ] dev-libs/libusb-0.1.8   0 kB 

[ebuild   R   ] sys-apps/hotplug-20040401   0 kB 

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

[ebuild   R   ] media-gfx/sane-backends-1.0.14  +gphoto2 +usb  0 kB 

[ebuild   R   ] media-gfx/sane-frontends-1.0.12  +gimp  0 kB
```

Start hotplug

```
# /etc/init.d/hotplug start

# rc-update add hotplug default
```

Edit /etc/hotplug/usb.usermap

Mine:

```
# USB PTP Nikon Coolpix 3100

usbcam     0x03 0x04b0 0x0115 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000

# Scanner 1640

usbscanner 0x03 0x04b8 0x010a 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000
```

0x04b8 0x010a codes identify your scanner. For instance, sane-find-scanner displays 

```
found USB scanner (vendor=0x04b8 [EPSON], product=0x010a [Perfection1640]) at libusb:002:006]
```

Create script usbscanner, i.e. same name as first field in the file you have just created, in /etc/hotplug/usb

Mine:

```
#!/bin/bash

#

# /etc/hotplug/usb/usbscanner

#

GROUP=users

if [ "${ACTION}" = "add" ] && [ -e "${DEVICE}" ]

then

    chgrp "${GROUP}" "${DEVICE}"

    chmod 0660 "${DEVICE}"

fi
```

Please note use of -e instead of -f which did not seem to work. My guess is /proc/bus/usb/002/00n does not look a regular file to bash when the script is called. find /proc/bus/usb -type f does list it though.

If you want to restrict access to some users, define a 'scanner' group e.g. and use it instead of users.

In file /etc/sane.d/dll.conf, define used backends (epson for xsane and epkowa for iscan) :

```
#/etc/sane.d/dll.conf

epson

epkowa
```

In files /etc/sane.d/epson and /etc/sane.d/epkowa, use usb ID's as for hotplug :

```
# epkowa.conf

#

usb 0x4B8 0x10A
```

and

```
# epson.conf

#

usb 0x4B8 0x10A
```

Note: to install iscan, you need gcc3.2 sources from http://www.epkowa.co.jp/english/linux_e/dl_scan.html, then use common ./configure / make / make install sequence.

I used ./configure --prefix=/usr --sysconfdir=/etc --with-gphoto2 --enable-libusb --with-gnu-ld

xsane and iscan-1.8.1 work perfectly for users. no need to be root.

Small glitch: xsane does not like epkowa backend (segfault), just run xsane epson.

Hth

----------

## kurtb

 *ravingsanity wrote:*   

>  Thankyouthankyouthankyou, kurtb.  

 

Glad to hear it worked for you!!

----------

## twilight

so,

i am still stuked in that "device busy" problem, but, oh wonder

oh wonder, ONCE scanning worked with gimp AFTER i tried to

get a preview with Kooka (KDE)... after that don`t working i

was trying gimp and it worked...

But now it doesn`t anymore.

Somebody gave me the hint that i should post the output

of dmesg here and if what dev-filesystem i am using...

so here it is: i am using devfs because udev doesn`t show up

in the menu of make menuconfig... even though it is deprecated

and i am using 2.6.5-gentoo-dev

and here`s what dmesg says:

```
Linux version 2.6.5-gentoo (root@heaven) (gcc version 3.3.3 20040217 (Gentoo Linux 3.3.3, propolice-3.3-7)) #3 SMP Sat Apr 17 12:03:32 CEST 2004

BIOS-provided physical RAM map:

 BIOS-e820: 0000000000000000 - 00000000000a0000 (usable)

 BIOS-e820: 00000000000f0000 - 0000000000100000 (reserved)

 BIOS-e820: 0000000000100000 - 000000001fff0000 (usable)

 BIOS-e820: 000000001fff0000 - 000000001fff3000 (ACPI NVS)

 BIOS-e820: 000000001fff3000 - 0000000020000000 (ACPI data)

 BIOS-e820: 00000000ffff0000 - 0000000100000000 (reserved)

511MB LOWMEM available.

On node 0 totalpages: 131056

  DMA zone: 4096 pages, LIFO batch:1

  Normal zone: 126960 pages, LIFO batch:16

  HighMem zone: 0 pages, LIFO batch:1

DMI 2.3 present.

ACPI disabled because your bios is from 2000 and too old

You can enable it with acpi=force

Built 1 zonelists

Kernel command line: root=/dev/hda4

Local APIC disabled by BIOS -- reenabling.

Found and enabled local APIC!

Initializing CPU#0

PID hash table entries: 2048 (order 11: 16384 bytes)

Detected 900.582 MHz processor.

Using tsc for high-res timesource

Console: colour VGA+ 80x25

Memory: 514448k/524224k available (2326k kernel code, 9016k reserved, 846k data, 180k init, 0k highmem)

Checking if this processor honours the WP bit even in supervisor mode... Ok.

Calibrating delay loop... 1761.28 BogoMIPS

Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)

Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)

Mount-cache hash table entries: 512 (order: 0, 4096 bytes)

CPU:     After generic identify, caps: 0183fbff c1c7fbff 00000000 00000000

CPU:     After vendor identify, caps: 0183fbff c1c7fbff 00000000 00000000

CPU: L1 I Cache: 64K (64 bytes/line), D cache 64K (64 bytes/line)

CPU: L2 Cache: 256K (64 bytes/line)

CPU:     After all inits, caps: 0183fbff c1c7fbff 00000000 00000020

Intel machine check architecture supported.

Intel machine check reporting enabled on CPU#0.

Enabling fast FPU save and restore... done.

Checking 'hlt' instruction... OK.

POSIX conformance testing by UNIFIX

CPU0: AMD Athlon(tm) Processor stepping 02

per-CPU timeslice cutoff: 731.50 usecs.

task migration cache decay timeout: 1 msecs.

SMP motherboard not detected.

enabled ExtINT on CPU#0

ESR value before enabling vector: 00000000

ESR value after enabling vector: 00000000

Using local APIC timer interrupts.

calibrating APIC timer ...

..... CPU clock speed is 899.0935 MHz.

..... host bus clock speed is 199.0985 MHz.

Brought up 1 CPUs

NET: Registered protocol family 16

PCI: PCI BIOS revision 2.10 entry at 0xfb430, last bus=1

PCI: Using configuration type 1

mtrr: v2.0 (20020519)

ACPI: Subsystem revision 20040326

ACPI: Interpreter disabled.

Linux Plug and Play Support v0.97 (c) Adam Belay

SCSI subsystem initialized

ACPI: ACPI tables contain no PCI IRQ routing entries

PCI: Invalid ACPI-PCI IRQ routing table

PCI: Probing PCI hardware

PCI: Probing PCI hardware (bus 00)

Disabling VIA memory write queue (PCI ID 0305, rev 02): [55] 89 & 1f -> 09

PCI: Using IRQ router VIA [1106/0686] at 0000:00:07.0

spurious 8259A interrupt: IRQ7.

Machine check exception polling timer started.

devfs: 2004-01-31 Richard Gooch (rgooch@atnf.csiro.au)

devfs: boot_options: 0x1

NTFS driver 2.1.6 [Flags: R/O].

udf: registering filesystem

Initializing Cryptographic API

PCI: Disabling Via external APIC routing

mice: PS/2 mouse device common for all mice

serio: i8042 AUX port at 0x60,0x64 irq 12

serio: i8042 KBD port at 0x60,0x64 irq 1

input: AT Translated Set 2 keyboard on isa0060/serio0

lp: driver loaded but no devices found

Serial: 8250/16550 driver $Revision: 1.90 $ 8 ports, IRQ sharing disabled

ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A

ttyS1 at I/O 0x2f8 (irq = 3) is a 16550A

parport0: PC-style at 0x378 [PCSPP,EPP]

lp0: using parport0 (polling).

parport_pc: Via 686A parallel port: io=0x378

Using anticipatory io scheduler

Floppy drive(s): fd0 is 1.44M

FDC 0 is a post-1991 82077

Uniform Multi-Platform E-IDE driver Revision: 7.00alpha2

ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx

VP_IDE: IDE controller at PCI slot 0000:00:07.1

VP_IDE: chipset revision 16

VP_IDE: not 100% native mode: will probe irqs later

VP_IDE: VIA vt82c686a (rev 22) IDE UDMA66 controller on pci0000:00:07.1

    ide0: BM-DMA at 0xd000-0xd007, BIOS settings: hda:DMA, hdb:DMA

    ide1: BM-DMA at 0xd008-0xd00f, BIOS settings: hdc:DMA, hdd:DMA

hda: Maxtor 33073H4, ATA DISK drive

hdb: WDC WD800AB-00CBA1, ATA DISK drive

ide0 at 0x1f0-0x1f7,0x3f6 on irq 14

hdc: Pioneer DVD-ROM ATAPIModel DVD-104S 020, ATAPI CD/DVD-ROM drive

hdd: HL-DT-ST GCE-8160B, ATAPI CD/DVD-ROM drive

ide1 at 0x170-0x177,0x376 on irq 15

hda: max request size: 128KiB

hda: 60030432 sectors (30735 MB) w/512KiB Cache, CHS=59554/16/63, UDMA(66)

 /dev/ide/host0/bus0/target0/lun0: p1 p2 p3 p4

hdb: max request size: 128KiB

hdb: 156301488 sectors (80026 MB) w/2048KiB Cache, CHS=65535/16/63, UDMA(66)

 /dev/ide/host0/bus0/target1/lun0: p1 < p5 >

hdc: ATAPI DVD-ROM drive, 512kB Cache, UDMA(33)

Uniform CD-ROM driver Revision: 3.20

hdd: ATAPI 40X CD-ROM CD-R/RW drive, 2048kB Cache, DMA

libata version 1.02 loaded.

oprofile: using NMI interrupt.

NET: Registered protocol family 2

IP: routing cache hash table of 4096 buckets, 32Kbytes

TCP: Hash tables configured (established 32768 bind 32768)

ip_conntrack version 2.1 (4095 buckets, 32760 max) - 300 bytes per conntrack

ip_tables: (C) 2000-2002 Netfilter core team

ipt_recent v0.3.1: Stephen Frost <sfrost@snowman.net>.  http://snowman.net/projects/ipt_recent/

arp_tables: (C) 2002 David S. Miller

NET: Registered protocol family 1

NET: Registered protocol family 17

found reiserfs format "3.6" with standard journal

Reiserfs journal params: device hda4, size 8192, journal first block 18, max trans len 1024, max batch 900, max commit age 30, max trans age 30

reiserfs: checking transaction log (hda4) for (hda4)

Using r5 hash to sort names

VFS: Mounted root (reiserfs filesystem) readonly.

Mounted devfs on /dev

Freeing unused kernel memory: 180k freed

Adding 987988k swap on /dev/hda3.  Priority:-1 extents:1

drivers/usb/core/usb.c: registered new driver usbfs

drivers/usb/core/usb.c: registered new driver hub

Real Time Clock Driver v1.12

Linux agpgart interface v0.100 (c) Dave Jones

agpgart: Detected VIA Twister-K/KT133x/KM133 chipset

agpgart: Maximum main memory to use for agp memory: 439M

agpgart: AGP aperture is 64M @ 0xd0000000

USB Universal Host Controller Interface driver v2.2

PCI: Found IRQ 11 for device 0000:00:07.2

PCI: Sharing IRQ 11 with 0000:00:07.3

PCI: Sharing IRQ 11 with 0000:00:09.2

PCI: Sharing IRQ 11 with 0000:00:0b.0

uhci_hcd 0000:00:07.2: VIA Technologies, Inc. USB

uhci_hcd 0000:00:07.2: irq 11, io base 0000d400

uhci_hcd 0000:00:07.2: new USB bus registered, assigned bus number 1

hub 1-0:1.0: USB hub found

hub 1-0:1.0: 2 ports detected

PCI: Found IRQ 11 for device 0000:00:07.3

PCI: Sharing IRQ 11 with 0000:00:07.2

PCI: Sharing IRQ 11 with 0000:00:09.2

PCI: Sharing IRQ 11 with 0000:00:0b.0

uhci_hcd 0000:00:07.3: VIA Technologies, Inc. USB (#2)

uhci_hcd 0000:00:07.3: irq 11, io base 0000d800

uhci_hcd 0000:00:07.3: new USB bus registered, assigned bus number 2

hub 2-0:1.0: USB hub found

hub 2-0:1.0: 2 ports detected

usb 1-2: new low speed USB device using address 2

PCI: Found IRQ 5 for device 0000:00:09.0

drivers/usb/core/usb.c: registered new driver hiddev

usb 2-1: new full speed USB device using address 2

input: USB HID v1.10 Mouse [Logitech USB Receiver] on usb-0000:00:07.2-2

drivers/usb/core/usb.c: registered new driver hid

drivers/usb/input/hid-core.c: v2.0:USB HID core driver

drivers/input/joystick/sidewinder.c: Init 0: Opened pci0000:00:09.1/gameport0, io 0xe000, speed 1269

sidewinder.c: Read 0 triplets. []

drivers/input/joystick/sidewinder.c: Init 1: Mode 1. Length 0.

sidewinder.c: Read 0 triplets. []

drivers/input/joystick/sidewinder.c: Init 1b: Length 0.

gameport: pci0000:00:09.1 speed 1269 kHz

usb 2-2: new full speed USB device using address 3

ieee1394: Initialized config rom entry `ip1394'

ohci1394: $Rev: 1172 $ Ben Collins <bcollins@debian.org>

PCI: Found IRQ 11 for device 0000:00:09.2

PCI: Sharing IRQ 11 with 0000:00:07.2

PCI: Sharing IRQ 11 with 0000:00:07.3

PCI: Sharing IRQ 11 with 0000:00:0b.0

ohci1394: fw-host0: Remapped memory spaces reg 0xe09b7000

ohci1394: fw-host0: Soft reset finished

ohci1394: fw-host0: Iso contexts reg: 000000a8 implemented: 0000000f

ohci1394: fw-host0: 4 iso receive contexts available

ohci1394: fw-host0: Iso contexts reg: 00000098 implemented: 000000ff

ohci1394: fw-host0: 8 iso transmit contexts available

ohci1394: fw-host0: Receive DMA ctx=0 initialized

ohci1394: fw-host0: Receive DMA ctx=0 initialized

ohci1394: fw-host0: Transmit DMA ctx=0 initialized

ohci1394: fw-host0: Transmit DMA ctx=1 initialized

ohci1394: fw-host0: OHCI-1394 1.1 (PCI): IRQ=[11]  MMIO=[de004000-de0047ff]  Max Packet=[2048]

ieee1394: CSR: setting expire to 98, HZ=1000

drivers/usb/class/usblp.c: usblp0: USB Bidirectional printer dev 3 if 0 alt 0 proto 2 vid 0x03F0 pid 0x3104

drivers/usb/core/usb.c: registered new driver usblp

drivers/usb/class/usblp.c: v0.13: USB Printer Device Class driver

8139too Fast Ethernet driver 0.9.27

PCI: Found IRQ 11 for device 0000:00:0b.0

PCI: Sharing IRQ 11 with 0000:00:07.2

PCI: Sharing IRQ 11 with 0000:00:07.3

PCI: Sharing IRQ 11 with 0000:00:09.2

eth0: RealTek RTL8139 at 0xe400, 00:c0:26:8a:b5:d1, IRQ 11

eth0:  Identified 8139 chip type 'RTL-8100B/8139D'

eth0: link up, 100Mbps, full-duplex, lpa 0x45E1

ohci_hcd: 2004 Feb 02 USB 1.1 'Open' Host Controller (OHCI) Driver (PCI)

ohci_hcd: block sizes: ed 64 td 64

ohci1394: fw-host0: IntEvent: 00030010

ohci1394: fw-host0: irq_handler: Bus reset requested

ohci1394: fw-host0: Cancel request received

ohci1394: fw-host0: Got RQPkt interrupt status=0x00008409

ohci1394: fw-host0: SelfID interrupt received (phyid 0, root)

ohci1394: fw-host0: SelfID packet 0x807f8c52 received

ieee1394: Including SelfID 0x528c7f80

ohci1394: fw-host0: SelfID for this node is 0x807f8c52

ohci1394: fw-host0: SelfID complete

ohci1394: fw-host0: PhyReqFilter=ffffffffffffffff

ieee1394: selfid_complete called with successful SelfID stage ... irm_id: 0xFFC0 node_id: 0xFFC0

ieee1394: NodeMgr: Processing host reset for knodemgrd_0

ohci1394: fw-host0: Single packet rcv'd

ohci1394: fw-host0: Got phy packet ctx=0 ... discarded

ieee1394: send packet local: ffc00140 ffc0ffff f0000400

ieee1394: received packet: ffc00140 ffc0ffff f0000400

ieee1394: send packet local: ffc00160 ffc00000 00000000 07f00404

ieee1394: received packet: ffc00160 ffc00000 00000000 07f00404

ieee1394: send packet local: ffc00540 ffc0ffff f0000404

ieee1394: received packet: ffc00540 ffc0ffff f0000404

ieee1394: send packet local: ffc00560 ffc00000 00000000 34393331

ieee1394: received packet: ffc00560 ffc00000 00000000 34393331

ieee1394: send packet local: ffc00940 ffc0ffff f0000408

ieee1394: received packet: ffc00940 ffc0ffff f0000408

ieee1394: send packet local: ffc00960 ffc00000 00000000 32a264e0

ieee1394: received packet: ffc00960 ffc00000 00000000 32a264e0

ieee1394: send packet local: ffc00d40 ffc0ffff f000040c

ieee1394: received packet: ffc00d40 ffc0ffff f000040c

ieee1394: send packet local: ffc00d60 ffc00000 00000000 003c0200

ieee1394: received packet: ffc00d60 ffc00000 00000000 003c0200

ieee1394: send packet local: ffc01140 ffc0ffff f0000410

ieee1394: received packet: ffc01140 ffc0ffff f0000410

ieee1394: send packet local: ffc01160 ffc00000 00000000 8aa10791

ieee1394: received packet: ffc01160 ffc00000 00000000 8aa10791

ieee1394: send packet local: ffc01550 ffc0ffff f0000400 04000000

ieee1394: received packet: ffc01550 ffc0ffff f0000400 04000000

ieee1394: send packet local: ffc01570 ffc00000 00000000 04000000

ieee1394: received packet: ffc01570 ffc00000 00000000 04000000

ieee1394: NodeMgr: raw=0xe064a232 irmc=1 cmc=1 isc=1 bmc=0 pmc=0 cyc_clk_acc=100 max_rec=2048 max_rom=1024 gen=3 lspd=2

ieee1394: Host added: ID:BUS[0-00:1023]  GUID[00023c009107a18a]

ieee1394: send packet 100: ffff0100 ffc0ffff f0000234 1f0000c0

ohci1394: fw-host0: Inserting packet for node 0-63:1023, tlabel=0, tcode=0x0, speed=0

ohci1394: fw-host0: Starting transmit DMA ctx=0

ohci1394: fw-host0: IntEvent: 00000001

ohci1394: fw-host0: Got reqTxComplete interrupt status=0x00008011

ohci1394: fw-host0: Packet sent to node 63 tcode=0x0 tLabel=0x00 ack=0x11 spd=0 data=0x1F0000C0 ctx=0

ip1394: $Rev: 1175 $ Ben Collins <bcollins@debian.org>

ip1394: eth1: IEEE-1394 IPv4 over 1394 Ethernet (fw-host0)

ohci1394: fw-host0: ohci_iso_recv_init: packet-per-buffer mode, DMA buffer is 16 pages (65536 bytes), using 16 blocks, buf_stride 4096, block_irq_interval 1

nvidia: no version magic, tainting kernel.

nvidia: module license 'NVIDIA' taints kernel.

0: nvidia: loading NVIDIA Linux x86 NVIDIA Kernel Module  1.0-5336  Wed Jan 14 18:29:26 PST 2004

agpgart: Found an AGP 2.0 compliant device at 0000:00:00.0.

agpgart: Putting AGP V2 device at 0000:00:00.0 into 4x mode

agpgart: Putting AGP V2 device at 0000:01:00.0 into 4x mode

```

thanks for any help

greetings,

twilight

----------

## MrStaticVoid

I did not bother reading this entire thread, I just wanted to let the people with Epson scanners know that I created an ebuild for iscan.  You can find it https://bugs.gentoo.org/show_bug.cgi?id=50043 .  I find that the epkowa backend that comes with iscan solved all of the problems I was having with the epson backend.

----------

## bfelger

 *lyz wrote:*   

> 
> 
> Did all of this, but I forgot one important detail that I though I'de share.  Make sure the epson_scanner script has execute permissions or it won't execute.   
> 
> 

 

Doh! Thanks, lyz, you saved me a couple hours of hair pulling...

----------

## ralle

Well, with the help of this thread I got my scanner working almost perfectly, but one issue remains:

My keyboard is always switched off as soon as I start scanning anything. I have to plug it out and in again to make it work. Anybody noticed this weirdness? Anybody found a solution?

----------

## davecs

 *kurtb wrote:*   

> 
> 
> ```
> 
> The permissions for the device files used by libusb  must  be  adjusted
> ...

 

I've tried everything and nothing made any difference then I added the line 

```

none /proc/bus/usb usbfs defaults,devmode=0666  0  0

```

to my /etc/fstab and hey presto it works!

----------

## Gentree

You say you run libusb 0.1.8 , when I use ~x86 and emerge this version I get faults from just about any scan software:

```
bash-2.05b# scanimage -L

scanimage: error while loading shared libraries: libusb-0.1.so.4: cannot open shared object file: No such file or directory

bash-2.05b# 
```

Did you fix that or not get it?

Thx  :Cool: 

----------

## metalus

For sake of completeness to this thread, let's capture this one as well. I was getting this error whenever I attempted to start /usr/sbin/saned:

```
May 23 20:46:38 tux saned[18857]: check_host: getpeername failed: socket operation on non-socket

May 23 20:46:38 tux saned[18857]: init: access by host [error] denied

May 23 20:46:38 tux saned[18857]: quit: exiting

```

if you use xinetd to launch the saned daemon, you may have to disable the "only_from" in the /etc/xinetd.conf file:

```
defaults

{

#       only_from      = localhost

        instances      = 60

        log_type       = SYSLOG authpriv info

        log_on_success = HOST PID

        log_on_failure = HOST

        cps            = 25 30

}

includedir /etc/xinetd.d
```

And then, to run a scanner front end on a client machine (client in my case is redhat 9 machine talking to a gentoo scanner server), you need to type:

```
xsane net:tux:epson
```

 (replace with your host and scanner name, net: is the prefix that gets xsane to look on the network)

My 2 cents

metalus

----------

## fusibou

 *Gentree wrote:*   

> You say you run libusb 0.1.8 , when I use ~x86 and emerge this version I get faults from just about any scan software:
> 
> ```
> bash-2.05b# scanimage -L
> 
> ...

 

re emerge sane-backends

----------

## fkurth

I made an ebuild of the newer version of iscan.

Works with libusb

Solution to make it work with xsane/scanimage and friends is applied.

get it here:

https://bugs.gentoo.org/show_bug.cgi?id=50043

have fun, report bugs.   :Evil or Very Mad: 

felix

----------

## Gentree

Nice work producing an ebuild.

Only pb I have is it has fetch restrictions since the source comes from epkowa site and on that site they seem to be offering a later version now.

iscan-1.9.0-5.redhat.8.0.tar.gz

 maybe the ebuild needs editing  :Question: 

Also:

Do you have any experience of neg. scanning with the epson * Photo range?

I am looking to buy a scanner and want to choose one that is fully supported under Linux.

Epson seem to have a very active and positive support for Linux so I am strongly looking at thier range. However the std xsane-backends seem to be a bit lacking in full support .

Do you have some advise to offer ,

Thanks.   :Cool: 

----------

## neysx

 *Gentree wrote:*   

> Do you have any experience of neg. scanning with the epson * Photo range?
> 
> I am looking to buy a scanner and want to choose one that is fully supported under Linux.
> 
> Epson seem to have a very active and positive support for Linux so I am strongly looking at thier range. However the std xsane-backends seem to be a bit lacking in full support .
> ...

 I'm quite happy with my 1640SU Photo. Negative scanning works great with it. iscan does a much better job at it than xsane btw.

If you need to scan many negatives, you might want to look for a specialized scanner. They have become quite affordable.

Check this 400dpi negative scan (2.3Mb) or the same one at 3200dpi (7.2Mb)

----------

## Gentree

Thanks for a very interesting post.

the 3200 dpi is facinating , you can really see the individual chrystals at this resolution which answers another of my qu. about what resolution was required to get the higherst quality from film scanning.

After a bit of googling I had been able to calculate 1600 should exeed the grain resolution of a 100 ASA film. I guess that the shot you posted was done on a somewhat faster film. 400ASA perhaps. Can you recall that detail?

 *Quote:*   

>  iscan does a much better job at it than xsane btw.

 

Yes, I am becoming a bit disappointed with sane*. It's a great open source project but lacks performance and support at a number of levels. Another reason for supporting Epson if they produce quality support for Linux. 

the 1640SU Photo is getting a bit old now (with the rate of change in hardware these days!) and is probably hard to find new now.

Do you have any feedback as to whether the newer devices perform as well? (newer is not always better)

I am looking at 1670 Photo or 2400 Photo in particular.

Thanks again.

 :Cool: 

----------

## neysx

 *Gentree wrote:*   

> After a bit of googling I had been able to calculate 1600 should exeed the grain resolution of a 100 ASA film. I guess that the shot you posted was done on a somewhat faster film. 400ASA perhaps. Can you recall that detail?

  Can't remember but it must have been 400 because I used it home (inside). Negative strip shows codes G23 and CH-7.

 *Gentree wrote:*   

> the 1640SU Photo is getting a bit old now (with the rate of change in hardware these days!) and is probably hard to find new now.
> 
> Do you have any feedback as to whether the newer devices perform as well? (newer is not always better)
> 
> I am looking at 1670 Photo or 2400 Photo in particular.

 Sorry, I don't know anything about newer models.

----------

## fkurth

Why do you say there is a newer version avialable ?

The newest one on there site is 1.9.0-5 withch is used in the latest ebuild.

There are no fetch restirictions since i expect it to be put on the gentoo mirrors. The license of epson allows that.

I want you to report success or failure with this ebuild if you're using it.

Does the LD_PRLEOAD stuff make sane/xsane/scanimage work for you ?

Report everything to bugzilla:

https://bugs.gentoo.org/show_bug.cgi?id=50043

felix   :Cool: 

----------

## Corona688

 *dopey wrote:*   

> so wanna hear something crazy .  scanimage fails. scanimage -L finds the scanner, but it refuses to scan.
> 
> However now xscanimage and xsane both work properly unless the scanner goes to sleep (light goes off).  if the scanner is sleeping and i fire up xscanimage or xsane, it hanges the programs for a couple of minutes before they finally start up and things work.

  Huh.  That sounds like the exact same problem I had with my Epson CX3200 multifunction device over a year ago.

----------

## -YoShi-

 *fkurth wrote:*   

> I made an ebuild of the newer version of iscan.
> 
> Works with libusb
> 
> Solution to make it work with xsane/scanimage and friends is applied.
> ...

 

good job man.

I have the same problem of Gentree

```

bash-2.05b# scanimage -L

scanimage: error while loading shared libraries: libusb-0.1.4: cannot open shared object file: No such file or directory

```

I have tried all... but nothing that stupid error doesn't go away.

The last attempt was:

```

# /etc/init.d/hotplug stop && rc-update del hotplug default

# Unmerge libusb, hotplug, sane-back, sane-front, xsane, iscan

# reboot

# ACCEPT_KEYWORDS="~x86" emerge libusb hotplug sane (back,front,x)

# emerge iscan 1.9

# start hotplug and add it to default level

# reboot

```

All that but no result...iscan,xsane,scanimage give the seme out no libusb bla..bla..bla..

Only command that run correctly is sane-find-scanner..  :Confused: 

It work it is like root like that user

----------

## fkurth

Im realy wondering. I just merged libusb on my system

emerge -avB libusb

(this gaves me version 0.1. :Cool: 

And this installed the following files

./usr/

./usr/bin/

./usr/bin/libusb-config

./usr/lib/

./usr/lib/libusb.la

./usr/lib/libusb

./usr/lib/libusb.a

./usr/lib/libusb-0.1.4

./usr/lib/libusb-0.1.4.4.0

./usr/share/

./usr/share/doc/

./usr/share/doc/libusb-0.1.8/

./usr/share/doc/libusb-0.1.8/README.gz

./usr/share/doc/libusb-0.1.8/NEWS.gz

./usr/share/doc/libusb-0.1.8/AUTHORS.gz

./usr/include/

./usr/include/usb.h

So /usr/lib/libusb-0.1.4 gets installed. Whats up with your libusb ?

What files will installed when you try did that ?

----------

## -YoShi-

This is emerge out...

During the merge i don't have seen any error

```

bash-2.05b# emerge -avB libusb

These are the packages that I would merge, in order:

Calculating dependencies ...done!

[ebuild     UD] dev-libs/libusb-0.1.7-r1 [0.1.8]  0 kB

Total size of downloads: 0 kB

```

----------

## fkurth

Do the following:

ACCEPT_KEYWORDS="~x86" emerge -B libusb

and post the last lines of the output, when it merges the files in the image.

----------

## -YoShi-

This is the output

```

   usr/lib/libusb-0.1.so.4.4.0

making executable: /usr/lib/libusb-0.1.so.4.4.0

>>> Completed installing into /var/tmp/portage/libusb-0.1.8/image/

./

./usr/

./usr/bin/

./usr/bin/libusb-config

./usr/lib/

./usr/lib/libusb-0.1.so.4.4.0

./usr/lib/libusb-0.1.so.4

./usr/lib/libusb.so

./usr/lib/libusb.la

./usr/lib/libusb.a

./usr/include/

./usr/include/usb.h

./usr/share/

./usr/share/doc/

./usr/share/doc/libusb-0.1.8/

./usr/share/doc/libusb-0.1.8/AUTHORS.gz

./usr/share/doc/libusb-0.1.8/NEWS.gz

./usr/share/doc/libusb-0.1.8/README.gz

>>> Done.

>>> Auto-cleaning packages ...

>>> No outdated packages were found on your system.

 * GNU info directory index is up-to-date.

bash-2.05b# scanimage -L

scanimage: error while loading shared libraries: libusb-0.1.4: cannot open shared object file: No such file or directory

bash-2.05b#

```

P.s. tnx for help me

----------

## fkurth

Your libusb got installed wrong.

Whats youre version of libtool ?

libtool --version

Mine is:

ltmain.sh (GNU libtool) 1.4.3 (1.922.2.111 2002/10/23 02:54:36)

This is the shit happened:

./usr/lib/libusb-0.1.so.4

It schoul be: 

./usr/lib/libusb-0.1.4.so

On my system i have sys-devel/libtool-1.4.3-r4 installed. We schould

track this down and fill a bug on libusb and/or libtool.

----------

## fkurth

As a first hack around the prob, try to set a symlink:

ln -s /usr/lib/libusb-0.1.so.4 /usr/lib/libusb.0.1.4

----------

## -YoShi-

 *fkurth wrote:*   

> As a first hack around the prob, try to set a symlink:
> 
> ln -s /usr/lib/libusb-0.1.so.4 /usr/lib/libusb.0.1.4

 

Thank you.Sorry but yesterday my internet connection was lost and I couldn't post a reply. I have resolved using your same method.  I have created the link manually and works.  The only problem is that I have had to return to version 1,8,1 because the 1,9 give an error to me "scanner not supported" I have epson perfection a 1250 photo

Tnx 4 help me  :Smile: 

----------

## fkurth

Since other people suffer from that problem, it would be nice, if you can track down why libusb got installed wrong ?

----------

## -YoShi-

Not unfortunately I cannot make a tracking of the error, because I do not know as it happened

----------

## Bob Paddock

I just installed a new hard disk and decided to go for a complete fresh install, using

pure UDEV

Now I can not get my scanner to work.  I'm using 2.6.7-r7 kernel with udev-029.

In the pasted I followed this with no problems:

http://www.khk.net/sane/libusb.html

sane-find-scanner -v -v says:

searching for USB scanners:

checking /dev/usb/scanner... failed to open (Invalid argument)

checking /dev/usb/scanner0... failed to open (Invalid argument)

checking /dev/usb/scanner1... failed to open (Invalid argument)

...

  # No USB scanners found. If you expected something different, make sure that

  # you have loaded a driver for your USB host controller and have installed a

  # kernel scanner module.

usbview is showing the scanner.

If I unplug the scanner then plug it back in /var/log/messages says:

Jul  5 18:18:21 tux usb 2-1.1: new full speed USB device using address 5

Where do I go from here?

----------

## Decibels

What was your scanner dev called before in /dev? Mine is /dev/sg0 and made a symlink to /dev/scanner.

----------

## Bob Paddock

 *Quote:*   

> 
> 
> What was your scanner dev called before in /dev? Mine is /dev/sg0 and made a symlink to /dev/scanner.
> 
> 

 

I don't know.  From your 'sg' I would think that means that you have a SCSI scanner.

I thought UDEV was going to take care of this kind of problem?

----------

## Decibels

Actually it's a usb scanner, but only works under scsi emulation. 

There is a program I wrote in python on the Udev Primer page: udevread.py .

You can run it as:  python udevread.py --all

It will spit out all the /sys information on everything in /dev folder. You could use it to look thru and see if you see you scanner named anywhere. Then you would know what it is being called. Just like my scanner, it maybe usb, but uses scsi emulation and is in the group disk. Weird.

You can send the output of the program to a text file with adding

> udevoutput.txt

And then look thru that for your scanner. Might help.

Ya, eventually udev will, but still is a work in progress, just works pretty good right now, but not all the way complete.

----------

## Bob Paddock

 *Quote:*   

> 
> 
> You can run it as: python udevread.py --all
> 
> 

 

Doing that spits out a lot of stuff, but has zip in it about the Epson Scanner.

This is what I'm finding from script output:

```

SYSFS{idVendor}="0451"

which is TI USB Hub

SYSFS{product}="Lexmark Z53"

SYSFS{idVendor}="043d"

SYSFS{idVendor}="0000"

SYSFS{manufacturer}="Linux 2.6.7-gentoo-r7 uhci_hcd"

SYSFS{maxchild}="2"

SYSFS{product}="VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (#2)"

-----------------------------

---> Character Device # 743

-----------------------------

/dev/usbscanner0

device not found in database

 Examining /sys for information on Device

```

sand-find-scanner says /dev/usbscanner0 does NOT exist, but ls /dev/usbscanner0 shows it.

What does that indicate?

lsusb says:

```

Bus 002 Device 005: ID 043d:0054 Lexmark International, Inc. 

Bus 002 Device 004: ID 0733:0430 ViewQuest Technologies, Inc. Intel Pro Share WebCam

Bus 002 Device 003: ID 04b8:010b Seiko Epson Corp. Perfection 1240

Bus 002 Device 002: ID 0451:2046 Texas Instruments, Inc. TUSB2046 Hub

Bus 002 Device 001: ID 0000:0000  

Bus 001 Device 001: ID 0000:0000  

```

dmesg says:

```

usb 2-1.1: USB disconnect, address 3 {Unplugged Scanner}

usb 2-1.1: new full speed USB device using address 6 {Plugged back in}

```

 *Quote:*   

> 
> 
> Ya, eventually udev will, but still is a work in progress, just works pretty good right now, but not all the way complete.
> 
> 

 

The frustrating part is that this worked with no problems before I installed the new harddisk and system.  :Sad: 

----------

## Decibels

 *Bob Paddock wrote:*   

> 
> 
> ```
> 
> SYSFS{idVendor}="0451"
> ...

 

/dev/usbscanner is in the listing as character device #743. I take it your scanner is Lexmark Z53 .  Which would be the device above that, it is character device #742, not 743. You just got your titles mixed up.

It list the [device type , type count] then list the information below that.

Look what character device #742 says. That would be the device that udev is seeing as your Lexmark Z53.

So one thing is obvious, udev isn't listing your scanner as /usbscanner0

----------

## Bob Paddock

 *Quote:*   

> 
> 
> /dev/usbscanner is in the listing as character device #743. I take it your scanner is Lexmark Z53 . Which would be the device above that, it is character device #742, not 743. You just got your titles mixed up. It list the [device type , type count] then list the information below that. 
> 
> Look what character device #742 says. That would be the device that udev is seeing as your Lexmark Z53. 
> ...

 

Lexmar Z53 is my printer, the scanner is Epson Perfection 1240U.  This is

what cat /proc/bus/usb/devices says about the scanner:

```

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

D:  Ver= 1.00 Cls=ff(vend.) Sub=ff Prot=ff MxPS=64 #Cfgs=  1

P:  Vendor=04b8 ProdID=010b Rev= 1.14

S:  Manufacturer=EPSON

S:  Product=Perfection1240

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

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

E:  Ad=81(I) Atr=02(Bulk) MxPS=  64 Ivl=0ms

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

```

Here is 740 to 744:

```

-----------------------------

---> Character Device # 740

-----------------------------

/dev/ttyzf

device not found in database

 Examining /sys for information on Device

-----------------------------

---> Character Device # 741

-----------------------------

/dev/urandom

P: /class/mem/urandom

N: urandom

T: c

M: 020444

S: 

O: root

G: root

F: 

L: 0

U: 7

 Examining /sys for information on Device

looking at class device '/sys/class/mem/urandom':

SYSFS{dev}="1:9"

-----------------------------

---> Character Device # 742

-----------------------------

/dev/usb/lp0

P: /class/usb/lp0

N: usb/lp0

T: c

M: 020660

S: 

O: root

G: lp

F: /etc/udev/rules.d/50-udev.rules

L: 108

U: 29

 Examining /sys for information on Device

looking at class device '/sys/class/usb/lp0':

SYSFS{dev}="180:0"

follow the class device's "device"

looking at the device chain at '/sys/devices/pci0000:00/0000:00:07.3/usb2/2-1/2-1.4/2-1.4:1.0':

BUS="usb"

ID="2-1.4:1.0"

SYSFS{bAlternateSetting}=" 0"

SYSFS{bInterfaceClass}="07"

SYSFS{bInterfaceNumber}="00"

SYSFS{bInterfaceProtocol}="02"

SYSFS{bInterfaceSubClass}="01"

SYSFS{bNumEndpoints}="02"

SYSFS{detach_state}="0"

SYSFS{iInterface}="00"

looking at the device chain at '/sys/devices/pci0000:00/0000:00:07.3/usb2/2-1/2-1.4':

BUS="usb"

ID="2-1.4"

SYSFS{bConfigurationValue}="1"

SYSFS{bDeviceClass}="00"

SYSFS{bDeviceProtocol}="00"

SYSFS{bDeviceSubClass}="00"

SYSFS{bMaxPower}="  4mA"

SYSFS{bNumConfigurations}="1"

SYSFS{bNumInterfaces}=" 1"

SYSFS{bcdDevice}="0100"

SYSFS{bmAttributes}="40"

SYSFS{detach_state}="0"

SYSFS{devnum}="5"

SYSFS{idProduct}="0054"

SYSFS{idVendor}="043d"

SYSFS{manufacturer}="Lexmark"

SYSFS{maxchild}="0"

SYSFS{product}="Lexmark Z53"

SYSFS{speed}="12"

SYSFS{version}=" 1.00"

looking at the device chain at '/sys/devices/pci0000:00/0000:00:07.3/usb2/2-1':

BUS="usb"

ID="2-1"

SYSFS{bConfigurationValue}="1"

SYSFS{bDeviceClass}="09"

SYSFS{bDeviceProtocol}="00"

SYSFS{bDeviceSubClass}="00"

SYSFS{bMaxPower}="  0mA"

SYSFS{bNumConfigurations}="1"

SYSFS{bNumInterfaces}=" 1"

SYSFS{bcdDevice}="0125"

SYSFS{bmAttributes}="e0"

SYSFS{detach_state}="0"

SYSFS{devnum}="2"

SYSFS{idProduct}="2046"

SYSFS{idVendor}="0451"

SYSFS{maxchild}="4"

SYSFS{speed}="12"

SYSFS{version}=" 1.10"

looking at the device chain at '/sys/devices/pci0000:00/0000:00:07.3/usb2':

BUS="usb"

ID="usb2"

SYSFS{bConfigurationValue}="1"

SYSFS{bDeviceClass}="09"

SYSFS{bDeviceProtocol}="00"

SYSFS{bDeviceSubClass}="00"

SYSFS{bMaxPower}="  0mA"

SYSFS{bNumConfigurations}="1"

SYSFS{bNumInterfaces}=" 1"

SYSFS{bcdDevice}="0206"

SYSFS{bmAttributes}="c0"

SYSFS{detach_state}="0"

SYSFS{devnum}="1"

SYSFS{idProduct}="0000"

SYSFS{idVendor}="0000"

SYSFS{manufacturer}="Linux 2.6.7-gentoo-r7 uhci_hcd"

SYSFS{maxchild}="2"

SYSFS{product}="VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (#2)"

SYSFS{serial}="0000:00:07.3"

SYSFS{speed}="12"

SYSFS{version}=" 1.10"

looking at the device chain at '/sys/devices/pci0000:00/0000:00:07.3':

BUS="pci"

ID="0000:00:07.3"

SYSFS{class}="0x0c0300"

SYSFS{detach_state}="0"

SYSFS{device}="0x3038"

SYSFS{irq}="11"

SYSFS{subsystem_device}="0x1234"

SYSFS{subsystem_vendor}="0x0925"

SYSFS{vendor}="0x1106"

looking at the device chain at '/sys/devices/pci0000:00':

BUS=""

ID="pci0000:00"

SYSFS{detach_state}="0"

-----------------------------

---> Character Device # 743

-----------------------------

/dev/usbscanner0

device not found in database

 Examining /sys for information on Device

-----------------------------

---> Character Device # 744

-----------------------------

/dev/vbi0

device not found in database

 Examining /sys for information on Device

```

 *Quote:*   

> 
> 
> So one thing is obvious, udev isn't listing your scanner as /usbscanner0/
> 
> 

 

UDEV seems to be completely obliviouss to any scanner.  Don't know what /dev/usbscanner0 is,  but it isn't getting any scanning done.  sane-find-scanner says it can not open the device.

If (X)Sane are using libusb now how do these devices fit into libusb usage?

----------

## Decibels

Does 

```
grep -i 'epson' /sys
```

 find anything?

----------

## Bob Paddock

 *Quote:*   

> 
> 
> grep -i 'epson' /sys find anything?
> 
> 

 

No, but "egrep -ir epson /sys" shows this:

```

/sys/class/usb_host/usb2/driver/0000:00:07.3/usb2/2-1/2-1.1/manufacturer:EPSON

/sys/class/usb_host/usb2/device/usb2/2-1/2-1.1/manufacturer:EPSON

/sys/class/usb_host/usb1/driver/0000:00:07.3/usb2/2-1/2-1.1/manufacturer:EPSON

/sys/class/pci_bus/0000:00/bridge/0000:00:07.3/usb2/2-1/2-1.1/manufacturer:EPSON

/sys/bus/usb/drivers/usb/2-1.1/manufacturer:EPSON

/sys/bus/usb/drivers/usb/2-1/2-1.1/manufacturer:EPSON

/sys/bus/usb/drivers/usb/usb2/2-1/2-1.1/manufacturer:EPSON

/sys/bus/usb/devices/2-1.1/manufacturer:EPSON

/sys/bus/usb/devices/2-1/2-1.1/manufacturer:EPSON

/sys/bus/usb/devices/usb2/2-1/2-1.1/manufacturer:EPSON

/sys/bus/pci/drivers/uhci_hcd/0000:00:07.3/usb2/2-1/2-1.1/manufacturer:EPSON

/sys/bus/pci/devices/0000:00:07.3/usb2/2-1/2-1.1/manufacturer:EPSON

/sys/devices/pci0000:00/0000:00:07.3/usb2/2-1/2-1.1/manufacturer:EPSON

```

----------

## Decibels

??? for some reason it looks like it recognizes it, but doesn't have the ability yet to make a device for it. My scanner use to be like that until they got generic scsi making devices. 

egrep'ing my scanner, that works now:

```
/sys/class/scsi_generic/sg0/device/model:Scanner V6UPL
```

Since don't see anything for a device and udevread.py doesn't pick up it (same info, just cleaner). Looks like what ever device needs created for your scanner isn't supported yet.

----------

## Bob Paddock

 *Quote:*   

> 
> 
> Since don't see anything for a device and udevread.py doesn't pick up it (same info, just cleaner). Looks like what ever device needs created for your scanner isn't supported yet.
> 
> 

 

This WAS working before I reinstalled.  Then I was using udev-15 or 18.

I tried loading the 'sg' devices with modprobe as shot in the dark, I did have them loaded for a zip drive on the past system.  Didn't seem to help any.

----------

## Bob Paddock

 *Quote:*   

> 
> 
> Since don't see anything for a device and udevread.py doesn't pick up it (same info, just cleaner). Looks like what ever device needs created for your scanner isn't supported yet.
> 
> 

 

Maybe this is the problem...off to remerge sane...

 *Quote:*   

> 
> 
> https://bugs.gentoo.org/show_bug.cgi?id=49815
> 
> There is another issue with libusbscanner:
> ...

 

----------

## Bob Paddock

 *Quote:*   

> 
> 
> * There are some problems with the hotplug script when
> 
>  * restarting hotplug with some kernel versions.
> ...

 

https://bugs.gentoo.org/show_bug.cgi?id=50934

emerging the masked sane-backends-1.0.14-r3.ebuild got scanner working again.

Seems someone needs to do better regression testing.  :Sad: 

```

found USB scanner (vendor=0x0733, product=0x0430) at libusb:002:004

found USB scanner (vendor=0x04b8 [EPSON], product=0x010b [Perfection1240]) at libusb:002:003

```

Not sure why it thinks WebCam (733) is a scanner?

[/code]

----------

## Decibels

So what device did it end up being?  :Question: 

----------

## Bob Paddock

 *Quote:*   

> 
> 
> So what device did it end up being?
> 
> 

 

/dev/usbscanner0

----------

## schmeggahead

I'm trying to get my HP6250C running.

I can see that the scanner is detected in USB:

```
bash-2.05b# dmesg | grep usb

usb.c: registered new driver usbdevfs

usb.c: registered new driver hub

usb.c: new USB bus registered, assigned bus number 1

usb.c: new USB bus registered, assigned bus number 2

usb.c: new USB bus registered, assigned bus number 3

usb.c: registered new driver hid

usb.c: registered new driver usbscanner

input: USB HID v1.00 Keyboard [045e:000b] on usb3:2.0

bash-2.05b# sane-find-scanner

  # No SCSI scanners found. If you expected something different, make sure that

  # you have loaded a SCSI driver for your SCSI adapter.

  # Also you need support for SCSI Generic (sg) in your operating system.

  # If using Linux, try "modprobe sg".

  # No USB scanners found. If you expected something different, make sure that

  # you have loaded a driver for your USB host controller and have installed a

  # kernel scanner module.

  # Not checking for parallel port scanners.

  # Most Scanners connected to the parallel port or other proprietary ports

  # can't be detected by this program.

bash-2.05b#
```

I look at /proc/bus/usb/devices and don't see the scanner:

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

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

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

P:  Vendor=0000 ProdID=0000 Rev= 0.00

S:  Product=USB UHCI-alt Root Hub

S:  SerialNumber=b400

C:* #Ifs= 1 Cfg#= 1 Atr=40 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=   8 Ivl=255ms

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

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

P:  Vendor=045e ProdID=000b Rev= 0.82

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

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

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

T:  Bus=02 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.00 Cls=09(hub  ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1

P:  Vendor=0000 ProdID=0000 Rev= 0.00

S:  Product=USB UHCI-alt Root Hub

S:  SerialNumber=b000

C:* #Ifs= 1 Cfg#= 1 Atr=40 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=   8 Ivl=255ms

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.00 Cls=09(hub  ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1

P:  Vendor=0000 ProdID=0000 Rev= 0.00

S:  Product=USB UHCI-alt Root Hub

S:  SerialNumber=b800

C:* #Ifs= 1 Cfg#= 1 Atr=40 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=   8 Ivl=255ms

```

My scanner shows up in /dev/usb/scanner0 rather than /dev/usbscanner

Not a clue where to go from here.

Thanks.

----------

## Decibels

Is you scanner a HP ScanJet 6250C ?

```
Model:         Product id:     Interface:

ScanJet 6250C  C6270A 3828     SCSI/USB
```

Support for models 5200C/62X0C/63X0C connected to the USB  require  the        kernel scanner driver or libusb.

See: Sane Backend HP

Looking at the /etc/sane.d/hp.conf looks like you need to do a little editing:

```

......

# Uncomment the following if your scanner is connected by USB,

# but you are not using libusb

# /dev/usb/scanner0

#   option connect-device
```

----------

## t011

I too am having troubles getting my scanner working again after a few months of no use and many upgraded packages.  I've been following this thread trying to track down my problem.  Quickly, here is some system info:

```
sys-kernel/gentoo-dev-sources-2.6.7-r11

media-gfx/sane-backends-1.0.14-r2

media-gfx/sane-frontends-1.0.11

media-gfx/xsane-0.91

dev-libs/libusb-0.1.8
```

The system is using pure udev now.  And my scanner is a Epson Perfection 1250.  So that's the plustek backend.

```
$ sane-find-scanner

found USB scanner (vendor=0x04b8 [EPSON], product=0x010f [EPSON Scanner 010F], chip=LM9832/3) at libusb:001:002
```

My problem is that although everything seems to be setup properly, when I try to scan something as any user, including as root, I get an error message stating the device is currently busy.  If anyone has any ideas as to why that might be happening, I'd love to hear them.  But I actually have a specific question.  I was looking at the files in /usr/lib/sane and thought they look kind of strange.  For example:

```
-rwxr-xr-x  1 root root  902 Jul 16 21:43 libsane-plustek.la*

-rwxr-xr-x  1 root root  920 Jul 16 21:43 libsane-plustek_pp.la*

lrwxrwxrwx  1 root root   28 Jul 16 21:43 libsane-plustek_pp.so -> libsane-plustek_pp.so.1.0.14*

lrwxrwxrwx  1 root root   28 Jul 16 21:43 libsane-plustek_pp.so.1 -> libsane-plustek_pp.so.1.0.14*

-rwxr-xr-x  1 root root 180K Jul 16 21:43 libsane-plustek_pp.so.1.0.14*

lrwxrwxrwx  1 root root   25 Jul 16 21:43 libsane-plustek.so -> libsane-plustek.so.1.0.14*

lrwxrwxrwx  1 root root   25 Jul 16 21:43 libsane-plustek.so.1 -> libsane-plustek.so.1.0.14*

-rwxr-xr-x  1 root root 174K Jul 16 21:43 libsane-plustek.so.1.0.14*

```

Isn't the .so supposed to go on the end?  I already had to add a symlink after reinstalling the masked version of libusb because I think sane was trying to find libusb-0.1.so.4.  That doesn't exist so I created a symlink to libusb-0.1.4.4.0 and that part works now.  So I'm wondering if libraries aren't being correctly installed on my system and that's why this is failing.  Any ideas?  What are the libraries named in your /usr/lib/sane?

Thanks

----------

## schmeggahead

I uncommenting the lines in hp.conf and it did not work.

I added the remount to fstab:

```
none /proc/bus/usb usbfs defaults  0  0
```

Earlier, when I tried the other option:

```
none /proc/bus/usb usbfs defaults,devmode=0666  0  0
```

I got a mount error on boot. The SANE website indicates there's a current bug with this and to address any access issues with hotplug.

However, I decided to re-install sane-backends and discovered that it wanted to +usb to it. My USE flags show USB listed but the SANE didn't have it. Not sure how this occured. I've had USB in the use flags for months.

Will advise on the success. It appears I have libusb installed but I probably don't have it activated or configured to be used. I went looking for some hint as to config and the HTML pages seem to be for developers who create interfaces that are libusb compliant. I do show:

```
bash-2.05b$ ls -la /etc/hotplug/usb/

total 54

drwxr-xr-x  2 root root   112 Jul  2 19:07 .

drwxr-xr-x  4 root root   688 Apr 14 08:18 ..

-rw-r--r--  1 root root 46476 Jul 18 19:05 libsane.usermap

-rwxr-xr-x  1 root root   914 Jul 18 19:05 libusbscanner

 
```

I currently have the kernal enabled with the USB scanner module installed, so I imagine if this doesn't work, I'll try removing the scanner module from the kernel build.

Thanks for the leads.

----------

## Decibels

Out of time. but here is the list:

```
bash-2.05b$ ls /usr/lib/sane

libsane-abaton.la                 libsane-matsushita.so.1.0.14

libsane-abaton.so                 libsane-microtek.la

libsane-abaton.so.1               libsane-microtek.so

libsane-abaton.so.1.0.14          libsane-microtek.so.1

libsane-agfafocus.la              libsane-microtek.so.1.0.14

libsane-agfafocus.so              libsane-microtek2.la

libsane-agfafocus.so.1            libsane-microtek2.so

libsane-agfafocus.so.1.0.14       libsane-microtek2.so.1

libsane-apple.la                  libsane-microtek2.so.1.0.14

libsane-apple.so                  libsane-mustek.la

libsane-apple.so.1                libsane-mustek.so

libsane-apple.so.1.0.14           libsane-mustek.so.1

libsane-artec.la                  libsane-mustek.so.1.0.14

libsane-artec.so                  libsane-mustek_pp.la

libsane-artec.so.1                libsane-mustek_pp.so

libsane-artec.so.1.0.14           libsane-mustek_pp.so.1

libsane-artec_eplus48u.la         libsane-mustek_pp.so.1.0.14

libsane-artec_eplus48u.so         libsane-mustek_usb.la

libsane-artec_eplus48u.so.1       libsane-mustek_usb.so

libsane-artec_eplus48u.so.1.0.14  libsane-mustek_usb.so.1

libsane-as6e.la                   libsane-mustek_usb.so.1.0.14

libsane-as6e.so                   libsane-nec.la

libsane-as6e.so.1                 libsane-nec.so

libsane-as6e.so.1.0.14            libsane-nec.so.1

libsane-avision.la                libsane-nec.so.1.0.14

libsane-avision.so                libsane-net.la

libsane-avision.so.1              libsane-net.so

libsane-avision.so.1.0.14         libsane-net.so.1

libsane-bh.la                     libsane-net.so.1.0.14

libsane-bh.so                     libsane-pie.la

libsane-bh.so.1                   libsane-pie.so

libsane-bh.so.1.0.14              libsane-pie.so.1

libsane-canon.la                  libsane-pie.so.1.0.14

libsane-canon.so                  libsane-plustek.la

libsane-canon.so.1                libsane-plustek.so

libsane-canon.so.1.0.14           libsane-plustek.so.1

libsane-canon630u.la              libsane-plustek.so.1.0.14

libsane-canon630u.so              libsane-plustek_pp.la

libsane-canon630u.so.1            libsane-plustek_pp.so

libsane-canon630u.so.1.0.14       libsane-plustek_pp.so.1

libsane-canon_pp.la               libsane-plustek_pp.so.1.0.14

libsane-canon_pp.so               libsane-qcam.la

libsane-canon_pp.so.1             libsane-qcam.so

libsane-canon_pp.so.1.0.14        libsane-qcam.so.1

libsane-coolscan.la               libsane-qcam.so.1.0.14

libsane-coolscan.so               libsane-ricoh.la

libsane-coolscan.so.1             libsane-ricoh.so

libsane-coolscan.so.1.0.14        libsane-ricoh.so.1

libsane-coolscan2.la              libsane-ricoh.so.1.0.14

libsane-coolscan2.so              libsane-s9036.la

libsane-coolscan2.so.1            libsane-s9036.so

libsane-coolscan2.so.1.0.14       libsane-s9036.so.1

libsane-dc210.la                  libsane-s9036.so.1.0.14

libsane-dc210.so                  libsane-sceptre.la

libsane-dc210.so.1                libsane-sceptre.so

libsane-dc210.so.1.0.14           libsane-sceptre.so.1

libsane-dc240.la                  libsane-sceptre.so.1.0.14

libsane-dc240.so                  libsane-sharp.la

libsane-dc240.so.1                libsane-sharp.so

libsane-dc240.so.1.0.14           libsane-sharp.so.1

libsane-dc25.la                   libsane-sharp.so.1.0.14

libsane-dc25.so                   libsane-snapscan.la

libsane-dc25.so.1                 libsane-snapscan.so

libsane-dc25.so.1.0.14            libsane-snapscan.so.1

libsane-dll.la                    libsane-snapscan.so.1.0.14

libsane-dll.so                    libsane-sp15c.la

libsane-dll.so.1                  libsane-sp15c.so

libsane-dll.so.1.0.14             libsane-sp15c.so.1

libsane-dmc.la                    libsane-sp15c.so.1.0.14

libsane-dmc.so                    libsane-st400.la

libsane-dmc.so.1                  libsane-st400.so

libsane-dmc.so.1.0.14             libsane-st400.so.1

libsane-epson.la                  libsane-st400.so.1.0.14

libsane-epson.so                  libsane-tamarack.la

libsane-epson.so.1                libsane-tamarack.so

libsane-epson.so.1.0.14           libsane-tamarack.so.1

libsane-fujitsu.la                libsane-tamarack.so.1.0.14

libsane-fujitsu.so                libsane-teco1.la

libsane-fujitsu.so.1              libsane-teco1.so

libsane-fujitsu.so.1.0.14         libsane-teco1.so.1

libsane-gphoto2.la                libsane-teco1.so.1.0.14

libsane-gphoto2.so                libsane-teco2.la

libsane-gphoto2.so.1              libsane-teco2.so

libsane-gphoto2.so.1.0.14         libsane-teco2.so.1

libsane-gt68xx.la                 libsane-teco2.so.1.0.14

libsane-gt68xx.so                 libsane-teco3.la

libsane-gt68xx.so.1               libsane-teco3.so

libsane-gt68xx.so.1.0.14          libsane-teco3.so.1

libsane-hp.la                     libsane-teco3.so.1.0.14

libsane-hp.so                     libsane-test.la

libsane-hp.so.1                   libsane-test.so

libsane-hp.so.1.0.14              libsane-test.so.1

libsane-hp5400.la                 libsane-test.so.1.0.14

libsane-hp5400.so                 libsane-u12.la

libsane-hp5400.so.1               libsane-u12.so

libsane-hp5400.so.1.0.14          libsane-u12.so.1

libsane-hpsj5s.la                 libsane-u12.so.1.0.14

libsane-hpsj5s.so                 libsane-umax.la

libsane-hpsj5s.so.1               libsane-umax.so

libsane-hpsj5s.so.1.0.14          libsane-umax.so.1

libsane-ibm.la                    libsane-umax.so.1.0.14

libsane-ibm.so                    libsane-umax1220u.la

libsane-ibm.so.1                  libsane-umax1220u.so

libsane-ibm.so.1.0.14             libsane-umax1220u.so.1

libsane-leo.la                    libsane-umax1220u.so.1.0.14

libsane-leo.so                    libsane-umax_pp.la

libsane-leo.so.1                  libsane-umax_pp.so

libsane-leo.so.1.0.14             libsane-umax_pp.so.1

libsane-ma1509.la                 libsane-umax_pp.so.1.0.14

libsane-ma1509.so                 libsane-v4l.la

libsane-ma1509.so.1               libsane-v4l.so

libsane-ma1509.so.1.0.14          libsane-v4l.so.1

libsane-matsushita.la             libsane-v4l.so.1.0.14

libsane-matsushita.so             libsane.so.1

libsane-matsushita.so.1
```

----------

## schmeggahead

moved scanner to another usb port (the one that my keyboard works from) and it worked.

No kernel usb scanner support. However I enable scsi support.

commented out everything in the etc/sane.d/dll.conf except hp 

/etc/sane.d/hp.conf contains:

```
  /dev/usb/scanner0

    option connect-device

```

Not sure whether the other ports are not functioning or not supported.

acquired and image and printed.

going back to ensure all these settings are necessary.

----------

## Mekoryuk

For those with Epson scanners getting that strange USBFS_BULK whatnot error in their dmesg output:

Comment epson out of your /etc/sane.d/dll.conf file.

Worked for me (even without doing anything in this thread), and hopefully it will work for some of you. =)  Apparently there's some weird bug in the epson backend.  Commenting out epson most likely makes it revert to the plustek backend instead.  Spotted this fix on a sane mailing list.

I'm kinda pissed that it was this easy for me to solve.  I wasted DAYS trying to get my scanner to work, bounced around a few distros (Mandrake, SuSE) before coming back to Gentoo, determined to fix this damn problem.  And then... all it involved was commenting out one line.

 :Razz: 

Oh well.  I still love you, Linux. =P

----------

## Gentree

OK here we go again. 

Update a couple packages and a nice working , stable system starts to fall apart.

If I recall from earlier I updated libusb and udev (mad wreckless bastard that I am.)

I now have no scanner , no scanner device and hotplugging no longer works.

Let's have a quick sound off of who is in the same boat.

I wish this stuff would get tested before being committed to portage. I get really sick of this time-wasting.

 :Evil or Very Mad: 

----------

## Gentree

OK , update.

libusb was not altered at dev-libs/libusb-0.1.8 

I now regressed to sys-fs/udev-030 did etc-update to revert the changes done earlier and I seems to have come back together.

Few.  :Cool: 

----------

## Doogman

 *Mekoryuk wrote:*   

> For those with Epson scanners getting that strange USBFS_BULK whatnot error in their dmesg output:
> 
> Comment epson out of your /etc/sane.d/dll.conf file.
> 
> 

 

A thousand thank-you's!  I don't care if your post is a month old or not, but it just saved me from pulling _all_ my hair out.  Thank you Google search!  :Smile:  This fixed my last big hardware problem from my Fedora -> Gentoo migration.   For others:

Keywords:  Epson Perfection 1260 scanner gentoo

Walkthough:

Obviously, emerge all the sane goodies.  You should see this:

doug@ghidorah doug $ sane-find-scanner

found USB scanner (vendor=0x04b8 [EPSON], product=0x011d [EPSON Scanner], chip=LM9832/3) at libusb:001:004

Add group "scanner" to your groups and log-back in again.  You should see this:

doug@ghidorah doug $ groups

tty wheel audio users scanner <---

Edit /etc/sane.d/plustek.conf and add these:

[usb] 0x04b8 0x011d

device auto

And then comment-out this line in /etc/sane.d/dll.conf

dmc

#epson

fujitsu

You _must_ comment out the epson line to disable the epson driver or you will get these errors in the kernel log:

Sep 24 09:41:50 [kernel] usb 1-2: bulk timeout on ep2in

Sep 24 09:41:50 [kernel] usb 1-2: usbfs: USBDEVFS_BULK failed ep 0x82 len 4 ret

-110

And then you will put of your hair for a hour and wonder why!  :Smile: 

Scanner works fine!  No need to mess with the scripts.  All the permissions are set correctly.

----------

## emanuelgreisen

I have a HP 5200C scanner, and I keep getting the darn warnings every now and then. Sometimes my scanner works, sometimes it doesn't... if it starts giving the warnings, there is not chance it will start working though.

Here is some output from dmesg

```

hub 2-0:1.0: port 1, status 0101, change 0001, 12 Mb/s

hub 2-0:1.0: debounce: port 1: total 100ms stable 100ms status 0x101

usb 2-1: new full speed USB device using address 8

usb 2-1: new device strings: Mfr=1, Product=2, SerialNumber=3

usb 2-1: default language 0x0409

usb 2-1: Product: HP ScanJet 5200C

usb 2-1: control timeout on ep0in

usb 2-1: Manufacturer: Hewlett-Packard

usb 2-1: SerialNumber: SG02F170X2HT

usb 2-1: hotplug

usb 2-1: adding 2-1:1.0 (config #1, interface 0)

usb 2-1:1.0: hotplug

usb 2-1: bulk timeout on ep1in

usb 2-1: usbfs: USBDEVFS_BULK failed ep 0x81 len 4096 ret -110

usb 2-1: bulk timeout on ep1in

usb 2-1: usbfs: USBDEVFS_BULK failed ep 0x81 len 4096 ret -110

usb 2-1: bulk timeout on ep1in

usb 2-1: usbfs: USBDEVFS_BULK failed ep 0x81 len 4096 ret -110

usb 2-1: bulk timeout on ep1in

usb 2-1: usbfs: USBDEVFS_BULK failed ep 0x81 len 4096 ret -110

usb 2-1: bulk timeout on ep1in

usb 2-1: usbfs: USBDEVFS_BULK failed ep 0x81 len 4096 ret -110

```

To make it work (sometimes), I unplug the USB-cable, turn of the scanner, restart the machine, turn on the scanner and plug in the USB cable. Then (if I am lucky it works... very windowish).

I have just updated to the lates sane-(b/f), xsane and libusb. And my kernel-version is as follows.:

sane-frontends-1.0.12

sane-backends-1.0.14-r6

xsane-0.95

libusb-0.1.8

gentoo-dev-sources-2.6.8-r3

I tried disabling hotplug (as someone mentioned earlier i the thread) but without success, since then my scanner is not detected at all.

I tried to run xsane like this:

SANE_DEBUG_HP=127 xsane

This gives a lot of debug-messages, but does not fix the problem. (some one had this fix it for him, thinking maybe the debugging had some sideeffects).

When using xsane, if it does not work, I eventually get the "Error during read: Error during device I/O".

Any help, pointers, anything would be appreciated, I am stuck, and I have spend hours trying all kind of things.

----------

## emanuelgreisen

Ok, now I found a way to force the scanner into scanning. Its not pretty... but it does the job (sooner or later).

Run xsane with the following environment-vars set:

```

SANE_DEBUG_SANEI_USB=8 SANE_HP_RDREDO=100 xsane

```

Not sure if the SANE_DEBUG_SANEI_USB-var is nessesary, but the retry-variable is !

An interesting thing though is that running with this much debug, I find two parts of the output that makes me wonder....

```

[sanei_debug] Setting debug level of sanei_usb to 8.

usb_set_debug: Setting debugging level to 255 (on)

usb_os_find_busses: Found 004

usb_os_find_busses: Found 003

usb_os_find_busses: Found 002

usb_os_find_busses: Found 001

usb_os_find_busses: Skipping non bus directory devices

usb_os_find_devices: Found 001 on 004

usb_os_find_devices: Found 016 on 003

usb_os_find_devices: Found 001 on 003

usb_os_find_devices: Found 001 on 002

usb_os_find_devices: Found 001 on 001

[sanei_usb] sanei_usb_init: device 0x0000/0x0000 looks like a root hub

[sanei_usb] sanei_usb_init: found libusb device (0x03f0/0x0401) interface 0  at 

libusb:003:016

[sanei_usb] sanei_usb_init: device 0x0000/0x0000 looks like a root hub

[sanei_usb] sanei_usb_init: device 0x0000/0x0000 looks like a root hub

[sanei_usb] sanei_usb_init: device 0x0000/0x0000 looks like a root hub

[sanei_usb] sanei_usb_init: found 1 devices

[sanei_usb] sanei_usb_find_devices: vendor=0x03f0, product=0x0401, attach=0x4013

0f26

[sanei_usb] sanei_usb_open: trying to open device `libusb:003:016'

[sanei_usb] sanei_usb_open: found bulk-in endpoint (address 1)

[sanei_usb] sanei_usb_open: found bulk-out endpoint (address 2)

[sanei_usb] sanei_usb_open: found interupt-in endpoint (address 3)

[sanei_usb] sanei_usb_open: opened usb device `libusb:003:016' (*dn=0)

[sanei_usb] sanei_usb_write_bulk: trying to write 2 bytes

[sanei_usb] sanei_usb_write_bulk: wanted 2 bytes, wrote 2 bytes

[sanei_usb] sanei_usb_write_bulk: trying to write 7 bytes

...

(-- A lot more debug mess --)

...

[sanei_usb] sanei_usb_read_bulk: attempt read libusb 16 bytes ep=0x81 timeout=30000

[sanei_usb] sanei_usb_read_bulk: result 9

[sanei_usb] sanei_usb_read_bulk: wanted 16 bytes, got 9 bytes

[sanei_usb] sanei_usb_close: closing device 0

[sanei_usb] sanei_usb_open: trying to open device `libusb:003:016'

[sanei_usb] sanei_usb_open: found bulk-in endpoint (address 1)

[sanei_usb] sanei_usb_open: we already have a bulk-in endpoint (address: 129), ignoring the new one

[sanei_usb] sanei_usb_open: found bulk-out endpoint (address 2)

[sanei_usb] sanei_usb_open: we already have a bulk-out endpoint (address: 2), ignoring the new one

[sanei_usb] sanei_usb_open: found interupt-in endpoint (address 3)

[sanei_usb] sanei_usb_open: we already have a int-in endpoint (address: 131), ignoring the new one

[sanei_usb] sanei_usb_open: opened usb device `libusb:003:016' (*dn=0)

...

(-- Even more debug mess --)

```

Now does it not seem weird that it openes the device, says all kind of stuff to it, then closes it again, and becomes surpriced that it already has ep1/ep2/ep3 set...

----------

## wendall911

First off, I got my inspiration for how to resolve the scanner issue from this thread, so thanks for beating up on things.

First of all, per the install documentation, you will need hotplug.

```
emerge hotplug

rc-update add hotplug default
```

2. Assuming you followed the install docs and your user isn't in the scanner group, stop hotplug.

```
/etc/init.d/hotplug stop
```

3. Add your user to the scanner group. Hotplug sets the entry in the /proc file system to root:scanner 0660 so your user will need to be in the scanner group.

```
usermod -g scanner yourusername
```

4. Emerge sane tools.

```
emerge sane-backends sane-frontends
```

5. Plug in your usb scanner and plug it into power. Start hotplug.

```
/etc/init.d/hotplug start
```

6. Create a launcher for xscanimage. Have fun!

The only problem I have with xscanimage is that it fails to do a damn thing if the scanner isn't plugged into a usb port, power, etc. Sucks for newb users since it doesn't even produce a popup to warn the user that the scanner isn't accessible.

I could rant about how easy it would be to make scanners just work, but that is an issue for the distribution to figure out. Guess this is why I use Gentoo, so I know exactly why things do what they do.

Wendall

----------

## emanuelgreisen

Well, with "sane-backends-1.0.14-r6" on gentoo follows a file  /etc/hotplug/usb/libusbscanner, in this file you find the followin lines: 

```

chown root:scanner "$DEVICE"

chmod 0660 "$DEVICE"

```

this can be changed to

```

chown root:scanner "$DEVICE"

chmod 0666 "$DEVICE"

```

Or you can add an ownership modifying line too

```

chown youruser:yourgroup "$DEVICE"

chmod 0660 "$DEVICE"

```

Just makeing sure no one thought there were some woodoo going on around this hotplugging and ownership of scanners.

----------

## simon_irl

Thanks Elm0...your post was what I'd been looking for all over the Net for about an hour...I just wanted to find my scanner in the filesystem! I'm used to /dev/usb/, not /proc/bus/usb/, but with lsusb it's perfectly straightforward. Thanks again.

----------

## Doudou

Hi,

I had a look on this post and other in the web but I couldn't find the solution of my problem...

In fact, whith a scanimage -L, I get a no scanner one time of two :

```
doudou@gladiatux doudou $ scanimage -L

device `epson:libusb:002:005' is a Epson GT-7000 flatbed scanner

doudou@gladiatux doudou $ scanimage -L

device `epson:libusb:002:005' is a Epson GT-7000 flatbed scanner

doudou@gladiatux doudou $ scanimage -L

No scanners were identified. If you were expecting something different,

check that the scanner is plugged in, turned on and detected by the

sane-find-scanner tool (if appropriate). Please read the documentation

which came with this software (README, FAQ, manpages).

doudou@gladiatux doudou $ scanimage -L

device `epson:libusb:002:005' is a Epson GT-7000 flatbed scanner

doudou@gladiatux doudou $ scanimage -L

No scanners were identified. If you were expecting something different,

check that the scanner is plugged in, turned on and detected by the

sane-find-scanner tool (if appropriate). Please read the documentation

which came with this software (README, FAQ, manpages).

doudou@gladiatux doudou $ scanimage -L

device `epson:libusb:002:005' is a Epson GT-7000 flatbed scanner

doudou@gladiatux doudou $ scanimage -L

No scanners were identified. If you were expecting something different,

check that the scanner is plugged in, turned on and detected by the

sane-find-scanner tool (if appropriate). Please read the documentation

which came with this software (README, FAQ, manpages).

```

I have good right on USB :

```
gladiatux root # ll /proc/bus/usb/002/005 

-rw-rw----  1 root scanner 50 nov  7 16:30 /proc/bus/usb/002/005

doudou@gladiatux doudou $ groups 

audio ftp video games users portage scanner

```

I've already tried with 770 right but I've got the same result...

Do you know why it works one time of two? Do you think using EPSON driver should resolve the problem?

----------

## picklestix

Anyone else out there with a Epson 2450 Photo that has all but given up hope?

I'm going on weeks spent on this now.

Here is the summary of what I have. (~x86, gentoo-dev-sources,udev,libusb)

I've tried all the config settings in this forum.

With epson commented out, as suggested here, from dll.conf, dmesg shows 

```
serial8250: too much work for irq11
```

Scanimage -L shows no scanner found(with changes also made to plustek.conf).  I believe this scanner is not compatable with the plustek backend workaround.

With epson in, dmesg shows the infamous USBDEVFS_BULK fail.

Scanimage -L gives correct result every OTHER time, as so many others also seem to be getting.

Like everyone else, sane-find-scanner *always* shows the scanner.

I have tried multiple other configurations as listed on these forums, and all as regular and root user.  I'm also in the scanner group.

I have also tried the epkowa backend, and epsons scanning utility.  Same result.  

I have posted a bug report to libusb project on sourceforge.  Where to go from here? gentoo bugzilla bug reports for libusb?  sane backend bug reports?  

Any advice would be greatly appreciated.

----------

## Gentree

dont bother scratching your head about what driver to use if sane cant even see the presence of the scanner.

I gave up on xsane last summer having wasted loads of time like you.

At that stage it did recognise my Epson 1670 photo but as soon as I tried to scan anything it locked up completely.

Now it does not even see the scanner , as you also report.

I now use vuescan . At that time there was a free-for-personal-use version for Linux but I'm not sure if that is still the case . I think there is a time limitted offer , o/w you may find something that works on p2p.

In any case vuescan is very effective , it still locks up if I use a usb2.0 port (probably a gentoo issue rather than the software) but it works perfectly on USB1.

Also make a very good job of neg scans.

HTH

 :Cool: 

----------

## picklestix

Well, epson-find-scanner IS detecting the scanner...That is the only thing that's consistent.

Seems most people having difficulties with this all had no issues with the kernel scanning module.  I just don't want to revert to devfs and a 2.4 kernel just to run my scanner...

It seems like many have gotten around this problem, but I think many more have given up......?

Will definatly check into viewscan though, thank you.

I still have scanner functionability in windoze, but this is the only thing I haven't been able to bring over to linux.  I hate having the wasted space of an entire operating system on my hd just for a scanning driver...............

----------

## Gentree

Yep, it seems xsane still is not upto speed on 2.6 kernels although this is not exactly cutting-edge technology any more.

BTW it vuescan not viewscan just incase you cant find it.  :Cool: 

----------

## Matteo Azzali

With the latests kernels,

from my experience: do not follow any tutorial, howto or similar.

Check the support (and in case the firmware file you will need) 

 here .

then with usb and gimp flags in make.conf do:

```
emerge sane-backends sane-frontends

scanimage -L
```

modify /etc/sane.d/XXX.conf (your backend) to point to the firmware file

and then enjoy!!!!

(after following 3 differents howto [none worked] I just did that and it

worked fine -epson perfection 1670- snapscan backend)

----------

## Gentree

Thanks , that's (fairly) good news. I'll check it out.

1600 dpi does not work acording to sane.org , so much for buying a hi-res scanner and of course no mention of photo scan capability but it is a generic use of the snapscan driver so not surprising.

Anyway, if it does something under sane I will be pleased.

BTW have you tried it on usb2 ?

I am not sure if that is a failing vuescan I am seeing or my PCI usb card or linux usb drivers.

Be nice if you had some input there.

Thx again.  :Cool: 

----------

## Matteo Azzali

I'm using 2.6.10-r6 kernel, a viaKt400 board with usb2 support.

I have both ehci and uhci usb modules directly compiled inside kernel.

I'm using udev. (hald, hotplug, etc.etc.)

check scanimage -L and then a scan with scanimage (from command line).

If them worked u can install sane-frontends wich contains xscanimage

(with "gimp" USE flag you get also the gimp plugin for scanning).

If all that worked you can test the scan features of other programs.

----------

## Gentree

Thanks , 

two odd things here. I found I need the esfw30.bin firmware for the 1670 photo  on snapscan.conf .

The sane site says it is in sanefront-ends but I dont find it anywhere on my system , I had to go and trawl the net for it.

I now find it with scanimage -L . fine.

I had to down grade to libusb 1.0.7-r1 since 1.0.8 left everthing broken .

However I still have a library issue with xscanimage

```
-bash-3.00#xscanimage

xscanimage: error while loading shared libraries: libusb-0.1.4: cannot open shared object file: No such file or directory

```

These are the ONLY versions in portage now , are others not seeing these breakages?

Thx

 :Cool: 

----------

## Matteo Azzali

I'm using libusb 1.0.8 , all working like a charm (i can turn-on and off

scanner while in a session, etc.etc., 1600 dpi not tested).

esfw30.bin is a file provided in the 1670 drivers-CD , you can try to

extract from the cd or get it from a windows with 1670 drivers installed

(system[32] folder).

Dunno why your machine have these problems, but on my

~x86 tree they all working. Have you masked some dependency?

----------

## Gentree

Thanks,

I recently went all ~x86 figuring it could not be more unstable than running stable.

Went throughs serveral _days_ worth of emerge -e system... system... world... world.... phew.

I'm not sure its better but it sure aint less together, I still have a couple of outstanding issues. This is one of them.

Could you post a few version numbers for me so I can compare.

emerge -p  udev baselayout libusb sane-backends sane xsane 

TIA.  :Cool: 

----------

## Matteo Azzali

all the most recent:

[ebuild   R   ] sys-fs/udev-051

[ebuild   R   ] sys-apps/baselayout-1.11.9-r1

[ebuild   R   ] dev-libs/libusb-0.1.8

[ebuild   R   ] media-gfx/sane-backends-1.0.15

[ebuild   R   ] media-gfx/sane-frontends-1.0.13

no xsane, i just compiled sane-frontends with gimp use flag 

(for gimp plugin AND xscanimage).

However, after some bad upgrade, now I'm getting

```

*** glibc detected *** corrupted double-linked list:

```

and I have to figure out what's that (glibc corrupted?)

----------

## Dragonlord

problem: HP ScanJet 4100C with f***ing linusb... result? does not work at all although the scanner is fully supported.

dmegs:

```
usb 3-1: new full speed USB device using uhci_hcd and address 5
```

good...

lsusb:

```
Bus 003 Device 005: ID 03f0:0101 Hewlett-Packard ScanJet 4100c
```

very good.

hp.conf:

```
scsi HP

usb 0x03f0 0x0101
```

let's go.

sane-find-scanner:

```

  # No SCSI scanners found. If you expected something different, make sure that

  # you have loaded a SCSI driver for your SCSI adapter.

  # No USB scanners found. If you expected something different, make sure that

  # you have loaded a driver for your USB host controller and have installed a

  # kernel scanner module.

  # Not checking for parallel port scanners.

  # Most Scanners connected to the parallel port or other proprietary ports

  # can't be detected by this program.
```

WTF?!

scanimage -L:

```
[sanei_debug] Setting debug level of dll to 255.

[dll] sane_init: SANE dll backend version 1.0.11 from sane-backends 1.0.15

[dll] sane_init: reading dll.conf

[dll] add_backend: adding backend `hp'

[dll] sane_get_devices

[dll] load: searching backend `hp' in `/usr/lib/sane'

[dll] load: trying to load `/usr/lib/sane/libsane-hp.so.1'

[dll] load: dlopen()ing `/usr/lib/sane/libsane-hp.so.1'

[dll] init: initializing backend `hp'

[sanei_debug] Setting debug level of hp to 255.

[hp] sane_init called

[hp] hp_init: global.is_up = 1

[hp] sane_init will finish with Success

[dll] init: backend `hp' is version 1.0.8

[hp] sane_get_devices called

[hp] hp_read_config: hp backend v1.06/$Revision: 1.21 $ starts reading config file

[hp] hp_read_config: processing line <#scsi HP>

[hp] hp_read_config: processing line <# Uncomment the following if you have "Error during device I/O" on SCSI>

[hp] hp_read_config: processing line <#   option dumb-read>

[hp] hp_read_config: processing line <#>

[hp] hp_read_config: processing line <# The usual place for a SCSI-scanner on Linux>

[hp] hp_read_config: processing line <#/dev/scanner>

[hp] hp_read_config: processing line <#>

[hp] hp_read_config: processing line <# USB-scanners supported by the hp-backend>

[hp] hp_read_config: processing line <# HP ScanJet 4100C>

[hp] hp_read_config: processing line <#usb 0x03f0 0x0101 libusb:003:004>

[hp] hp_read_config: processing line <# HP ScanJet 5200C>

[hp] hp_read_config: processing line <#usb 0x03f0 0x0401>

[hp] hp_read_config: processing line <# HP ScanJet 62X0C>

[hp] hp_read_config: processing line <#usb 0x03f0 0x0201>

[hp] hp_read_config: processing line <# HP ScanJet 63X0C>

[hp] hp_read_config: processing line <#usb 0x03f0 0x0601>

[hp] hp_read_config: processing line <#>

[hp] hp_read_config: processing line <# Uncomment the following if your scanner is connected by USB,>

[hp] hp_read_config: processing line <# but you are not using libusb>

[hp] hp_read_config: processing line <# /dev/usb/scanner0>

[hp] hp_read_config: processing line <#   option connect-device>

[hp] hp_read_config: processing line <#connect-scsi HP>

[hp] hp_read_config: processing line <#usb libusb:003:004>

[hp] hp_read_config: processing line <>

[hp] hp_read_config: processing line <scsi HP>

[hp] hp_read_config: processing line <usb 0x03f0 0x0101>

[hp] hp_attach_matching_devices: attach matching scsi HP

[hp] hp_read_config: attach usb 0x03f0 0x0101

[hp] hp_attach_matching_devices: usb attach matching "usb 0x03f0 0x0101"

[hp] hp_read_config: reset to default config

[hp] sane_get_devices will finish with Success

[dll] sane_get_devices: found 0 devices

No scanners were identified. If you were expecting something different,

check that the scanner is plugged in, turned on and detected by the

sane-find-scanner tool (if appropriate). Please read the documentation

which came with this software (README, FAQ, manpages).

[dll] sane_exit: exiting

[dll] sane_exit: calling backend `hp's exit function

[hp] sane_exit called

[hp] hp_destroy: global.is_up = 0

[hp] sane_exit will finish

[dll] sane_exit: finished
```

WTF?! nothing found?!

why does it not find it? since the change to libusb i can not scan anymore... i read all i could... nothing helps.

it's up to you... somebody knows what the f*** is up there? (this libusb really starts to **** me off U_U ).

----------

## Gentree

Could not have put it better myself  :Wink: 

I found libusb-0.1.8 messed thikngs up:

```
bash-3.00#xscanimage

xscanimage: error while loading shared libraries: libusb-0.1.so.4: cannot open shared object file: No such file or directory

```

This sort of thing happens fairly often (yes even on 'stable' before someone shouts me down) . 

Try masking 0.1.8 , 0.1.7-r1 does at least link the lib although the chances are your printer and/or scanner still wont work. sigh.

Here, scanner works , print not.  :Rolling Eyes: 

----------

## Matteo Azzali

Do you print with sane/libusb???? I never knew that would be possible, I'm

using cups...

----------

## Matteo Azzali

OOps, also my scanner is working, I just savd device info in xscanimage

and then it gives me glibc error if the scanner is off.

----------

## Gentree

sane is a scanner interface, I dont use it for printing.

libusb is a usb library which I do need to use my usb printer.

Trouble is this got blown out by a crappy update about a month ago and I have been unable to find out exactly what screwed it up.

Net result I dont print with Gentoo. Great desktop system without print capability.

Just installed win2k to have printing since I have wasted enough time on flakey cups/a2sp/ghostscript or whatever the hell has crapped out this time.

Bah !  :Evil or Very Mad: 

----------

## nx12

Somebody had any success in running xsane with epkowa backend?

----------

## aricaldeira

Hi All,

I just got a Stylus CX4500 to work, both to print and scan. Printing was easy, I just installed pips-scx4500_4600-cups-2.6.2-2.i386.rpm (since I couldn't compile it from source), and the printer just worked. I use cups and kde.

Scanning was a bit harder, but I just checked out and there is a new version of iscan at http://www.avasys.jp/english/linux_e/dl_spc.html

Just downloaded it, installed it with

```
rpm -ivh --replacefiles --nodeps iscan-1.14.0-3.i386.rpm
```

and iscan just started to work. It didn't work here with previous versions of iscan without some modifications, that maybe help you if:

1. Edit /etc/sane.d/dll.conf and comment out the line epson

2. Edit /etc/sane.d/epkowa.conf and add the following line:

```
usb 0x04b8 0x080d
```

You can find those values by running sane-find-scanner, they are the vendor and product codes

3. Edit /etc/hotplug/usb/libsane.usermap and add the following line:

```
libusbscanner 0x0003 0x04b8 0x080d 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000
```

4. Turn the printer off an on again, and make sure your user is in the scanner group

And that was it. Hope it works for you guys too.

----------

## David916

I don't know if this was mentioned previously, but if anyone has the problem where sane-find-scanner, scanimage, sane, etc only work as root, check to see if there is a scanner group and add yourself to it if there is. I found that the permissions on the scanner device were as follows:

```
-rw-rw----  1 root scanner 57 Jul  7 10:51 /proc/bus/usb/002/003
```

```
# lsusb

Bus 004 Device 001: ID 0000:0000

Bus 003 Device 001: ID 0000:0000

Bus 002 Device 005: ID 04b8:010f Seiko Epson Corp. Perfection 1250

Bus 002 Device 001: ID 0000:0000

Bus 001 Device 001: ID 0000:0000
```

```
# sane-find-scanner

  # No SCSI scanners found. If you expected something different, make sure that

  # you have loaded a SCSI driver for your SCSI adapter.

found USB scanner (vendor=0x04b8 [EPSON], product=0x010f [EPSON Scanner 010F], chip=LM9832/3) at libusb:002:005

  # Your USB scanner was (probably) detected. It may or may not be supported by

  # SANE. Try scanimage -L and read the backend's manpage.

  # Not checking for parallel port scanners.

  # Most Scanners connected to the parallel port or other proprietary ports

  # can't be detected by this program.

```

```
# scanimage -L

device `plustek:libusb:002:005' is a Epson Perfection 1250/Photo USB flatbed scanner
```

All I had to do was add myself to the scanner group, logout and login again, and my scanner worked perfectly. I can even unplug it, plug it in another port, and it still works. No mods to any of the sane files or anything, just emerged sane and left it alone. Yay for simple solutions.

System:

ASUS A7V8X-X Socket A (Socket 462) VIA KT400 Motherboard

2.6.11-gentoo-r9

EPSON Perfection 1250

----------

## Headrush

Check this for setting up permissions so non-root users can access devices when using libusb.

https://forums.gentoo.org/viewtopic-p-2545791.html#2545791

Depending on your versions of software and what scanner, this may or may not already be setup for you.

This guide should work when your next device that uses libusb isn't setup automatically, or you want to change or make a different group other than "scanner"

----------

## Matteo Azzali

The only-root-access for libusb was there another time, my hackish fix is at https://forums.gentoo.org/viewtopic-p-3305680.html#3305680

----------

## picklestix

Thanks for your suggestions.  Apparantly there is still issue with this scanner and libusb.

I posted something to sane-devel list and they told me to just get a firewire cable.

For anyone else with this scanner, it's the way to go.

----------

## Matteo Azzali

 *picklestix wrote:*   

> Thanks for your suggestions.  Apparantly there is still issue with this scanner and libusb.
> 
> I posted something to sane-devel list and they told me to just get a firewire cable.
> 
> For anyone else with this scanner, it's the way to go.

 

Well, the issue I described waswith udev usb permissions, not sane.....

----------

## radio_flyer

I see this thread has been going on for, what, 2 years? I am in exactly the same boat as Picklestix. I have a USB Epson 2450 scanner that worked *perfectly* on an old Debian 2.4 system. It absolutely refuses to function correctly on my stable x86 2.6.16 Gentoo system. I have been all over the web looking for the 'solution', and nobody seems to have a clue.

I know the hardware works flawlessly, because when I run the Epson scanner stuff on Win98 under VMWare the scanner works perfectly. Same box, same underlying kernel, same cable, same everything.

However, when I try to access the thing from Linux directly nothing works right, or consistently. I've checked the udev isn't creating any files other than bus/usb/XXX/YYY. The hotplug script (actually scripts, as iscan and sane both plop scripts in /etc/hotplug/usb) is setting permissions correctly on /proc/bus/usb/XXX/YYY. My user is in the scanner group. I've commented out every line in /etc/sane.d/dll.conf except for net, epkowa, and v4l. Nothing. I've also tried the sane-epson backend. Still nothing. I've tried using the iscan utility you can download directly from Epson using the link found on the sane-project.org web site. No go.

The issue seems to be similar to what many other people are experiencing. sane-find-scanner always finds the scanner:

 *Quote:*   

> 
> 
> found USB scanner (vendor=0x04b8 [EPSON], product=0x0112 [EPSON Scanner]) at libusb:005:020
> 
> 

 

However, scanimage -L doesn't see the scanner. Sometimes when I run scanimage -L after firing up the scanner for the first time, it will actually find it. Usually, it won't, and I'll receive the infamous "no scanners were identified" message. In either case, attempting to access the scanner with xsane, iscan or anything else results in 'scanner not responding', 'command timed out', or similar. If I strace the execution of these programs on those rare occasions I see numerous usb bulk timeout errors. 

This URL 

[url]

http://www.mail-archive.com/linux-usb-users@lists.sourceforge.net/msg09945.html

[url]

seems to suggest it's a problem with hotplug. Others suggest libusb. It seems like there are two camps: those who get the scanner working, proclaim victory and move on, and a few of us, like Picklestix and me, who have tried every suggestion under the sun and still can't get it going. 

Anyway, it appears the only way to debug this is to dig into the source and see what's up. My first guess would be that libusb is broken and that's where to start looking. Since VMWare runs the scanner just fine, I suspect the kernel USB stuff, IOAPIC IRQ allocations, and other low-level infrastructure is just fine. I suppose the next trouble spot might be the sane drivers epkowa and/or epson. Most of the recent website postings say 'use the epkowa driver', but man sane-epkowa states in big bold letters "This backend should be considered alpha-quality software!" Well, that's comforting.

Anyway, enough ranting. I guess my only question is: why libusb? What's the point of making a user-space library and then not providing any convenient way of allowing anyone but root to access it without the stupid hotplug script hacks? And why does usblib play around in proc? Why not just access the low-level drives in /dev? Guess I just don't understand...

----------

## cryos

I haven't used my scanner in months, and it was working, but I now seem to be suffering from the same issue. I am not an expert on scanning and libusb but doing a little investigation it works fine as root, my user is a member of the scanner group. The node in /proc/bus/usb/001/008 is -rw-rw---- 1 root scanner so all looks well there. Yet as my user the scanner is not accessible.

```
[sanei_usb] sanei_usb_open: trying to open device `libusb:001:008'

USB error: could not set config 1: Operation not permitted

[sanei_usb] sanei_usb_open: libusb complained: could not set config 1: Operation not permitted

[sanei_usb] Make sure you run as root or set appropriate permissions
```

As far as I can tell the permissions are correct. Is there another place I should be looking at permissions? I can scan the stuff I need to now, but I am not sure how to proceed any further and thought I would document my case here too. Hopefully I will be able to report my solution sometime soon too  :Smile: 

----------

## Matteo Azzali

@cryos : check permissions doin "scanimage -L" as user in scanner group. If the scanner is not seen please check:

https://forums.gentoo.org/viewtopic-p-3311185.html#3311185 (a script OR a tutorial to manually setting 

fine the udev rule of permission for the scanner, if you choose script turn on one scanner at time).

----------

## cryos

Thanks for the help Matteo! Finally got it working as my user and the secret is the permissions in /dev/bus/usb/ that were incorrect. Check out bug 50934 for more details. Hopefully this will get resolved soon - I will see if I can figure out anymore on the weekend if no progress has been made.

Thanks once again Matteo!

----------

## djs

The real fix for these problems is to remove coldplug from your default runlevel. If coldplug is running, it will detect the usb device and put it in /dev/bus/usb/... with root:root permissions. Hotplug, however, seems to do the job correctly, with root:usb permissions.

```
rc-update del coldplug default
```

NOTE: whatever modules were being detected by coldplug must be added to your /etc/modules.autoload.d/kernel-2.6 file so you get your eth0, for example, at your next boot. For me, this was just e100, the intel nic driver module. 

Have fun with sane!   :Very Happy: 

/djs

----------

## engineermdr

I've been trying half the day to get my once working Epson Stylus CX5400 scanner working again.  I'm not even at the permissions problem yet, running everything as root.  I've followed the howto and the suggestions in this thread.  I have the infamous

```
# sane-find-scanner -q

found USB scanner (vendor=0x04b8 [EPSON], product=0x0808 [USB MFP]) at libusb:001:007
```

```
# scanimage -L

No scanners were identified. If you were expecting something different,

check that the scanner is plugged in, turned on and detected by the

sane-find-scanner tool (if appropriate). Please read the documentation

which came with this software (README, FAQ, manpages).

```

I see in the system log

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

everytime I run scanimage.

This makes me think that somehow the printer functionality is interfering with the scanning functionality.  Could this be the issue?  Any suggestions?

----------

## Matteo Azzali

 *mdr wrote:*   

> 
> 
> This makes me think that somehow the printer functionality is interfering with the scanning functionality.  Could this be the issue?  Any suggestions?

 

I can't see if someone else tried before so...... Try both sane-find-scanner and then scanimage first

as normal (nonroot, but in scanner group) user, and then try that as root. 

Also check at http://www.sane-project.org/ if you need to supply/configure a firmware file for your scanner to work,

or if there's something more required.....

In your situation, I would also make sure that the udev rule in /etc/udev/rules.d/99-libsane.rules:

```
SYSFS{idVendor}=="04b8", SYSFS{idProduct}=="0808", MODE="660", GROUP="scanner"
```

would really catch my scanner , checking thet "04b8" and "0808" aren't wrong with udevinfo.... (or usbview)

----------

## engineermdr

 *Quote:*   

> I can't see if someone else tried before so...... Try both sane-find-scanner and then scanimage first 
> 
> as normal (nonroot, but in scanner group) user, and then try that as root. 

 

```
$ id

uid=10806(michael) gid=100(users) groups=10(wheel),11(floppy),18(audio),19(cdrom),27(video),85(usb),100(users),250(portage),409(scanner)

$ sane-find-scanner -q

found USB scanner (vendor=0x04b8 [EPSON], product=0x0808 [USB MFP]) at libusb:001:002

$ scanimage -L

No scanners were identified. If you were expecting something different,

check that the scanner is plugged in, turned on and detected by the

sane-find-scanner tool (if appropriate). Please read the documentation

which came with this software (README, FAQ, manpages).

```

Same as with root.

 *Quote:*   

> Also check at http://www.sane-project.org/ if you need to supply/configure a firmware file for your scanner to work, 
> 
> or if there's something more required..... 

 

I looked there and I don't see any firmware requirements, in fact, support is rated as good.

 *Quote:*   

> In your situation, I would also make sure that the udev rule in /etc/udev/rules.d/99-libsane.rules:

 

Here's from mine:

```
# Epson CX-5400

SYSFS{idVendor}=="04b8", SYSFS{idProduct}=="0808", MODE="660", GROUP="scanner"

```

Now I've never used udevinfo before, but after playing around, the only thing relavent I can get is 

```
# udevinfo -q all -n /dev/bus/usb/001/002

P: /class/usb_device/usbdev1.2

N: bus/usb/001/002
```

so it's recognizing it's there, and the dev node has the right permissions

```
ls -l /dev/bus/usb/001/002

crw-rw---- 1 root scanner 189, 1 Jan 28 13:07 /dev/bus/usb/001/002

```

I'm not sure what else to check.  I compiled sane-backends with the usb USE flag.

----------

## Matteo Azzali

The only other possible "easy fix" that comes in my mind is to check that

you specified the right backend in /etc/make.conf ......

However IMHO is really strange that root doesn't gets the scanner with scanimage -L ,

this means is not a permission issue (that's 98% of the errors) but something else.....

----------

## engineermdr

Yep, like I said in my first post, I'm way before dealing with permission problems.

Seems like the only clue is my message in the system log:

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

Does anybody have a clue what this message means?

----------

## Matteo Azzali

 *mdr wrote:*   

> Does anybody have a clue what this message means?

 

I'm just guessing but usblp should be an interface for usb printers....

Do you moved the scanner to the usb port that was previously of the printer?

Try to move the scanner to another usb port, if you can, and check if it gives the same issue...

----------

## engineermdr

 *Matteo Azzali wrote:*   

>  *mdr wrote:*   Does anybody have a clue what this message means? 
> 
> I'm just guessing but usblp should be an interface for usb printers....
> 
> Do you moved the scanner to the usb port that was previously of the printer?
> ...

 

Actually, the printer and the scanner are one and the same device, so there's only 1 usb cable.

----------

## lyhana8

1) I have no idea how to install my scanner (espon perfection 1670) on -any- linux ;

2) some quick read give me a working scanner as root (I don't know how to give right to my user on gentoo  :Wink:  ; 

3) I'm not an expert so I try many think, maybe useless, but at least that work (don't follow this think it's bad X) ;

So i follow these step :

I add the usb USE in my /etc/make.conf

```

# emerge -av sane-backends sane-frontends

# emerge iscan (doesn't seems to work even in root)

```

Some tutorial talk about /etc/sane.d/snapscan.conf, I replace the following generic line by :

```
firmware /usr/share/sane/snapscan/esfw30.bin
```

that seem to be the windows file, I download using the following command (from http://www.flexion.org/site/index.php?gadget=StaticPage&action=Page&id=15):

```

# wget http://www.commercialventvac.com/~jeffs/ESFW30.BIN

```

then copy in /usr/share/sane/my_Backend (see http://www.sane-project.org/sane-mfgs.html). As snapscan folder doesn't exists I create before copy : 

```

# mkdir /usr/share/sane/snapscan

# cp ESFW30.BIN /usr/share/sane/snapscan

```

I made this to "locate" my scanner :

```

# scanimage -L

device `snapscan:libusb:001:003' is a EPSON EPSON Scanner flatbed scanner

```

this mean I must look at : /dev/bus/usb/001/ (on the port 003)

So i add this 

```
/dev/bus/usb/001 bus=usb
```

 in my /etc/saned.d/snapscan.conf

Xsane wokr as root, now i need to give right to my user, to test i used :

```
scanimage >image.test
```

scan and send to image.test (25M for me  :Smile: )

I think i don't forgot anything so good luck.

----------

## Matteo Azzali

 *lyhana8 wrote:*   

> 
> 
> Xsane wokr as root, now i need to give right to my user, to test i used :
> 
> 

 

This is usually done by adding the user to the scanner group (check if he's added also to usb group).

Note : the firmware file could be everywhere you want,  just modifying the firmware line at the start of

/etc/sane.d/snapscan.conf file :

```

firmware /usr/local/esfw30.bin

```

----------

## figueroa

This may be helpful to some of you, even though this is an old thread.  I got my Epson Perfection 3170 working correctly with the software provided by avasys:  See: https://forums.gentoo.org/viewtopic-p-6035076.html#6035076

----------

