Trouble with Canon printer

I have Canon LBP-3010 printer, one of the models known for their bad drivers for Linux. However some folks were able to make them work. I’m trying too but still without success.
I followed the next instruction:

  1. Downloaded and installed the last version of Canon official drivers for my model (packages cndrvcups-capt-2.60-1.x86_64.rpm
    & cndrvcups-common-2.60-1.x86_64.rpm); 1. Restarted cups:
sudo /etc/init.d/cups restart
  1. Registered the printer with lpadmin
    : ```
    sudo /usr/sbin/lpadmin -p LBP3010 -m CNCUPSLBP3050CAPTK.ppd -v ccp://localhost:59687 -E
 (names are 100% correct)
  1. Registered the printer for *ccpd*
 daemon: ```
sudo /usr/sbin/ccpdadmin -p LBP1120 -o /dev/usb/lp0

(Here can be the trouble as there no usb directory inside /dev).

  1. Replaced the content of /etc/init.d/ccpd
    (see below); 1. Tried to start ccpd service:
sudo /etc/init.d/ccpd start

but get into the error:

Job for ccpd.service failed. See "systemctl statuc ccpd.service" and "journalctl -xn for details"

. Both systemctl status ccpd service & journalctl -xn report:

Failed to start SVSV: Start Canon Printer Daemon for CUPS

In /var/log/cups/error_log there are lines:

Unable to bind socket for address [v1.::1]:631 - Cannot assign requested address.


[cups driverd] Bad driver information file "/usr/share/cups/drv/sample.drv"
There was a suggestion, if lp0 is missing, then allow usblp loading with commenting line *blacklist usblp* in some file in */etc/modprobe.d* but there are no files containing such a line.
How is it possible to fix this issue?

New */etc/init.d/ccpd* content:

startup script for Canon Printer Daemon for CUPS (ccpd)

BEGIN INIT INFO

Provides: ccpd

Required-Start: $local_fs $remote_fs $syslog $network $named

Should-Start: $ALL

Required-Stop: $syslog $remote_fs

Default-Start: 2 3

Default-Stop: 0 1 4 5 6

Description: Start Canon Printer Daemon for CUPS

END INIT INFO

DAEMON=/usr/sbin/ccpd
LOCKFILE=/var/lock/subsys/ccpd
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
NAME=ccpd
DESC=“Canon Printer Daemon for CUPS”

test -f $DAEMON || exit 0

. /lib/lsb/init-functions

case $1 in
start)
log_begin_msg “Starting $DESC: $NAME”
start-stop-daemon --start --quiet --exec $DAEMON
log_end_msg $?
;;
stop)
log_begin_msg “Stopping $DESC: $NAME”
start-stop-daemon --stop --quiet --oknodo --exec $DAEMON
log_end_msg $?
;;
status)
echo “$DESC: $NAME:” pidof $NAME
;;
restart)
log_begin_msg “Restarting $DESC: $NAME”
start-stop-daemon --stop --quiet --oknodo --exec $DAEMON
sleep 1
start-stop-daemon --start --quiet --exec $DAEMON
log_end_msg $?
;;
*)
echo “Usage: ccpd {start|stop|restart|status}”
exit 1
;;
esac

exit 0

Failed to start SVSV: Start Canon Printer Daemon for CUPS

It’s not obvious to me why the ccpd daemon fails to start. I don’t own Canon hardware, but I do happen to have ‘cndrvcups-capt-2.60-1.x86_64’ and ‘cndrvcups-common-2.60-1.x86_64’ installed from way back when I last helped a user with getting a Canon printer configured. I don’t have any such issue with starting it (using openSUSE 13.1)

For reference, I have

#!/bin/sh
# startup script for Canon Printer Daemon for CUPS (ccpd)

if  -f /etc/rc.d/init.d/functions ]; then
        if  -f /etc/slackware-version ]; then
                SYS_F="SL"
        else
                . /etc/rc.d/init.d/functions 
                SYS_F="RH"
        fi
elif  -x /sbin/startproc ]; then
        SYS_F="Su"
elif  -x /sbin/start-stop-daemon ]; then
        SYS_F="De"
fi

DAEMON=/usr/sbin/ccpd
LOCKFILE=/var/lock/subsys/ccpd

export PATH=$PATH:/usr/local/sbin:/usr/local/bin

ccpd_start ()
{
        echo -n "Starting ${DAEMON}: "

        if  "$SYS_F" = "RH" ]; then
                daemon ${DAEMON}
                 "$?" = "0" ] && touch ${LOCKFILE}
                echo "."
        elif  "$SYS_F" = "Su" ]; then
                startproc ${DAEMON}
                echo "."
        elif  "$SYS_F" = "De" ]; then
                start-stop-daemon --start --quiet --oknodo --exec ${DAEMON}
                echo "."
        else
                `${DAEMON}`
        fi
}

ccpd_stop ()
{
        echo -n "Shutting down ${DAEMON}: "

        if  "$SYS_F" = "De" ]; then
                start-stop-daemon --stop --quiet --oknodo --signal 15 --exec ${DAEMON}
                echo "."
        elif  "$SYS_F" = "SL" ]; then
                kill -KILL `pidof ${DAEMON}`
                 "$?" = "0" ] && rm -f ${LOCKFILE}
                echo 
        else
                killproc ${DAEMON}
                 "$?" = "0" ] && rm -f ${LOCKFILE}
                echo
        fi
}


case $1 in

        start)
                ccpd_start
                ;;

        stop)
                ccpd_stop
                ;;

        status)
                echo "${DAEMON}:" `pidof ${DAEMON}`
                ;;

        restart)
                ccpd_stop
                ccpd_start
                ;;

        *)
                echo "Usage: ccpd {start|stop|status}"
                exit 1
                ;;
esac
exit 0

There was a suggestion, if lp0 is missing, then allow usblp loading with commenting line blacklist usblp in some file in /etc/modprobe.d but there are no files containing such a line.
How is it possible to fix this issue?

You can load usblp at boot. Refer

man modules-load.d

Replaced my ccpd with yours. Restarting gives

Starting /usr/bin.ccpd: .

Is that a correct reply? YaST tells, that printing is turned off.

It’s a pity, there’s no man page for modules-load.d in my system, though I’ll google of course.

Did you make sure CUPS is runnning?

systemctl status cups.service
systemctl start cups.service

It’s a pity, there’s no man page for modules-load.d in my system, though I’ll google of course.

Which version of openSUSE you’re using?

It should be sufficient to create /etc/modules-load.d/usblp.conf with the following

# Load usblp at boot
usblp

It will take effect next boot.

The following guide may be helpful too
https://wiki.archlinux.org/index.php/Canon_CAPT

*You can check if ccpd is running with ‘ps -A|grep ccpd’ or ‘/etc/init.d/ccpd status’ or use systemd commands

systemctl start ccpd
systemctl status ccpd

Further to this, you can create a proper systemd service by creating a service unit file /etc/systemd/system/ccpd.service containing the following


[Unit]
Description=Canon CAPT daemon
Requires=cups.service
After=cups.service

[Service]
Type=forking
ExecStart=/usr/sbin/ccpd

[Install]
WantedBy=printer.target

Then do

systemctl enable ccpd.service
systemctl start ccpd.service

Check status with

systemctl status ccpd.service

Correction: For openSUSE replace ‘printer.target’ with ‘multi-user.target’ like this


[Unit]
Description=Canon CAPT daemon
Requires=cups.service
After=cups.service

[Service]
Type=forking
ExecStart=/usr/sbin/ccpd

[Install]
WantedBy=multi-user.target

I have openSUSE 13.2 x64.

cups starts automatically, ccpd needs manual starting. But both them became active (running) (checked via systemctl status).

I created /etc/modules-load.d/usblp.conf and /etc/systemd/system/ccpd.service according to your suggestions, rebooted and made sure that cups and ccpd were running. Then I checked printer’s settings in YaST and set the checkbox “Is turned on”. Then the button “Print testing page” became available. I tried it … and nothing happened.

/var/log/cups/error_log reports:

E [23/May/2015:19:24:22 +0300] Unable to bind socket for address [v1.::1]:631 - Cannot assign requested address.
E [23/May/2015:19:29:48 +0300] [cups-driverd] Bad driver information file "/usr/share/cups/drv/sample.drv"!

The next step is determine if /dev/usb/lp0 exists, since that is how you have it configured currently. (BTW, that configuration parameters are kept in /etc/ccpd.conf)

When you connect the printer, examine the output from

journalctl -k

Does the device node exist?

ls -l /dev/usb/lp*

I just noticed in your opening post that you create the printer queue with

sudo /usr/sbin/lpadmin -p LBP3010 -m CNCUPSLBP3050CAPTK.ppd -v ccp://localhost:59687 -E

but then do

sudo /usr/sbin/ccpdadmin -p LBP1120 -o /dev/usb/lp0

The last line should have been

sudo /usr/sbin/ccpdadmin -p LBP3010 -o /dev/usb/lp0

Check /etc/ccpd.conf for a valid configuration. It should contain something like

<Printer LBP3010>
DevicePath /dev/usb/lp0
</Printer>

<Ports>
# Status monitoring socket port.
#  Default 59787
UI_Port  59787
PDATA_Port  59687
</Ports>

No, /dev/usb directory doesn’t exist.

About the queue: I’ve made a mistake when posting here. In terminal command I used correct printer model (LBP3010). ccpd.conf contains exact what you’ve mentioned in your last post.

It would be useful for you to post output from commands requested. I specifically want to see what kernel output is generated when the printer is first plugged in. There should be output like the following from ‘dmesg|tail’ or journalctl -k’

[14450.290739] usblp 2-1.2:1.0: usblp0: USB Bidirectional printer dev 3 if 0 alt 1 proto 2 vid.......

If not, that is where the problem is.

dmesg|tail:

[16039.588086] usb 3-1: device descriptor read/64, error -71
[16039.812056] usb 3-1: device descriptor read/64, error -71
[16040.028122] usb 3-1: new full-speed USB device number 8 using uhci_hcd
[16040.148083] usb 3-1: device descriptor read/64, error -71
[16040.372040] usb 3-1: device descriptor read/64, error -71
[16040.588063] usb 3-1: new full-speed USB device number 9 using uhci_hcd
[16040.996039] usb 3-1: device not accepting address 9, error -71
[16041.108062] usb 3-1: new full-speed USB device number 10 using uhci_hcd
[16041.516044] usb 3-1: device not accepting address 10, error -71
[16041.516103] usb usb3-port1: unable to enumerate USB device

journalctl -k outputs too much, but the onliest line, where usblp is mentioned, is

desktop kernel: usbcore: registered new interface driver usblp

Maybe to much USB-Devices are plugged in? Did you try a USB-Hub with extern power?

[16039.588086] usb 3-1: device descriptor read/64, error -71

https://paulphilippov.com/articles/how-to-fix-device-not-accepting-address-error

Try a USB2 port

[16039.588086] usb 3-1: device descriptor read/64, error -71
[16039.812056] usb 3-1: device descriptor read/64, error -71
[16040.028122] usb 3-1: new full-speed USB device number 8 using uhci_hcd
[16040.148083] usb 3-1: device descriptor read/64, error -71
[16040.372040] usb 3-1: device descriptor read/64, error -71
[16040.588063] usb 3-1: new full-speed USB device number 9 using uhci_hcd
[16040.996039] usb 3-1: device not accepting address 9, error -71
[16041.108062] usb 3-1: new full-speed USB device number 10 using uhci_hcd
[16041.516044] usb 3-1: device not accepting address 10, error -71
[16041.516103] usb usb3-port1: unable to enumerate USB device

Okay, the above indicates a problem with device recognition. I don’t know the cause, but it might depend on the number of devices concurrently plugged in. Are you connected via a passive hub perhaps? Remove all USB devices except for the printer, and also try changing ports.

https://paulphilippov.com/articles/how-to-fix-device-not-accepting-address-error

…and as gogalthorp recommend, try connecting to a USB 2.0 port. The printer uses USB 2.0, so this could well be impacting here.

OK, I unplugged all USB-devices except keyboard an printer, changed USB-port for the printer and rebooted.
When printer is turned off, dmesg|tail outputs:

    8.721168] input: HDA VIA VT82xx Line Out as /devices/pci0000:00/0000:00:13.0/0000:80:01.0/sound/card0/input12
   10.601676] EXT4-fs (sda6): warning: maximal mount count reached, running e2fsck is recommended
   10.642642] EXT4-fs (sda6): mounted filesystem with ordered data mode. Opts: (null)
   10.779268] Adding 2497532k swap on /dev/sda5.  Priority:-1 extents:1 across:2497532k FS
   11.435843] cfg80211: Calling CRDA to update world regulatory domain
   12.080897] atl1 0000:04:00.0: Unable to enable MSI: -22
   12.081010] atl1 0000:04:00.0: enp4s0 link is up 100 Mbps full duplex
   12.110078] atl1 0000:04:00.0: Unable to enable MSI: -22
   12.110127] atl1 0000:04:00.0: enp4s0 link is up 100 Mbps full duplex
   12.162225] NET: Registered protocol family 17

But after starting ccpd and turning the printer on:

  454.392039] usb 2-1: device descriptor read/64, error -71
  454.620056] usb 2-1: device descriptor read/64, error -71
  454.836034] usb 2-1: new full-speed USB device number 3 using uhci_hcd
  454.960037] usb 2-1: device descriptor read/64, error -71
  455.188077] usb 2-1: device descriptor read/64, error -71
  455.404036] usb 2-1: new full-speed USB device number 4 using uhci_hcd
  455.820024] usb 2-1: device not accepting address 4, error -71
  455.932048] usb 2-1: new full-speed USB device number 5 using uhci_hcd
  456.348064] usb 2-1: device not accepting address 5, error -71
  456.348120] usb usb2-port1: unable to enumerate USB device

The output with the printer turned off doesn’t help resolve this. The full-speed interface description is worrying, since the LBP3010 has a USB 2.0 high-speed interface according the specs. So, I guess your USB hardware (host controller) is only full-speed capable? While this shouldn’t cause any issues in itself, the descriptor errors are symptomatic of a communication issue here.

Running the following might tell us more about your USB controller hardware

usb-devices

or even better

/usr/sbin/hwinfo --usb

Something that might be worth a go. With the printer attached. Try

systemctl restart ccpd

and check if that helps with connectivity. I’ve seen references (including the page I linked to below) to using a udev rule to starting ccpd only when a Canon printer is attached.

I found a similar USB descriptor error reported here with regards to a Canon LBP7010 printer

http://ubuntuforums.org/showthread.php?t=2135549

I share it here, so that you can check the steps that were taken there in case that helps.