Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] scanimage -L takes more than 2min
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
Yminus
Apprentice
Apprentice


Joined: 06 Jan 2008
Posts: 184

PostPosted: Mon Feb 18, 2013 2:36 pm    Post subject: [SOLVED] scanimage -L takes more than 2min Reply with quote

Code:
time scanimage -L
Failed cupsGetDevices
device `v4l:/dev/video0' is a Noname Laptop Integrated Webcam virtual device
device `plustek:libusb:005:002' is a Canon CanoScan N670U/N676U/LiDE20 flatbed scanner

real    2m10.627s
user    0m0.112s
sys     0m0.151s


The "Failed cupsGetDevices" error does not occur when called by root, but the long delay is the same with and without being root.

It used to work instantly in the past. I do not know when exactly it broke since I seldom use the scanner.

I tested the scanner with xsane. It works flawlessly after >2min waiting for the device dialogue to appear.

There is nothing related in syslog.


Last edited by Yminus on Thu Feb 21, 2013 8:42 am; edited 1 time in total
Back to top
View user's profile Send private message
Hypnos
Advocate
Advocate


Joined: 18 Jul 2002
Posts: 2889
Location: Omnipresent

PostPosted: Tue Feb 19, 2013 12:59 am    Post subject: Reply with quote

What if you specify the device? E.g.

Code:
# scanimage -d plustek:libusb:005:002

_________________
Personal overlay | Simple backup scheme
Back to top
View user's profile Send private message
Yminus
Apprentice
Apprentice


Joined: 06 Jan 2008
Posts: 184

PostPosted: Tue Feb 19, 2013 8:15 am    Post subject: Reply with quote

Code:
scanimage -d plustek:libusb:005:003 >image.pnm

Works immediately.
Back to top
View user's profile Send private message
Hypnos
Advocate
Advocate


Joined: 18 Jul 2002
Posts: 2889
Location: Omnipresent

PostPosted: Tue Feb 19, 2013 8:24 am    Post subject: Reply with quote

Seems like the issue is that SANE is confused by your webcam. It tries every driver, and when each of them fails/times out, it moves onto your actual scanner.

One possible workaround is to emerge sane-backends with "SANE_BACKENDS: <driver>" USE flag containing the only the drivers you know you will use.

Another possible workaround: to skip your webcam, it may be sufficient just to disable the "v4l" USE flag, if you have that enabled.
_________________
Personal overlay | Simple backup scheme
Back to top
View user's profile Send private message
Yminus
Apprentice
Apprentice


Joined: 06 Jan 2008
Posts: 184

PostPosted: Wed Feb 20, 2013 9:11 pm    Post subject: Reply with quote

Hypnos wrote:
Another possible workaround: to skip your webcam, it may be sufficient just to disable the "v4l" USE flag, if you have that enabled.


No, this does not help:

Code:
time scanimage -L
Failed cupsGetDevices
device `plustek:libusb:005:004' is a Canon CanoScan N670U/N676U/LiDE20 flatbed scanner

real    2m11.199s
user    0m0.128s
sys     0m0.214s


Hypnos wrote:
One possible workaround is to emerge sane-backends with "SANE_BACKENDS: <driver>" USE flag containing the only the drivers you know you will use.


Well, this helps:
Code:
time scanimage -L
device `plustek:libusb:005:004' is a Canon CanoScan N670U/N676U/LiDE20 flatbed scanner

real    0m0.301s
user    0m0.013s
sys     0m0.019s

But this is definitely not a solution for a laptop.

I recompiled without avahi support and etc-update fixed the broken /etc/sane.d/net.conf. Then I recompiled with v4l and avahi enabled and now it works again:
Code:
time scanimage -L
Failed cupsGetDevices
device `v4l:/dev/video0' is a Noname Laptop Integrated Webcam virtual device
device `plustek:libusb:005:004' is a Canon CanoScan N670U/N676U/LiDE20 flatbed scanner

real    0m4.322s
user    0m0.100s
sys     0m0.140s
Back to top
View user's profile Send private message
Hypnos
Advocate
Advocate


Joined: 18 Jul 2002
Posts: 2889
Location: Omnipresent

PostPosted: Thu Feb 21, 2013 1:24 am    Post subject: Reply with quote

That's good detective work -- it seems that misconfigured network drivers were the problem.

If you are satisfied with the solution, please add "[SOLVED]" to the thread title by editing the first post.
_________________
Personal overlay | Simple backup scheme
Back to top
View user's profile Send private message
Yminus
Apprentice
Apprentice


Joined: 06 Jan 2008
Posts: 184

PostPosted: Thu Feb 21, 2013 8:43 am    Post subject: Reply with quote

Thanks for your help!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum