XSane is not compatible any more with libsane in Karmic (9.10)

Bug #485551 reported by Peter Békési
80
This bug affects 16 people
Affects Status Importance Assigned to Milestone
sane-backends (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

Since I have upgraded to Karmic I am not able to use XSane with my Canon Lide 50 scanner. XSane starts properly, but making it to start scanning pops up a window saying: "Failed to start scanner: Error during device I/O"
On XSane news page the developer says:

"If you experience any problems with XSane and sane-backends with a version number greater than 1.0.19 then this may be caused by an incompatible development of sane-backends. In this case it may be worth to try sane-backends-1.0.19 or earlier. XSane is and will keep compatible to the original SANE-1.0 standard. I will not spend any time for incompatible things that will mess up everything. When the SANE-1.1 changes are compatible to SANE-1 then there is no need to change anything in XSane. "

libsane version in Jaunty was 1.0.19, but Karmic has 1.0.20. Replacing libsane with the 1.0.19 from Jaunty repository makes XSane work again, except that I have to force quit XSane as it stops responding when I try to close any windows.

I suggest revising the libsane vs XSane compatibility version in Karmic repository and/or including a different frontend that works with libsane 1.0.20 in Karmic repository.

Revision history for this message
f13ftw (f13ftw) wrote :

I have the same scanner and can verify that the above is accurate.

Revision history for this message
CA Wills (infocawills) wrote :

My Lide 50 also fails to scan - it worked perfectly under 9.04. As a learner it's difficult to know what is wrong BUT I've tried all reported 'fixws' and some from the LUG members, to no avail, please fix.
C A Wills

Revision history for this message
pmes (pmesch) wrote :

I can scan all day with my HP 5300C using scanimage and xscanimage, but I can only scan once with xsane. After that the scanner is completely unavailable until I pull the power cord and plug it back in.

This is lucid ubuntu 2.6.32-7-generic #10-Ubuntu SMP Sun Dec 6 13:54:12 UTC 2009 x86_64 GNU/Linux

libsane-1.0.20-4ubuntu3
sane-1.0.14-9
xsane-0.996-2ubuntu1.1

Revision history for this message
Droop7 (droop7) wrote :

Same problem with Canon Lide 50 Xsane blocks

Revision history for this message
Droop7 (droop7) wrote :

same type of problems than bug n°485551

Revision history for this message
Cosmin (cstroe) wrote :

It seems that the libsane people have made some serious changes to libsane version 1.0.20, and have broken compatibility with all the frontends. XSane, xscanimage, and any other frontend I've tried cannot find my CanoScan LiDE 50, even though my scanner is working fine with Windows XP via Sun VirtualBox with USB passthrough.

sane-find-scanner seems find the scanner, and reports:

found USB scanner (vendor=0x04a9 [Canon], product=0x2213 [CanoScan], chip=GL841?) at libusb:001:012

but no frontend can use it. scanimage reports "no SANE devices found".

I've searched for a way for downgrade to libsane version 1.0.19, but I've found no easy way to do this.

Revision history for this message
Lucien Demeuse (lucien-demeuse) wrote :

To Cosmin

I explain here the procedure to make xsane working for LIDE 50 whith Karmic but it is in french.

http://users.skynet.be/linux-rixensart/1_suite.html#scanner

You can download libsane-1.0.19 here : http://packages.ubuntu.com/fr/jaunty/libsane without any problem

You can translate the french part using google translate

Good luck

Lucien

Revision history for this message
Cosmin (cstroe) wrote :

Thanks Lucien.

I had to downgrade more than the libsane package to get everything working.

Here's a short summary of what I did to get things working as they were:

1) Remove the libsane-1.0.20-4ubuntu3 package (I did this using Synaptic). Write down the dependencies that get removed, so you can install them back later. If you have xsane installed, remove the xsane-common package also (it's not listed as a dependency).

2) Download the following packages from jaunty (download links are at the bottom of the page):

libsane_1.0.19-23ubuntu7_i386.deb (http://packages.ubuntu.com/en/jaunty/libsane)
sane-utils_1.0.19-23ubuntu7_i386.deb (http://packages.ubuntu.com/en/jaunty/sane-utils)
xsane-common_0.996-1ubuntu2_all.deb (http://packages.ubuntu.com/en/jaunty/xsane-common)
xsane_0.996-1ubuntu2_i386.deb (http://packages.ubuntu.com/en/jaunty/xsane)

Close Synaptic, and install the packages by doubleclicking them and clicking install. Make sure you install them in the order they were downloaded.

I also changed the permissions as mentioned in your post, but I'm not sure if that's absolutely necessary.

You can now test the scanner with xsane. It should work as it had under jaunty.

3) Install any packages that were removed in step 1, but have not been installed yet. Do NOT upgrade any of the packages installed in step 2.

That's it. Scanner is now working as it should be. Thank you very much for the help.

Revision history for this message
Cosmin (cstroe) wrote :

Actually, there is now another problem with xsane: it doesn't exit cleanly. This isn't a big problem if you only use xsane, because you can "force quit", but it will cause Gimp to hang forever on startup.

I tried to upgrade xsane to the version that's distributed with karmic, but still has the same problem.

So in the end, I just uninstalled xsane, and installed flegita instead. It also has a gimp plugin, that's in the flegita-gimp package, and this adds a "Scan.." menu entry to the File menu. It works fine standalone and also with gimp.

Happy new year.

Revision history for this message
Stephan Wüthrich (ubuntu-runway) wrote :

I have the same problem. Is there someone who will fix it?

Revision history for this message
ih (ih-ad) wrote :

I performed the same operations as Lucien.

Here is the sequence of events I did and it worked for me.

0) Unplug the scanner from the USB port

1) Uninstall libsane (and dependant libraries) including configuration files
$ sudo apt-get purge hpijs hplip sane-utils xsane xsane-common libsane

2) Install the old version
a) Open http://packages.ubuntu.com/en/jaunty/libsane and install the package for your architecture (libsane_1.0.19-23ubuntu7_i386 for i386)
b) You might want to "lock the version" of the libsane package, so it does not attempt to upgrade it
Find libsane in Synaptic, select it, click on the Package menu and tick "Lock Version"

3) Install back the dependant packages (the current ones, not the old ones from jaunty)
$ sudo apt-get install hpijs hplip sane-utils xsane xsane-common

4) Edit the config file
$ sudo gedit /lib/udev/rules.d/50-udev-default.rules

Find the text
 # libusb device nodes
 SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", MODE="0664"
and change MODE="0664" to "0666"

On my copy of the file, this it's on line 58.

5) Plug-in the scanner

6) Everything should work now.

BTW: For me the change of the mode of the device was crucial. With the original Karmic (9.10) version of libsane (libsane-1.0.20-4ubuntu3) the scanner could be accessed by a normal user. This is not the case with the downgraded libsane.

user1@hp311:~$ scanimage -L
device `v4l:/dev/video0' is a Noname HP Webcam-50 virtual device

user1@hp311:~$ sudo scanimage -L
[sudo] password for user1:
device `v4l:/dev/video0' is a Noname HP Webcam-50 virtual device
device `genesys:libusb:002:010' is a Canon LiDE 35/40/50 flatbed scanner

I then followed step 4 and all was good after that. scanimage -L did show the scanner for a non-privileged user

Peter Békési (pbekesi)
tags: added: karmic
tags: added: sane
tags: added: 50 canon canoscan lide xsane
Revision history for this message
Peter Békési (pbekesi) wrote :

I have tried the steps ih suggested on my 64bit karmic and scanner is working fine until I try to quit XSane. Than it stops responding and I have to force quit.

Can anyone suggest how this bug can get out of the new/unassigned status? Isn't there anyone else using XSane with Karmic?

Revision history for this message
rbuick (robert-buick) wrote :

My 64bit laptop running (Lucid Lynx 10.04) Simple Scan and libsane 1.0.20 worked fine on my father's Canon LiDE 50 scanner.

He was having all sorts of problems on his i386 desktop XP installation, so I thought it would be a great opportunity to try and ween him onto nutritious Ubuntu 9.10.

Unfortunately the scanner wouldn't work correctly.

Some googling later (I hadn't come across this post) I decided to upgrade the i386 to Lucid 10.04.
However the problems still persisted:

The backend Simple Scan, scans the document but it scans it at twice the resolution, or put it another way it puts an A4 page on half of the Simple Scan output and then hits the stops and tries to do what it thinks is the other half by trying to scan past the stops (as it did on 9.10).

Xsane backend doesn't illuminate the lamp or drive the scanner along the document.

Having found this post, I followed the instructions by ih and replaced libsane with the earlier version but with exactly the same outcome.

Are there configuration settings that can be adjusted so that Simple Scan doesn't try and drive through the end stops?

Revision history for this message
Launchpad Janitor (janitor) wrote :

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

Changed in sane-backends (Ubuntu):
status: New → Confirmed
Revision history for this message
penalvch (penalvch) wrote :

Peter Békési, thank you for reporting this and helping make Ubuntu better.

As per https://wiki.ubuntu.com/Releases Karmic reached EOL on April 30, 2011.

If you have an issue in a supported release (ex. 16.04) please file a new report, and feel free to subscribe me to it.

Changed in sane-backends (Ubuntu):
status: Confirmed → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.