无法使用 Ubuntu 20.04 和 Xpress M2022 进行打印

无法使用 Ubuntu 20.04 和 Xpress M2022 进行打印

我最近安装了 Ubuntu 20.04,并且有一台三星 Xpress M2022 打印机。但它似乎不起作用。我从互联网上下载了 ppd 文件,但也没有用。然后我尝试了不同的方法通过在线搜索进行调试,但似乎没有任何效果。我不确定如何找到问题以及如何找到此错误日志。

这样做sudo journalctl -b 0 -u cups会给我这个输出:

-- Logs begin at Mon 2020-08-10 15:38:06 BST, end at Thu 2020-10-15 20:33:12 BST. --
Oct 15 09:42:59 bishal-Latitude-7300 systemd[1]: Started CUPS Scheduler.
Oct 15 11:52:00 bishal-Latitude-7300 /hpfax[11995]: [11995]: error: Failed to create /var/spool/cups/tmp/.hplip
Oct 15 20:30:28 bishal-Latitude-7300 cupsd[949]: pam_unix(cups:auth): Couldn't open /etc/securetty: No such file or directory
Oct 15 20:30:28 bishal-Latitude-7300 cupsd[949]: pam_unix(cups:auth): Couldn't open /etc/securetty: No such file or directory
Oct 15 20:30:39 bishal-Latitude-7300 cupsd[949]: pam_unix(cups:auth): Couldn't open /etc/securetty: No such file or directory
Oct 15 20:30:39 bishal-Latitude-7300 cupsd[949]: pam_unix(cups:auth): Couldn't open /etc/securetty: No such file or directory
Oct 15 20:30:40 bishal-Latitude-7300 cupsd[949]: pam_unix(cups:auth): Couldn't open /etc/securetty: No such file or directory
Oct 15 20:30:40 bishal-Latitude-7300 cupsd[949]: pam_unix(cups:auth): Couldn't open /etc/securetty: No such file or directory
Oct 15 20:30:45 bishal-Latitude-7300 cupsd[949]: pam_unix(cups:auth): Couldn't open /etc/securetty: No such file or directory
Oct 15 20:30:45 bishal-Latitude-7300 cupsd[949]: pam_unix(cups:auth): Couldn't open /etc/securetty: No such file or directory
Oct 15 20:30:47 bishal-Latitude-7300 cupsd[949]: pam_unix(cups:auth): Couldn't open /etc/securetty: No such file or directory
Oct 15 20:30:47 bishal-Latitude-7300 cupsd[949]: pam_unix(cups:auth): Couldn't open /etc/securetty: No such file or directory
Oct 15 20:30:52 bishal-Latitude-7300 cupsd[949]: pam_unix(cups:auth): Couldn't open /etc/securetty: No such file or directory
Oct 15 20:30:52 bishal-Latitude-7300 cupsd[949]: pam_unix(cups:auth): Couldn't open /etc/securetty: No such file or directory
Oct 15 20:30:53 bishal-Latitude-7300 cupsd[949]: pam_unix(cups:auth): Couldn't open /etc/securetty: No such file or directory
Oct 15 20:30:53 bishal-Latitude-7300 cupsd[949]: pam_unix(cups:auth): Couldn't open /etc/securetty: No such file or directory

奇怪的是,尽管我的打印机是三星的,但它与 HP 有关系。

编辑:

我按照此处的说明使用我的 USB 打印机:https://wiki.ubuntu.com/DebuggingPrintingProblems

输出tail -f /var/log/syslog

Oct 15 11:52:40 bishal-Latitude-7300 kernel: [ 7789.814880] usb 1-3: SerialNumber: ZFCDB8GG3D0006B
Oct 15 11:52:40 bishal-Latitude-7300 kernel: [ 7789.819788] usblp 1-3:1.0: usblp1: USB Bidirectional printer dev 11 if 0 alt 0 proto 2 vid 0x04E8 pid 0x3321
Oct 15 11:52:40 bishal-Latitude-7300 systemd[1]: Started Configure Plugged-In Printer.
Oct 15 11:52:40 bishal-Latitude-7300 udev-configure-printer: add usb-001-011
Oct 15 11:52:40 bishal-Latitude-7300 udev-configure-printer: device devpath is /devices/pci0000:00/0000:00:14.0/usb1/1-3
Oct 15 11:52:40 bishal-Latitude-7300 udev-configure-printer: Device already handled
Oct 15 11:52:40 bishal-Latitude-7300 systemd[1]: [email protected]: Main process exited, code=exited, status=1/FAILURE
Oct 15 11:52:40 bishal-Latitude-7300 systemd[1]: [email protected]: Failed with result 'exit-code'.
Oct 15 11:53:07 bishal-Latitude-7300 kernel: [ 7817.391676] usb 1-3: USB disconnect, device number 11
Oct 15 11:53:07 bishal-Latitude-7300 kernel: [ 7817.392059] usblp1: removed
Oct 15 11:53:35 bishal-Latitude-7300 kernel: [ 7845.614988] usb 1-3: new high-speed USB device number 12 using xhci_hcd
Oct 15 11:53:36 bishal-Latitude-7300 kernel: [ 7845.767530] usb 1-3: New USB device found, idVendor=04e8, idProduct=3321, bcdDevice= 1.00
Oct 15 11:53:36 bishal-Latitude-7300 kernel: [ 7845.767533] usb 1-3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Oct 15 11:53:36 bishal-Latitude-7300 kernel: [ 7845.767534] usb 1-3: Product: M2020 Series
Oct 15 11:53:36 bishal-Latitude-7300 kernel: [ 7845.767536] usb 1-3: Manufacturer: Samsung Electronics Co., Ltd.
Oct 15 11:53:36 bishal-Latitude-7300 kernel: [ 7845.767537] usb 1-3: SerialNumber: ZFCDB8GG3D0006B
Oct 15 11:53:36 bishal-Latitude-7300 kernel: [ 7845.772577] usblp 1-3:1.0: usblp1: USB Bidirectional printer dev 12 if 0 alt 0 proto 2 vid 0x04E8 pid 0x3321
Oct 15 11:53:36 bishal-Latitude-7300 systemd[1]: Started Configure Plugged-In Printer.
Oct 15 11:53:36 bishal-Latitude-7300 udev-configure-printer: add usb-001-012
Oct 15 11:53:36 bishal-Latitude-7300 udev-configure-printer: device devpath is /devices/pci0000:00/0000:00:14.0/usb1/1-3
Oct 15 11:53:36 bishal-Latitude-7300 udev-configure-printer: Device already handled
Oct 15 11:53:36 bishal-Latitude-7300 systemd[1]: [email protected]: Main process exited, code=exited, status=1/FAILURE
Oct 15 11:53:36 bishal-Latitude-7300 systemd[1]: [email protected]: Failed with result 'exit-code'.
^C

输出lsusb

Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 007: ID 0a5c:5843 Broadcom Corp. 58200
Bus 001 Device 006: ID 0bda:585b Realtek Semiconductor Corp. Integrated_Webcam_HD
Bus 001 Device 012: ID 04e8:3321 Samsung Electronics Co., Ltd M2020 Series
Bus 001 Device 003: ID 062a:4101 MosArt Semiconductor Corp. Wireless Keyboard/Mouse
Bus 001 Device 008: ID 0cf3:e007 Qualcomm Atheros Communications 
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

输出ls -l /dev/usb/lp* /dev/bus/usb/*/*

crw-rw-r-- 1 root root 189,   0 Oct 15 09:42 /dev/bus/usb/001/001
crw-rw-r-- 1 root root 189,   2 Oct 15 09:42 /dev/bus/usb/001/003
crw-rw-r-- 1 root root 189,   5 Oct 15 09:42 /dev/bus/usb/001/006
crw-rw-r-- 1 root root 189,   6 Oct 15 09:42 /dev/bus/usb/001/007
crw-rw-r-- 1 root root 189,   7 Oct 15 09:42 /dev/bus/usb/001/008
crw-rw-r-- 1 root lp   189,  11 Oct 15 11:54 /dev/bus/usb/001/012
crw-rw-r-- 1 root root 189, 128 Oct 15 09:42 /dev/bus/usb/002/001
crw-rw-r-- 1 root root 189, 256 Oct 15 09:42 /dev/bus/usb/003/001
crw-rw-r-- 1 root root 189, 384 Oct 15 09:42 /dev/bus/usb/004/001
crw-rw---- 1 root lp   180,   1 Oct 15 11:54 /dev/usb/lp1

输出sudo usb_printerid /dev/usb/lp1

GET_DEVICE_ID string:
MFG:Samsung;CMD:SPL,URF,FWV,PIC,EXT,DCU;MDL:M2020 Series;CLS:PRINTER;CID:SA_SPLV3_BW;MODE:SPL3,R000105;STATUS:BUSY;

输出lpinfo -v

file cups-brf:/
direct hp
network http
network lpd
network ipp
network https
network beh
direct usb://Samsung/M2020%20Series?serial=ZFCDB8GG3D0006B
network socket
network ipps
direct hpfax

输出lsusb -v | grep -A 3 bInterfaceClass.*7

Couldn't open device, some information will be missing
Couldn't open device, some information will be missing
Couldn't open device, some information will be missing
Couldn't open device, some information will be missing
Couldn't open device, some information will be missing
Couldn't open device, some information will be missing
Couldn't open device, some information will be missing
      bInterfaceClass         7 Printer
      bInterfaceSubClass      1 Printer
      bInterfaceProtocol      2 Bidirectional
      iInterface              0 
Couldn't open device, some information will be missing
Couldn't open device, some information will be missing

输出至ls -l /usr/lib/cups/filter/rastertospl

-rwxr-xr-x 1 root root 92384 Sep 20 21:41 /usr/lib/cups/filter/rastertospl

答案1

我没有 M2022,但我有 M2070W,我认为您应该能够使用从 HP 支持网站下载的官方安装程序 V1.00.39_01:17(HP - 这不是错误)。您应该尝试下载并解压 tar.gz 文件,进入解压后的目录并运行 install.sh(我不知道这是否有必要,但我以 root 用户身份执行了此操作)。然后我转到 CUPS localhost:631,删除自动安装的打印机,然后使用列表中的第一个驱动程序再次添加它。我可以通过 USB 和无线以及扫描仪添加它。如果您尝试这种方式,请写下它是否适合您。顺便说一句,我认为三星的打印机部门在此期间被 HP 收购,现在您应该使用 HP 网站上的 Ubuntu 驱动程序。

答案2

该打印机的 URI 已指定为

usb://Samsung/M2020%20Series?serial=ZFCDB8GG3D0006B

用户在系统上的某个位置有一个 PPD,该 PPD 已被指示为正确的 PPD。PPD 的位置未知(但如果有必要,我们可以找到它)。rastertospl 过滤器也在系统上。此命令设置打印队列:

lpadmin -p 2022 -v URI -E -P /路径/到.PPD

代替为了URI然后用

lp -d 2022 /etc/nsswitch.conf

相关内容