Linux configuration

Scanner Epson Perfection V370 Photo on Ubuntu 17.10

2017/12/10

When I upgraded from Ubuntu 17.04 to Ubuntu 17.10, my laptop stopped recognizing my scanner. Here is how I fixed it.

Solution

Here is a quick summary of the solution I adopted. See the Details section to learn about how I found it out.
  1. From the Epson drive page, enter "Perfection V370" and not "Perfection V370 Photo", otherwise it returns no result. Download the driver 1.0.1 from 2016/07/04.
      $ tar xzvf ~/Downloads/iscan-perfection-v370-bundle-1.0.1.x64.deb.tar.gz
      $ cd iscan-perfection-v370-bundle-1.0.1.x64.deb
      $ sudo ./install.sh
    
  2. Fix the path with a symbolic link
      $ cd /usr/lib/x86_64-linux-gnu/sane
      $ sudo ln -s /usr/lib/sane/libsane-epkowa.so.1 .
    
  3. Fix udev permission by creating as root: /etc/udev/rules.d/60-sane-missing-scanner.rules to be
    ATTRS{idVendor}=="04b8", ATTRS{idProduct}=="014a", MODE="0664", GROUP="scanner", ENV{libsane_matched}="yes"
    
That's it.

Details

Basic check

I first made sure my scanner was connected and turned on.

A web search showed that one possible issue was a lack of permissions. I first tried the most basic command line to see if my scanner was detected.

  $ lsusb
  Bus 002 Device 003: ID 04b8:014a Seiko Epson Corp.
  $ sudo sane-find-scanner
  found USB scanner (vendor=0x04b8 [EPSON], product=0x014a [EPSON Perfection V37/V370]) at libusb:002:003
To figure out if it was a permission issue, I ran the same command without sudo and it worked as well.

scanimage

The second step was to run:
  $ sudo scanimage -L
  No scanners were identified.
That was the problem.

I tried to run this command again with some debug level to see if I could get more information out of it but without success:
  $ sudo SANE_DEBUG_SNAPSCAN=128 scanimage -L
  [sanei_debug] Setting debug level of snapscan to 128.
  [snapscan] sane_snapscan_init
  [snapscan] sane_snapscan_init: Snapscan backend version 1.4.53
  [snapscan] sane_snapscan_get_devices (0x7ffcefae19b0, 0)

Packages

Some people suggested to install package libsane-extras. I tried that without success.

The list of supported Epson scanners by SANE showed that it was "supported by the epkowa backend plus non-free interpreter".

With some extra search, I figured out that the epkowa backend comes from the iscan driver provided by Epson . From the Epson drive page, I had to enter "Perfection V370" and not "Perfection V370 Photo", otherwise it returned no result. I was able to download the driver 1.0.1 from 2016/07/04.

  $ tar xzvf ~/Downloads/iscan-perfection-v370-bundle-1.0.1.x64.deb.tar.gz
  $ cd iscan-perfection-v370-bundle-1.0.1.x64.deb
  $ sudo ./install.sh
This script installed 3 packages:
  1. iscan_2.30.2-2_amd64.deb
  2. iscan-data_1.36.0-1_all.deb
  3. iscan-plugin-perfection-v370_1.0.0-2_amd64.deb
After installation, sudo scanimage -L was still giving me an empty output.

Fixing the library path

Most of the install looked OK: /etc/sane.d/dll.d/iscan had a line with epkowa and /etc/sane.d/epkowa.conf was present.

I figured out that the standard plugins for sane were installed in /usr/lib/x86_64-linux-gnu/sane (for example libsane-epson2.so.1) but libsane-epkowa.so.1 was located at a different place (/usr/lib/sane). So I created a symbolic link from /usr/lib/x86_64-linux-gnu/sane to /usr/lib/sane/libsane-epkowa.so.1

  $ cd /usr/lib/x86_64-linux-gnu/sane
  $ sudo ln -s /usr/lib/sane/libsane-epkowa.so.1 .
The execution of sudo scanimage -L became successful:
  $ sudo scanimage -L
  device `epkowa:interpreter:002:003' is a Epson Perfection V370 Photo flatbed scanner
But running without sudo was still returning nothing.

Fixing permissions

At this point, it really looked like a permission issue.

Some users recommend to add the user name to the scanner or lp group but the Arch documentation says that these groups are deprecated since the move to systemd. Instead, the solution is to change udev permissions.

Indeed the scanner was not listed in /lib/udev/rules.d/60-libsane1.rules. The solution was to create as root: /etc/udev/rules.d/60-sane-missing-scanner.rules to be

ATTRS{idVendor}=="04b8", ATTRS{idProduct}=="014a", MODE="0664", GROUP="scanner", ENV{libsane_matched}="yes"
scanimage -L finally worked without sudo.