Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 142896 - sane-backends-1.0.17 fails to recognize scanner
Summary: sane-backends-1.0.17 fails to recognize scanner
Status: RESOLVED NEEDINFO
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Patrick Kursawe (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-08-05 10:06 UTC by Klaus-J. Wolf
Modified: 2006-09-09 09:33 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
strace output for sane-backends 1.0.17 when called by xsane (xsane_trace,216.36 KB, text/plain)
2006-08-27 03:41 UTC, Klaus-J. Wolf
Details
emerge --info output (emerge_info,3.46 KB, text/plain)
2006-08-29 07:44 UTC, Klaus-J. Wolf
Details
failed scanimage -vL strace output (run as user) (strace_1_0_18r2_user,171.52 KB, text/plain)
2006-08-29 07:59 UTC, Klaus-J. Wolf
Details
succeeding scanimage -vL strace output (run as root) (strace_1_0_18r2_root,192.32 KB, text/plain)
2006-08-29 08:01 UTC, Klaus-J. Wolf
Details
succeeding scanimage -vL strace output (run as root) (strace_1_0_18r2_root,192.32 KB, text/plain)
2006-08-29 08:05 UTC, Klaus-J. Wolf
Details
succeeding scanimage -vL strace output (run as root) (strace_1_0_18r2_root,192.32 KB, text/plain)
2006-08-29 08:09 UTC, Klaus-J. Wolf
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Klaus-J. Wolf 2006-08-05 10:06:55 UTC
I have got a problem with sane-backends-1.0.17 which fails to recognize my Epson Scanjet 2200c (plustek driver). sane-backends-1.0.15 works without problems.

It appears that the driver scans the /proc/bus/usb entries, but rejects the proper entry without known reason after ioctl() operation.
Comment 1 Patrick Kursawe (RETIRED) gentoo-dev 2006-08-07 00:56:35 UTC
Are you sure you mean Epson, not HP?

Could you please post the output of sane-find-scanner -vv and scanimage -vL ?
Does your problem still exist for sane-backends-1.0.18?
Comment 2 Klaus-J. Wolf 2006-08-13 01:47:10 UTC
Sorry, HP is correct. (So much trouble with the Epson printer that I don't get it out of my mind.)

Trying with media-gfx/sane-backends-1.0.18-r2, there seems to be an access permission problem (i.e. the access method is a bit different, works only when being root).

"device libusb:001:004" in plustek.conf makes sane fail without detecting the scanner. Apparently sane accesses it in a different way when "device auto" is set. (There were no such problems with sane-backends-1.0.15.)

# sane-find-scanner -vv
...
found USB scanner (vendor=0x03f0 [Hewlett-Packard], product=0x0605 [HP ScanJet 2200C], chip=LM9832/3) at libusb:001:004
...
# scanimage -vL
device `plustek:libusb:001:004' is a Hewlett-Packard Scanjet 2200c USB flatbed scanner

$ scanimage -vL

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

$ ll /proc/bus/usb/001
total 0
-rw-rw-r-- 1 root usb 43 Aug 13 10:31 001
-rw-rw-r-- 1 root usb 57 Aug 13 10:36 004
-rw-rw-r-- 1 root usb 50 Aug 13 10:31 005
$ id
uid=1000(kjwolf) gid=1000(kjwolf) groups=...85(usb)...
Comment 3 Patrick Kursawe (RETIRED) gentoo-dev 2006-08-13 23:43:44 UTC
(In reply to comment #2)
> "device libusb:001:004" in plustek.conf makes sane fail without detecting the
> scanner. Apparently sane accesses it in a different way when "device auto" is
> set. (There were no such problems with sane-backends-1.0.15.)

As far as I understand the documentation this makes the driver try to access the scanner via /proc/bus/usb/ - which obviously does not have the right permissions.
Please try to access it via the entry in /dev - perhaps /dev/usbscanner?

But first please try autodetection with just [usb] in your plustek.conf (like mentioned in the sample plustek.conf file). It's not clear to me from your description what the current content of your plustek.conf file is.
Comment 4 Klaus-J. Wolf 2006-08-14 08:27:19 UTC
Excuse me, I am not a nitpicker, but as a member of group 'usb' I should surely be able to access that device without problems. sane simply doesn't access it that way.

Look:
$ python
Python 2.4.3 (#1, May 16 2006, 20:05:20)
[GCC 3.4.5 (Gentoo 3.4.5-r1, ssp-3.4.5-1.0, pie-8.7.9)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> f=open("/proc/bus/usb/001/004","w")
>>>
Comment 5 Patrick Kursawe (RETIRED) gentoo-dev 2006-08-15 01:24:41 UTC
(In reply to comment #4)
> Excuse me, I am not a nitpicker, but as a member of group 'usb' I should surely
> be able to access that device without problems. sane simply doesn't access it
> that way.

Sorry, didn't read thoroughly enough. What about access via /dev or leaving it automatic? What happens then?

Another thing maybe worth trying is using strace to check which system call fails.
Comment 6 Klaus-J. Wolf 2006-08-27 03:39:59 UTC
Sorry for the long delay. I attach the strace output for sane-backends-1.0.17 when using xsane.
Comment 7 Klaus-J. Wolf 2006-08-27 03:41:26 UTC
Created attachment 95189 [details]
strace output for sane-backends 1.0.17 when called by xsane
Comment 8 Patrick Kursawe (RETIRED) gentoo-dev 2006-08-28 00:54:58 UTC
Please:

- tell me your "emerge --info" output
- tell me what's in your plustek.conf file
- tell me if 1.0.18-r2 makes any difference.

Please give me the output of a working (root) and failed (user) attempt with scanimage -vL, not of xsane.

Thanks.
Comment 9 Klaus-J. Wolf 2006-08-29 07:44:44 UTC
Created attachment 95369 [details]
emerge --info output
Comment 10 Klaus-J. Wolf 2006-08-29 07:59:09 UTC
Created attachment 95371 [details]
failed scanimage -vL strace output (run as user)
Comment 11 Klaus-J. Wolf 2006-08-29 08:01:29 UTC
Created attachment 95372 [details]
succeeding scanimage -vL strace output (run as root)

sane-backends-1.0.17 won't succeed even if run as root
Comment 12 Klaus-J. Wolf 2006-08-29 08:05:36 UTC
Created attachment 95373 [details]
succeeding scanimage -vL strace output (run as root)

sane-backends-1.0.17 won't succeed even if run as root
Comment 13 Klaus-J. Wolf 2006-08-29 08:09:15 UTC
Created attachment 95374 [details]
succeeding scanimage -vL strace output (run as root)

sane-backends-1.0.17 won't succeed even if run as root
Comment 14 Klaus-J. Wolf 2006-08-29 08:15:25 UTC
Sorry for these attachment spamming, the browser didn't stop for some reason after uploading, later those attachments suddenly appeared. (Someony might want to delete these.)

plustek.conf is changed in one single line:

< [usb]
> [usb] 0x3f0 0x605

sane-backends-1.0.15 works with unchanged plustek.conf, 1.0.18-r2 only with this change, 1.0.17 doesn't work at all (tried many different changes).
Comment 15 Patrick Kursawe (RETIRED) gentoo-dev 2006-08-31 01:54:48 UTC
I was sure I added a comment yesterday, strange...
The main question was: Could you please investigate why you have no permissions to create /var/lib/lock/sane/LCK..libusb:001:004 when you work with user privileges?
Comment 16 Patrick Kursawe (RETIRED) gentoo-dev 2006-09-07 00:14:31 UTC
Please re-open if you respond to comment #15
Comment 17 Klaus-J. Wolf 2006-09-09 09:33:58 UTC
From the package:
drwxrwxr-x root/scanner      0 2006-09-09 18:26:51 ./var/lib/lock/sane/

Hmm. One needs to be member of group scanner.

There are so many obligatory groups (many of them undocumented or silently changed, at least I had no clue about that one), on some systems you would easily have more than the allowed number (32) a user needs to be member of.

Don't know if that kind of "bug" is worth reopening...