Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Sane/XSane on Debian Jessie (Error during device I/O)

963 views
Skip to first unread message

rm...@sent.com

unread,
Mar 7, 2016, 11:00:05 AM3/7/16
to
After many hours of troubleshooting/googling, looking for some help:
 
I'm switching from Ubuntu to Debian Jessie, and am having problems scanning via Sane. Oddly, I had no trouble with scanning on Ubuntu/Xubuntu (14.04) with the same computer and same scanner/printer. Printing is fine on both OS's.. It's just scanning that won't work on Debian.
 
When I attempt a scan, I can hear the scanner moving, but then an error appears before the image shows up on the computer.
 
I have tried both XSane (version: 0.998) and Simple Scan (3.14.0).
 
Here are the errors:
XSane: Error during read: Error during device I/O.
Simple Scan: "Failed to scan Error communicating with scanner"
 
It makes no difference whether I run XSane/SimpleScan as "user" or "root"; The same error occurs in both cases.
 
I also tried using Sane directly from command line, and this is what I get:
 
#root@debianos:/home/me# sane-find-scanner
found USB scanner (vendor=0x040a [Eastman Kodak Company], product=0x4066 [KODAK ESP Office 2170 Series]) at libusb:001:008
 
#root@debianos:/home/me# scanimage -L
device `v4l:/dev/video0' is a Noname HD WebCam virtual device
device `kodakaio:libusb:001:008' is a Kodak KODAK ESP Office 2170 Series flatbed scanner
 
#root@debianos:/home/me# scanimage -d kodakaio --format pnm > outfile.pnm
scanimage: sane_read: Error during device I/O
 
On Debian Jessie I saw these files:
/etc/sane.d/kodak.conf
/etc/sane.d/kodakaio.conf
So to experiment, I tried replacing them with the ones from my working Ubuntu. But that didn't help. And "diff" showed almost no difference anyway.
 
Again, I have no trouble scanning using Ubuntu on the same computer/scanner combo, so I'm thinking it should be possible on Debian.
 
 
Any help would be appreciated. Thanks in advance

New Linux

unread,
Mar 8, 2016, 3:50:04 PM3/8/16
to
Some new information about SANE scanner problem:
 
Debian (scanner not working):
libsane 1.0.24
libsane-common 1.0.24
 
Ubuntu (scanner working):
libsane 1.0.23
libsane-common 1.0.23
 
To experiment, I used synaptic to remove everything related to SANE on Debian Jessie, and then compiled SANE 1.0.23 from source on it. And then command line SCANNING WORKED - Great!
 
Unfortunately, as soon as I reinstalled either XSane or SimpleScan, synaptic reinstalled SANE 1.0.24 and then nothing worked again.
 
If these questions sound like I don't know what I'm doing, it's because I don't know what I'm doing (amateur Debian user):
 
1) Is there some way I can install the older SANE 1.0.23 via Synaptic?
2) Alternatively, since SANE 1.0.22 was part of Wheezy - can that be installed via Synaptic on Jessie?
 
Hope someone can help! 
 
 

Lisi Reisz

unread,
Mar 8, 2016, 6:10:05 PM3/8/16
to
On Tuesday 08 March 2016 20:46:19 New Linux wrote:
> Some new information about SANE scanner problem:
>
> Debian (scanner not working): libsane 1.0.24 libsane-common 1.0.24
>
> Ubuntu (scanner working): libsane 1.0.23 libsane-common 1.0.23
>
> To experiment, I used synaptic to remove everything related to SANE on
> Debian Jessie, and then compiled SANE 1.0.23 from source on it. And then
> command line SCANNING WORKED - Great!
>
> Unfortunately, as soon as I reinstalled either XSane or SimpleScan,
> synaptic reinstalled SANE 1.0.24 and then nothing worked again.
>
> If these questions sound like I don't know what I'm doing, it's because
> I don't know what I'm doing (amateur Debian user):
>
> 1) Is there some way I can install the older SANE 1.0.23 via Synaptic?
> 2) Alternatively, since SANE 1.0.22 was part of Wheezy - can that be
> installed via Synaptic on Jessie?

I wrote half an email before doing the correct Google search. :-(

I see that the Jessie libsane problem has already been solved:
https://packages.debian.org/search?keywords=libsane&searchon=names&suite=all&section=all

So follow these directions for using Backports, and you will be home and dry:
http://backports.debian.org/Instructions/

I don't know how you use backports in Synaptic. In Aptitude it is the same as
in apt-get, mutatis mutandis. You could always use apt-get just this once!

Lisi

New Linux

unread,
Mar 8, 2016, 7:10:05 PM3/8/16
to
Thanks Lisi, but still having the same trouble...
 
I did this:
 
1) To /etc/apt/sources.list I added the line:
deb http://http.debian.net/debian/ jessie-backports main
 
2) Then did:  apt-get update
 
3) Then did:
apt-get -t jessie-backports install sane libsane libsane-common sane-utils
 
But when I try to scan, I get the same errors as described previously.
Am I doing something wrong there?

David

unread,
Mar 9, 2016, 12:00:06 PM3/9/16
to
I have a similar problem, but with a SCSI scanner.

If I type in a terminal window lsscsi it shows the scanner is there, but
without a location eg /dev/

Sometimes if I type sane-find-scanner it does.

This morning I had to use modprobe sg1 then it worked OK.

David.

Lisi Reisz

unread,
Mar 9, 2016, 1:00:07 PM3/9/16
to
On Wednesday 09 March 2016 00:06:42 New Linux wrote:
> Thanks Lisi, but still having the same trouble...
>
> I did this:
>
> 1) To /etc/apt/sources.list I added the line: deb
> http://http.debian.net/debian/ jessie-backports main
>
> 2) Then did:  apt-get update
>
> 3) Then did: apt-get -t jessie-backports install sane libsane libsane-
> common sane-utils
>
> But when I try to scan, I get the same errors as described previously.
> Am I doing something wrong there?

Perhaps when backports is a regression you have to uninstall the newer
versions first? I have only ever back-ported a higher version. What version
of libsane have you got now? Or perhaps you have a missing driver.

Lisi

New Linux

unread,
Mar 13, 2016, 11:20:05 AM3/13/16
to
 
Unfortunately I was not able to resolve this problem. After a week of troubleshooting, I've settled on some workarounds, which I'm posting below.
 
Giving the limited information I've been able to find, I believe this is a problem specific to using a Kodak All-In-One (kodakaio) scanner with sane on Debian Jessie.
 
As mentioned in my first post, I am able to scan on Ubuntu/Xubuntu/etc which uses the following packages:
libsane, libsane-common, sane-utils (**All version 1.0.23 on Ubuntu**)
 
Debian Jessie Stable is currently v1.0.24. I tried installing v1.0.25 from a different Debian repo, but still had the same errors. I then tried using Debian snapshots to install the Wheezy version (1.0.22). Unfortunately that version did not have a kodakaio back-end. So version 1.0.23 is the only one that worked for me with kodakaio.
 
However, any GUI (like xsane/simplescan) that I installed either didn't recognize the v1.0.23 SANE packages and/or reinstalled the v1.0.24 packages. In my numerous attempts to get a compatible GUI working with the 1.0.23 packages, I ended up having to reinstall my entire operating system in order to clean up the mess.
 
Having spent a week on this, these seem to be the options:
1) Buy a new, non-Kodak, printer (ugh)
2) Scan to an SD card inserted into the kodak (low quality, limited functionality)
3) Use a USB/pen-drive version of Ubuntu whenever I need to scan (okay for infrequent use)
4) Scan from the command line on Debian Jessie (okay)
 
If I used the scanner frequently, I'd probably opt for a new scanner. But since I mostly only need an occasional document scanned, I'm using the command line option. Anyone interested in that can read below for instructions.
 
[Instructions for command line scanning on kodakaio with sane]
1) I first removed the v1.0.24 libsane, libsane-common, and sane-utils via Synaptic Package Manager
2) I got v1.0.23 of the sane-backends from: https://alioth.debian.org/frs/?group_id=30186
3) Extracted that and then ran the following command in the new diretory:
# ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var BACKENDS=kodakaio
4) Then, I did NOT use "make install" (that's part of what led to having to reinstall my OS). Instead, I used Synaptic to install "checkinstall" (it makes package available/uninstallable via Synaptic). Once installed, close Synaptic and then run this command:
# checkinstall
 
Here's how I do an 8.5x11 (US Letter size) scan:
# cd /home/user/Documents  (or wherever you want the scan saved)
# scanimage -d kodakaio --mode gray --resolution 300 -x 215.9 -y 279.40 > MyDocScan.pgm
(for different sizes, note that x/y are in millimeters)
 
To see other options (for color/resolution/etc), do this command:
# scanimage --help -d 'kodakaio'
 
Once scanned, you can then adjust the image with GIMP. For a document, this is what I do in GIMP:
.. Colors -> Brightness/Contrast -> Contrast to 30
.. Image -> Scale Image -> Then choose either 300 or 72 pixel resolution (72 is blurry), and set to 8.5x11 inches
.. File -> Export -> Select File Type (Portable Doc Format / PDF) -> Export
 
This is not ideal, but it works. Again, another (maybe safer) option is to use Ubuntu on a pen-drive for infrequent scanning. If anyone finds a way to get the kodaio working on Debian Jessie's current sane/libsane, please post a followup. I'd much rather use a GUI like xsane or simplescan.
 
Original post:
https://lists.debian.org/debian-user/2016/03/msg00241.html

Lisi Reisz

unread,
Mar 13, 2016, 11:40:08 AM3/13/16
to
On Sunday 13 March 2016 15:02:45 New Linux wrote:
> However, any GUI (like xsane/simplescan) that I installed either didn't
> recognize the v1.0.23 SANE packages and/or reinstalled the v1.0.24
> packages. In my numerous attempts to get a compatible GUI working with
> the 1.0.23 packages, I ended up having to reinstall my entire operating
> system in order to clean up the mess.

Did you try back-ports?

Lisi
0 new messages