Canon MX340 All-In-One - Scanner requires manual SANE compilation to work
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
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://
[2] http://
[3] http://
After having problems with the MX340, I tried the listed instructions.
The following line comes from config.log: =/var --enable-libusb_1_0
$ ./configure --prefix=/usr --sysconfdir=/etc --localstatedir
It compiled and installed just fine. I did this some time ago, but you can compare the timestamps in /usr/lib/sane/ pixma.so. 1.0.23 pixma.so. 1.0.23 pixma.so. 1.0.20 pixma.so. 1.0.23
lrwxrwxrwx 1 root root 23 2011-04-21 18:29 libsane-pixma.so -> libsane-
lrwxrwxrwx 1 root root 23 2011-04-21 18:29 libsane-pixma.so.1 -> libsane-
-rw-r--r-- 1 root root 116476 2010-04-14 22:24 libsane-
-rw-r--r-- 1 root root 332677 2011-04-21 18:29 libsane-
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.