This service will be undergoing maintenance at 00:00 UTC, 2016-09-28. It is expected to last about 1 hours
Bug 140248 - xsane always reports Device Busy
xsane always reports Device Busy
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: sane-backends (Show other bugs)
3
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Tim Waugh
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2004-11-21 14:07 EST by Jonathan Eskritt
Modified: 2007-11-30 17:10 EST (History)
0 users

See Also:
Fixed In Version: 1.0.15-1
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-12-06 12:34:14 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)
output from "ps auxfww" (9.30 KB, text/plain)
2004-11-23 11:09 EST, Jonathan Eskritt
no flags Details
strace output (55.64 KB, text/plain)
2004-11-23 14:44 EST, Jonathan Eskritt
no flags Details
output from "SANE_DEBUG_PLUSTEK=35 scanimage >output 2>&1" (11.29 KB, text/plain)
2004-11-24 11:09 EST, Jonathan Eskritt
no flags Details
output from "SANE_DEBUG_SANEI_USB=128 scanimage >output 2>&1" (42.61 KB, text/plain)
2004-11-29 13:55 EST, Jonathan Eskritt
no flags Details
output from "export SANE_DEBUG_DLL=1 ; export SANE_DEBUG_PLUSTEK=20 ; export SANE_DEBUG_EPSON=5 ; scanimage >output 2>&1" (14.80 KB, text/plain)
2004-12-03 09:46 EST, Jonathan Eskritt
no flags Details

  None (edit)
Description Jonathan Eskritt 2004-11-21 14:07:42 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5)
Gecko/20041111 Firefox/1.0

Description of problem:
I have xsane-0.92-13, sane-backends-1.0.14-6,  kernel-2.6.9-1.678_FC3.
When I start xsane it scans for devices as normal (though it does take
a lot longer than usual) and the xsane windows come up as normal. It
proper detects that I have a Epson Perfect 1250 scanner (USB). When I
go to aquire preview I get the error "Failed to start scanner: Device
Busy"

I used this scanner without issue on redhat 9, and fedora Core 1 & 2.
Only since upgrading to FC3 have I had this problem.

Version-Release number of selected component (if applicable):
xsane-0.92-13

How reproducible:
Always

Steps to Reproduce:
1. start xsane
2. click aquire preview
3.
    

Actual Results:  got the error "Failed to start scanner: Device Busy"

Expected Results:  scanner should have aquired a preview and put it in
the preview window

Additional info:
Comment 1 Tim Waugh 2004-11-22 06:08:40 EST
If you switch the scanner off, and then on, does the scan work?
Comment 2 Jonathan Eskritt 2004-11-22 11:32:46 EST
No, I still get the same error message
Comment 3 Tim Waugh 2004-11-22 11:49:41 EST
What does:

  scanimage -L

and then:

  scanimage >/dev/null

say?
Comment 4 Jonathan Eskritt 2004-11-22 20:52:00 EST
$ scanimage -L
device `plustek:libusb:003:008' is a Epson Perfection 1250/Photo USB
flatbed scanner

$ scanimage > /dev/null
scanimage: sane_start: Device busy

Comment 5 Jonathan Eskritt 2004-11-23 00:15:53 EST
I don't know if it matters, but I have upgraded my kernel to the
latest version: kernel-2.6.9-1.681_FC3. I still get the same problems.
Comment 6 Tim Waugh 2004-11-23 06:16:50 EST
What do these commands give as output?:

ls -l /proc/bus/usb/003/008
ps auxfww
Comment 7 Jonathan Eskritt 2004-11-23 11:09:15 EST
Created attachment 107307 [details]
output from "ps auxfww"
Comment 8 Jonathan Eskritt 2004-11-23 11:10:29 EST
The scanner changes it's USB device numbers every time I power it down.

$ scanimage -L
device `plustek:libusb:003:006' is a Epson Perfection 1250/Photo USB
flatbed scanner

$ ls -l /proc/bus/usb/003/006
-rw-------  1 jon root 57 Nov 23 09:02 /proc/bus/usb/003/006

jon is my user name, so I should have rw access.

The output to ps auxfww is pretty long so I made it an attachement.
Comment 9 Tim Waugh 2004-11-23 11:19:08 EST
How about this?:

strace -eopen scanimage >/dev/null

I expect it will just show -EBUSY or something, so I'd also like to see the
output of:

fuser -v /proc/bus/usb/003/006

(obviously use the numbers from scanimage -L)

The fuser command comes from the psmisc package, in case you don't have that
installed.
Comment 10 Jonathan Eskritt 2004-11-23 14:44:00 EST
Created attachment 107328 [details]
strace output

the fuser -v /proc/bus/usb/003/007 produced no output. I ran it as both a
regular user and as root.
Comment 11 Tim Waugh 2004-11-24 05:41:14 EST
Oh, that's interesting:

open("/proc/bus/usb/003/007", O_RDWR)   = 19

So the open call is succeeding, not failing as I'd expected from the error message.

Please try this:

SANE_DEBUG_PLUSTEK=35 scanimage >output 2>&1

and attach the 'output' file.  Thanks.
Comment 12 Jonathan Eskritt 2004-11-24 11:09:57 EST
Created attachment 107400 [details]
output from "SANE_DEBUG_PLUSTEK=35 scanimage >output 2>&1"
Comment 13 Need Real Name 2004-11-26 21:16:37 EST
FWIW, i see the exact same behavior with my epson perfection
1260/photo scanner and reproduced all of the tests given here. 
Comment 14 Tim Waugh 2004-11-29 11:39:09 EST
What does '/sbin/lsmod' say?  I'm wondering if the kernel loads a scanner module
and prevents us using libusb for that device.
Comment 15 Jonathan Eskritt 2004-11-29 12:19:48 EST
# lsmod
Module                  Size  Used by
ppdev                   8901  0
nls_utf8                1985  1
parport_pc             24705  1
lp                     11565  0
parport                41737  3 ppdev,parport_pc,lp
autofs4                24005  0
asb100                 20061  0
i2c_sensor              3521  1 asb100
i2c_viapro              6989  0
i2c_dev                10433  0
i2c_core               22081  4 asb100,i2c_sensor,i2c_viapro,i2c_dev
ipt_REJECT              6465  1
ipt_state               1857  5
ip_conntrack           40693  1 ipt_state
iptable_filter          2753  1
ip_tables              16193  3 ipt_REJECT,ipt_state,iptable_filter
dm_mod                 54741  0
button                  6481  0
battery                 8517  0
ac                      4805  0
nvidia               3474076  12
sd_mod                 16961  2
md5                     4033  1
ipv6                  232705  10
usb_storage            61321  1
scsi_mod              118417  2 sd_mod,usb_storage
joydev                  8705  0
legousbtower           16197  0
ehci_hcd               31685  0
uhci_hcd               31449  0
snd_cmipci             35173  3
snd_pcm_oss            47608  0
snd_mixer_oss          17217  3 snd_pcm_oss
snd_pcm                97993  2 snd_cmipci,snd_pcm_oss
snd_page_alloc          9673  1 snd_pcm
snd_opl3_lib           11201  1 snd_cmipci
snd_timer              29765  2 snd_pcm,snd_opl3_lib
snd_hwdep               9413  1 snd_opl3_lib
gameport                4801  1 snd_cmipci
snd_mpu401_uart         8769  1 snd_cmipci
snd_rawmidi            26725  1 snd_mpu401_uart
snd_seq_device          8137  2 snd_opl3_lib,snd_rawmidi
snd                    54053  12
snd_cmipci,snd_pcm_oss,snd_mixer_oss,snd_pcm,snd_opl3_lib,snd_timer,snd_hwdep,snd_mpu401_uart,snd_rawmidi,snd_seq_device
soundcore               9889  3 snd
tulip                  43745  0
floppy                 58609  0
ext3                  116809  5
jbd                    74969  1 ext3
Comment 16 Tim Waugh 2004-11-29 12:43:01 EST
Could you try this now please?

SANE_DEBUG_SANEI_USB=128 scanimage >output 2>&1
Comment 17 Jonathan Eskritt 2004-11-29 13:55:36 EST
Created attachment 107563 [details]
output from "SANE_DEBUG_SANEI_USB=128 scanimage >output 2>&1"
Comment 18 Tim Waugh 2004-11-30 06:39:15 EST
Please try sane-backends-1.0.15 from Fedora development:

ftp://download.fedora.redhat.com/pub/fedora/linux/core/development/i386/Fedora/RPMS

There have been several plustek changes since 1.0.14, and it would be useful to
know if they fix the problem or not.
Comment 19 Jonathan Eskritt 2004-11-30 11:40:46 EST
So I updated to sane-backends-1.0.15-6 and hotplug-2004_04_01-10 (required
dependancy) and I still get the same result:

$ scanimage -L
device `plustek:libusb:003:003' is a Epson Perfection 1250/Photo USB flatbed scanner

$ scanimage > /dev/null
scanimage: sane_start: Device busy
Comment 20 Tim Waugh 2004-11-30 12:01:25 EST
I've reported this on the sane-devel mailing list.  We'll see what the
upstream developers say.
Comment 21 Tim Waugh 2004-12-01 08:25:56 EST
If you replace the line "epson" with "#epson" in /etc/sane.d/dll.conf, does
scanning work?
Comment 22 Jonathan Eskritt 2004-12-01 11:24:50 EST
That seems to have done the trick. Thanks.

BTW the scan now makes some strange noises at the end of the scan that it didn't
before.
Comment 23 Tim Waugh 2004-12-01 11:53:02 EST
Are you still running 1.0.15-6?  1.0.15 was meant to fix this problem, by
preventing the epson backend from trying to handle the device:

https://alioth.debian.org/tracker/?group_id=30186&atid=410366&func=detail&aid=300751

Indeed, the source code for 1.0.15 does not list 0x4b8/0x10f as being handled by
epson_usb.c, so it's a bit of a puzzle that commenting out the epson backend
makes a difference.
Comment 24 Jonathan Eskritt 2004-12-01 12:50:54 EST
yeah I'm still using 1.0.15-6. 

The strange thing was that in all the debug stuff I ran, it properly detected it
was a plustek scanner, and in the "SANE_DEBUG_SANEI_USB=128 scanimage >output
2>&1" test it could write and read data from the scanner. But when it came to
actually scanning the epson driver cased some conflict.
Comment 25 Tim Waugh 2004-12-03 05:52:24 EST
Let's see what the epson backend is up to.  Please try this:

export SANE_DEBUG_DLL=1
export SANE_DEBUG_PLUSTEK=20
export SANE_DEBUG_EPSON=5
scanimage >output 2>&1

Thanks.
Comment 26 Jonathan Eskritt 2004-12-03 09:46:15 EST
Created attachment 107830 [details]
output from "export SANE_DEBUG_DLL=1 ; export SANE_DEBUG_PLUSTEK=20 ; export SANE_DEBUG_EPSON=5 ; scanimage >output 2>&1"
Comment 27 Tim Waugh 2004-12-03 10:29:23 EST
Does your /etc/sane.d/epson.conf have a line like this?:

usb 0x04b8 0x010f

If so, did you put that there or did it come like that?
Comment 28 Jonathan Eskritt 2004-12-03 14:14:15 EST
I does. I may have done it before submitting the bug report, I tried a bunch of
stuff before submitting to bugzilla. But, I upgraded to sane-backends-1.0.15-6,
shouldn't that either over write the changed file, or have made a
epson.conf.rpmnew? I did get an /etc/sane.d/dll.conf.rpmnew when I upgraded, and
I moved it to /etc/sane.d/dll.conf (after saving the old conf to
/etc/sane.d/dll.conf.old)


Should I comment out the usb 0x04b8 0x010f line in the /etc/sane.d/epson.conf
file and try again?

Comment 29 Tim Waugh 2004-12-06 07:00:50 EST
Since it is a configuration file, it is not overwritten.

Please remove that line and try again.  Thanks.
Comment 30 Jonathan Eskritt 2004-12-06 12:08:02 EST
I commented out the line "usb 0x04b8 0x010f"  in the /etc/sane.d/epson.conf, and
uncommented the epson in the /etc/sane.d/dll.conf file. Everything still works.
I was getting the device busy errors before I made any changes, so it must have
been the upgrade to sane-backends-1.0.15-6 that fixed the problem.

Thanks for all your help.
Comment 31 Tim Waugh 2004-12-06 12:34:14 EST
Great, thanks for testing.

Note You need to log in before you can comment on or make changes to this bug.