Saturday, June 14, 2014

Ubuntu 14.04 and the Canon LBP6020B laser printer

The Canon in general, and the LBP6020 in particular, haven't had a good reputation on Linux / Ubuntu, however the good news is that while it still doesn't work out of the box, support appears to have improved recently.

If you're running Ubuntu 16.04, or any other linux distribution that supports docker, I suggest you look at my updated post "Ubuntu 16.04 (or any other recent linux) and the Canon LBP6020B laser printer".

If you're running something between Ubuntu 14.04 and 15.10, read on...

The latest Canon Linux drivers, available from Canon Europe, with release date 28 May 2014, includes support for the LBP6020 (earlier drivers may have, this is the first that I've seen).

When trying to get the printer working, the two main articles I used were:

The first indicates that the 32 bit libraries need to be enabled on 64 bit Ubuntu.  The drivers linked above include a 64 bit version, so I'm not sure if this is necessary any more (I already had the 32 bit libraries enabled).

Other than that, the steps I followed were:

Download the drivers from Canon Europe, and install:

tar xzvf ~/Downloads/Linux_CAPT_PrinterDriver_V260_uk_EN.tar.gz 
cd Linux_CAPT_PrinterDriver_V260_uk_EN/64-bit_Driver/Debian/
sudo dpkg -i cndrvcups-common_2.60-1_amd64.deb
sudo dpkg -i cndrvcups-capt_2.60-1_amd64.deb

Check that the LBP6020 is supported directly:

grep -H ModelName /usr/share/cups/model/*.ppd | grep 6020

You should see CNCUPSLBP6020CAPTK.ppd in the output.

Assuming that you only have one USB printer plugged in, check which device it is:

ls /dev/usb/lp*

Then define the printer queue (LBP6020 in the example below) with the device found above:

sudo lpadmin -p LBP6020 -m CNCUPSLBP6020CAPTK.ppd -v ccp://localhost:59687 -E
sudo ccpdadmin -p LBP6020 -o /dev/usb/lp0
sudo service ccpd start
sudo service cups restart

Check that the ccpd service appears to have started correctly:

On Ubuntu versions prior to 15.04:

sudo service ccpd status
On Ubuntu 15.04:

sudo /etc/init.d/ccpd status

You should see two numbers at the end of the line, if not, something's not right.  You can try looking in /var/log/cups/, but the information is unfortunately sparse.

Once the printer has been installed and is working, to start the printer:

# Switch the printer on and wait for it to settle

# Confirm that the usb device exists and matches the device in /etc/ccpd.conf:

ls /dev/usb/

# Start the ccpd service:

sudo service ccpd start

# Restart CUPS

sudo service cups restart

# Check that the service appears to have started correctly

sudo /etc/init.d/ccpd status


Hope this helps.

EDIT 24 Oct 2016: Added reference to a new post for Ubuntu 16.04 and other recent linux distributions.

EDIT 30 Apr 2015: Updated the status check for Ubuntu 15.04, and included the restart instructions from 11 Dec 2014.

EDIT 28 Feb 2015: Removed the command to autostart the service.  The sequence posted in the comments on 11 Dec 2014 assumes that the service hasn't been started.

22 comments:

  1. Hi!

    thank you very much.

    I did it and the printer run. But then I updated ubuntu and it doesn't work anymore... I tried these steps again but it doesn't work, I have just one number and not two with "sudo service ccpd status"

    How can I clean cups and start these steps from zero?

    thank you so much!

    ReplyDelete
  2. I've found that the ccpd daemon is very sensitive to startup conditions, and having a single number as you describe was one of the negative side effects. I don't have access to the printer at the moment, however from memory what I did was disable ccpd from automatically starting at boot time. The sequence then was:

    * Boot the computer (with cups automatically starting)
    * Switch the printer on and wait for it to settle
    * Manually start ccpd

    Hope this helps...

    ReplyDelete
  3. I've got access to the printer again and have confirmed the startup sequence I use:

    * Switch the printer on and wait for it to settle.
    * Confirm that the usb device exists and matches the device in /etc/ccpd.conf:
    ** $ ls /dev/usb/lp1
    * Start the ccpd service:
    ** $ sudo service ccpd start
    * Restart cups:
    ** $ sudo service cups restart
    * Confirm that ccpd started correctly (shows the two process ids as described above):
    ** $ sudo service ccpd status

    This has worked without problem for the last few jobs I've had to print.

    Once the toner runs out I'll still seriously consider ditching the Canon and buying another Brother printer.

    ReplyDelete
  4. Hi Alistair,
    greetings from Malawi (in Africa). I made the fatal mistake of buying a Canon LBP 6020 to run on Ubuntu 14.04 LTS and have regretted it ever since. I have meticulously followed your instructions, but to no avail. I still get only one number when I check the ccpd status. I would really appreciate any assistance that your can render to ease my suffering.
    Cheers,

    ReplyDelete
  5. One short thing to try - I've left the ccpd service to not autostart on boot. Check that before trying the sequence I posted on 11 Dec 2014.

    Failing that, I'd suggest posting your question to the Ubuntu forums with the following information. That will allow more people to see it and possibly help.

    Please include the output of (with the printer switched on):

    $ dpkg --list | grep cndrv
    $ ls -l /dev/usb
    $ cat /etc/ccpd.conf

    And the output of:

    /var/log/cups/access_log
    /var/log/cups/error_log

    Post a link to the question back here and I'll see if I can help further.

    ReplyDelete
  6. Thanks a lot Mr Alistair. You saved my life. I was looking high and low for a way to get my damned Lbp6020b work on my ubuntu mate 64bit. That took me almost a month to finally find your valuable tips. I'm very glad that it works fine. I'll after reboot if it stays working.

    ReplyDelete
  7. Glad it was able to help... :-)

    ReplyDelete
  8. I NEED SOME HELP. MY LBP6020B DOESN'T WORK
    HERE'S THE OUTPUT OF THE COMMANDS ABOVE
    serra@lapdeb8:~$ ls /dev/usb/lp*
    /dev/usb/lp0
    serra@lapdeb8:~$ ls /dev/usb/lp0
    /dev/usb/lp0
    serra@lapdeb8:~$ dpkg --list | grep cndrv
    serra@lapdeb8:~$ ls -l /dev/usb
    total 0
    crw-rw---- 1 root lp 180, 0 juin 12 23:10 lp0
    serra@lapdeb8:~$ cat /etc/ccpd.conf
    cat: /etc/ccpd.conf: Aucun fichier ou dossier de ce type
    serra@lapdeb8:~$ /var/log/cups/access_log
    bash: /var/log/cups/access_log: Permission non accordée
    serra@lapdeb8:~$ /var/log/cups/error_log
    bash: /var/log/cups/error_log: Permission non accordée
    serra@lapdeb8:~$

    NOTICE THAT MY SERIAL NUMBER IS NOT INCLUDED IN THE FOLLOWING SITE
    http://www.canon-europe.com/support/consumer_products/products/printers/laser/i-sensys_lbp6020b.aspx?type=download&language=&os=LINUX

    ReplyDelete
    Replies
    1. I hadn't seen the list of serial numbers before. My printer happens to fall within the supported range. I'd suggest posting to Ubuntu Forums to see if anyone else has had this problem and found a solution. Sorry.

      Delete
  9. Thanks for the explanation. Used this for my parents LBP6020 on Ubuntu. They turn their printer off when not in use and disconnect the USB plug. Spend hours of remote re-configuring due to this ccpd daemon that has quirks. But that there is a new driver v2.7 since november 2015; this seems to have sold the timing / precendence issues.

    ReplyDelete
  10. Hello, tried to install this printer on fresh 16.04 without any success. From the command ccpd status I can see well over 50 numbers, which is really strange. The printer can be seen from cups web interface but cannot print. Please let me know if you know how to solve this one! Thanks

    ReplyDelete
  11. If anyone came here looking for a solution for my problem (previous comment) Please check here: http://askubuntu.com/questions/778367/cannot-print-from-canon-lbp6020-ubuntu-16-04/794114#794114

    ReplyDelete
    Replies
    1. Nik,
      Thanks for coming back and posting your solution! I've just tried to install the driver on Ubuntu 16.04 for the first time and this came in handy.

      Delete
  12. This comment has been removed by a blog administrator.

    ReplyDelete
  13. This comment has been removed by a blog administrator.

    ReplyDelete
  14. Thanks very much. There is a newer printer driver 2.71 and installed using your guide on linuxmint sylvia

    ReplyDelete
  15. This comment has been removed by the author.

    ReplyDelete
  16. Learn how to fix canon printer won't connect to wifi error from our highly skilled experts. Our team is working at day as well as night to resolve your printer errors. So hurry up get in touch with us and for more information visit our website canon printer offline.

    ReplyDelete
  17. If you want to know how to fix kindle fire error code 13 then get connected with our team. Our experts tell you the best way to resolve this error. You can get in touch with us any time as we are available round the clock to help you. For more information visit our website Ebook Helpline.

    ReplyDelete
  18. Are you looking for someone who can provide you installation service for your smart devices? If yes, then you have reached the right place. Geeks for Tech is a group of expert technicians who can provide you the best services. Geek Squad

    ReplyDelete
  19. If you are facing issues regarding how to fix the Brother Printer Error 04, then visit our website printer offline tech or call our experienced experts. With the help of our experts, you can learn how to fix these errors. To know more, dial our toll-free helpline number at USA/CA: +1-888-966-6097.

    ReplyDelete