Many 3rd party scanner drivers are broken by a sane change

Bug #1728012 reported by PeterPall on 2017-10-27
234
This bug affects 46 people
Affects Status Importance Assigned to Milestone
sane-backends (Ubuntu)
High
Unassigned

Bug Description

Many scanners can no more be used since sane has changed something: The 3rd-party plug-in the vendor provides as .deb package will still install. But the scanner is no more recognized.

Scanners that are affected are(besides others):
 - Epson Perfection V10
 - Epson Perfection V1000
 - Epson WorkForce GT-1500
 - Brother MFC-8510DN
 - Epson Perfection V33

It is to note that the probability that the scanner manufacturers fix things others broke is below 100%.

ProblemType: Bug
DistroRelease: Ubuntu 18.04
Package: libsane1 1.0.27-1~experimental2ubuntu2
Uname: Linux 4.14.0-041400rc5-lowlatency x86_64
ApportVersion: 2.20.7-0ubuntu3.1
Architecture: amd64
Date: Fri Oct 27 12:35:52 2017
EcryptfsInUse: Yes
SourcePackage: sane-backends
UpgradeStatus: No upgrade log present (probably fresh install)

PeterPall (peterpall) wrote :
description: updated
description: updated
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in sane-backends (Ubuntu):
status: New → Confirmed
Jeremy Bicha (jbicha) on 2017-10-27
Changed in sane-backends (Ubuntu):
importance: Undecided → High

I can confirm that the Epson Perfection V300 is also affected

Using libsane1 1.0.27-1~experimental2ubuntu2.1 allows me to install the drivers without conflicts.

But the scanner is not recognized. Neither by scanimage, simple-scan or iscan

lsusb shows that the scanner is attached

lsusb
Bus 002 Device 002: ID 8087:8001 Intel Corp.
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 8087:8009 Intel Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 006: ID 04b8:0131 Seiko Epson Corp. GT-F720 [GT-S620/Perfection V30/V300 Photo]
Bus 003 Device 005: ID 046d:c069 Logitech, Inc. M-U0007 [Corded Mouse M500]
Bus 003 Device 004: ID 08bb:2707 Texas Instruments
Bus 003 Device 003: ID 0409:005a NEC Corp. HighSpeed Hub
Bus 003 Device 002: ID 24f0:0137
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Kubuntu 17.04
Fail to use Epson Perfection V30

$ lsusb |grep -i epson

Bus 003 Device 005: ID 04b8:0131 Seiko Epson Corp. GT-F720 [GT-S620/Perfection V30/V300 Photo]

$ apt list --installed |grep -e esci -e iscan -e libsane -e sane-utils

esci-interpreter-gt-f720/now 0.1.1-2 amd64 [installed,local]
iscan/now 2.30.2-2 amd64 [installed,local]
iscan-data/now 1.36.0-1 all [installed,local]
libsane-common/now 1.0.27-1~experimental2ubuntu2.1 all [installed,local]
libsane-extras/artful,now 1.0.22.5 amd64 [installed]
libsane-extras-common/artful,artful,now 1.0.22.5 all [installed,automatic]
libsane-hpaio/artful,now 3.17.7+repack0-3 amd64 [installed]
libsane1/now 1.0.27-1~experimental2ubuntu2.1 amd64 [installed,local]
sane-utils/now 1.0.27-1~experimental2ubuntu2.1 amd64 [installed,local]

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

Xerox Workcentre 3225 with the drivers version 1.00.25:00.05 that used to work very well with Zesty's libsane still not functional.
My malfunction hasn't changed a bit with the 1.0.27-1~experimental2ubuntu2.1 package.
Like before xsane crashes with the following message:
  Not a JPEG file: starts with 0x00 0x00
and/or hangs with scanning status.
mariusz:~> dpkg -l | grep sane
ii libkf5sane-data 17.04.3-0ubuntu1 all scanner library (data files)
ii libkf5sane5 17.04.3-0ubuntu1 amd64 scanner library (runtime)
ii libksane-data 4:17.04.3-0ubuntu1 all scanner library (data files) - transitional package
ii libksane0 4:15.08.3-1ubuntu2 amd64 scanner library (runtime)
ii libsane-common 1.0.27-1~experimental2ubuntu2.1 all API library for scanners -- documentation and support files
ii libsane-extras:amd64 1.0.22.5 amd64 API library for scanners -- extra backends
ii libsane-extras-common 1.0.22.5 all API library for scanners -- documentation and support files
rc libsane-hpaio:amd64 3.16.7+repack0-1ubuntu1 amd64 HP SANE backend for multi-function peripherals
ii libsane1:amd64 1.0.27-1~experimental2ubuntu2.1 amd64 API library for scanners
ii sane 1.0.14-12build1 amd64 scanner graphical frontends
ii sane-utils 1.0.27-1~experimental2ubuntu2.1 amd64 API library for scanners -- utilities
ii xsane 0.999-5ubuntu2 amd64 featureful graphical frontend for SANE (Scanner Access Now Easy)
ii xsane-common 0.999-5ubuntu2 all xsane architecture independent files

I could use some/any guidance for providing more details to anyone if reverting back to working libsane is not an option.

Forgot to mention that I use or rather attempt to use the scanner over the TCP.

Michael Hill (wrendriff) wrote :

Add to list of scanner "broken" - Epson Perfection V300 Photo.

dependency errors occurring after upgrade from Ubuntu 17.04 to 17.10 are
iscan depending on libsane (>=1.0.11-3)
esci-interpreter-gt-f720 depends on iscan (>=2.16.1)

luca.mg (luca-mg) wrote :

Cross posting from https://bugs.launchpad.net/ubuntu/+source/sane-backends/+bug/1707352?comments=all

On artful, libsane1 1.0.27-1~experimental2ubuntu2.1, in short: the Epson 4490 Photo scanner doesn't work, the Brother MDC-1910W scanner only works as root; both were fully working on zesty. In details:

Epson 4490 Photo as user
sane-find-scanner detects a bunch of USB devices including the scanner, but has not enough permission
scanimage -l no SANE devices found
iscan, simple-scan, and xsane do not work

Epson 4490 Photo as root
sane-find-scanner ok
scanimage -l no SANE devices found
iscan, simple-scan, and xsane do not work

Brother MFC-1910W as user
sane-find-scanner detects a bunch of USB devices including the scanner, but has not enough permission
scanimage -l no SANE devices found
simple-scan and xsane do not work

Brother MFC-1910W as root
sane-find-scanner ok
scanimage -l ok
simple-scan ok
xsane ok

Bo Lundberg (bo-lundberg) wrote :

Epson 2400 photo doesn't work in Iscan (can't send to scanner). Works fine with xsane.

Yves D. Mercier (ymerj) wrote :

Epson v370 photo doesn't work either. Purchased only 3 months ago, it was fully functionnal in zesty. Now totally unusable in artful even with libsane1 1.0.27-1~experimental2ubuntu2.1

Today I managed to bring back my dead Epson V300 alive :-)

1. Install libsane1 1.0.27-1~experimental2ubuntu2.1

2. Install iscan-gt-f720-bundle-1.0.1.x64.deb.tar.gz

3. Copy (or move) the files from /usr/lib/sane (libsane-epkowa.la, libsane-epkowa.so.1, libsane-epkowa.so.1.0.15 in my case) to /usr/lib/x86_64-linux-gnu/sane

4. reboot.

Guess this works with all Iscan depend scanners from Epson

Just for the record

scanimage -L
device `epkowa:interpreter:003:007' is a Epson Perfection V300 flatbed scanner
device `imagescan:esci:networkscan://192.168.50.24:1865' is a Epson XP-540

Iscan, simple-scan, Xsane are working as expected.

BRScan users can you try what happens when copy the files (libsane-brother*) from /usr/lib64/sane/ to /usr/lib/x86_64-linux-gnu/sane.

Maybe the fix for brother scanners is as easy as the one for the epson ones ...

Yves D. Mercier (ymerj) wrote :

Sorry to say that staedtler-przyborski solution did not work for me (epson V370 photo). Deb file is different in my case (iscan-perfection-v370-bundle-1.0.1.x64.deb.tar.gz)

Yves D. Mercier (ymerj) wrote :

Update: Just tried it as root. I works.

Thats interesting. I don't need to be root to scan.

So whats different is the question ? I don't believe it's the different plugin. Iscan is identical I suppose.

Just for completeness:

 apt list --installed |grep -e esci -e iscan -e libsane -e sane-utils

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

esci-interpreter-gt-f720/now 0.1.1-2 amd64 [Installiert,lokal]
iscan/now 2.30.2-2 amd64 [Installiert,lokal]
iscan-data/now 1.36.0-1 all [Installiert,lokal]
libsane-common/now 1.0.27-1~experimental2ubuntu2.1 all [Installiert,lokal]
libsane-hpaio/artful,now 3.17.7+repack0-3 amd64 [installiert]
libsane1/now 1.0.27-1~experimental2ubuntu2.1 amd64 [Installiert,lokal]
sane-utils/now 1.0.27-1~experimental2ubuntu2.1 amd64 [Installiert,lokal]

Are on x-org or wayland ? Can you try what happens if you switch to X-org ?

X-Org or wayland doens't matter. My scanner works with both (verfied).

Do you have a file named 79-udev-epson.rules in /etc/udev/rules.d ?

Mine has the following content:

# chmod device EPSON group
# ACTION=="add", ATTRS{manufacturer}=="EPSON", DRIVERS=="usb", SUBSYSTEMS=="usb", ATTRS{idVendor}=="04b8", ATTRS{idProduct}=="*", MODE="0666"
ATTRS{manufacturer}=="EPSON", DRIVERS=="usb", SUBSYSTEMS=="usb", ATTRS{idVendor}=="04b8", ATTRS{idProduct}=="*", MODE="0777"

A Test here showed:

without 79-udev-epson.rules in /etc/udev/rules.d

only 'sudo scanimage -L works'

with 79-udev-epson.rules in /etc/udev/rules.d

no root needed, a simple 'scanimage -L' is sufficient

maybe for the brscan scanners also only the udev rule is missing

try to add
# Brother scanners
ATTRS{idVendor}=="04f9", ATTRS{idProduct}=="0255", MODE="0660", GROUP="scanner", ENV{libsane_matched}="yes"

to e.g. /lib/udev/rules.d/60-libsane1.rules

Yves D. Mercier (ymerj) wrote :

I did not have the 79-udev-epson.rules file, so I created one with the content you posted. My scanner works now. No root needed. Many thanks.

My Brother MFC-J220 works now with the 1.0.27-1~experimental2ubuntu2.1 packages.

The brscan3 driver installs files in /usr/lib64 and /usr/lib64/sane.
I linked them by
'sudo ln -sfr /usr/lib64/libbrscandec* /usr/lib/x86_64-linux-gnu'
and
'sudo ln -sfr /usr/lib64/sane/libsane-brother* /usr/lib/x86_64-linux-gnu/sane'

Thanks to staedtler-przyborski for the hint.

@ Hans Schwimmbeck

Great, so we have a fix for brother brscan3 scanners too.

Ah yes, linking is definitely a better way than copying (you may forgive me, my workaround was only a first try).

Now we only need to know if, brscan, brscan2 and brscan4 scanners can be fixed too by linking directories

For Xerox Workcentre 3225 I have mentioned in this and the original sane bug the solution is:
1. Link the files in /usr/lib/sane to /usr/lib/x86_64-linux-gnu/sane,
2. Add the user that needs to use the scanner to the "lp" group.
Otherwise the "Not a JPEG file: starts with 0x00 0x00" issue persists.

Thanks Mariusz. Can you please specify which files are in /usr/lib/sane (just to make the command below more precise) ?

To summarize we have now the following workarounds (all 64-bit):

1. Brother brscan3

a) 'sudo ln -sfr /usr/lib64/libbrscandec* /usr/lib/x86_64-linux-gnu'
b) 'sudo ln -sfr /usr/lib64/sane/libsane-brother* /usr/lib/x86_64-linux-gnu/sane'

2. Epson Iscan

a) 'sudo ln -sfr /usr/lib/sane/libsane-epkowa* /usr/lib/x86_64-linux-gnu/sane'
b) generate '/etc/udev/rules.d/79-udev-epson.rules'
content:
# chmod device EPSON group
ATTRS{manufacturer}=="EPSON", DRIVERS=="usb", SUBSYSTEMS=="usb", ATTRS{idVendor}=="04b8", ATTRS{idProduct}=="*", MODE="0777"

3. Xerox Workcentre 3225

a) 'sudo ln -sfr /usr/lib/sane/* /usr/lib/x86_64-linux-gnu/sane'
b) 'sudo adduser $USER lp'

PeterPall (peterpall) wrote :

You are a genius! My MFC8510 and my Epson WorkForce GT-1500 now work fine...
...now we should forward this info to the sane programmers (perhaps they can make the program look in both the old and the new locations), to Debian - and to the manufacturers: Symlinks isn't hard to create in the postinstall scripts. Perhaps they will add the necessary lines.

> ls -la /usr/lib/sane/
total 40
drwxr-xr-x 2 root root 4096 Oct 27 12:10 .
drwxr-xr-x 147 root root 36864 Oct 17 15:30 ..
lrwxrwxrwx 1 root root 31 Oct 27 12:10 libsane-smfp.so -> /usr/lib/sane/libsane-smfp.so.1
lrwxrwxrwx 1 root root 35 Oct 27 12:10 libsane-smfp.so.1 -> /usr/lib/sane/libsane-smfp.so.1.0.1
lrwxrwxrwx 1 root root 50 Oct 27 12:10 libsane-smfp.so.1.0.1 -> /opt/smfp-common/scanner/lib/libsane-smfp.so.1.0.1

Xerox has an "universal", script based driver installer available at http://download.support.xerox.com/pub/drivers/WC3225/drivers/linux/en_GB/Xerox_WorkCentre_3225_Linux-Driver.tar.gz

PPDs and about 5 installed binaries, French locale and a bunch of scripts for arm, i386, and x86_64.

In the meanwhile I had a look on different brscan drivers ...

Unfortunately brscan4 has a complete different structure (so at least one real user is needed)

Summary is now:

1. Brother brscan, brscan2, brscan 3

a) 'sudo ln -sfr /usr/lib64/libbr* /usr/lib/x86_64-linux-gnu'
b) 'sudo ln -sfr /usr/lib64/sane/libsane-brother* /usr/lib/x86_64-linux-gnu/sane'

2. Epson Iscan

a) 'sudo ln -sfr /usr/lib/sane/libsane-epkowa* /usr/lib/x86_64-linux-gnu/sane'
b) generate '/etc/udev/rules.d/79-udev-epson.rules'
content:
# chmod device EPSON group
ATTRS{manufacturer}=="EPSON", DRIVERS=="usb", SUBSYSTEMS=="usb", ATTRS{idVendor}=="04b8", ATTRS{idProduct}=="*", MODE="0777"

3. Xerox Workcentre 3225

a) 'sudo ln -sfr /usr/lib/sane/libsane-smfp* /usr/lib/x86_64-linux-gnu/sane'
b) 'sudo adduser $USER lp'

I forgot to mention that also needed is something like /etc/udev/rules.d/59-local.rules.
In my upgraded installation it has not changed since 16.04 and looks like this:
---------------
# Brother MFC-J220
ATTRS{idVendor}=="04f9", ATTRS{idProduct}=="0259", MODE="0664", GROUP="scanner", ENV{libsane_matched}="yes"

---------------

Of course 'idProduct' has to match the local scanner model, 'lsusb' and 'sane-find-scanner' are your friends.

Dear Hans could you please test if a more generic solution like the one provided by Epson would also work for local attached Brother Scanners ?

A possible Example:

# chmod device BROTHER group
ATTRS{manufacturer}=="BROTHER", DRIVERS=="usb", SUBSYSTEMS=="usb", ATTRS{idVendor}=="04f9", ATTRS{idProduct}=="*", MODE="0777"

Thanks

luca.mg (luca-mg) wrote :

I can confirm that the Epson Perfection 4490 Photo scanner, iscan-gt-x750-bundle-1.0.0.x64 based, works by creating symlinks of the /usr/lib/sane/libsane-epkowa* files into the /usr/lib/x86_64-linux-gnu/sane directory by issuing the command 'sudo ln -sfr /usr/lib/sane/libsane-epkowa* /usr/lib/x86_64-linux-gnu/sane' as said above; no need to tinker with the udev rules files in my case. This doesn't look like a bug fix to me, it's a workaround, needing a user tweak, libsane1 should look for third party sane drivers (once called backends IIRC) in the "legacy" directories as well as in the new ones, for backward compatibility.

luca.mg (luca-mg) wrote :

The Brother MFC-1910W printer-fax-scanner, brscan4 based, does not work with the symlink trick, the scanner is detected by sane-find-scanner, but is not listed by scanimage -l, and will only work after enabling the root account and issuing the 'su root' and 'xsane' commands in a terminal; a simple sudo xsane won't work. Although it seems to me a permission issue, creating appropriate (to the best of my knowledge!) udev rules files in the /etc/udev/rules.d directory and/or in /lib/udev/rules.d directory has no positive outcome, nor editing the the /lib/udev/rules.d/60-libsane1.rules file; my attempts were using the lines

## Brother MFC-1910W
ATTRS{idVendor}=="04f9", ATTRS{idProduct}=="035d", MODE="0666", GROUP="scanner", ENV{libsane_matched}="yes"

with several flavours of the MODE= option (0660 0666 0664 0777 and the like).
Again: if only libsane1 will also look for sane backends in the "legacy" locations other than the new ones perhaps this insane mess would be sorted out.

I don't like MODE="0777" in the Epson derived example.

This works for me and _should_ work for all brscan3 devices:

# Brother brscan3 devices
ATTRS{idVendor}=="04f9", ATTRS{idProduct}=="*", MODE="0664", GROUP="scanner", ENV{libsane_matched}="yes"

luca.mg (luca-mg) wrote :

Thank You for Your time Hans, I do not like 0777 as well, but I was shooting in the dark. As stated, I tried
## Brother MFC-1910W
ATTRS{idVendor}=="04f9", ATTRS{idProduct}=="035d", MODE="0666", GROUP="scanner", ENV{libsane_matched}="yes" (or 0660 0664 0777 modes)

which should be the equivalent of Your
# Brother brscan3 devices
ATTRS{idVendor}=="04f9", ATTRS{idProduct}=="*", MODE="0664", GROUP="scanner", ENV{libsane_matched}="yes"

no joy.

luca.mg (luca-mg) wrote :

PS I'm on brscan 4.

I have no glue why Epson has chosen '0777', maybe it's because they upload a firmware to their scanners ...

Actual summary:

1.Brother:

brscan4 no luck until now (btw. the installer already seems to respect /usr/lib/x86_64-linux-gnu/sane)

brscan, brscan2, brscan3

a) 'sudo ln -sfr /usr/lib64/libbr* /usr/lib/x86_64-linux-gnu'
b) 'sudo ln -sfr /usr/lib64/sane/libsane-brother* /usr/lib/x86_64-linux-gnu/sane'
c) generate '/etc/udev/rules.d/59-udev-local.rules'
content:
# Brother brscan devices
ATTRS{idVendor}=="04f9", ATTRS{idProduct}=="*", MODE="0664", GROUP="scanner", ENV{libsane_matched}="yes"

2. Epson Iscan

a) 'sudo ln -sfr /usr/lib/sane/libsane-epkowa* /usr/lib/x86_64-linux-gnu/sane'
b) generate '/etc/udev/rules.d/79-udev-epson.rules'
content:
# chmod device EPSON group
ATTRS{manufacturer}=="EPSON", DRIVERS=="usb", SUBSYSTEMS=="usb", ATTRS{idVendor}=="04b8", ATTRS{idProduct}=="*", MODE="0777"

3. Xerox Workcentre 3225

a) 'sudo ln -sfr /usr/lib/sane/libsane-smfp* /usr/lib/x86_64-linux-gnu/sane'
b) 'sudo adduser $USER lp'

@luca.mg

Are you aware of these informations ?

http://stepsilon.com/ubuntu/install-scanner-brother-dcp-7055-ubuntu

"The Brother Linux scanner driver works only with a superuser by default, as noted on the brother solutions site.

If you want to allow normal users to also use the scanner, this is the solution:

Download following deb package. Open a terminal and paste following line

       wget www.brother.com/pub/bsc/linux/dlf/brother-udev-rule-type1-1.0.0-1.all.deb"

Can you please try ?

luca.mg (luca-mg) wrote :

Hi staedtler-przyborski, and thank You for taking the time to further investigate the matter. Yes indeed, I did try to install the brother-udev-rule-type1 package You kindly linked, also tinkering with the various settings, and tested with a later release too, even if both weren't needed in zesty, nor in xenial (I guess that the package was required with earlier ubuntu releases), but it doesn't make any difference: the scanner is found by sane-find-scanner, but is not detected by scanimage -l, and it only works running xsane from the terminal after the 'su root' command, while 'sudo xsane' won't work at all. I'm quite sure that it's a permission issue, but I'm out of ideas as to how to fix it, and using the scanner as root is not a feasible option.

@luca.mg

Im sorry to hear that.

BTW. Are you on wayland or xorg. If wayland, have you tried with xorg ?

luca.mg (luca-mg) wrote :

@staedtler-przyborski
I'm on xorg... I forgot to mention: the Brother scanner only works as root AND with xsane, simple-scan doesn't work at all.

tags: added: patch
85 comments hidden view all 165 comments
Raimondo Giammanco (rai) wrote :

The bug still affects Epson Perfection V330 Photo on Ubuntu 18.04 but the workaround in #36 makes the scanner usable again.
Nonetheless, iscan is still unable to save as .JPEG or .PNG. Is that a different issue?
I suspect that iscan and its interpreters are no longer actively maintained by EPSON, so...
Is there any known workaround?

Boaz Dodin (bdcomp) wrote :

@Raimondo It's a different issue - make sure the libjpeg62 package installed.

luca.mg (luca-mg) wrote :

After a bunch of Bionic updates the Brother MFC 1910W scanner gave up working; I have had to install the libsane-extras package and add the line "brother4" to the file /etc/sane.d/dll.d/libsane-extras to regain control of the device. Weird enough the Epson scanner wasn't affected by the updates.

Manuel (manuel-schulte) wrote :

I'm affected as well, my scanner is an Epson GT-S50 (0x04b8 0x0137).

I've documented my observations and trials to resolve on askubuntu.com: https://askubuntu.com/questions/1034528/epson-gt-s50-scanner-not-working-after-upgrade-to-18-04-from-16-04

I tried also to do a fresh install of Bionic, but same issue.

I tried to specify my scanner in /etc/sane.d/epkowa.conf (I've added "usb 0x04b8 0x0137" -without the double quotes- in the appropriate section of the file) and added the following UDEV rules in a 55-libsane.rules file under /etc/udev/rules.d/

> SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", MODE=="0666"
SUBSYSTEM=="usb_device", MODE=="0666"
ATTRS{idVendor}=="04b8", ATTRS{idProduct}=="0137", MODE="0666",
GROUP="scanner", ENV{libsane_matched}="yes"

So far, no luck, scanner remains stubbornly undetected :'(

Manuel (manuel-schulte) wrote :

ADDENDUM to #129: Ah! Success!

I followed the advice of comment #28 (https://bugs.launchpad.net/ubuntu/+source/sane-backends/+bug/1728012/comments/28), and it works !!!

Did the following:
$ sudo ln -sfr /usr/lib/sane/libsane-epkowa* /usr/lib/x86_64-linux-gnu/sane

Then:
1. Removed the "usb 0x04b8 0x0137" entry I had added to /etc/sane.d/epkowa.conf
2. Added a 55-epson-libsane.rules file to /etc/udev/rules.d/ with the following text:
SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", MODE=="0666"
SUBSYSTEM=="usb_device", MODE=="0666"
ATTRS{manufacturer}=="EPSON", DRIVERS=="usb", SUBSYSTEMS=="usb", ATTRS{idVendor}=="04b8", ATTRS{idProduct}=="*", MODE="0666"
ATTRS{idVendor}=="04b8", ATTRS{idProduct}=="0137", MODE="0666", GROUP="scanner", ENV{libsane_matched}="yes"

Finally I unplugged / plugged my scanner and tried:
$ scanimage -L

And got this encouraging answer:
device `epkowa:interpreter:003:011' is a Epson GT-S50 flatbed scanner

Then I started iscan (Image Scan!) and it immediately detected my scanner.
I then could successfully scan a page.

The workaround is thus effective! Thanks to all contributions :-)

Sicabol (sicabol) wrote :

I have followed comment #96 for an Epson Perfection Photo V500 on Ubuntu 18.04 - it works perfectly.

Peter Bennett (pgbennett) wrote :

Brother DCP-7065DN Network Printer & scanner. I just installed Bionic alongside Xenial. Printer works fine on bionic with the brother drivers but the scanner is not found. The scanner works with Xenial. For xenial, after installing the Brother drivers, I had created links using "sudo ln -sf /usr/lib64/sane/libsane-brother4.so* /usr/lib/sane/". I ran that on bionic and the scanner is still not found.

Marco Bortoli (markus51) wrote :

Brother MFC-J480DW, printer ok, scanner doesn't work in Ubuntu 18.04, fresh installation yesterday. I use simple scan, scanner is not found. Scanner works fine with 16.04. In brother folder, brscan4-04.4-3.amd64.deb, libsane-common version 1.0.27-1 experimental3ubuntu 2. If you find the way to solve this problem ........

Letatcest (ksoeteman) wrote :

I'd like to add that Epson Perfection V500 works perfectly after installing all official Epson Linux drivers and follow the instructions at number 25: https://bugs.launchpad.net/ubuntu/+source/sane-backends/+bug/1728012/comments/25

But I don't think non-savvy Ubuntu users can figure this out on their own...

Peter Bennett (pgbennett) wrote :

Brother DCP-7065DN Network Printer & scanner on bionic (comment #132 above). I have now installed a chroot of xenial on my new bionic setup. In the chroot I installed the Brother scanner drivers and ran the "sudo ln -sf /usr/lib64/sane/libsane-brother4.so* /usr/lib/sane/". The scanner works perfectly in the chroot. "scanimage -L" displays the details of the scanner and scanimage successfully scans a page. Those things still do not work without chroot. Something in bionic is preventing it from working.

Ken Wright (wizard-bnnorth) wrote :

I've just tried a fresh install of Epson's drivers, deleting and reinstalling libsane-epkowa*, recreating the symlinks, all the process in Comment #96. This procedure worked for me on 17.10, but not on 18.04. What am I missing?

Manuel (manuel-schulte) wrote :

@Ken Wright:
For my scanner (Epson GT-S50 / epkowa driver), I added more in my udev rule file:
> SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", MODE=="0666"
> SUBSYSTEM=="usb_device", MODE=="0666"
> ATTRS{manufacturer}=="EPSON", DRIVERS=="usb", SUBSYSTEMS=="usb", ATTRS{idVendor}=="04b8", ATTRS{idProduct}=="*", MODE="0666"
> ATTRS{idVendor}=="04b8", ATTRS{idProduct}=="0137", MODE="0666", GROUP="scanner", ENV{libsane_matched}="yes"

the last line is important, and is missing in the recommendations of comment #96, that is perhaps what is causing you trouble. NOTE: for your scanner, the line should read (cfr. #124):
> ATTRS{idVendor}=="04b8", ATTRS{idProduct}=="0130", MODE="0666", GROUP="scanner", ENV{libsane_matched}="yes"

Hoping this will help. Cheers.

Brother MFC-7420 installed under fresh install of 18.04 and connected via USB. Brother2 drivers are installed. Have created links and local udev rules and almost have scanner working.

scanimage -L >>> device `brother2:bus2;dev4' is a Brother MFC-7420 USB scanner
scanimage --test >>> scanimage: open of device brother2:bus2;dev4 failed: Invalid argument

Using debug, scanimage test openned and successfully interrogated the scanner but failed with
[dll] sane_start(handle=0x55c29b5b7ee0)
scanimage: sane_start: Invalid argument

scanning to file was similar
[dll] sane_open: trying to open `brother2:bus2;dev1'
scanimage: open of device brother2:bus2;dev1 failed: Invalid argument

To get this far my drivers needed libusb-0.1-4 (userspace USB programming library). 18.04 uses libusb-1 and they are not interchangeable as I tried a simple link pointing to new version.

Is this a jigsaw puzzle with a couple of pieces missing

https://forums.opensuse.org/showthread.php/507627-Suse-13-2-scanner-no-longer-working-on-64-bit-version/page2?s=ac5dc860f0f94d47d233f69afdbfc346 has similar debug results to my prior comment. It was resolved by using a USB2 port instead of a USB3 port. Maybe this is another piece of the puzzle as I had to use an earlier version of libusb and my MB is recent with mainly USB3 - will try changing bios on another day

PeterPall (peterpall) wrote :

The USB3 issue should be resolved in the linux kernel bionic uses, see the following thread: https://www.spinics.net/lists/linux-usb/msg125193.html

Chris Rainey (ckrainey) wrote :

HP Color LaserJet MFP M477fnw also affected.

Thank you PeterPaul. Will try again after the next Bionic kernel upgrade. In the meantime the brother MFC is plugged into my 16.04 PC and network connected. The printer cost me $20 at a garage sale and only has USB.
PS - more pieces of the puzzle: the brother-udev-rule-type1 DEB package mentioned above as not necessary creates a file /opt/brother/scanner/udev-rules/type1/NN-brother-mfp-type1.rules and this rules file has a comment that it should be copied to the relevant udev folder - /etc/udev/rules.d;
The driver name is "Brother MFC7420 for CUPS" and does not have a hyphen after MFC so it appears after all MFC printers in the list of drivers and is easily missed

Ken Wright (wizard-bnnorth) wrote :

@Manuel,

I added the further content to my Rules file, but it didn't make any difference.

In case I haven't mentioned it, and because it may be important, I am able to scan as root, but not as a regular user.

Jean COLIN (carl174) wrote :

Had problem with EPSON perfection 3170 photo = GT9400UF

searched for long

to display what dll are used,
use command shell export SANE_DEBUG_DLL=128
then use command shell xsane
discovered that

[dll] load: searching backend `epkowa' in `/usr/lib/i386-linux-gnu/sane:/usr/lib/sane'
[dll] load: trying to load `/usr/lib/i386-linux-gnu/sane/libsane-epkowa.so.1'
[dll] load: dlopen()ing `/usr/lib/i386-linux-gnu/sane/libsane-epkowa.so.1'
[dll] init: initializing backend `epkowa'
[dll] init: backend `epkowa' is version 1.0.213

the file /usr/lib/i386-linux-gnu/sane/libsane-epkowa.so.1 (273k) is different from the file included in the driver downloaded from epsion (142k)

the file downloaded from epsion was installed at /usr/lib/sane/

copied this file from /usr/lib/sane/ to /usr/lib/i386-linux-gnu/sane/ (renamed file 273k for safety)

now
[dll] init: backend `epkowa' is version 1.0.208

and working (for me) - probable regression between version 1.0.208 and version 1.0.213

Regards

Regards

Manuel (manuel-schulte) wrote :

@Ken Wright,
Yes, you mentioned it and it is why I suggested to add the extra rules... but I may be wrong as I'm no udev expert :'(
Have you checked in your user settings if your account has "Use scanners" checked under "User privileges"? If not, maybe you'd have to give it a try to see if it solves the problem.

Manuel (manuel-schulte) wrote :

Same as Jean COLIN:
...
[dll] load: searching backend `epkowa' in `/usr/lib/x86_64-linux-gnu/sane'
[dll] load: trying to load `/usr/lib/x86_64-linux-gnu/sane/libsane-epkowa.so.1'
[dll] load: dlopen()ing `/usr/lib/x86_64-linux-gnu/sane/libsane-epkowa.so.1'
[dll] init: initializing backend `epkowa'
[dll] init: backend `epkowa' is version 1.0.213
[dll] load: searching backend `ls5000' in `/usr/lib/x86_64-linux-gnu/sane'
[dll] load: trying to load `/usr/lib/x86_64-linux-gnu/sane/libsane-ls5000.so.1'
[dll] load: dlopen()ing `/usr/lib/x86_64-linux-gnu/sane/libsane-ls5000.so.1'
[dll] init: initializing backend `ls5000'
[dll] init: backend `ls5000' is version 1.0.0
[dll] sane_get_devices: found 1 devices
[dll] sane_open: trying to open `epkowa:interpreter:003:006'
[dll] sane_open: open successful
...

Besides, in spite the fact the workaround worked for me (able to scan), there are still some issues:
a. the scanner is very slow to detect (at least one minute, against a few seconds under Ubuntu 16.04)
b. my scanner is sheet fed, but gets identified as a flatbed scanner, which results in some options being grayed out in "Image Scan!" (iscan)

I'll try as, Jean, to replace the libsane-epkowa.so.1 by the one provided with the Epkowa package to see if it solved those issues as well.

Ken Wright (wizard-bnnorth) wrote :

@Manuel,
You are a frickin' genius! I checked Users and Groups. Use scanners was checked, so I took a look at my groups. I has both saned and scanner, but was only a member of scanner. I joined saned, rebooted, and Robert is your mother's brother. Thank you so very much!

Peter Bennett (pgbennett) wrote :

Brother DCP-7065DN Network Printer & scanner on bionic (comment #132 and #135 above). Adding sane and scanner group and checking "use scanners" does not help. The scanner is still not recognized.

BobvanderPoel (bob-mellowood) wrote :

I just installed 18.04 and had the same problem ... so it's not fixed yet.

Seems that copying the epkowa files from /usr/lib/sane to /usr/lib/x86_64-linux-gnu/sane does the trick.

Ken Wright (wizard-bnnorth) wrote :

@Peter Bennett,

Have you created the symlinks from /usr/lib/sane to /usr/lib/x86_64-linux-gnu/sane? Alternatively, have you tried searching for the scanner as root?

Ken Wright (wizard-bnnorth) wrote :

@Peter Bennet,
try "sudo sane-find-scanner" (without the double quotes) and see if the scanner is recognized.

Peter Bennett (pgbennett) wrote :

@Ken Wright

I did set up the links with "sudo cp /usr/lib64/sane/libsane-brother4.so* /usr/lib/x86_64-linux-gnu/sane"

The "sudo sane-find-scanner" does not find it - that seems to be looking for USB scanners but this is network attached. It found my TV tuner (PCTV 801e) and thinks it may be a scanner.

"sudo scanimage -L" also does not find it

See below

peter@andromeda:~$ ls -l /usr/lib/x86_64-linux-gnu/sane/*bro*
-rwxr-xr-x 1 root root 158336 May 16 19:04 /usr/lib/x86_64-linux-gnu/sane/libsane-brother4.so
-rwxr-xr-x 1 root root 158336 May 16 19:04 /usr/lib/x86_64-linux-gnu/sane/libsane-brother4.so.1
-rwxr-xr-x 1 root root 158336 May 16 19:04 /usr/lib/x86_64-linux-gnu/sane/libsane-brother4.so.1.0.7
peter@andromeda:~$ ls -l /usr/lib/sane/*bro*
lrwxrwxrwx 1 root root 35 May 16 18:45 /usr/lib/sane/libsane-brother4.so -> /usr/lib64/sane/libsane-brother4.so
lrwxrwxrwx 1 root root 37 May 16 18:45 /usr/lib/sane/libsane-brother4.so.1 -> /usr/lib64/sane/libsane-brother4.so.1
lrwxrwxrwx 1 root root 41 May 16 18:45 /usr/lib/sane/libsane-brother4.so.1.0.7 -> /usr/lib64/sane/libsane-brother4.so.1.0.7

peter@andromeda:~$ sudo sane-find-scanner

  # sane-find-scanner will now attempt to detect your scanner. If the
  # result is different from what you expected, first make sure your
  # scanner is powered up and properly connected to your computer.

  # No SCSI scanners found. If you expected something different, make sure that
  # you have loaded a kernel SCSI driver for your SCSI adapter.

found USB scanner (vendor=0x2304 [YUANRD], product=0x023a [PCTV 801e]) at libusb:003:003
could not fetch string descriptor: Pipe error
  # Your USB scanner was (probably) detected. It may or may not be supported by
  # SANE. Try scanimage -L and read the backend's manpage.

  # Not checking for parallel port scanners.

  # Most Scanners connected to the parallel port or other proprietary ports
  # can't be detected by this program.

peter@andromeda:~$ sudo 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).

Peter Bennett (pgbennett) wrote :

Correction to the prior post - the command to link the files was "ln -s" not "cp". I did try both linking and copying the files. Currently they are linked.

downward (invisioslice) wrote :

imagescan_3.30.0-1epson4ubuntu16.04_amd64.deb doesn't even install. I just can't use the scanner of my old EPSON XP-231

Ken Wright (wizard-bnnorth) wrote :

@downward,
Take a look at epson.com and download the latest drivers. I think that may help.

Ken Wright (wizard-bnnorth) wrote :

@Peter Bennett,
I'm sorry, I don't know anything about network connections, but that's where your problem lies. You've got the drivers linked, and the Epson rule, so once you get the network connection fixed you should be all right. Sorry I can't be of more help.

luca.mg (luca-mg) wrote :

@ Peter Bennet: hi there, I have a brother4 driven scanner too, all I did was to run the latest brother installer and install the libsane-extras package adding the line "brother4" to the file /etc/sane.d/dll.d/libsane-extras to get control of the otherwise not detected scanner. YMMV

PeterPall (peterpall) wrote :

In my case the network problem also involved gufw being configured to refuse all inbound connections: avahi's autodiscover requires you to ope. the ports needed for bonjour.

Peter Bennett (pgbennett) wrote :

@luca.mg
I tried what you suggested, and rebooted, but the scanner is still not found by scanimage -L

@Ken Wright
The network must be OK, because I can scan if I run under chroot in the same installation.

$Peterpall
I do not have gufw, or any firewall. the ports all should be open, and it does work under chroot so I don't think it is a network problem.

Ken Wright (wizard-bnnorth) wrote :

@Peter Bennett,

If you've got Synaptic, start it and search for ufw. I had it without knowing. I installed gufw, which is just a graphical interface to ufw and was able to check the firewall rules.

Peter Bennett (pgbennett) wrote :

@Ken Wright
Thanks for the info. I installed gufw. I found that the firewall was disabled for "Home" and enabled for "Office" and "Public". I disabled it for all and rebooted. scanimage -L still does not find the Brother scanner.

Ken Wright (wizard-bnnorth) wrote :

@Peter Bennett,

Let me make sure I'm following. scanimage -L doesn't find the scanner, but sudo scanimage -L does?

Peter Bennett (pgbennett) wrote :

No. sudo scanimage -L gives the same result. It does not detect the scanner. However schroot with chroot of Ubuntu 16.04 detects it correctly. See below.

peter@andromeda:~$ 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).

peter@andromeda:~$ sudo scanimage -L
[sudo] password for peter:

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

peter@andromeda:~$ schroot -c chroot:xenial
(xenial)peter@andromeda:~$ scanimage -L
device `brother4:net1;dev0' is a Brother Brother_DCP7065DN DCP-7065DN
(xenial)peter@andromeda:~$

Steven Tryon (stryon) wrote :

Clean install of sane and Epson drivers and reseating cables appears to have taken care my problems with my Epson V500.

Karl Kastner (kastner-karl) wrote :

Samsung SCX-470x,04e8:3457 Samsung Electronics Co., Ltd, is affected as well, the scanner is detected, but if a scan is attempted, the error "Failed to start scanner: error during device i/o" is displayed. Then the connection to the device is lost and I need to restart the device.

Rajasekharan workaround fixed the problem, thanks for posting it!

Displaying first 40 and last 40 comments. View all 165 comments or add a comment.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers