Bug#308081: similar problems w/ libsane and epson scanner

2005-05-07 Thread Diab Jerius
Package: libsane
Version: 1.0.15-9
Followup-For: Bug #308081


I've got an epson Perfection 2450 Photo scanner.  Recently (after
upgrading) it stopped working with the following symptoms:

When the scanner is first plugged in, the following appears in the
kernel logs

kernel: usb 5-1: new high speed USB device using ehci_hcd and address 7

lsusb will show it:

  # lsusb
  Bus 005 Device 007: ID 04b8:0112 Seiko Epson Corp. Perfection 2450

and scanimage -L will find it:

  # scanimage -L
  device `epson:libusb:005:007' is a Epson GT-9700 flatbed scanner
  device `epkowa:libusb:005:007' is a Epson Perfection 2450 flatbed scanner

This takes a LONG time (minutes). Repeated scanimage -L's will show it.
However, scanimage -T causes the following

  # scanimage -T -v
  scanimage: no SANE devices found

and the following is written to the system log:

  kernel: usb 5-1: usbfs: interface 0 claimed while 'scanimage' sets config #1

Subsequent attempts at scanimage -L result in an immediate (no waiting)
response:

  # 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).


If I cycle the power to the scanner it'll once more be seen by
scanimage.  Here's the result of an strace on scanimage after such a
power cycle. (Note that the usb device id has changed because of the 
power reset) I've kept just the part after the correct device was opened:


  # strace -e trace=open,ioctl scanimage -L
  open("/etc/sane.d/epson.conf", O_RDONLY) = 3
  open("/proc/bus/usb/005/009", O_RDWR)   = 4
  ioctl(4, USBDEVFS_SETCONFIGURATION, 0xbfffafe4) = 0
  ioctl(4, USBDEVFS_CLAIMINTERFACE, 0xbfffafe4) = 0
  ioctl(4, USBDEVFS_SUBMITURB, 0xbfffaf40) = 0
  ioctl(4, USBDEVFS_REAPURBNDELAY, 0xbfffaea4) = -1 EAGAIN (Resource 
temporarily unavailable)
  ioctl(4, USBDEVFS_REAPURBNDELAY, 0xbfffaea4) = 0
  ioctl(4, USBDEVFS_SUBMITURB, 0xbfffaf20) = 0
  ioctl(4, USBDEVFS_REAPURBNDELAY, 0xbfffae84) = -1 EAGAIN (Resource 
temporarily unavailable)
  ioctl(4, USBDEVFS_REAPURBNDELAY, 0xbfffae84) = -1 EAGAIN (Resource 
temporarily unavailable)
  ioctl(4, USBDEVFS_REAPURBNDELAY, 0xbfffae84) = -1 EAGAIN (Resource 
temporarily unavailable)
  ioctl(4, USBDEVFS_REAPURBNDELAY, 0xbfffae84) = -1 EAGAIN (Resource 
temporarily unavailable)

This continues for a while, until it outputs the device information:

  device `epson:libusb:005:009' is a Epson GT-9700 flatbed scanner
  device `epkowa:libusb:005:009' is a Epson Perfection 2450 flatbed scanner
 


-- System Information:
Debian Release: 3.1
  APT prefers testing
  APT policy: (990, 'testing')
Architecture: i386 (i686)
Kernel: Linux 2.6.10-1-k7
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)

Versions of packages libsane depends on:
ii  adduser 3.63 Add and remove users and groups
ii  debconf 1.4.30.13Debian configuration management sy
ii  libc6   2.3.2.ds1-21 GNU C Library: Shared libraries an
ii  libgphoto2-22.1.5-4  gphoto2 digital camera library
ii  libgphoto2-port02.1.5-4  gphoto2 digital camera port librar
ii  libieee1284-3   0.2.10-1 cross-platform library for paralle
ii  libjpeg62   6b-9 The Independent JPEG Group's JPEG 
ii  libusb-0.1-42:0.1.10a-9  userspace USB programming library
ii  makedev 2.3.1-77 creates device files in /dev
ii  sane-utils  1.0.15-9 API library for scanners -- utilit

-- no debconf information


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Bug#308081: similar problems w/ libsane and epson scanner

2005-05-08 Thread Julien BLACHE
Diab Jerius <[EMAIL PROTECTED]> wrote:

Hi Nils and Diab,

> and scanimage -L will find it:
>
>   # scanimage -L
>   device `epson:libusb:005:007' is a Epson GT-9700 flatbed scanner
>   device `epkowa:libusb:005:007' is a Epson Perfection 2450 flatbed scanner

Does it work better if you disable the epkowa backend in
/etc/sane.d/dll.d/libsane-extras ? (you can also just purge
libsane-extras if you don't need it)

JB.

-- 
 Julien BLACHE - Debian & GNU/Linux Developer - <[EMAIL PROTECTED]> 
 
 Public key available on  - KeyID: F5D6 5169 
 GPG Fingerprint : 935A 79F1 C8B3 3521 FD62 7CC7 CD61 4FD7 F5D6 5169 


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Bug#308081: similar problems w/ libsane and epson scanner

2005-05-08 Thread Julien BLACHE
Diab Jerius <[EMAIL PROTECTED]> wrote:

> I removed all of the other backends. (BTW, This got rid of the syslog
> error about interface 0 being claimed )

Can you restore the original dll.conf file, and:
 - purge libsane-extras, then try to scan
 - revert to libsane 1.0.15-8, then try to scan

I need to figure out who's at fault, and I have 3 candidates. Either a
backend in libsane-extras, a backend in libsane, or libusb itself.

> I ran strace scanimage -L twice in a row.  The second generates many
> "Resource temporarily unavailable" errors.  Logs are in

The logs seem strange to me, I can't quite figure out what's
happening. Do you have messages in /var/log/messages from the USB
subsystem ?

JB.

-- 
 Julien BLACHE <[EMAIL PROTECTED]>  |  Debian, because code matters more 
 Debian & GNU/Linux Developer|   
 Public key available on  - KeyID: F5D6 5169 
 GPG Fingerprint : 935A 79F1 C8B3 3521 FD62 7CC7 CD61 4FD7 F5D6 5169 


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Bug#308081: similar problems w/ libsane and epson scanner

2005-05-08 Thread Julien BLACHE
Diab Jerius <[EMAIL PROTECTED]> wrote:

>> Can you restore the original dll.conf file, and:
>>  - purge libsane-extras, then try to scan
>>  - revert to libsane 1.0.15-8, then try to scan
>
> ok; will get to that shortly.

Thanks. There were *no changes* made to the epson backend between
those 2 revisions ...

>> I need to figure out who's at fault, and I have 3 candidates. Either a
>> backend in libsane-extras, a backend in libsane, or libusb itself.
>
> I commented out all of the backends except for epson or epkowa, so I
> think that rules out all of the other backends.  I checked the strace
> logs, and they are the only ones attempted.

My guess is that the scanner gets confused at some point, but it's
only a guess.

> I can successfully access a USB camera via gphoto2; I don't know if that
> helps any in deciding if libusb is a factor (probably not).

Not really. libusb changed a few days after libsane 1.0.15-9 entered
Sarge, so ...

JB.

-- 
 Julien BLACHE <[EMAIL PROTECTED]>  |  Debian, because code matters more 
 Debian & GNU/Linux Developer|   
 Public key available on  - KeyID: F5D6 5169 
 GPG Fingerprint : 935A 79F1 C8B3 3521 FD62 7CC7 CD61 4FD7 F5D6 5169 


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Bug#308081: similar problems w/ libsane and epson scanner

2005-05-09 Thread Julien BLACHE
Diab Jerius <[EMAIL PROTECTED]> wrote:

Hi Diab,

> Ok, I purged libsane-extras and ran the following experiment.  I ran
> scanimage -L 10 times in a row (log files are L.n.log) and then ran
> scanimage in acquire mode 10 times (logs are in read.n.log).  The script
> test-sane is what does it.
>
> There are separate directories for 1.0.15-9 and 1.0.15-8. A tar file
> of the logs is here:
>   
>   http://hea-www.cfa.harvard.edu/~dj/tmp/sane/20050508.1.tar.bz2

Thanks. I relocated the file to


> Note that the -L runs alternate between "normal" behavior and
> lots of resource errors.

OK. Does your scanner use a firmware ?

> In both 1.0.15-8 and 1.0.15-9, the second attempt at acquiring an
> image (read.1.log) succeeds. 
>
> (For 1.0.15-8 I cycled power to the scanner and tried just acquiring
> the image.  The behavior was the same as when it was preceded with the
> scanimage -L runs.)
>
> with libsane at 1.0.15-9, I then downgraded libusb and ran the script.
>
> 0.1.10a-8: same behavior
>
> 0.1.10a-7: at this point I modified test-sane to use 5 iterations (10
>  was taking too long), with the result that the image was
>  acquired on the first attempt. Otherwise, the pattern of
>  success/failure.
>
> 0.1.10a-6: same
> 0.1.10a-5: same
> 0.1.10a-3: same
>
> Finally, I downgraded to
>
> libsane: 1.0.15-1
> libusb-0.1-4: 0.1.10a-3
>
> Just to be sure, I rebooted after this. Same results.
>
> I wish I could tell you when I last had the scanner working, so as to
> narrow things down.
>
> Any further downgrades on libusb causes a small dependency crisis;
> I'll need a bit more time to prepare for that and won't be able to do
> anything until Tuesday evening.

Ok. Looks like a real problem.

JB.

-- 
 Julien BLACHE <[EMAIL PROTECTED]>  |  Debian, because code matters more 
 Debian & GNU/Linux Developer|   
 Public key available on  - KeyID: F5D6 5169 
 GPG Fingerprint : 935A 79F1 C8B3 3521 FD62 7CC7 CD61 4FD7 F5D6 5169 


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Bug#308081: similar problems w/ libsane and epson scanner

2005-05-10 Thread Diab Jerius
Julien,

I haven't had a chance to downgrade libusb/sane further, but I just
happened to have a laptop running Ubuntu Hoary at home this morning,
and tried that out.  I have no idea if this is of any help to you.
For completeness:

kernel: 2.6.10-5-686
libusb: 0.1.8-17ubuntu
libsane: 1.0.15-4ubuntu

I ran the same script as I've done before.  The device detection section
worked consistently.  The image acquisition section worked on the first
iteration, then failed on the subsequent four attempts.

There's definitely something different going here, in part because the
strace logs indicate a single attempt at contacting the scanner, which
fails with a timeout, not tons of resource temporarily unavailable
messages.

This was without libsane-extras installed.  I then installed that
package and repeated the test.  Same result.  I should note that the
epkowa driver isn't in Ubuntu's libsane-extras.

The logs are attached.

You had asked if my scanner had firmware; I checked Epson's website and
could find no indication of firmware.


-- 
Diab Jerius <[EMAIL PROTECTED]>


20050510.1.tar.bz2
Description: application/bzip-compressed-tar


Bug#308081: similar problems w/ libsane and epson scanner

2005-05-10 Thread Julien BLACHE
Diab Jerius <[EMAIL PROTECTED]> wrote:

Hi,

> I haven't had a chance to downgrade libusb/sane further, but I just
> happened to have a laptop running Ubuntu Hoary at home this morning,
> and tried that out.  I have no idea if this is of any help to you.

Ubuntu basically uses the exact same libsane package, except they
removed a bit of documentation in README.Debian.

> This was without libsane-extras installed.  I then installed that
> package and repeated the test.  Same result.  I should note that the
> epkowa driver isn't in Ubuntu's libsane-extras.

Ubuntu is lagging behind :>

JB.

-- 
 Julien BLACHE - Debian & GNU/Linux Developer - <[EMAIL PROTECTED]> 
 
 Public key available on  - KeyID: F5D6 5169 
 GPG Fingerprint : 935A 79F1 C8B3 3521 FD62 7CC7 CD61 4FD7 F5D6 5169 


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Bug#308081: similar problems w/ libsane and epson scanner

2005-05-10 Thread Matt Zimmerman
On Tue, May 10, 2005 at 12:10:39PM -0700, Matt Zimmerman wrote:
> There is one functional change; the Ubuntu version adds a couple of
> additional USB IDs to the hotplug usermap (patch attached).

Really attached now.

-- 
 - mdz
#! /bin/sh /usr/share/dpatch/dpatch-run
## 39_more_hotplug_usbids.dpatch by  <[EMAIL PROTECTED]>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: No description.

@DPATCH@
diff -urNad sane-backends-1.0.15/tools/hotplug/libsane.usermap 
/tmp/dpep.WGOSZJ/sane-backends-1.0.15/tools/hotplug/libsane.usermap
--- sane-backends-1.0.15/tools/hotplug/libsane.usermap  2005-05-06 
14:04:48.411313536 -0700
+++ /tmp/dpep.WGOSZJ/sane-backends-1.0.15/tools/hotplug/libsane.usermap 
2005-05-06 14:05:04.864812224 -0700
@@ -445,3 +445,7 @@
 libusbscanner 0x0003  0x0a82   0x46000x   0x   
0x00 0x000x000x000x00   
0x00   0x
 #EPSON Corp.|Stylus CX6600
 libusbscanner 0x0003  0x04b8   0x08130x   0x   
0x00 0x000x000x000x00   
0x00   0x
+# Epson Corp.|Stylus RX425
+libusbscanner 0x0003  0x04b8   0x080f0x   0x   
  0x00 0x000x000x000x00  0x00   
0x
+# Epson Corp.|Stylus CX6600
+libusbscanner 0x0003  0x04b8   0x08130x   0x   
  0x00 0x000x000x000x00  0x00   
0x


Bug#308081: similar problems w/ libsane and epson scanner

2005-05-10 Thread Matt Zimmerman
On Tue, May 10, 2005 at 08:36:22PM +0200, Julien BLACHE wrote:

> Diab Jerius <[EMAIL PROTECTED]> wrote:
> > I haven't had a chance to downgrade libusb/sane further, but I just
> > happened to have a laptop running Ubuntu Hoary at home this morning,
> > and tried that out.  I have no idea if this is of any help to you.
> 
> Ubuntu basically uses the exact same libsane package, except they
> removed a bit of documentation in README.Debian.

The README.Debian changes look like they're probably the result of an error
resolving merge conflicts.

There is one functional change; the Ubuntu version adds a couple of
additional USB IDs to the hotplug usermap (patch attached).

> > This was without libsane-extras installed.  I then installed that
> > package and repeated the test.  Same result.  I should note that the
> > epkowa driver isn't in Ubuntu's libsane-extras.
> 
> Ubuntu is lagging behind :>

Debian sid and Ubuntu breezy contain identical source for libsane-extras
(1.0.15.9); if the resulting binaries do not provide the same drivers, that
would be a bug.

-- 
 - mdz


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Bug#308081: similar problems w/ libsane and epson scanner

2005-05-10 Thread Julien BLACHE
Matt Zimmerman <[EMAIL PROTECTED]> wrote:

>> Ubuntu basically uses the exact same libsane package, except they
>> removed a bit of documentation in README.Debian.
>
> The README.Debian changes look like they're probably the result of an error
> resolving merge conflicts.

I can't really see a reason for the change, so that must be it.

> There is one functional change; the Ubuntu version adds a couple of
> additional USB IDs to the hotplug usermap (patch attached).

IIRC I added both those IDs to libsane (maybe it's in my tree waiting
for a build, though)

Thanks for the info & patch,

JB.

-- 
 Julien BLACHE - Debian & GNU/Linux Developer - <[EMAIL PROTECTED]> 
 
 Public key available on  - KeyID: F5D6 5169 
 GPG Fingerprint : 935A 79F1 C8B3 3521 FD62 7CC7 CD61 4FD7 F5D6 5169 


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Bug#308081: similar problems w/ libsane and epson scanner

2005-05-12 Thread Julien BLACHE
Diab Jerius <[EMAIL PROTECTED]> wrote:

Hi Diab,

> kernel:  2.6.10-1-k7
> libsane: 1.0.15-9
> libsane-extras:  1.0.15.9

Could you upgrade your kernel and see if it helps ?

JB.

-- 
 Julien BLACHE - Debian & GNU/Linux Developer - <[EMAIL PROTECTED]> 
 
 Public key available on  - KeyID: F5D6 5169 
 GPG Fingerprint : 935A 79F1 C8B3 3521 FD62 7CC7 CD61 4FD7 F5D6 5169 


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Bug#308081: similar problems w/ libsane and epson scanner

2005-05-13 Thread Julien BLACHE
Diab Jerius <[EMAIL PROTECTED]> wrote:

Hi Diab,

> I took a different approach.  I first verified that the scanner wasn't
> itself broken by hunting up an old hard drive with W98 on it and running
> that. It worked fine, so that's out of the way.
>
> Then I downloaded a demo of vuescan for linux from www.hamrick.com.  It
> worked, perfectly, with  libusb at 0.1.10a-9.  So, unless sane is
> tweaking libusb a lot differently from vuescan, this strongly implies
> the problem is not libusb.

Could you read the last few mails of the bug log and try to run a
newer kernel ? If it still fails, then we're positive there's a
problem.

JB.

-- 
 Julien BLACHE <[EMAIL PROTECTED]>  |  Debian, because code matters more 
 Debian & GNU/Linux Developer|   
 Public key available on  - KeyID: F5D6 5169 
 GPG Fingerprint : 935A 79F1 C8B3 3521 FD62 7CC7 CD61 4FD7 F5D6 5169 


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Bug#308081: similar problems w/ libsane and epson scanner

2005-05-13 Thread Diab Jerius
On Fri, 2005-05-13 at 18:44 +0200, Julien BLACHE wrote:
> Diab Jerius <[EMAIL PROTECTED]> wrote:
> 
> Hi Diab,
> 
> > I took a different approach.  I first verified that the scanner wasn't
> > itself broken by hunting up an old hard drive with W98 on it and running
> > that. It worked fine, so that's out of the way.
> >
> > Then I downloaded a demo of vuescan for linux from www.hamrick.com.  It
> > worked, perfectly, with  libusb at 0.1.10a-9.  So, unless sane is
> > tweaking libusb a lot differently from vuescan, this strongly implies
> > the problem is not libusb.
> 
> Could you read the last few mails of the bug log and try to run a
> newer kernel ? If it still fails, then we're positive there's a
> problem.
> 
> JB.
> 

Julien,

I did that a couple of days ago, but I seem to have forgotten to mention
that; sorry!  

kernel-image   2.6.11-1-k7
libusb-0.1-4   0.1.10a-9
libsane1.0.15-9

It still fails.

Diab


-- 
Diab Jerius <[EMAIL PROTECTED]>



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]