我最近购买了一台 Canon I-SENSYS LBP7010C 打印机,但在让它在我的 Linux Mint 17 系统上运行时遇到问题。我成功地从佳能网站安装了驱动程序,但是当我尝试打印某些内容时,它卡在“将数据发送到打印机”上。
司机
这是我从佳能网站安装的驱动程序。它被称为适用于 Linux 版本 2.70 的 CAPT 打印机驱动程序(64 位)。
遵循 Ubuntu 的调试打印问题
打印机已连接并打开电源。
打开终端/控制台并检查 USB 内核模块是否已加载
$ lsmod | grep usb
usblp 22891 0
usbhid 52659 0
hid 106148 2 hid_generic,usbhid
从计算机上拔下 USB 打印机电缆并输入以下命令:
$ tail -f /var/log/syslog
重新连接 USB 打印机电缆,您应该会看到出现一些消息。
Mar 30 14:55:09 mm-desktop kernel: [ 506.224058] usb 1-8: new high-speed USB device number 5 using ehci-pci
Mar 30 14:55:09 mm-desktop kernel: [ 506.361176] usb 1-8: New USB device found, idVendor=04a9, idProduct=271c
Mar 30 14:55:09 mm-desktop kernel: [ 506.361182] usb 1-8: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Mar 30 14:55:09 mm-desktop kernel: [ 506.361186] usb 1-8: Product: Canon CAPT USB Device
Mar 30 14:55:09 mm-desktop kernel: [ 506.361189] usb 1-8: Manufacturer: Canon
Mar 30 14:55:09 mm-desktop kernel: [ 506.361192] usb 1-8: SerialNumber: 0000A2F0Q78n
Mar 30 14:55:09 mm-desktop kernel: [ 506.362903] usblp 1-8:1.0: usblp1: USB Bidirectional printer dev 5 if 0 alt 0 proto 2 vid 0x04A9 pid 0x271C
Mar 30 14:55:09 mm-desktop mtp-probe: checking bus 1, device 5: "/sys/devices/pci0000:00/0000:00:1d.7/usb1/1-8"
Mar 30 14:55:09 mm-desktop mtp-probe: bus: 1, device: 5 was not an MTP device
Mar 30 14:55:09 mm-desktop udev-configure-printer: add /devices/pci0000:00/0000:00:1d.7/usb1/1-8
Mar 30 14:55:09 mm-desktop udev-configure-printer: device devpath is /devices/pci0000:00/0000:00:1d.7/usb1/1-8
Mar 30 14:55:09 mm-desktop udev-configure-printer: MFG:Canon MDL:LBP7010C/7018C SERN:- serial:0000A2F0Q78n
Mar 30 14:55:10 mm-desktop kernel: [ 507.492381] usblp1: removed
Mar 30 14:55:10 mm-desktop kernel: [ 507.496039] usblp 1-8:1.0: usblp1: USB Bidirectional printer dev 5 if 0 alt 0 proto 2 vid 0x04A9 pid 0x271C
Mar 30 14:55:10 mm-desktop hp[13602]: io/hpmud/pp.c 627: unable to read device-id ret=-1
Mar 30 14:55:10 mm-desktop python: io/hpmud/pp.c 627: unable to read device-id ret=-1
Mar 30 14:55:10 mm-desktop udev-configure-printer: URI contains USB serial number
Mar 30 14:55:10 mm-desktop udev-configure-printer: URI match: usb://Canon/LBP7010C/7018C?serial=0000A2F0Q78n
Mar 30 14:55:10 mm-desktop udev-configure-printer: URI of detected printer: usb://Canon/LBP7010C/7018C?serial=0000A2F0Q78n, normalized: canon lbp7010c 7018c serial 0000a2f0q78n
Mar 30 14:55:10 mm-desktop udev-configure-printer: URI of print queue: ccp://localhost:59787, normalized: ccp localhost 59787
Mar 30 14:55:10 mm-desktop udev-configure-printer: URI of print queue: usb://Canon/LBP7010C/7018C?serial=0000A2F0Q78n, normalized: canon lbp7010c 7018c serial 0000a2f0q78n
Mar 30 14:55:10 mm-desktop udev-configure-printer: Queue ipp://localhost:631/printers/LBP7010C-7018C has matching device URI
正如您在输出中看到的,我为此打印机添加了两个不同的 CUPS 条目。添加一项是因为 CUPS 自动检测到打印机,另一项是通过中列出的步骤添加的佳能CaptDrv190。
检查 USB 子系统是否正确检测到打印机,并确定其 USB 供应商/产品 ID 以及 USB 总线和设备地址:
$ lsusb
Bus 001 Device 006: ID 04a9:271c Canon, Inc.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 002: ID 0603:00f2 Novatek Microelectronics Corp. Keyboard (Labtec Ultra Flat Keyboard)
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 002: ID 046d:c05a Logitech, Inc. M90/M100 Optical Mouse
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
检查打印机的设备文件是否已正确创建以及所有权(“root lp”)和权限(非 HP:“crw-rw-r--”,HP:“crw-rw-r--+”)放:
$ ls -l /dev/usb/lp* /dev/bus/usb/*/*
crw-rw-r-- 1 root root 189, 0 mar 30 14:46 /dev/bus/usb/001/001
crw-rw-r-- 1 root lp 189, 5 mar 30 14:57 /dev/bus/usb/001/006
crw-rw-r-- 1 root root 189, 128 mar 30 14:46 /dev/bus/usb/002/001
crw-rw-r-- 1 root root 189, 129 mar 30 14:46 /dev/bus/usb/002/002
crw-rw-r-- 1 root root 189, 256 mar 30 14:46 /dev/bus/usb/003/001
crw-rw-r-- 1 root root 189, 257 mar 30 14:46 /dev/bus/usb/003/002
crw-rw-r-- 1 root root 189, 384 mar 30 14:46 /dev/bus/usb/004/001
crw-rw-r-- 1 root root 189, 512 mar 30 14:46 /dev/bus/usb/005/001
crw-rw---- 1 root lp 180, 1 mar 30 14:57 /dev/usb/lp1
这里似乎有一个我以前没有看到的问题。/dev/usb/lp1
实际上缺少其他人的读取权限。
确定打印机的设备 ID 字符串:
$ sudo usb_printerid /dev/usb/lp1
GET_DEVICE_ID string:
MFG:Canon;MDL:LBP7010C/7018C;CMD:CAPT;VER:3.0;CLS:PRINTER;DES:Canon LBP7010C/7018C
查看 CUPS 是否检测到您的打印机:
$ lpinfo -v
network ipp14
direct usb://Canon/LBP7010C/7018C?serial=0000A2F0Q78n
direct ccp
network lpd
network http
network ipp
network https
network socket
serial serial:/dev/ttyS0?baud=115200
network ipps
network smb
direct parallel:/dev/lp0
系统日志
接下来是我的系统日志,记录插入并打开打印机、通过系统配置打印机添加打印机,然后在出现提示时尝试打印测试页的过程。
Mar 23 15:29:39 mm-desktop kernel: [ 4318.648033] usb 1-8: new high-speed USB device number 9 using ehci-pci
Mar 23 15:29:39 mm-desktop kernel: [ 4318.783740] usb 1-8: New USB device found, idVendor=04a9, idProduct=271c
Mar 23 15:29:39 mm-desktop kernel: [ 4318.783746] usb 1-8: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Mar 23 15:29:39 mm-desktop kernel: [ 4318.783749] usb 1-8: Product: Canon CAPT USB Device
Mar 23 15:29:39 mm-desktop kernel: [ 4318.783753] usb 1-8: Manufacturer: Canon
Mar 23 15:29:39 mm-desktop kernel: [ 4318.783756] usb 1-8: SerialNumber: 0000A2F0Q78n
Mar 23 15:29:39 mm-desktop kernel: [ 4318.785433] usblp 1-8:1.0: usblp1: USB Bidirectional printer dev 9 if 0 alt 0 proto 2 vid 0x04A9 pid 0x271C
Mar 23 15:29:39 mm-desktop mtp-probe: checking bus 1, device 9: "/sys/devices/pci0000:00/0000:00:1d.7/usb1/1-8"
Mar 23 15:29:39 mm-desktop mtp-probe: bus: 1, device: 9 was not an MTP device
Mar 23 15:29:39 mm-desktop udev-configure-printer: add /devices/pci0000:00/0000:00:1d.7/usb1/1-8
Mar 23 15:29:39 mm-desktop udev-configure-printer: device devpath is /devices/pci0000:00/0000:00:1d.7/usb1/1-8
Mar 23 15:29:39 mm-desktop udev-configure-printer: MFG:Canon MDL:LBP7010C/7018C SERN:- serial:0000A2F0Q78n
Mar 23 15:29:40 mm-desktop kernel: [ 4319.829770] usblp1: removed
Mar 23 15:29:40 mm-desktop kernel: [ 4319.832654] usblp 1-8:1.0: usblp1: USB Bidirectional printer dev 9 if 0 alt 0 proto 2 vid 0x04A9 pid 0x271C
Mar 23 15:29:40 mm-desktop hp[3477]: io/hpmud/pp.c 627: unable to read device-id ret=-1
Mar 23 15:29:40 mm-desktop python: io/hpmud/pp.c 627: unable to read device-id ret=-1
Mar 23 15:29:40 mm-desktop udev-configure-printer: no corresponding CUPS device found
Mar 23 15:30:13 mm-desktop dbus[520]: [system] Activating service name='org.freedesktop.hostname1' (using servicehelper)
Mar 23 15:30:13 mm-desktop dbus[520]: [system] Successfully activated service 'org.freedesktop.hostname1'
Mar 23 15:30:13 mm-desktop kernel: [ 4352.312742] systemd-hostnamed[3500]: Warning: nss-myhostname is not installed. Changing the local hostname might make it unresolveable. Please install nss-myhostname!
Mar 23 15:30:18 mm-desktop dbus[520]: [system] Activating service name='org.opensuse.CupsPkHelper.Mechanism' (using servicehelper)
Mar 23 15:30:18 mm-desktop dbus[520]: [system] Successfully activated service 'org.opensuse.CupsPkHelper.Mechanism'
Mar 23 15:30:18 mm-desktop kernel: [ 4357.479407] usblp1: removed
Mar 23 15:30:18 mm-desktop kernel: [ 4357.490463] usblp 1-8:1.0: usblp1: USB Bidirectional printer dev 9 if 0 alt 0 proto 2 vid 0x04A9 pid 0x271C
Mar 23 15:30:18 mm-desktop hp[3524]: io/hpmud/pp.c 627: unable to read device-id ret=-1
Mar 23 15:30:18 mm-desktop python: io/hpmud/pp.c 627: unable to read device-id ret=-1
Mar 23 15:30:43 mm-desktop colord: Profile added: Canon-LBP7010C-7018C-Gray..
Mar 23 15:30:43 mm-desktop colord: Profile added: Canon-LBP7010C-7018C-RGB..
Mar 23 15:30:43 mm-desktop colord: Device added: cups-Canon-LBP7010C-7018C
Mar 23 15:30:47 mm-desktop kernel: [ 4386.398394] usblp1: removed
中没有消息/var/log/cups/error_log
。
我尝试过的事情
- 为我的 MacBook 安装驱动程序并让它正常工作。
- 重新启动打印机、计算机和cups 服务。
- 正在安装
printer-driver-cjet
。 - 将我自己添加到
lp
组中lpadmin
。 - 遵循 Ubuntu 指南佳能CaptDrv190。最值得注意的是,我再次添加了打印机
lpadmin
(见下文)并安装了损坏的依赖项captfilter
。这样做,我发现了一个新条目/dev/usb/lp1
(如上所示)。
更新:打印机通过lpadmin
使用我添加的新打印机,作业完成,但没有真正打印任何内容。运行时captstatusui -P LBP7010C
显示 UI 提示“通信错误”。
更新:/dev
条目
进行一些更改后,我发现了一个新条目:/dev/usb/lp1
。我尝试将其设置/dev/lp0
为 devpath ccpd.conf
。
# Canon Printer Daemon for CUPS Configuration Data
<Path>
# CUPS configuration file path.
# Default /etc/cups/
CUPS_ConfigPath /etc/cups/
# Log directory path.
# LogDirectoryPath /var/log/CCPD/
</Path>
<Printer LBP7010C>
DevicePath /dev/usb/lp0
</Printer>
<Ports>
# Status monitoring socket port.
# Default 59787
UI_Port 59787
PDATA_Port 59687
</Ports>
更新:打印!
我不知道我到底做了什么,但现在有时可以打印页面。至少在重新启动打印机后它可以工作,尽管打印的页面非常淡。我不知道这是什么原因,但以下佳能常见问题解答表明墨粉盒已用完。我不明白一台全新的打印机怎么会出现这种情况,但该列表上的其他内容似乎都不可信。