Linux tip, Fedora tip / howto: Using the Epson Perfection 4490 scanner

Note that these tips are mostly outdated

back to notes and tips index

Try my online puzzle page with Calcudoku, Killer Sudoku and online Sudoku.

Using the Epson Perfection 4490 scanner

(related tip: fixing the Epson 4490 ratchet noise)

Update: after about 8 years of service, my 4490 did one more scan of some 8mm film, and then decided to call it quits :-(
sane-find-scanner still reports it, but any other software says there's no scanner attached. Both scanning lights stay dark (!). A clear advantage of this scanner was the high quality high res scanning capability, a clear drawback the poor build quality.

Update: getting the scanner to work under CentOS 6.4 x86_64

Recently I got the scanner to work again under CentOS 6.4. The steps I took are listed below (maybe not all are required, but at least the scanner works now :-) )

  • from the Epson download center page, search for "4490"
  • download the core & data packages, and the iscan plugin package for Linux (for CentOS 6.4 I needed the ltdl7 version of the first RPM): iscan-2.29.2-1.usb0.1.ltdl7.x86_64.rpm iscan-data-1.24.0-2.noarch.rpm iscan-plugin-gt-x750-2.1.2-1.x86_64.rpm
  • install in this order: iscan-data, iscan, iscan-plugin-gt-x750
  • in /etc/sane.d/dll.conf, make sure the line with epson is uncommented (you can leave epkowa and epson2 commented out)
  • in /etc/sane.d/epson.conf, change the line usb to:
    usb 0x04b8 0x0119
  • xsane now works, but it sounds like the scanner is moving its head in the wrong direction when initializing (?!)
  • iscan works, both standalone and as a gimp plugin (File→Create→Scanning)

(Send me your feedback using the form at the bottom of the page)

Older info, some may still be useful

I'm busy trying to get old 8mm film to scan properly using this scanner. This page is the progress report. My SANE related installed RPMs (this is on Fedora Core 4):

Don't bother getting the latest sane-backends source and compiling and installing that: you'll run into problems recognizing the scanner.

Instead, get the iscan software from the Avasys download page. I downloaded and installed the following RPMs (if you're also using Fedora Core 4, for "Distribution Version" just pick 5):

Now, the scanimage tool (which is part of the sane-backends package) will show your scanner: scanimage -L gives, in my case:
device `epkowa:libusb:001:005' is a Epson Perfection 4490 flatbed scanner

Run iscan to scan using a GUI, use scanimage to scan from the command-line, for example:
scanimage --mode Color --depth 8 --resolution 300 --source "Transparency Unit" --format=tiff --film-type Positive --verbose > film.tiff

This will scan a positive film using the transparency unit (don't forget to remove the cover below the lid), in color, at 300 dpi, storing 8 bits per color channel, into a TIFF file film.tiff

Run scanimage --help -d epkowa to see all the possible options.

Set the environment variable SANE_DEBUG_EPKOWA to 5 to see lots of debugging output from scanimage (a higher value produces more output, the minimum is 1).

Update: scanning at 4800 dpi

I finally found a way to scan at 4800 dpi under Linux. Because the scanner reports 2400 dpi as the highest resolution, all the front-end software does not want to go higher. However, there are some special cases in the driver source for scanners that report too high dpi values: we'll do something similar, but the other way around. For now I've hacked it such that if you specify 600 dpi as the scan resolution, it will use 4800 dpi instead (I know, bad hack :-)).

To get this to work (all steps as root, verified under Fedora 4 and 8):

  • install the RPMs as described above (including the iscan one!)
  • yum install sane-backends-devel
    (this should install sane-backends-devel-1.0.17-0.fc4.2) (currently sane-backends-devel-1.0.18-17.fc8 on Fedora 8)
  • from the Avasys download page mentioned above, download the iscan_2.10.0-1.tar.gz source
  • tar zxvf iscan_2.10.0-1.tar.gz
  • download this patch file for the epkowa driver
  • cd iscan-2.10.0/backend
    patch epkowa.c epkowa.patch
  • cd ..
    ./configure --prefix=/usr
    make; make install
    (if you get an error about a missing ltdl.h:
    yum install libtool-ltdl-devel)
    (an Ubuntu user reported that the configuration file epkowa.conf may end up in the wrong place (after which scanimage -L will tell you "No scanners were identified"), if so, run configure like this:
    ./configure --prefix=/usr --sysconfdir=/etc)

Now you should be able to run iscan, please let me know if you get an error message. To scan at 4800 dpi, select 600 dpi instead. Similarly, to use scanimage to scan at 4800 dpi (a small 1 inch by 1cm block at the top of the page):
scanimage --mode Color --depth 8 --resolution 600 -t 0 -l 50 -x 25.4 -y 10 --format=tiff --verbose > test.tiff

scanning at 4800 dpi is limited to 57 mm width

The buffer for a scan line is limited to 32768 bytes, which at 4800 dpi (and 8 bits per pixel) effectively limits a single line to 57 mm. The maximum scannable width for the film scanner in the lid is about 68.6 mm.

I fixed this by hard-coding a larger buffer size in epkowa.c (did not encounter any negative side effects yet...). In the function sane_start, around line 6290, after the line that says s->block = SANE_TRUE, add this line:
sanei_scsi_max_request_size = 39000;
This makes the buffer a bit larger than what is needed for a line of width 68.6 mm. Next, compile and install as described above.

auto exposure issue

Some kind of "auto exposure" thing is going on: with the 8mm film on the scanner "from left to right" I get good scans, when putting it "from top to bottom" (to scan more frames in one go), the colors are all messed up. Any pointers are appreciated. To get around this, I'm now doing horizontal scans near the top of the scanning area.

Another note: when scanning near the top of the scanning area without the film holder, scans often fail when scanning very near the top (e.g. using -t 5, for example). Moving only a little bit further down (-t 10 etc.) fixes this problem...

scanimage does not use the -t and -l parameters

This took some debugging to figure out: it turns out that this depends on the order of the paramaters (!). Just make sure you specify the source before the -t and -l parameters, for example:

scanimage --mode Color --depth 8 --resolution 300 --source "Transparency Unit" -t 5 -l 25 -x 20 -y 10 --format=tiff --film-type Positive --verbose > test.tiff

(if you specify the source after, it resets these parameters to zero...)

scanimage produces Segmentation fault, except when run as root

The solution to this turned out to be simple: just specify the driver:
scanimage -d epkowa ...
Now you should be able to run scanimage from a regular user account.

If you get errors about the lp or ppdev modules, then temporarily log in as root, and load those modules:
modprobe lp
modprobe ppdev

← back to notes and tips index
Please do not copy the text of this tip (© Patrick Min) to your web site.