Can't get my Canon LBP printer to run under Ubuntu 14.04
The Canon CAPT printer driver is closed source and the binary libraries supplied by Canon are compiled for i386. So if you are on amd64 you will need to first enable multiarch and install some libraries:
# amd64 only
dpkg --add-architecture i386
apt-get update
apt-get install libstdc++6:i386 libxml2:i386 zlib1g:i386 libpopt0:i386
Install cups if you do not already have it:
apt-get install cups
Download and unpack the Canon CAPT printer driver:
wget http://gdlp01.c-wss.com/gds/6/0100004596
tar -zxvf Linux_CAPT_PrinterDriver_V260_uk_EN.tar.gz/03/Linux_CAPT_PrinterDriver_V260_uk_EN.tar.gz
Install 32-bit or 64-bit driver depending on your architecture:
-
32-bit
dpkg -i Linux_CAPT_PrinterDriver_V260_uk_EN/32-bit_Driver/Debian/*.deb
-
64-bit
dpkg -i Linux_CAPT_PrinterDriver_V260_uk_EN/64-bit_Driver/Debian/*.deb
Now look in /usr/share/cups/model
for the ppd files that describe the printers and choose the one that matches (or is closest to) your printer:
# grep -H ModelName /usr/share/cups/model/*.ppd | less
...
/usr/share/cups/model/CNCUPSLBP6018CAPTS.ppd:*ModelName: "Canon LBP6000/LBP6018 CAPT (US)"
In this case we chose CNCUPSLBP6018CAPTS.ppd
which matches model LBP6000.
(Note - if you can not find a match for your printer, then view the README-capt-*txt file in the Canon tar.gz archive - in the section named "Object Printer" it contains an exact list of the printers supported by each .ppd file).
Add printer:
# lpadmin -p LBP6000 -m CNCUPSLBP6018CAPTS.ppd -v ccp://localhost:59687
# lpadmin -p LBP6000 -E
# ccpdadmin -p LBP6000 -o /dev/usb/lp0
And configure your system to start the Canon ccpd daemon automatically:
# update-rc.d ccpd defaults
Problems
There are several problems with the Canon printer driver:
-
It was built for Debian and last supported Ubuntu version was 12.04. It does work in 14.04 though.
-
It includes closed source binary libraries which are built for 32-bit i386, so can not be run natively on amd64 (even in the 64-bit package)
-
captstatusui includes an unbounded call to
strcpy
in cnsktmodule.c which fails with erroraborted *** buffer overflow detected ***
on some systems -
The Canon printer driver is actually a separate daemon that talks to cups over a local or network socket - it leaves an open network port on your system, and I doubt the Canon code has ever been audited for security vulnerabilities
-
The printer can appear twice in cups (once for auto-detected USB printer, once as Canon CCPD daemon) but the "USB" printer will not work if you try and print to it. In printer settings, if you see your printer configured as USB printer, you must manually disable it (right click, disable)
-
Canon use their own proprietary software and protocol for talking to the printer, which is why it is not integrated with cups, does not get automatically detected, and requires a driver to be manually installed. It is reasonable to expect that a printer should be automatically detected and just work, but this is not possible with Canon LBP. My next printer will be a printer that "just works" with open source drivers, probably a network printer that supports the PCL - Printer Command Language standard, like the Brother HL-2250DN (cheap duplex network printer, previously Amazon's top selling laser printer), or a HP Linux recommended printer that works with their open source HPLIP software.
-
The build scripts for the source code are old and a bit of a mess. Due to the inclusion of closed source i386 binary libraries, and lack of support for multiarch in the build scripts, it would be very hard to compile a fully working 64-bit release. Compiling a 32-bit release, on a 32-bit system, is possible once you have worked around the various bugs in the build system.
Problem: ccpd hangs
Sometimes ccpd hangs and the queue just says "Processing since ..."
Try a manual restart:
pkill -9 -x ccpd
pkill -9 -x captmoncnabc
/etc/init.d/ccpd start
/etc/init.d/ccpd status
Problem: ccpd does not work - only one ccpd process running after system startup
For normal operation two ccpd processes should be running in a system. The ccpd daemon depends on running cups daemon before forking the second process. You can use the following method to workaround the problem:
-
Enable the cups init script (update-rc.d cups defaults).
-
Instruct the ccpd init script to run after the cups init (update-rc.d ccpd defaults 99), or add "sleep 10 && /etc/init.d/ccpd start" in /etc/rc.local script.
If you want to use UDEV rules and startup script, be aware that UDEV rules execute before the CUPS init script, so it may be useful to restart the ccpd init script rather then simply start. For example, you can place the following string in "/etc/rc.local":
sleep 10 && /etc/init.d/ccpd restart
(Solution from Ubuntu wiki)
Reporting bugs and issues to Canon support
Canon have an official email address for reporting any bugs and issues with the driver:
[email protected]
Build from source
If you are tempted to try building and installing from source, follow these instructions (the Arch build script may also help):
sudo apt-get install build-essential automake libtool libgtk2.0-dev libglade2-dev libcups2-dev
wget http://gdlp01.c-wss.com/gds/6/0100004596/03/Linux_CAPT_PrinterDriver_V260_uk_EN.tar.gz
tar -zxvf Linux_CAPT_PrinterDriver_V260_uk_EN.tar.gz
cd Linux_CAPT_PrinterDriver_V260_uk_EN/Src/
# do cndrvcups-common
sudo apt-get install build-essential automake libtool libgtk2.0-dev libglade2-dev libcups2-dev
rm -rf cndrvcups-common-2.60-1/
tar -zxvf cndrvcups-common-2.60-1.tar.gz
cd cndrvcups-common-2.60-1/
sed -i -e 's/-lcups/-lcups -lgmodule-2.0/' cngplp/src/Makefile.am
dpkg-buildpackage -b -uc
cd ..
sudo apt-get install cups
sudo dpkg -i cndrvcups-common_2.60-1_amd64.deb
# do cndrvcups-capt
rm -rf cndrvcups-capt-2.60-1/
tar -zxvf cndrvcups-capt-2.60-1.tar.gz
cd cndrvcups-capt-2.60-1/
export echo=echo
sed -i -e 's/dh_shlibdeps/dh_shlibdeps --dpkg-shlibdeps-params=--ignore-missing-info/' debian/rules
sed -i -e 's/eval cmds=\"$old_archive_cmds/echo/' cngplp/ltmain.sh
sed -i -e 's:uimain.h":uimain.h"\n#include <cups/ppd.h>:' statusui/src/ppapdata.c
sed -i -e 's/cnsktmodule.la/cnsktmodule.la -lpthread/' statusui/src/Makefile.am
debian/rules configure
sed -i -e 's/RANLIB=/#RANLIB=/' cngplp/libtool
debian/rules build
fakeroot debian/rules install
fakeroot debian/rules binary-arch
cd ..
sudo dpkg -i cndrvcups-capt_2.60-1_amd64.deb
I am including this just as a note for anyone inclined to follow this path. Most people should not attempt to build this from source. Even on an amd64 system, the resulting package will include the closed i386 libraries.
Related videos on Youtube
empedokles
Updated on September 18, 2022Comments
-
empedokles over 1 year
I downloaded Linux CAPT driver V2.60 from Canon and installed both .deb packages, which were listed under the 64bit folder with Ubuntu Software-Center. My Canon printer still won't be recognized. Is there anything else I have to do? My printer is connected over USB.
Ubuntu would make a great replacment for my office, but unfortunately without printer support I will still rely on Windows.
-
Admin about 10 yearsDon't blame Ubuntu for the lack of support by Canon to Linux.
-
Admin about 10 years@Rinzwind I think Ubuntu would have enough power to talk to Canon to achieve better support.
-
Admin about 10 yearsNope you are wrong there. Simple: Canon as a business wants money. And Canonical will not pay (it is against the ideals of the company). All the support you see regarding Canon on Ubuntu is from a(!) volunteer (michael gruz on launchpad launchpad.net/~michael-gruz/+archive/canon-trunk ).
-
Admin about 10 yearsThat PPA is obsolete, it does not support Ubuntu 14.04.
-
Admin about 10 yearsThe PPA might(!) not be obsolete. Think about it: the drivers itself might not need to be updated for older devices. Only if there is a new group of Canon printers that use some new tools it needs an update (though a 14.04 version would be preferred ;) )
-
Admin about 10 yearsDo I have to do anything after sudo-apt-get update then?
-
Admin about 10 years@Rinzwind The drivers might not require updating, but the PPA would, since packages are published for specific releases of Ubuntu - compares the Trusty i386 Packages file on that PPA to the Precise i386 Packages file - trusty does not have the cndrvcups-common driver package (or, easier, check Overview of published packages on the PPA web page)
-
-
empedokles about 10 yearsThanks. I also always look for energy-efficiency. What about LaserJet Pro P1102? topten.ch/deutsch/buro/laserdrucker/…
-
bain about 10 yearsAccording to the HPLIP P1102 page that printer is fully supported on Ubuntu 14.04. It does require a downloadable closed source plugin; they provide software (
hp-setup
) that will do the download and configure it. -
empedokles about 10 yearsWell, Ubuntu also states that canonprinter I have is supported, but the closed source driver doesn't work.
-
bain about 10 yearsIt depends on what you mean by "supported". There are no official Ubuntu packages from Canon, and there are no drivers in the Ubuntu repositories, and Canon state that, apart from offering Linux drivers for download, they will not do anything else. What they do is provide a single archive with RPM and Debian packages. The documentation says this is tested on many distributions, the most recent Ubuntu being Ubuntu 12.04. The driver does work, it is just often a pain to install and configure.
-
empedokles about 10 yearsUnfortunately I'm a bit new to Ubuntu. It isn't so easy to figure out where the problem is. While I can see the printer in my system settings, if I print anything, nothing happens. (I'll upload a screenshot in my main posting.)
-
syockit almost 10 yearsThanks for the answer! By the way, how did you know that
libstdc++6:i386 libxml2:i386 zlib1g:i386
was required? The instructions did mentionia32-libs
, which has since been absent in later Ubuntu versions, so I've wondered what the replacement was. -
bain almost 10 years@syockit If you run
file canon/libcapt.so
it will identify the Canon libraries as "ELF 32-bit" so we know it needs 32-bit dynamic libraries. Run ldd like soldd canon/libcapt.so
- the linker will print any required dynamic libraries and show those that are not found. You can then useapt-file search libpthread.so
to find the package the libraries are in. -
user154126 about 8 yearsThere is a newer driver available at canon-europe.com/support/consumer_products/products/printers/…