Canon MX340 All-In-One - Scanner requires manual SANE compilation to work

Bug #701001 reported by Li-aung Yip ("Lewis")
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
sane-backends (Ubuntu)
Expired
Low
Unassigned

Bug Description

Binary package hint: libsane

Ubuntu Version: 10.10 (Maverick)
Summary: Canon MX340 scanner component not supported out of the box. Nasty tricks required to make it work with SANE.
Proposed Fix: Just needs an update of the libsane package (possibly next release.) Note that SANE must be compiled with libusb 1.0 or strange behaviours crop up.

--

The Canon MX340 is an all-in-one scanner/printer/fax of roughly 2009 vintage. The scanner component is supported by very, very new versions of the sane-pixma backend (sufficiently new that Ubuntu 10.10's libsane package doesn't include support yet.) Compilation of sane-backends from Git is required to make the scanner work without resorting to Canon's own "scangearmp" interface, which is severely limited in features.

For the most part Nicolas Paris' instructions [1] about manual compilation of sane-backends from Git apply, with the added twist that you must add --enable-libusb_1_0 to the list of ./configure arguments. To be explicit:

1) Install libusb-dev-1.0-0 from repos.
2) Download sane-backends from git repository [2]. I used the version that was current at Sun, 9 Jan 2011 16:24:18 +0000.
3) ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --enable-libusb_1_0
4) make clean; make; sudo make install. Wail and gnash teeth while waiting for compile to finish.
5) Yay! xsane works with the scanner. :)

If you don't force the use of libusb 1.0, then SANE will compile with libusb 0.1.4; this leads to strange errors where SANE errors out on *all* operations with "Error during device I/O.", yet the scanner will still go through the motions of doing whatever SANE asked it to. For example, if you ask for a scan from the flatbed platen, SANE will immediately error out, but the scanner head will light up and do a full pass over the scanning area. (This sounds to me _somewhat_ like the "USB timeout" error described in [3].)

I only discovered that libusb_1_0 was required after banging my head on the wall for 6 hours, then observing that SANE on my Archlinux box (compiled with libusb 1.0.8) actually worked, albeit only with superuser privileges and only half the time.

- Lewis.

[1] http://mp610.blogspot.com/2008/04/give-your-scanner-new-freshly-sane.html
[2] http://git.debian.org/?p=sane/sane-backends.git
[3] http://lists.alioth.debian.org/pipermail/sane-devel/2009-March/024228.html

Revision history for this message
Bryan Bonvallet (btbonval) wrote :

After having problems with the MX340, I tried the listed instructions.

The following line comes from config.log:
  $ ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --enable-libusb_1_0

It compiled and installed just fine. I did this some time ago, but you can compare the timestamps in /usr/lib/sane/
lrwxrwxrwx 1 root root 23 2011-04-21 18:29 libsane-pixma.so -> libsane-pixma.so.1.0.23
lrwxrwxrwx 1 root root 23 2011-04-21 18:29 libsane-pixma.so.1 -> libsane-pixma.so.1.0.23
-rw-r--r-- 1 root root 116476 2010-04-14 22:24 libsane-pixma.so.1.0.20
-rw-r--r-- 1 root root 332677 2011-04-21 18:29 libsane-pixma.so.1.0.23

You can see the new version (generated from the instructions given) is dated April 2011, the old version (from Ubuntu) is dated April 2010. The soft links point to the new version.

xsane, when run as a normal user, does not detect the MX340. I ran some of the diagnostics on the command line, and they also do not detect the MX340. If I run "sudo xsane", against all warnings and provisions, miraculously the scanner can be used. Briefly. xsane will eventually lock up during a preview scan or a full scan.

I'm not sure this one update is enough to resolve the problem, although I am running 10.04 LTS. Perhaps there are additional problems for 10.04.

Revision history for this message
Bryan Bonvallet (btbonval) wrote :

I think my issue is more pertinent to Bug #217571, but anyone who ends up at this ticket should be aware that the proposed fix here will not resolve the issue of only root being able to utilize the scanner.

If the above solution does not fix your problem, test xsane with root just to see if it can connect (disconnect from the network prior to doing so). If xsane does connect, close xsane immediately, and see Bug 217571.

Revision history for this message
penalvch (penalvch) wrote :

Li-aung Yip ("Lewis"), thank you for reporting this and helping make Ubuntu better.

As per https://wiki.ubuntu.com/Releases 10.10 reached EOL on April 10, 2012.

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):
importance: Undecided → Low
status: New → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for sane-backends (Ubuntu) because there has been no activity for 60 days.]

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

Other bug subscribers

Remote bug watches

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