complete PDF
Complete EPUB
One page


5_toubleshooting PDF

(pdf) (epub) (1 page)
1 Intro
2 What is Sane?
3 Buying a scanner
4 How do I install
5 It doesn't work
6 Scanner specifics
7 . SCSI problems
8 Paralel port scanners
9 USB Problems
10 Network-scanning
11 I can make a scan! Great, what's next?

5. It doesn't work

5.1. It does not work; basic problem searching.

OK. Don't panic.

Henning Meier-Geinitz has made a program called sane-troubleshoot. It can be found at http://www.meier-geinitz.de/sane/sts/ Though not yet finnished, it may guide you to the problem you're having.

Otherwise try the following:

First thing to do is get the latest version of sane and the backend. Sane develops relatively fast, and it might be that your problem is already fixed.

Check the boot-messages ( /var/log/messages ); there should be some lines indicating your scanner; something like:

Vendor: AGFA Model: SnapScan Rev: 1.40, Type: Scanner ANSI SCSI revision: 02)

If not: go to the SCSI-section in this FAQ

Run a

 sane-find-scanner

If you have a SCSI or USB scanner, the scanner should be listed. If not: go to the SCSI or USB-section of this FAQ.

If you're using a SCSI-scanner do a

sgcheck

Or run the following script:

 #!/bin/bash
 for dev in /dev/sg* ; do
 echo "__________________"
 echo "$dev:"
 scsiinfo $dev 
 done

If your scanner is not there, you have a SCSI-problem. alternatively, you might use

 cat /proc/scsi/scsi

do as root:

scanimage -L 

this will give the list of scanners that is recognised. On Linux-systems, the kernel-modules are loaded automatically when they are needed. If you know what modules you need, you might load them using insmod If not, run scanimage -l tiwce.

5.2. I compiled SANE, but my scanner doesn't show in the device list or no Device selection dialog appears.

Depending on your platform/scanner, you will need time for a coffee, a pizza or an extra month of holiday :

We already told that, but ensure your scanner is in the supported scanner list. If your scanner is SCSI: Check that the SCSI card is supported by your OS. You may need to rebuild your kernel to add generic SCSI support.

Your SCSI card often display SCSI device on startup. If not, check cables and terminators.

Some operating system display available SCSI device on startup. Again, if not, check cables and terminators.

Check if your SCSI-module is correctly loaded (lsmod). If you installed a binary-package, check if /usr/local/lib is in /etc/ld.so.conf Make sure that the path to the sane libs (default: /usr/local/lib/sane ) is NOT listed in /etc/ld.so.conf repair the links from /usr(/local)/lib/libsane* -> sane/libsane-dll* and call ldconfig the same problem may occur when LD_LIBRARY_PATH includes the path to the sane libs. The path to the link libsane.so.1

/usr(/local)/lib has to be listed in the /etc/ld.so.conf or dynamically linked frontends will not be able to load the sane libs. Note that a default RedHat 6.2 ld.so.conf does not contain /usr/local/lib which is the default path for SANE-installations. Try setenv SANE_DEBUG_BACKENDNAME=255 for debug-messages. Also export SANE_DEBUG_DLL=255 may be good to look if the backend is loaded at all. If it is not mentioned in the debug log it may not be in dll.conf or commented out (e.g. mustek_pp). You may not understand all the messages, on the other hand you could recognise your mistake/the problem.

Ask in the sane-devel mailing list. If you changed the library-setup, especially /etc/ld.so.conf, you need to run ldconfig

5.3. Permissions: As root it works, but not for ordinary people

Anyone scanning must have read and write permissions on the scanner-device. Do a

 scanimage -L

This will give you the name of the device. For example:

 [ljm@ronsard ~]$ scanimage -L
 device `umax:/dev/sgd' is a UMAX     Astra 1220S      flatbed scanner
 [ljm@ronsard ~]$ 

The /dev/sgd is the name of the device. The easiest is to give everybody access chmod a+rw /dev/sgd You might also allow only a limited group. Some systems have addtional security build in. This might stop SANE from working. Look at the security log files.

In some cases, the permission of the scanner may be set and reset at login-time. Look for your scanner in the file /etc/security/console.perms and comment-out those lines. For users of the device filesystem: edit /etc/devfs/perms which is used to set the device permission in the dev file system. In this file you'll find the folowing line:

 REGISTER ^sg[^/]* PERMISSIONS root.root 0600

As the next line insert the following text:

 REGISTER ^sg4 PERMISSIONS root.scanner 0660

or any other sg-number your scanner uses.

For most parallel port scanners you not only need read/write access to the device, you also have to be root (or your application needs to be setuid root). The reason for this is that the backend must control the actual parallel port via I/O ports. This is necessary for all Linuces (linuxes?) 2.1 and above.

An exception might be the backends that use the libieee1284.

For USB-scanner: have a look at the USB-section.

5.4. Sane hangs or crashes when I start a frontend for sane, what can I do?

Sometimes the backends that are not used make problems. Edit /usr/(local)/etc/sane.d/dll.conf and comment out everything but the backend used.

5.5. Scanimage gives a message "Invallid argument"

"Invalid argument" is what scanimage says when almost anything goes wrong. It does it if the device file is missing, or already open, or the kernel driver is missing, or the scanner responds with something it shouldn't, or not at all.

If the complete message looks like:

 scanimage: open of device /dev/usbscanner0 failed: Invalid argument

You seem to have specified a UNIX device name, or filename instead of selecting the SANE scanner or image acquisition device you want to use. As an example, you might want epson:/dev/sg0 or hp:/dev/usbscanner0 If any supported devices are installed in your system, you should be able to see a list with scanimage --list The specification for the -d option should be:

-d, --device-name=DEVICE use a given scanner device The format of DEVICE is backendname:devicefile (e.g. umax:/dev/scanner ).

5.6. I changed the dll.conf or other configuration files but nothing has changed

When trying to get things working, you may have made several installation tries. Therefore there may be different versions of the configuration files. You may have made the changes to the configuration file that is not in use.

You can verify this with:

 find /usr /etc -name dll.conf -print

If more than one dll.conf in a SANE driretory shows up, you have multiple installations.

5.7. I need more technical information for Linux

See: http://www.sane-project.org/README.linux