Bugzilla – Bug 127524
no scanning for Epson all-in-one devices when usblp is loaded
Last modified: 2005-11-17 13:21:05 UTC
Hi there, in 9.3 the EPSON CX3650 (same as CX3600) printer / scanner was perfekt working with the drivers from www.avasys.jp. In 10.0 the printer part is working with the includet driver for the cx3200 (but not with the original from epson/avasys), but the scanner is not working (not with cx3200 driver nor the orig.) if I do rcsane-dev restart it says in /var/log/messages: Oct 11 13:08:11 helios kernel: usb 5-1: usbfs: interface 1 claimed by usblp while 'scanimage' sets config #1 Thanks Joern
Created attachment 53615 [details] My hardware
Are there more messaged related to this problem in the syslog? Could be a problem with the USB-subsystem... Christian: Can you help here?
No there are no more message related in syslog. But: if I do a helios:/home/joern # rmmod usblp and helios:/home/joern # rcsane-dev restart it works: helios:/home/joern # scanimage -L device `epson:libusb:005:002' is a Epson CX3600 flatbed scanner -> I can scan. But: I cannot print :-( (until I reload usblp and restart cups)
The kernel guys say its a sane problem: -> http://bugzilla.kernel.org/show_bug.cgi?id=5001
Here is the bug in sane: https://alioth.debian.org/tracker/?group_id=30186&atid=410366&func=detail&aid=302207 Note CX-3200 also is affected. removing usblp fixes the detection issue.
I can see this behaviour on my system too with the mentioned CX3200. (Added me to cc)
likely the sane driver needs to detach the kernel usb driver. This can be done by: usb_detach_kernel_driver_np() (check usb.h).
I have the same problem with my epson CX5400. (Worked under 9.3 but not under 10.0)
folks , this bug seems to be fixed. http://cvs.alioth.debian.org/cgi-bin/cvsweb.cgi/sane-backends/sanei/sanei_usb.c.diff?r1=1.42&r2=1.43&cvsroot=sane
Same problem with EPSON Stylus Photo RX420. Will test Sane 1.43 asap.
This update allows me to print and will allow me to scan but only as root. I've tried copying the file from ~/sane-backends/tools/hotplug to my /etc/hotplug/usb/ directory as mentioned in the readme, but have had no luck.
For what to do to scan as normal user see http://portal.suse.com/sdb/en/2005/09/jsmeix_scanner-setup-100.html
Reproduced it with my Epson Stylus Photo RX420. Both sane (for the epson backend) and iscan (for the epkowa backend) are affected. Both kernel modules "usblp" (automatically loaded for the printer unit) and "usb_storage" (automatically loaded for the cardreader unit) cause problems when scanning. In /var/log/messages there are messages like --------------------------------------------------------------------------- usbfs: interface 1 claimed by usblp while 'scanimage' sets config #1 usbfs: interface 2 claimed by usb-storage while 'scanimage' sets config #1 --------------------------------------------------------------------------- I made patched versions of the sane and iscan pacakge versions which are included in Suse Linux 10.0 (at the moment no version updates) for the 32-bit i386 architecture (at the moment not for 64-bit x86_64) public available for testing here: ftp://ftp.suse.com/pub/people/jsmeix/unsupported/sane/10.0/RPMS/ sane-1.0.15-20.1.i586.ignore-EBUSY-from-USB.rpm ftp://ftp.suse.com/pub/people/jsmeix/unsupported/iscan/10.0/RPMS/ iscan-1.15.0.2-4.1.i586.ignore-EBUSY-from-USB.rpm Note the README in the directories. It should be available in a few hours. Note that ftp.suse.com is often overloaded so that you may have to use a mirror (but because of ftp.suse.com overload the mirrors may be delayed). My patch does the same (i.e. ignoring EBUSY from USB) as the patch in comment #13 but a bit different because of the older versions. Regardless of the patch I still have problems at least when usblp and usb-storage are loaded: Scanning hangs for some time and in the ned there is a IO error. I.e. the patch is not yet a real solution but at least for me it seems to be o.k. at least for printing and scanning at the same time. At least for me it works well when usblp is loaded but usb-storage is not loaded. Then I can print and scan even at the same time. In the next days I will make patched versions of the other sane and iscan and iscan-free package versions available for further testing. I appreciate your feedback.
Let's test this a bit more and once we have a working version, do a recommended update via YOU for 10.0. Here's already a SWAMP-ID: Maintenance-Tracker-2685
I installed the RPMs from Johannes today. They seem to do what they should :-) I can scan, print and (!) I had no errors scanning an watching a movie from my external usb-disk. The only errors I had were >Oct 27 11:28:11 helios kernel: usb 3-1: usbfs: interface 1 claimed by usblp while 'scanimage' sets config #1 but it worked perfect :-) Thanks Joern P.S. What is this SWAMP-ID? I found nothing about it in google...
The messages in /var/log/messges are still the same because all what the patch does is that SANE simply ignores the error. And this "simply ignoring the error" seems to be not a final soultion. Nevertheless if "simply ignoring the error" helps now in most cases and if it doesn't cause severe problems (e.g. a sudden system stop because of a deadlock or crash in the kernel) I will provide the patched packages as recommended YOU update. Ignore "SWAMP-ID" - it is a Suse-internal ID for our process when we are makeing an official package update (e.g. a YOU update). As Suse Bugzilla is now open it may be searched by Google so that you may find soon this entry about "SWAMP-ID" also in Google ;-)
Regarding comment #20 "no errors scanning an watching a movie from my external usb-disk": I assume your CX3650 doesn't have a built-in cardreader (is this correct?) so that in your case the usb-storage module will not claim an interface of the EPSON CX3650 so that there is no conflict with usb-storage and SANE in your case. In contrast my RX420 does have a built-in cardreader so that the usb-storage module claims an interface of the RX420 which leads to the conflict with usb-storage and SANE. According to comment #17 the interfaces are different: interface 1 seems to be associated with the printer-unit, interface 2 seems to be associated with the cardreader unit. Perhaps the scanner unit is accessible via another different interface and perhaps it is possible to change SANE (or libusb?) to claim only the interface which is associated with the scanner unit? I am no USB expert but perhaps this may lead to a real solution?
More packages for testing: ftp://ftp.suse.com/pub/people/jsmeix/unsupported/sane/10.0/RPMS/ sane-1.0.15-20.1.i586.ignore-EBUSY-from-USB.rpm sane-1.0.15-20.1.x86_64.ignore-EBUSY-from-USB.rpm ftp://ftp.suse.com/pub/people/jsmeix/unsupported/iscan/10.0/RPMS/ iscan-1.15.0.2-4.1.i586.ignore-EBUSY-from-USB.rpm iscan-free-1.15.0.2-3.i586.ignore-EBUSY-from-USB.rpm iscan-free-1.15.0.2-3.x86_64.ignore-EBUSY-from-USB.rpm
Follow-up for the last paragraph in comment #22: It is really a different interface (interface 0) for the scanner unit: sane-find-scanner -v -v shows the following output for my RX420 -------------------------------------------------------------------------- <device descriptor of 0x04b8/0x080f at 002:003 (EPSON USB MFP)> bLength 18 bDescriptorType 1 bcdUSB 1.10 bDeviceClass 0 bDeviceSubClass 0 bDeviceProtocol 0 bMaxPacketSize0 8 idVendor 0x04B8 idProduct 0x080F bcdDevice 1.00 iManufacturer 1 (EPSON) iProduct 2 (USB MFP) iSerialNumber 3 (LJ4010410142027390) bNumConfigurations 1 <configuration 0> bLength 9 bDescriptorType 2 wTotalLength 78 bNumInterfaces 3 bConfigurationValue 1 iConfiguration 4 (USB MFP) bmAttributes 192 (Self-powered) MaxPower 2 mA <interface 0> <altsetting 0> bLength 9 bDescriptorType 4 bInterfaceNumber 0 bAlternateSetting 0 bNumEndpoints 2 bInterfaceClass 255 bInterfaceSubClass 255 bInterfaceProtocol 255 iInterface 5 (EPSON Scanner) <endpoint 0> bLength 7 bDescriptorType 5 bEndpointAddress 0x81 (in 0x01) bmAttributes 2 (bulk) wMaxPacketSize 64 bInterval 0 ms bRefresh 0 bSynchAddress 0 <endpoint 1> bLength 7 bDescriptorType 5 bEndpointAddress 0x02 (out 0x02) bmAttributes 2 (bulk) wMaxPacketSize 64 bInterval 0 ms bRefresh 0 bSynchAddress 0 <interface 1> <altsetting 0> bLength 9 bDescriptorType 4 bInterfaceNumber 1 bAlternateSetting 0 bNumEndpoints 2 bInterfaceClass 7 bInterfaceSubClass 1 bInterfaceProtocol 2 iInterface 6 (USB Printer) <endpoint 0> bLength 7 bDescriptorType 5 bEndpointAddress 0x83 (in 0x03) bmAttributes 2 (bulk) wMaxPacketSize 64 bInterval 0 ms bRefresh 0 bSynchAddress 0 <endpoint 1> bLength 7 bDescriptorType 5 bEndpointAddress 0x04 (out 0x04) bmAttributes 2 (bulk) wMaxPacketSize 64 bInterval 0 ms bRefresh 0 bSynchAddress 0 <interface 2> <altsetting 0> bLength 9 bDescriptorType 4 bInterfaceNumber 2 bAlternateSetting 0 bNumEndpoints 2 bInterfaceClass 8 bInterfaceSubClass 6 bInterfaceProtocol 80 iInterface 7 (USB Mass Storage) <endpoint 0> bLength 7 bDescriptorType 5 bEndpointAddress 0x85 (in 0x05) bmAttributes 2 (bulk) wMaxPacketSize 64 bInterval 0 ms bRefresh 0 bSynchAddress 0 <endpoint 1> bLength 7 bDescriptorType 5 bEndpointAddress 0x06 (out 0x06) bmAttributes 2 (bulk) wMaxPacketSize 64 bInterval 0 ms bRefresh 0 bSynchAddress 0 -------------------------------------------------------------------------- In contrast a normal Epson scanner looks like -------------------------------------------------------------------------- <device descriptor of 0x04b8/0x010b at 002:002 (EPSON Perfection1240)> bLength 18 bDescriptorType 1 bcdUSB 1.00 bDeviceClass 255 bDeviceSubClass 255 bDeviceProtocol 255 bMaxPacketSize0 64 idVendor 0x04B8 idProduct 0x010B bcdDevice 1.04 iManufacturer 1 (EPSON) iProduct 2 (Perfection1240) iSerialNumber 0 () bNumConfigurations 1 <configuration 0> bLength 9 bDescriptorType 2 wTotalLength 32 bNumInterfaces 1 bConfigurationValue 1 iConfiguration 0 () bmAttributes 64 (Self-powered) MaxPower 2 mA <interface 0> <altsetting 0> bLength 9 bDescriptorType 4 bInterfaceNumber 0 bAlternateSetting 0 bNumEndpoints 2 bInterfaceClass 255 bInterfaceSubClass 255 bInterfaceProtocol 255 iInterface 0 () <endpoint 0> bLength 7 bDescriptorType 5 bEndpointAddress 0x81 (in 0x01) bmAttributes 2 (bulk) wMaxPacketSize 64 bInterval 0 ms bRefresh 0 bSynchAddress 0 <endpoint 1> bLength 7 bDescriptorType 5 bEndpointAddress 0x02 (out 0x02) bmAttributes 2 (bulk) wMaxPacketSize 64 bInterval 0 ms bRefresh 0 bSynchAddress 0 --------------------------------------------------------------------------
Right now scanning failed on my RX420 when usblp was loaded but usb-storage was not loaded. => Very unstable (at least for me). => Needs further investigation.
After asking on the sane-devel@lists.alioth.debian.org list, it seems the other errors which I had with my RX420 "are not dierctly connected to this", see http://lists.alioth.debian.org/pipermail/sane-devel/2005-October/015249.html and http://lists.alioth.debian.org/pipermail/sane-devel/2005-November/015297.html I never had any new problem (or got any such report) when EBUSY is simply ignored. Therefore I decided to make it public available as recommended YOU update.
released