LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 07-09-2010, 09:52 AM   #1
metageek
Member
 
Registered: Jun 2007
Location: Farmington, CT
Distribution: Slackware64
Posts: 204

Rep: Reputation: 44
sane not reading dll.conf ?


I'm trying to setup an Epson perfection 4490 photo scanner in Slack 13.1. I've got the appropriate iscan and epkowa driver and firmware. However it is not working:

sane-find-scanner produces:
Code:
found USB scanner (vendor=0x04b8 [EPSON], product=0x0119 [EPSON Scanner]) at libusb:001:004
but scanimage -L finds nothing. After battling a lot with dll.conf and epkowa.conf I decided to run strace scanimage -L and to my shock it never tries to read dll.conf, instead it goes straight to read xerox_mfp.conf and does not try to read any other conf file in /etc/sane.d

Has anyone come across problems with sane in 13.1 (or 13.0 as I tried this before upgrading with the same results)?

Is sane broken? Any ideas?
 
Old 07-09-2010, 06:35 PM   #2
ljb643
Member
 
Registered: Nov 2003
Posts: 526

Rep: Reputation: Disabled
Same Slackware 13.1, "strace scanimage -L" does show it opening and reading /etc/sane.d/dll.conf.

Make sure you do not have a dll.conf in your working directory, and that there is no environment variable SANE_CONFIG_DIR defined.
 
Old 07-10-2010, 01:59 AM   #3
metageek
Member
 
Registered: Jun 2007
Location: Farmington, CT
Distribution: Slackware64
Posts: 204

Original Poster
Rep: Reputation: 44
mistery deepens

libj643, thanks; I checked and neither of those issues are a problem here. I also managed to get sane working on a machine at home (with a different scanner but also epkowa, though the problems are before epkowa enters the picture). I am now comparing the straces in both of these but have not advanced much. The one that works goes on to read dll.conf (first in local directory, then in /etc/sane.d), but the one that does not work never tries to read dll.conf. This is very strange and is getting on my nerves.

here are the relevant straces at the same point where dll.conf gets read:

working sane:
Code:
uname({sys="Linux", node="photo", ...}) = 0
open("/etc/sane.d/dll.d", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY|O_CLOEXEC) = 3
fcntl64(3, F_GETFD)                     = 0x1 (flags FD_CLOEXEC)
brk(0)                                  = 0x8053000
brk(0x807c000)                          = 0x807c000
getdents(3, /* 2 entries */, 32768)     = 32
getdents(3, /* 0 entries */, 32768)     = 0
brk(0x8074000)                          = 0x8074000
close(3)                                = 0
open("./dll.conf", O_RDONLY)            = -1 ENOENT (No such file or directory)
open("/etc/sane.d/dll.conf", O_RDONLY)  = 3
broken sane:
Code:
uname({sys="Linux", node="haldane", ...}) = 0
stat64("/dev/", {st_mode=S_IFDIR|0755, st_size=5580, ...}) = 0
open("/dev/", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY|O_CLOEXEC) = 3
fcntl64(3, F_GETFD)                     = 0x1 (flags FD_CLOEXEC)
brk(0)                                  = 0x8053000
brk(0x807c000)                          = 0x807c000
getdents(3, /* 279 entries */, 32768)   = 5416
getdents(3, /* 0 entries */, 32768)     = 0
brk(0x8074000)                          = 0x8074000
close(3)                                = 0
stat64("/dev/usb/", 0xbfb6971c)         = -1 ENOENT (No such file or directory)
open("/dev/bus/usb", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY|O_CLOEXEC) = 3
getdents(3, /* 8 entries */, 32768)     = 128
close(3)                                = 0
Notice that the broken sane goes straight to open usb devices at this point, without checking dll.conf; later on it does open one conf file but it is not dll.conf:

Code:
open("./xerox_mfp.conf", O_RDONLY)      = -1 ENOENT (No such file or directory)
open("/etc/sane.d/xerox_mfp.conf", O_RDONLY) = 6
fstat64(6, {st_mode=S_IFREG|0644, st_size=399, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb782c000
read(6, "#xerox_mfp.conf\n\n#Dell MFP Laser "..., 4096) = 399
read(6, ""..., 4096)                    = 0
close(6)                                = 0
munmap(0xb782c000, 4096)                = 0
fstat64(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 3), ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb782c000
write(1, "\n"..., 1)                    = 1
write(1, "No scanners were identified. If y"..., 72) = 72
write(1, "check that the scanner is plugged"..., 68) = 68
write(1, "sane-find-scanner tool (if approp"..., 71) = 71
write(1, "which came with this software (RE"..., 55) = 55
exit_group(0)                           = ?
xerox_mfp.conf is the last conf file (alphabetically) in the /etc/sane.d directory.

Both machines have 13.1 installed as an upgrade to 13.0 (installed new in both cases). The scanner that does not work was working when I had 12.2 installed...

I was hoping I did not have to go inside the sane source code, but this is getting more likely now...
 
Old 07-10-2010, 09:14 PM   #4
ljb643
Member
 
Registered: Nov 2003
Posts: 526

Rep: Reputation: Disabled
Have you tried this? The output might help.
Code:
SANE_DEBUG_DLL=128 scanimage -L
Here are the first few lines from my output:
Code:
[sanei_debug] Setting debug level of dll to 128.
[dll] sane_init: SANE dll backend version 1.0.12 from sane-backends 1.0.21
[dll] sane_init/read_dlld: processing /etc/sane.d/dll.d ...
[dll] sane_init/read_dlld: done.
[dll] sane_init/read_config: reading dll.conf
 
Old 07-11-2010, 01:33 AM   #5
samac
Senior Member
 
Registered: Mar 2004
Location: Kirkwall, Orkney
Distribution: Linux Mint 20.3 - Cinnamon
Posts: 1,425

Rep: Reputation: 139Reputation: 139
EDITED

Sorry I should wake up before answering, or run the risk of appearing stupid.

samac

Last edited by samac; 07-11-2010 at 01:46 AM.
 
Old 07-11-2010, 05:29 AM   #6
metageek
Member
 
Registered: Jun 2007
Location: Farmington, CT
Distribution: Slackware64
Posts: 204

Original Poster
Rep: Reputation: 44
ljb643:

Nothing happens, only the message that sane could not find the scanner:
Code:
SANE_DEBUG_DLL=128 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).
that is why I used strace.
 
Old 07-11-2010, 05:08 PM   #7
ljb643
Member
 
Registered: Nov 2003
Posts: 526

Rep: Reputation: Disabled
Well, that's extremely weird. If I use that command with my scanner disconnected, I still get all the debug output about reading the configuration files, adding backends, trying to open the backend shared library objects... and then I get the same message as you got at the very end ("No scanners were identified").

I'm out of ideas, except for the usually sanity checks that I'm sure you already did: make sure you have just 1 version of sane installed, and you are running the version you think you are, and your library search path /etc/ld.so.conf is what you expect.
 
Old 07-12-2010, 04:22 AM   #8
sircubbi
LQ Newbie
 
Registered: Jul 2010
Posts: 1

Rep: Reputation: 1
The problem might be a wrong entry in ld.so.conf

I ran into the same problem mentioned here. Sane was not reading dll.conf. The only file being parsed was the xerox_mfp.conf.

After lots of debugging I finally found the problem on my system:

In /etc/ld.so.conf there was an entry /usr/lib/sane. That entry caused ldconfig to create a file /usr/lib/sane/libsane.so.1 linking to libsane-xerox_mfp.so

That of course lead sane to not load /usr/lib/libsane.so but /usr/lib/sane/libsane.so linking to the xerox-library. sane-dll and all other libraries were nether initialized.

The solution is simple: remove the entry from /etc/ld.so.conf and run ldconfig. That should sane to load the correct library (/usr/lib/libsane.so) and work as intended.

Regards,
Matthias
 
Old 07-12-2010, 04:30 PM   #9
metageek
Member
 
Registered: Jun 2007
Location: Farmington, CT
Distribution: Slackware64
Posts: 204

Original Poster
Rep: Reputation: 44
Quote:
Originally Posted by sircubbi View Post
The solution is simple: remove the entry from /etc/ld.so.conf and run ldconfig. That should sane to load the correct library (/usr/lib/libsane.so) and work as intended.

Regards,
Matthias
Matthias, this was it. Nasty one! Thanks for the solution, it works now!
 
Old 08-28-2010, 08:02 AM   #10
dlee99
LQ Newbie
 
Registered: Mar 2006
Location: Berkel en Rodenrijs
Distribution: Slackware64-current
Posts: 21

Rep: Reputation: 2
Hi all,

I am not sure if I can post in this thread or begin a new one.

Please excuse me if I hijacked it. Just hope someone can shed some light on my problem.

I am trying to get my epson 4490 working as well.

Downloaded and built/installed the packages from Avasys but somehow it just doesn't work.

I am running a 2.6.35.3 kernel on Slackware64-current.

sane-find-scanner gives:

Code:
found USB scanner (vendor=0x04b8 [EPSON], product=0x0119 [EPSON Scanner]) at libusb:002:005

and
SANE_DEBUG_DLL=128 scanimage -L:

Code:
[sanei_debug] Setting debug level of dll to 128.
[dll] sane_init: SANE dll backend version 1.0.12 from sane-backends 1.0.21
[dll] sane_init/read_dlld: processing /etc/sane.d/dll.d ...
[dll] sane_init/read_dlld: done.
[dll] sane_init/read_config: reading dll.conf
[dll] add_backend: adding backend `epkowa'
[dll] sane_get_devices
[dll] load: searching backend `epkowa' in `/usr/lib64/sane'
[dll] load: trying to load `/usr/lib64/sane/libsane-epkowa.so.1'
[dll] load: dlopen()ing `/usr/lib64/sane/libsane-epkowa.so.1'
[dll] init: initializing backend `epkowa'
[dll] init: backend `epkowa' is version 1.0.212
[dll] sane_get_devices: found 1 devices
device `epkowa:usb:002:005' is a Epson (unknown model) flatbed scanner
[dll] sane_exit: exiting
[dll] sane_exit: calling backend `epkowa's exit function
[dll] sane_exit: finished

strace scanimage -L gives (relevant part):

Code:
open("/dev/bus/usb/002/005", O_RDWR)    = 6
write(4, "\1", 1)                       = 1
read(3, "\1", 1)                        = 1
ioctl(22494272, USBDEVFS_GETDRIVER, 0x7fff32f2c480) = -1 EBADF (Bad file descriptor)
ioctl(6, USBDEVFS_SETCONFIGURATION, 0x7fff32f2c5ac) = 0
ioctl(6, USBDEVFS_CLAIMINTERFACE, 0x7fff32f2c58c) = 0
ioctl(6, USBDEVFS_SUBMITURB or USBDEVFS_SUBMITURB32, 0x1570d30) = 0
timerfd_settime(5, TFD_TIMER_ABSTIME, {it_interval={0, 0}, it_value={1292, 873055000}}, NULL) = 0
poll([{fd=3, events=POLLIN}, {fd=5, events=POLLIN}, {fd=6, events=POLLOUT}], 3, 60000) = 1 ([{fd=6, revents=POLLOUT}])
ioctl(6, USBDEVFS_REAPURBNDELAY or USBDEVFS_REAPURBNDELAY32, 0x7fff32f2c3e8) = 0
timerfd_settime(5, 0, {it_interval={0, 0}, it_value={0, 0}}, NULL) = 0
ioctl(6, USBDEVFS_SUBMITURB or USBDEVFS_SUBMITURB32, 0x1570d30) = 0
timerfd_settime(5, TFD_TIMER_ABSTIME, {it_interval={0, 0}, it_value={1292, 873523000}}, NULL) = 0
poll([{fd=3, events=POLLIN}, {fd=5, events=POLLIN}, {fd=6, events=POLLOUT}], 3, 60000) = 1 ([{fd=6, revents=POLLOUT}])
ioctl(6, USBDEVFS_REAPURBNDELAY or USBDEVFS_REAPURBNDELAY32, 0x7fff32f2c3e8) = 0
timerfd_settime(5, 0, {it_interval={0, 0}, it_value={0, 0}}, NULL) = 0
ioctl(6, USBDEVFS_SUBMITURB or USBDEVFS_SUBMITURB32, 0x1570d30) = 0
timerfd_settime(5, TFD_TIMER_ABSTIME, {it_interval={0, 0}, it_value={1292, 873920000}}, NULL) = 0
poll([{fd=3, events=POLLIN}, {fd=5, events=POLLIN}, {fd=6, events=POLLOUT}], 3, 60000) = 1 ([{fd=5, revents=POLLIN}])
timerfd_settime(5, 0, {it_interval={0, 0}, it_value={0, 0}}, NULL) = 0
ioctl(6, USBDEVFS_DISCARDURB, 0x1570d30) = 0
poll([{fd=3, events=POLLIN}, {fd=5, events=POLLIN}, {fd=6, events=POLLOUT}], 3, 60000) = 1 ([{fd=6, revents=POLLOUT}])
ioctl(6, USBDEVFS_REAPURBNDELAY or USBDEVFS_REAPURBNDELAY32, 0x7fff32f2c3e8) = 0
timerfd_settime(5, 0, {it_interval={0, 0}, it_value={0, 0}}, NULL) = 0
futex(0x1573cf0, FUTEX_WAKE_PRIVATE, 1) = 0
ioctl(6, USBDEVFS_CLEAR_HALT, 0x7fff32f2c54c) = 0
ioctl(6, USBDEVFS_CLEAR_HALT, 0x7fff32f2c5cc) = 0
ioctl(6, USBDEVFS_CLEAR_HALT, 0x7fff32f2c5cc) = 0
ioctl(6, USBDEVFS_CLEAR_HALT, 0x7fff32f2c5ac) = 0
ioctl(6, USBDEVFS_CLEAR_HALT, 0x7fff32f2c5ac) = 0
ioctl(6, USBDEVFS_RELEASEINTERFACE, 0x7fff32f2c59c) = 0
write(4, "\1", 1)                       = 1
read(3, "\1", 1)                        = 1
close(6)                                = 0
fstat(1, {st_mode=S_IFREG|0644, st_size=38785, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fc6bf218000
munmap(0x7fc6bc361000, 2321168)         = 0
munmap(0x7fc6bc004000, 3522840)         = 0
write(1, "device `epkowa:usb:002:005' is a"..., 71device `epkowa:usb:002:005' is a Epson (unknown model) flatbed scanner
) = 71
exit_group(0)                           = ?

I think the problem is at the line:

ioctl(22494272, USBDEVFS_GETDRIVER, 0x7fff32f2c480) = -1 EBADF (Bad file descriptor)


I have been googling but could not find anything.

What is remarkeble is is that this command waits at the line:

Code:
poll([{fd=3, events=POLLIN}, {fd=5, events=POLLIN}, {fd=6, events=POLLOUT}], 3, 60000) = 1 ([{fd=6, revents=POLLOUT}])
for about 30 seconds and then continious until it finally detects the scanner.

Still it doesn't work. Starting iScan replies:

could not send command to scanner.
Check the scanner's status.

I installed drivers and firmware in the default directories but I also tried to put the firmware in /lib/firmware. Still no luck.

Dik
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Shadowbane under wine is not working UBUNTU says needs dll but the dll is there ? zonemikel Linux - Games 2 04-13-2009 10:30 AM
sane: conflicting advice man sane-usb/howto sonichedgehog Linux - Newbie 6 12-02-2007 05:48 PM
Reading inetd.conf Echo Kilo Linux - General 6 03-17-2005 09:54 PM
SANE .conf files Allan Levy Linux - Hardware 4 05-06-2004 05:18 AM
.conf Reading gamehack Programming 1 04-04-2004 12:19 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 10:04 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration