[sane-devel] ScanImage works, but no other program does

David Goodenough david.goodenough at linkchoose.co.uk
Mon Jul 16 14:10:14 UTC 2007


On Monday 16 July 2007, Gerhard Jaeger wrote:
> On Montag, 16. Juli 2007, David Goodenough wrote:
> [SNIPSNAP]
>
> > I am using 2.6.21, and unfortunately the stock kernel from Debian
> > has CONFIG_USB_SUSPEND turned on.  But I never use hibernate or the like
> > on this machine.
> >
> > Are there any details of the problem?  Also why are the mechanisms used
> > by scanimage so different to those used by all the other programs?
>
> The problem seems, that the USB seems to be put to suspend mode, after
> closing the port - while scanimage does something like open detect scan
> close, xsane does something like open detect close .... wait what the user
> wants, then open scan close...
>
> Guess the return from suspend mode does not work correctly for the LiDE25
> and that's why you'll see some black images - but that needs to be
> verified.
>
> -
> Gerhard

According to the Ubuntu forums this is indeed a problem in libusb.  It 
does not currently have support for suspend mode.  There is a workaround
but I have not been able to test it (usbcore has a parameter autosuspend
and if this is set to zero the function is disabled but for everything).
As usbcore is loaded from initramfs in Debian these days that means 
rebuilding the initramfs which is why I have not got around to testing
it.

There is also some talk on the usb-devel list of fixing this.  But actually
their starting point seems to be changing the default for autosuspend to 
0 from the default of 2 (seconds I think).  But disabling this function has
implications for power saving on some USB devices, so the real solution is
to press the libusb people into a new release with proper suspend support.
Their reason for not doing it yet is that CONFIG_USB_SUSPEND is marked as 
experimental in the kernel (even in 2.6.21) but as distributions are now
using it fixing it has become important.

It would appear that this problem hits lots of USB scanners, and the 
Ubuntu list are up in arms about it.

I have gotten around it my attaching the scanner to an old machine which
was running an old kernel which did not have this enabled, and then using
saned to access the scanner remotely.

David



More information about the sane-devel mailing list