让 HP DeskJet 3700 与 Xubuntu 20.04 兼容

让 HP DeskJet 3700 与 Xubuntu 20.04 兼容

经过 2 小时的故障排除,我的打印机仍然无法工作。有趣的是,我想从 PDF 打印 2 页,打印第一页没有问题,但翻转纸张并按下第二页上的Ctrl+后P,事情完全崩溃了。我不敢相信在 2020 年打印一页需要费很大力气,所以无论付出什么代价,我都想打印那一页。

这是我的信息:

  • 操作系统:Xubuntu 20.04
  • $ uname -r5.4.0-42-generic
  • 打印机:HP DeskJet Ink Advantage 3785

hp-check尝试安装它无法找到的软件包。结果发现,14 个软件包中的大多数都已安装,但有些软件包apt没有候选包,有些软件包hp-check根本无法识别它们。

HP Linux Imaging and Printing System (ver. 3.20.3)
Dependency/Version Check Utility ver. 15.1

Copyright (c) 2001-18 HP Development Company, LP
This software comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to distribute it
under certain conditions. See COPYING file for more details.

Note: hp-check can be run in three modes:
1. Compile-time check mode (-c or --compile): Use this mode before compiling the HPLIP supplied tarball (.tar.gz or .run) to determine 
if the proper dependencies are installed to successfully compile HPLIP.                                                                
2. Run-time check mode (-r or --run): Use this mode to determine if a distro supplied package (.deb, .rpm, etc) or an already built    
HPLIP supplied tarball has the proper dependencies installed to successfully run.                                                      
3. Both compile- and run-time check mode (-b or --both) (Default): This mode will check both of the above cases (both compile- and     
run-time dependencies).                                                                                                                

Check types:                                                                                                                           
a. EXTERNALDEP - External Dependencies                                                                                                 
b. GENERALDEP - General Dependencies (required both at compile and run time)                                                           
c. COMPILEDEP - Compile time Dependencies                                                                                              
d. [All are run-time checks]                                                                                                           
PYEXT SCANCONF QUEUES PERMISSION                                                                                                       

Status Types:
    OK
    MISSING       - Missing Dependency or Permission or Plug-in
    INCOMPAT      - Incompatible dependency-version or Plugin-version

warning: ubuntu-20.04 version is not supported. Using ubuntu-19.10 versions dependencies to verify and install...

---------------
| SYSTEM INFO |
---------------

 Kernel: 5.4.0-42-generic #46-Ubuntu SMP Fri Jul 10 00:24:02 UTC 2020 GNU/Linux
 Host: asus
 Proc: 5.4.0-42-generic #46-Ubuntu SMP Fri Jul 10 00:24:02 UTC 2020 GNU/Linux
 Distribution: ubuntu 20.04
 Bitness: 64 bit


-----------------------
| HPLIP CONFIGURATION |
-----------------------

HPLIP-Version: HPLIP 3.20.3
HPLIP-Home: /usr/share/hplip
warning: HPLIP-Installation: Auto installation is not supported for ubuntu distro  20.04 version 

Current contents of '/etc/hp/hplip.conf' file:
# hplip.conf.  Generated from hplip.conf.in by configure.

[hplip]
version=3.20.3

[dirs]
home=/usr/share/hplip
run=/var/run
ppd=/usr/share/ppd/hplip/HP
ppdbase=/usr/share/ppd/hplip
doc=/usr/share/doc/hplip
html=/usr/share/doc/hplip-doc
icon=no
cupsbackend=/usr/lib/cups/backend
cupsfilter=/usr/lib/cups/filter
drv=/usr/share/cups/drv
bin=/usr/bin
apparmor=/etc/apparmor.d
# Following values are determined at configure time and cannot be changed.
[configure]
network-build=yes
libusb01-build=no
pp-build=no
gui-build=yes
scanner-build=yes
fax-build=yes
dbus-build=yes
cups11-build=no
doc-build=yes
shadow-build=no
hpijs-install=yes
foomatic-drv-install=yes
foomatic-ppd-install=no
foomatic-rip-hplip-install=no
hpcups-install=yes
cups-drv-install=yes
cups-ppd-install=no
internal-tag=3.20.3
restricted-build=no
ui-toolkit=qt5
qt3=no
qt4=no
qt5=yes
policy-kit=yes
lite-build=no
udev_sysfs_rules=no
hpcups-only-build=no
hpijs-only-build=no
apparmor_build=no
class-driver=no


Current contents of '/var/lib/hp/hplip.state' file:
Plugins are not installed. Could not access file: No such file or directory

Current contents of '~/.hplip/hplip.conf' file:
[commands]
scan = /usr/bin/simple-scan %SANE_URI%

[fax]
email_address = 
voice_phone = 

[installation]
date_time = 08/03/20 15:44:15
version = 3.20.3

[last_used]
device_uri = "hp:/usb/DeskJet_3700_series?serial=CN7C23D3X306H6"
printer_name = DeskJet_3700
working_dir = .

[polling]
device_list = 
enable = false
interval = 5

[refresh]
enable = false
rate = 30
type = 1

[settings]
systray_messages = 0
systray_visible = 0

[upgrade]
last_upgraded_time = 1596460943
notify_upgrade = false
pending_upgrade_time = 0


 <Package-name>        <Package-Desc>      <Required/Optional> <Min-Version> <Installed-Version> <Status>   <Comment>

-------------------------
| External Dependencies |
-------------------------

 error: cups          CUPS - Common Unix Printing System                           REQUIRED        1.1             -               INCOMPAT   'CUPS may not be installed or not running'
 gs                   GhostScript - PostScript and PDF language interpreter and previewer REQUIRED        7.05            9.50            OK         -
 xsane                xsane - Graphical scanner frontend for SANE                  OPTIONAL        0.9             0.999           OK         -
 scanimage            scanimage - Shell scanning program                           OPTIONAL        1.0             1.0.29          OK         -
 dbus                 DBus - Message bus system                                    REQUIRED        -               1.12.16         OK         -
 policykit            PolicyKit - Administrative policy framework                  OPTIONAL        -               0.105           OK         -
 network              network -wget                                                OPTIONAL        -               1.20.3          OK         -
 avahi-utils          avahi-utils                                                  OPTIONAL        -               0.7             OK         -

------------------------
| General Dependencies |
------------------------

 libjpeg              libjpeg - JPEG library                                       REQUIRED        -               -               OK         -
 cups-devel           CUPS devel- Common Unix Printing System development files    REQUIRED        -               -               OK         -
 cups-image           CUPS image - CUPS image development files                    REQUIRED        -               -               OK         -
 libpthread           libpthread - POSIX threads library                           REQUIRED        -               b'2.31'         OK         -
 libusb               libusb - USB library                                         REQUIRED        -               1.0             OK         -
 sane                 SANE - Scanning library                                      REQUIRED        -               -               OK         -
 sane-devel           SANE - Scanning library development files                    REQUIRED        -               -               OK         -
 libnetsnmp-devel     libnetsnmp-devel - SNMP networking library development files REQUIRED        5.0.9           5.8             OK         -
 libcrypto            libcrypto - OpenSSL cryptographic library                    REQUIRED        -               1.1.1           OK         -
 python3X             Python 2.2 or greater - Python programming language          REQUIRED        2.2             3.8.2           OK         -
 python3-notify2      Python libnotify - Python bindings for the libnotify Desktop notifications OPTIONAL        -               -               OK         -
 error: python3-pyqt4-dbus PyQt 4 DBus - DBus Support for PyQt4                         OPTIONAL        4.0             -               MISSING    'python3-pyqt4-dbus needs to be installed'
 error: python3-pyqt4 PyQt 4- Qt interface for Python (for Qt version 4.x)         REQUIRED        4.0             -               MISSING    'python3-pyqt4 needs to be installed'
 python3-dbus         Python DBus - Python bindings for DBus                       REQUIRED        0.80.0          1.2.16          OK         -
 python3-xml          Python XML libraries                                         REQUIRED        -               2.2.9           OK         -
 python3-devel        Python devel - Python development files                      REQUIRED        2.2             3.8.2           OK         -
 python3-pil          PIL - Python Imaging Library (required for commandline scanning with hp-scan) OPTIONAL        -               7.0.0           OK         -
 python3-reportlab    Reportlab - PDF library for Python                           OPTIONAL        2.0             3.5.34          OK         -

--------------
| COMPILEDEP |
--------------

 libtool              libtool - Library building support services                  REQUIRED        -               2.4.6           OK         -
 gcc                  gcc - GNU Project C and C++ Compiler                         REQUIRED        -               9.3.0           OK         -
 make                 make - GNU make utility to maintain groups of programs       REQUIRED        3.0             4.2.1           OK         -

---------------------
| Python Extentions |
---------------------

 cupsext              CUPS-Extension                                               REQUIRED        -               3.20.3          OK         -
 hpmudext             IO-Extension                                                 REQUIRED        -               3.20.3          OK         -

----------------------
| Scan Configuration |
----------------------

'/etc/sane.d/dll.d/hpaio' not found.
 hpaio                HPLIP-SANE-Backend                                           REQUIRED        -               3.20.3          OK         'hpaio found in /etc/sane.d/dll.conf'
 scanext              Scan-SANE-Extension                                          REQUIRED        -               3.20.3          OK         -

------------------------------
| DISCOVERED SCANNER DEVICES |
------------------------------

device `hpaio:/usb/DeskJet_3700_series?serial=CN7C23D3X306H6' is a Hewlett-Packard DeskJet_3700_series all-in-one


--------------------------
| DISCOVERED USB DEVICES |
--------------------------

  Device URI                                         Model                      
  -------------------------------------------------  ---------------------------
  hp:/usb/DeskJet_3700_series?serial=CN7C23D3X306H6  HP DeskJet 3700 series     

---------------------------------
| INSTALLED CUPS PRINTER QUEUES |
---------------------------------

 
DeskJet_3700
------------
Type: Printer
Device URI: hp:/usb/DeskJet_3700_series?serial=CN7C23D3X306H6
PPD: /etc/cups/ppd/DeskJet_3700.ppd
warning: Failed to read /etc/cups/ppd/DeskJet_3700.ppd ppd file
PPD Description: 
Printer status: printer DeskJet_3700 is idle.  enabled since Mon 03 Aug 2020 03:22:08 PM CEST
error: Unable to communicate with device (code=12): hp:/usb/DeskJet_3700_series?serial=CN7C23D3X306H6
error: Device not found
error: Communication status: Failed


--------------
| PERMISSION |
--------------

USB             DeskJet_3700                   Required        -        -        OK       Node:'/dev/bus/usb/003/005' Perm:'  root  lp rw- rw- rw- rw- r--'
 
-----------
| SUMMARY |
-----------

Missing Required Dependencies
-----------------------------
error: 'libcups2' package is missing/incompatible 
error: 'python3-pyqt4' package is missing/incompatible 
error: 'gtk2-engines-pixbuf' package is missing/incompatible 

Missing Optional Dependencies
-----------------------------
error: 'python3-dbus.mainloop.qt' package is missing/incompatible 

Total Errors: 4
Total Warnings: 0


Done.

我已经尝试过hp-setup,翻阅了设置,它报告说一切正常。在打印机我看到我的打印机上有一个绿色的复选标记。

打印机设置 1

但是当我想打印测试页时,它显示以下内容:

设备通讯错误

我也收到这样的通知:

打印机“HP-DeskJet-3700-series”可能未连接。

最后,当我尝试打印时,我看到打印机队列中有打印作业,但什么也没发生。打印机上没有闪烁的指示灯,没有错误代码,什么都没有。打印机就像什么都没发生一样。所有电缆都已连接,已打开,纸张已送入,门已打开,墨盒已装满墨水。

我如何让它打印第二页,为什么它能够打印第一页?

错误通知1

错误通知2

如果我删除打印机打印机,当我尝试打印页面时,我仍然会看到打印机,但描述中填充的信息是“获取打印机信息”,它永远不会结束。

打印对话框

输出lsmod | grep usb

usblp                  24576  0
intel_xhci_usb_role_switch    16384  0
roles                  16384  1 intel_xhci_usb_role_switch
usbhid  

/var/log/syslog当我重新连接 USB 时摘录:

Aug  3 16:09:23 asus ippusbxd: <-1586383104>Error: P 0x7fb29c004820: Printer has been disconnected
Aug  3 16:10:42 asus kernel: [ 5094.148607] usb 3-1: new high-speed USB device number 6 using xhci_hcd
Aug  3 16:10:42 asus kernel: [ 5094.365507] usb 3-1: New USB device found, idVendor=03f0, idProduct=0653, bcdDevice= 1.00
Aug  3 16:10:42 asus kernel: [ 5094.365526] usb 3-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Aug  3 16:10:42 asus kernel: [ 5094.365538] usb 3-1: Product: DeskJet 3700 series
Aug  3 16:10:42 asus kernel: [ 5094.365548] usb 3-1: Manufacturer: HP
Aug  3 16:10:42 asus kernel: [ 5094.365557] usb 3-1: SerialNumber: CN7C23D3X306H6
Aug  3 16:10:42 asus kernel: [ 5094.382254] usblp 3-1:1.1: usblp1: USB Bidirectional printer dev 6 if 1 alt 0 proto 2 vid 0x03F0 pid 0x0653
Aug  3 16:10:42 asus root: loading HP Device 003 006
Aug  3 16:10:42 asus python3: io/hpmud/musb.c 2189: [17817] hpmud_make_usb_uri() bus=003 dev=006
Aug  3 16:10:42 asus python3: io/hpmud/musb.c 2287: hpmud_make_usb_uri() uri=hp:/usb/DeskJet_3700_series?serial=CN7C23D3X306H6 bytes_read=49
Aug  3 16:10:43 asus systemd[1]: Starting Daemon to make IPP-over-USB printers available as network printers (003:006)...
Aug  3 16:10:43 asus kernel: [ 5095.204468] usb 3-1: usbfs: process 17835 (ippusbxd) did not claim interface 0 before use
Aug  3 16:10:43 asus kernel: [ 5095.212483] usblp1: removed
Aug  3 16:10:43 asus systemd[1]: Started Daemon to make IPP-over-USB printers available as network printers (003:006).
Aug  3 16:10:43 asus kernel: [ 5095.248847] audit: type=1400 audit(1596463843.153:53): apparmor="DENIED" operation="open" profile="ippusbxd" name="/etc/nsswitch.conf" pid=17854 comm="ippusbxd" requested_mask="r" denied_mask="r" fsuid=0 ouid=0
Aug  3 16:10:43 asus kernel: [ 5095.250529] TCP: request_sock_TCP: Possible SYN flooding on port 60000. Sending cookies.  Check SNMP counters.
Aug  3 16:10:43 asus kernel: [ 5095.250634] audit: type=1400 audit(1596463843.153:54): apparmor="DENIED" operation="open" profile="ippusbxd" name="/etc/nsswitch.conf" pid=17854 comm="ippusbxd" requested_mask="r" denied_mask="r" fsuid=0 ouid=0
Aug  3 16:10:43 asus kernel: [ 5095.250641] audit: type=1400 audit(1596463843.153:55): apparmor="DENIED" operation="open" profile="ippusbxd" name="/etc/passwd" pid=17854 comm="ippusbxd" requested_mask="r" denied_mask="r" fsuid=0 ouid=0
Aug  3 16:10:43 asus kernel: [ 5095.250647] audit: type=1400 audit(1596463843.153:56): apparmor="DENIED" operation="open" profile="ippusbxd" name="/etc/passwd" pid=17854 comm="ippusbxd" requested_mask="r" denied_mask="r" fsuid=0 ouid=0
Aug  3 16:10:43 asus kernel: [ 5095.250971] audit: type=1400 audit(1596463843.153:57): apparmor="DENIED" operation="open" profile="ippusbxd" name="/etc/passwd" pid=17854 comm="ippusbxd" requested_mask="r" denied_mask="r" fsuid=0 ouid=0
Aug  3 16:10:43 asus kernel: [ 5095.251011] audit: type=1400 audit(1596463843.153:58): apparmor="DENIED" operation="open" profile="ippusbxd" name="/etc/passwd" pid=17854 comm="ippusbxd" requested_mask="r" denied_mask="r" fsuid=0 ouid=0
Aug  3 16:10:49 asus colord-sane: io/hpmud/musb.c 2101: Invalid usb_open: Permission denied
^C

那个奇怪的“影子”打印机以下划线结尾,还有更多内容。如果我尝试删除它,它只会将自己重新添加到打印机

打印机设置 2

我也尝试过通过 HP 设备管理器进行打印。但无论哪种模式,加工待办的。没有打印。我只能打印“打印机信息页”,只需按下打印机上的按钮即可获得。

笔记我知道,真正的解决办法是扔掉打印机,买一台非惠普的产品。但我每年的打印需求不到 10 页。我会设定尽可能多的声誉点数作为赏金,只要赏金符合条件。如果您有任何想法,请发帖。我会尽量发布我能发布的任何信息。

答案1

这是 Apparmor 的一个严重问题!!几天前我在使用 EPSON 打印机时就遇到了这个问题。看看syslog-audit-linesapparmor拒绝访问/etc/passwd

您可以按照说明进入ippbusxd模式complain在 Ubuntu wwiki 上或全局禁用 Apparmor。

答案2

可惜没人多花点功夫解释一下。首先,检查 dmesg 命令的输出,看看你是否有 apparmor 问题(与你的打印机相关的 DENIED 消息)。如果是 ippusbxd,你需要在终端中运行:

sudo apt install apparmor-utils
sudo aa-complain ippusbxd
#sudo aa-complain cups (Might be cupsd or not needed, check dmesg)

拔下打印机并重新插入,然后再次运行 dmesg。理论上,这可以解决问题,但你可能会受到以下影响: https://bugs.launchpad.net/hplip/+bug/1871011

我注意到 dmesg 输出:

[344350.239687] usb 1-4.2.3: usbfs: process 393755 (ippusbxd) did not claim interface 0 before use
[344350.241485] usblp1: removed

因此它使用 ippusbxd 驱动程序但不会加载它。

因此对于某些型号它可能会起作用,对于我在 Ubuntu 20.04 LTS 上的 HP Envy 5544,我必须删除该软件包:

sudo apt remove ippusbxd

现在 dmesg 显示:

[344499.345607] usb 1-4.2.3: New USB device found, idVendor=03f0, idProduct=ce11, bcdDevice= 1.00
[344499.345610] usb 1-4.2.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[344499.345612] usb 1-4.2.3: Product: ENVY 5540 series
[344499.345613] usb 1-4.2.3: Manufacturer: HP
[344499.345614] usb 1-4.2.3: SerialNumber: THESERIAL
[344499.352931] usblp 1-4.2.3:1.1: usblp1: USB Bidirectional printer dev 22 if 1 alt 0 proto 2 vid 0x03F0 pid 0xCE11

您可能需要停止 ippusbcd:sudo systemctl stop ippusbxd@001:017.service(请注意您的 id,使用 tab 自动完成)并在执行此操作时重新加载启动 systemd 配置:

systemctl 守护进程重新加载

最后,这仍然没能让我的打印机工作。让它工作的方法是让打印机保持插电状态,在插电状态下关闭它,然后重新启动它。在 dmesg 中,我仍然可以看到打印后设备被移除,但它似乎确实工作了。

答案3

令人惊讶的是,许多用户认为 HPLIP 是唯一的选择,仅仅因为设备供应商是 HP。

Ubuntu 20.04 安装 ippusbxd 并在打印机插入 USB 端口时运行它。3700 实际上变成了一个网络设备,而且,任何供应商软件(包括 HPLIP)都无法用于打印和扫描。

有两种可能的解决方案:

  • 适应印刷系统的现代变化并与之合作。
  • 放弃 ippusbxd 的好处并将其从系统中清除。

希望用户能够找到Debian wiki 上的 IPP-over-USB 部分有用。

答案4

很遗憾,我之前的评论(见下文)过于乐观。显然,我的 HP 打印机/扫描仪失去响应(打印了半页然后停止,“打印机未连接”消息等)只是时间问题。我删除了“ippusbxd”包,然后删除了之前通过 GUI 安装的打印机,重新启动了系统,最后安装了旧的 hplip 驱动程序。现在一切都正常:打印和扫描。

先前的评论是:

Debian 维基讨论这个答案对我来说真的很有用。

在“IPP-over-USB:调查和故障排除”标题下,有一个明确的解释:

“...请记住,IPP-over-USB 打印机被视为网络设备,请务必始终使用这两种设置解决方案查看网络打印机。即使设备位于 USB 上,也不要试图设置本地 USB 连接。在型号/驱动程序条目下查找包含无驱动程序或 IPP Everywhere 的条目。”

通过添加打印机的 GUI 提供的“网络打印机”选项添加打印机对我来说是一个奇迹,现在我可以打印和扫描了。

注意:每次尝试扫描时,软件都会搜索可用的扫描仪。然后您将看到两个包含打印机名称的选项,您应该选择最长的一个:在我的情况下是“ESCL Deskjet 3520 系列 [CNXXXXXXXX]”,其中 XXXXXXXX 是数字。

相关内容