Friday, June 3, 2011

Fedora 15, CUPS - Why does Canon LBP2900B behave so erratically?

I installed a Canon LBP2900B printer and discovered that the drivers are not included in Fedora. It was easy to get them from http://support-asia.canon-asia.com/contents/ASIA/EN/0900772407.html.

The printer worked but after a reboot, the printer did not seem to work. CUPS insisted on creating an additional LBP2900-2 printer for device usb://Canon/LBP2900, while the correct LBP2900 was on device ccp://localhost:59687.

Ignoring all the false steps, the problem would be overcome by stopping the ccpd server and restarting it.

It took a number of reboots and installing it on Ubuntu 11.04 as well to identify that while the additional entry for the same printer by CUPS was confusing, it was harmless.

The real problem was that /etc/init.d/ccpd service should have two processes. On Fedora 15, it was having only one. However, when I stopped the service and restarted it, it would start correctly with two processes:
$ sudo systemctl status ccpd.service
ccpd.service - LSB: Start Canon Printer Daemon for CUPS
      Loaded: loaded (/etc/rc.d/init.d/ccpd)
      Active: active (running) since Fri, 03 Jun 2011 09:56:52 +0530; 11min ago
     Process: 5681 ExecStop=/etc/rc.d/init.d/ccpd stop (code=exited, status=0/SUCCESS)
     Process: 5693 ExecStart=/etc/rc.d/init.d/ccpd start (code=exited, status=0/SUCCESS)
    Main PID: 5698 (ccpd)
      CGroup: name=systemd:/system/ccpd.service
          ├ 5698 /usr/sbin/ccpd
          ├ 5702 /usr/sbin/ccpd
          └ 5703 captmon2 --data-write-fd=8 --data-read-fd=12 --cmd...
The issue appears to be somehow related to systemd starting services in parallel. The ccpd server probably expects some service to be running which has not yet started.
 

6 comments:

  1. I cannot get fedora 15 to add my canon LBP7700c printer at all :) I installed the .rpm's provided by canon but no luck :/

    ReplyDelete
  2. how to install canon lbp2900 in fedora 16

    ReplyDelete
  3. The most recent driver I found was at www.canon.co.uk/Support/Consumer_Products/products/printers/Laser/i-SENSYS_LBP2900B.aspx

    This contains rpm files for 32bit and 64 bit drivers. Install the one you need.

    The doc directory has the needed documentation to configure the printer. You need to use the lpadmin command and make sure that the printer is enabled.

    You can use localhost:631 to configure or check the configuration using cups as well.

    By the way, cups seems to create a second entry which tries to use the printer as a usb device and does not work. I disable it or just ignore it as I could not find a way to get rid of it permanently.

    The /etc/init.d/ccpd is the script to start the daemon. You need to enable it
    $sudo systemctl enable ccpd.service

    Usually, the script fails to start successfully with systemd. Hence, I manually restart it when I need the printer (printer should be on):
    $sudo systemctl restart ccpd.service

    Check the status
    $sudo systemctl status ccpd.service

    There should be 2 processes running.

    ReplyDelete
  4. sir, i tried these commands as u instructed......
    [root@nabha nabha]# sudo systemctl status ccpd.service
    ccpd.service
    Loaded: loaded (/etc/rc.d/init.d/ccpd)
    Active: inactive (dead)
    CGroup: name=systemd:/system/ccpd.service

    [root@nabha nabha]# sudo systemctl start ccpd.service
    [root@nabha nabha]# sudo systemctl status ccpd.service
    ccpd.service
    Loaded: loaded (/etc/rc.d/init.d/ccpd)
    Active: active (running) since Wed, 09 Jan 2013 23:35:40 +0530; 6s ago
    Process: 1414 ExecStart=/etc/rc.d/init.d/ccpd start (code=exited, status=0/SUCCESS)
    CGroup: name=systemd:/system/ccpd.service
    └ 1417 /usr/sbin/ccpd

    [root@nabha nabha]# sudo systemctl stop ccpd.service
    [root@nabha nabha]# sudo systemctl status ccpd.service
    ccpd.service
    Loaded: loaded (/etc/rc.d/init.d/ccpd)
    Active: inactive (dead) since Wed, 09 Jan 2013 23:36:00 +0530; 5s ago
    Process: 1424 ExecStop=/etc/rc.d/init.d/ccpd stop (code=exited, status=0/SUCCESS)
    Process: 1414 ExecStart=/etc/rc.d/init.d/ccpd start (code=exited, status=0/SUCCESS)
    CGroup: name=systemd:/system/ccpd.service

    [root@nabha nabha]# sudo systemctl start ccpd.service
    [root@nabha nabha]# sudo systemctl status ccpd.service
    ccpd.service
    Loaded: loaded (/etc/rc.d/init.d/ccpd)
    Active: active (running) since Wed, 09 Jan 2013 23:36:26 +0530; 6s ago
    Process: 1424 ExecStop=/etc/rc.d/init.d/ccpd stop (code=exited, status=0/SUCCESS)
    Process: 1437 ExecStart=/etc/rc.d/init.d/ccpd start (code=exited, status=0/SUCCESS)
    CGroup: name=systemd:/system/ccpd.service
    └ 1440 /usr/sbin/ccpd



    still no printing

    ReplyDelete
  5. You may want to check on Cups -
    http://localhost:631/

    Go to manage printers and you should see something like
    ▼ Queue Name ▼ Description Location Make and Model Status
    LBP2900 Canon LBP2900 amd.sethanil.com Canon LBP2900 CAPT ver.1.5 Idle

    LBP2900-2 Canon LBP2900 amd.sethanil.com Canon LBP2900 CAPT ver.1.5 Paused - "Unplugged or turned off"

    The first entry is the one you need. The second is inserted by the system with an incorrect connection (usb://Canon/...)

    Make sure that the first entry's status is idle and there are no pending print jobs.

    In case problem persists, try re-installing the driver and re-configuring the printer. It may just work!

    ReplyDelete