How to install the CanoScan 9000f Mark II on Ubuntu 14.04 with color profiles

You bought one of the best consumer scanners affordable (let's forget the $600+ Epsons for now) and want to scan natively on Linux. While I can see a case being made running SilverFast in a VirtualBox, there is most certainly no need to buy expensive VueScan or other propietery software if you are running Linux. Linux comes with saned and xsane, a daemon and its scan software. Up-to-date, feature-rich, free.

xane-for-linux

There is most certainly no need to buy expensive VueScan or other proprietery software if you are running Linux

In the following tutorial, we will compile the lastest saned, install all its requirements and then as well set up color profile management to get that rich and vibrant scans you expect from a scanner retailing at $280 MRSP.

Compile saned

Let's get to straight to it:

mkdir ~/src
cd src/
git clone git://git.debian.org/sane/sane-backends.git cd ~/src/sane-backends
BACKENDS="canon pixma" ./configure
cd ~/src/sane-backends
make && sudo make install
sudo ldconfig -v | grep libsane
cd /usr/share/locale/de/LC_MESSAGES
sudo ln -sf /usr/local/share/locale/de/LC_MESSAGES/sane-backends.mo .
sudo cp ~/src/sane-backends/tools/udev/libsane.rules /etc/udev/rules.d
usermod -aG scanner USERNAME (use your username here)

Permissions and test scans

Verify that you and saned are in the group scanner:

grep -e scanner /etc/group

Fiddle around with these commands and files to get it to work:

Make sure the term CanoScan is mentioned when issuing

sane-find-scanner

Fire up saned and try test scans:

sudo service saned start
scanimage -V
scanimage -L

Troubleshooting

If saned does not start edit this file:

sudo emacs /etc/default/saned (yes, emacs)

If it still does not work, make sure your libsane.rules do mention the MARK II.

cat /etc/udev/rules.d/libsane.rules | grep MARK

First scan

Finally do a real scan with:

scanimage > ~/test.pnm

More Troubleshooting

If it still does not work do a:

sudo scanimage > ~/test.pnm

Aha! Permission problem - figure it out or try a reboot as measure of last resort. Yes, I do hate those as well.

Color Profiles

Try a scan with

xsane

Colors are all messed up

Wonder why the colors are all messed up? Youi can extract the Canonscans ICC profiles over from some Windows install or from this location where I uploaded the extracted color profiles for your convenience:

canon9000 fm2 icc profiles.tar.gz
CNSR0D.ICC
CNSP0D.ICC
CNSN0D.ICC

Unzip and move into Linux' color profile folder:

sudo mv *.ICC /usr/share/color/icc/

Make sure to copy your screen's icm profiles there too, you will need them for xane. (Trust me, you'll need them)

Go to your system settings -> Color. Apply the profiles to your hardware accordingly. The profiles should be available if you copied everything correctly in the last step.

Now fire up xsane once again. Go into configuration and set the scanner's ICC Positive Color Profile as well as your screen's ICM profile. Enable color management as described on xsane.org. Scan, enjoy the Mark II's 4800 dpi and feel like a pro.

Update March 2015: Activate Buttons

As it stands I got all buttons to work: 3 PDF creation modes, E-Mail-to and the Send-To-Printer function.

All you have to do is to install scanbd, the scan button daemon and get the config files and bash-script wrappers of this Debian mailing list.

Make sure to tinker around with the file /usr/local/etc/scanbd/scanner.d/cs9000f.sh. The file is available in the mailing list thread.

Usually you would set the autoscan button to something like this, which yielded a good ratio between image quality, file size and scan speed:

scanimage -d $SCANBD_DEVICE $PARAM --format=tiff --source Flatbed 
--mode Color --resolution 300 -x 210 -y 297 | convert - -units 
PixelsPerInch -density 300 -compress jpeg -resize 60% -quality 72 
${SCANDIR}${FILENAME}.jpg

But you can assign any action to the scanner buttons, e.g. play a sound file or power down your PC, after all this is Linux and there are no limits to what you can achieve.

As it stands I got all buttons to work as intended on my Linux, even PDF creation, E-Mail-to and the Send-To-Printer function.

Conclusion

bike-scan2

DIN A4 scan out of a magazine

.. after all this is Linux and there are no limits to what you can achieve.

The picture above is a scan I did in 1200dpi natively in Linux on our office's 9000F Mark II. No need to use 4800dpi unless you scan film, in my opinion.

In case you know how to remove dust and make use of the internal infrared scanning ability of this beast of a scanner, please let me know in the comments. Thank you for reading.

Sources

Ubuntu Forum: Installing Scanner