我需要在 Debian (KDE) 环境下通过 USB 连接 HP LaserJet M14-M17 打印机打印几张试卷。打印机插入后能够被系统识别并出现在设备列表中但实际发送打印任务时状态显示打印完成打印机却毫无反应仅指示灯象征性地闪烁了两下。值得注意的是打印选项中没有双面打印。第一反应是检查 HPLIP 。系统的 HPLIP 版本是 3.22.10 。随后执行sudo hp-setup -i系统正确检测到了打印机并匹配了对应的 PPD 文件hp-laserjet_m14-m17.ppd。但在打印测试页时终端输出以下错误error: Channel write error error: Device is busy or in an error state.打印机依然没有反应。HPLIP 虽然识别了设备型号但实际的数据通信失败了。这就很奇怪了。查询发现 HP LaserJet M14-M17 是一款支持 IPP Everywhere 的打印机通过 USB 连接时使用的是 IPP over USB 协议而非传统的 USB 批量传输。在 Debian 中负责处理该协议的是ipp-usb守护进程。我尝试检查ipp-usb的状态。systemctl status ipp-usb○ ipp-usb.service - Daemon for IPP over USB printer support Loaded: loaded (/usr/lib/systemd/system/ipp-usb.service; static) Active: inactive (dead) Docs: man:ipp-usb(8) Apr 25 18:40:15 localhost systemd[1]: Started ipp-usb.service - Daemon for IPP over USB printer support. Apr 25 18:41:04 localhost systemd[1]: ipp-usb.service: Deactivated successfully.服务处于inactive (dead)状态且日志中显示它曾被多次启动但均在短时间内退出。也许是ipp-usb本身的问题systemctl status ipp-usb.socketUnit ipp-usb.socket could not be found.socket 单元不存在。ipp-usb并非通过 socket 激活。原来服务反复退出的真正原因是打印机未开机——ipp-usb在 udev 模式下运行时如果没有检测到 IPP over USB 设备就会自动退出。打开打印机后先用lsusb确认设备已被系统识别lsusb | grep -i hpBus 001 Device 006: ID 03f0:be2a HP, Inc HP LaserJet M14-M17systemctl status ipp-usb● ipp-usb.service - Daemon for IPP over USB printer support Loaded: loaded (/usr/lib/systemd/system/ipp-usb.service; static) Active: active (running) since Sat 2026-04-25 19:03:40 CST; 2min 2s ago Main PID: 3904 (ipp-usb) Tasks: 12 (limit: 4306) Memory: 14.2M (peak: 15M) CPU: 98ms CGroup: /system.slice/ipp-usb.service └─3904 /usr/sbin/ipp-usb udev Apr 25 19:03:40 localhost systemd[1]: Started ipp-usb.service - Daemon for IPP over USB printer support.ipp-usb成功保持运行且命令行参数为udev印证了它以 udev 模式工作。查看journal其中却只记录了 systemd 的启停信息看不到 ipp-usb 自身的日志。通过ipp-usb -h查看帮助信息发现它支持debug模式。Usage: ipp-usb mode [options] Modes are: standalone - run forever, automatically discover IPP-over-USB devices and serve them all udev - like standalone, but exit when last IPP-over-USB device is disconnected debug - logs duplicated on console, -bg option is ignored check - check configuration and exit status - print ipp-usb status and exitsystemctl stop ipp-usb ipp-usb debug ipp-usb started in debug mode, pid4190 ctrlsock: listening at /var/ipp-usb/ctrl PNP Bus 001 Device 006: added Found new device. VID:PID 03f0:be2a HWID quirks: EMPTY Loading quirks for model: HP LaserJet M14-M17 Device quirks: [*] ; (/usr/share/ipp-usb/quirks/default.conf:5) http-connection Bus 001 Device 006: opened HP LaserJet M14-M17 Device info: USB Port: 2 Ident: 03f0-be2a-VN50B02739-HP-LaserJet-M14-M17 Manufacturer: HP Product: HP LaserJet M14-M17 SerialNumber: VN50B02739 BasicCaps: print,http USB stack parameters authorized_default: 1 autosuspend: 2 blinkenlights: N initial_descriptor_timeout: 5000 nousb: N old_scheme_first: N quirks: usbfs_memory_mb: 16 usbfs_snoop: N usbfs_snoop_max: 65536 use_both_schemes: Y USB interfaces: Config Interface Alt Class SubClass Proto 1 0 0 7 1 2 1 1 0 255 4 1 * 1 1 1 7 1 4 1 2 0 255 4 1 * 1 2 1 7 1 4 1 3 0 255 4 1 * 1 3 1 7 1 4 USB[0]: open: Bus 001 Device 006 Interface 1 Alt 1 USB[1]: open: Bus 001 Device 006 Interface 2 Alt 1 USB[2]: open: Bus 001 Device 006 Interface 3 Alt 1 HTTP[000]: POST ipp://localhost:60000/ipp/print HTTP[000]: request body: got 461 bytes; closed HTTP[000]: body is small (461 bytes), prefetched before sending USB[0]: connection allocated, 1 in use: a-- --- --- HTTP[000]: connection 0 allocated USB[0]: zero-size read ...此处省略大量 zero-size read HTTP[000]: POST ipp://localhost:60000/ipp/print - 200 OK USB[0]: zero-size read ...此处省略大量 zero-size read HTTP[000]: response body: got 1566 bytes; EOF USB[0]: connection released, 0 in use: --- --- --- HTTP[000]: done with response body IPP FaxOut service not in capabilities HTTP[001]: GET http://localhost:60000/eSCL/ScannerCapabilities HTTP[001]: body is empty, sending as is USB[1]: connection allocated, 1 in use: --- a-- --- HTTP[001]: connection 1 allocated USB[1]: zero-size read ...此处省略大量 zero-size read HTTP[001]: GET http://localhost:60000/eSCL/ScannerCapabilities - 404 Not Found HTTP[001]: client has gone; draining response from USB ! ESCL: eSCL: HTTP status: 404 Not Found HP LaserJet M16a (435CA7): _printer._tcp TXT record: usb_SERVN50B02739 usb_HWID03f0be2a HP LaserJet M16a (435CA7): _ipp._tcp TXT record: airnone mopria-certified1.3 rpipp/print priority50 kinddocument,envelope,photo PaperMaxlegal-A4 UUID564e3530-4230-3237-3339-c46516435ca7 ColorF DuplexF note qtotal1 usb_MDLHP LaserJet M14-M17 usb_MFGHP usb_CMDPJL,PML,PWG_RASTER,URP tyHP LaserJet M14-M17 product(HP LaserJet M14-M17) pdlapplication/PCLm,application/octet-stream,image/pwg-raster txtvers1 adminurlhttp://localhost:60000 FaxF ScanF usb_SERVN50B02739 usb_HWID03f0be2a HP LaserJet M16a (435CA7): _http._tcp TXT record: HP LaserJet M16a (435CA7): _ipp-usb._tcp TXT record: DNS-SD: HP LaserJet M16a (435CA7) (USB): trying USB[1]: connection released, 0 in use: --- --- --- HTTP[001]: done with response body DNS-SD: FQDN: linux.local DNS-SD: FQDN: linux.local-localhost DNS-SD: subtype: _universal._sub._ipp._tcp DNS-SD: HP LaserJet M16a (435CA7) (USB): publishing requested DNS-SD: HP LaserJet M16a (435CA7) (USB): AVAHI_ENTRY_GROUP_REGISTERING DNS-SD: HP LaserJet M16a (435CA7) (USB): AVAHI_ENTRY_GROUP_ESTABLISHED DNS-SD: HP LaserJet M16a (435CA7) (USB): published auth: operation requested: print (HTTP POST /ipp/print) auth: address check: client-addr ::1 localtrue server-addr ::1 localtrue auth: client UID-1 (auth rules dont use UID) auth: UID -1 resolved: user names: * group names: * auth: allowed operations: config,fax,print,scan auth: access granted HTTP[002]: POST http://localhost:60000/ipp/print HTTP[002]: request body: got 173 bytes; EOF HTTP[002]: body is small (173 bytes), prefetched before sending USB[2]: connection allocated, 1 in use: --- --- a-- HTTP[002]: connection 2 allocated USB[2]: zero-size read ...此处省略大量 zero-size read HTTP[002]: POST http://localhost:60000/ipp/print - 200 OK USB[2]: zero-size read ...此处省略大量 zero-size read HTTP[002]: response body: got 45675 bytes; EOF USB[2]: connection released, 0 in use: --- --- --- HTTP[002]: done with response body auth: operation requested: config (HTTP GET /ipp/strings/en-us) auth: address check: client-addr ::1 localtrue server-addr ::1 localtrue auth: client UID-1 (auth rules dont use UID) auth: UID -1 resolved: user names: * group names: * auth: allowed operations: config,fax,print,scan auth: access granted HTTP[003]: GET http://localhost:60000/ipp/strings/en-us HTTP[003]: body is empty, sending as is USB[0]: connection allocated, 1 in use: a-- --- ---
HP LaserJet M14-M17 在Debian下无法打印
发布时间:2026/6/25 14:42:23
我需要在 Debian (KDE) 环境下通过 USB 连接 HP LaserJet M14-M17 打印机打印几张试卷。打印机插入后能够被系统识别并出现在设备列表中但实际发送打印任务时状态显示打印完成打印机却毫无反应仅指示灯象征性地闪烁了两下。值得注意的是打印选项中没有双面打印。第一反应是检查 HPLIP 。系统的 HPLIP 版本是 3.22.10 。随后执行sudo hp-setup -i系统正确检测到了打印机并匹配了对应的 PPD 文件hp-laserjet_m14-m17.ppd。但在打印测试页时终端输出以下错误error: Channel write error error: Device is busy or in an error state.打印机依然没有反应。HPLIP 虽然识别了设备型号但实际的数据通信失败了。这就很奇怪了。查询发现 HP LaserJet M14-M17 是一款支持 IPP Everywhere 的打印机通过 USB 连接时使用的是 IPP over USB 协议而非传统的 USB 批量传输。在 Debian 中负责处理该协议的是ipp-usb守护进程。我尝试检查ipp-usb的状态。systemctl status ipp-usb○ ipp-usb.service - Daemon for IPP over USB printer support Loaded: loaded (/usr/lib/systemd/system/ipp-usb.service; static) Active: inactive (dead) Docs: man:ipp-usb(8) Apr 25 18:40:15 localhost systemd[1]: Started ipp-usb.service - Daemon for IPP over USB printer support. Apr 25 18:41:04 localhost systemd[1]: ipp-usb.service: Deactivated successfully.服务处于inactive (dead)状态且日志中显示它曾被多次启动但均在短时间内退出。也许是ipp-usb本身的问题systemctl status ipp-usb.socketUnit ipp-usb.socket could not be found.socket 单元不存在。ipp-usb并非通过 socket 激活。原来服务反复退出的真正原因是打印机未开机——ipp-usb在 udev 模式下运行时如果没有检测到 IPP over USB 设备就会自动退出。打开打印机后先用lsusb确认设备已被系统识别lsusb | grep -i hpBus 001 Device 006: ID 03f0:be2a HP, Inc HP LaserJet M14-M17systemctl status ipp-usb● ipp-usb.service - Daemon for IPP over USB printer support Loaded: loaded (/usr/lib/systemd/system/ipp-usb.service; static) Active: active (running) since Sat 2026-04-25 19:03:40 CST; 2min 2s ago Main PID: 3904 (ipp-usb) Tasks: 12 (limit: 4306) Memory: 14.2M (peak: 15M) CPU: 98ms CGroup: /system.slice/ipp-usb.service └─3904 /usr/sbin/ipp-usb udev Apr 25 19:03:40 localhost systemd[1]: Started ipp-usb.service - Daemon for IPP over USB printer support.ipp-usb成功保持运行且命令行参数为udev印证了它以 udev 模式工作。查看journal其中却只记录了 systemd 的启停信息看不到 ipp-usb 自身的日志。通过ipp-usb -h查看帮助信息发现它支持debug模式。Usage: ipp-usb mode [options] Modes are: standalone - run forever, automatically discover IPP-over-USB devices and serve them all udev - like standalone, but exit when last IPP-over-USB device is disconnected debug - logs duplicated on console, -bg option is ignored check - check configuration and exit status - print ipp-usb status and exitsystemctl stop ipp-usb ipp-usb debug ipp-usb started in debug mode, pid4190 ctrlsock: listening at /var/ipp-usb/ctrl PNP Bus 001 Device 006: added Found new device. VID:PID 03f0:be2a HWID quirks: EMPTY Loading quirks for model: HP LaserJet M14-M17 Device quirks: [*] ; (/usr/share/ipp-usb/quirks/default.conf:5) http-connection Bus 001 Device 006: opened HP LaserJet M14-M17 Device info: USB Port: 2 Ident: 03f0-be2a-VN50B02739-HP-LaserJet-M14-M17 Manufacturer: HP Product: HP LaserJet M14-M17 SerialNumber: VN50B02739 BasicCaps: print,http USB stack parameters authorized_default: 1 autosuspend: 2 blinkenlights: N initial_descriptor_timeout: 5000 nousb: N old_scheme_first: N quirks: usbfs_memory_mb: 16 usbfs_snoop: N usbfs_snoop_max: 65536 use_both_schemes: Y USB interfaces: Config Interface Alt Class SubClass Proto 1 0 0 7 1 2 1 1 0 255 4 1 * 1 1 1 7 1 4 1 2 0 255 4 1 * 1 2 1 7 1 4 1 3 0 255 4 1 * 1 3 1 7 1 4 USB[0]: open: Bus 001 Device 006 Interface 1 Alt 1 USB[1]: open: Bus 001 Device 006 Interface 2 Alt 1 USB[2]: open: Bus 001 Device 006 Interface 3 Alt 1 HTTP[000]: POST ipp://localhost:60000/ipp/print HTTP[000]: request body: got 461 bytes; closed HTTP[000]: body is small (461 bytes), prefetched before sending USB[0]: connection allocated, 1 in use: a-- --- --- HTTP[000]: connection 0 allocated USB[0]: zero-size read ...此处省略大量 zero-size read HTTP[000]: POST ipp://localhost:60000/ipp/print - 200 OK USB[0]: zero-size read ...此处省略大量 zero-size read HTTP[000]: response body: got 1566 bytes; EOF USB[0]: connection released, 0 in use: --- --- --- HTTP[000]: done with response body IPP FaxOut service not in capabilities HTTP[001]: GET http://localhost:60000/eSCL/ScannerCapabilities HTTP[001]: body is empty, sending as is USB[1]: connection allocated, 1 in use: --- a-- --- HTTP[001]: connection 1 allocated USB[1]: zero-size read ...此处省略大量 zero-size read HTTP[001]: GET http://localhost:60000/eSCL/ScannerCapabilities - 404 Not Found HTTP[001]: client has gone; draining response from USB ! ESCL: eSCL: HTTP status: 404 Not Found HP LaserJet M16a (435CA7): _printer._tcp TXT record: usb_SERVN50B02739 usb_HWID03f0be2a HP LaserJet M16a (435CA7): _ipp._tcp TXT record: airnone mopria-certified1.3 rpipp/print priority50 kinddocument,envelope,photo PaperMaxlegal-A4 UUID564e3530-4230-3237-3339-c46516435ca7 ColorF DuplexF note qtotal1 usb_MDLHP LaserJet M14-M17 usb_MFGHP usb_CMDPJL,PML,PWG_RASTER,URP tyHP LaserJet M14-M17 product(HP LaserJet M14-M17) pdlapplication/PCLm,application/octet-stream,image/pwg-raster txtvers1 adminurlhttp://localhost:60000 FaxF ScanF usb_SERVN50B02739 usb_HWID03f0be2a HP LaserJet M16a (435CA7): _http._tcp TXT record: HP LaserJet M16a (435CA7): _ipp-usb._tcp TXT record: DNS-SD: HP LaserJet M16a (435CA7) (USB): trying USB[1]: connection released, 0 in use: --- --- --- HTTP[001]: done with response body DNS-SD: FQDN: linux.local DNS-SD: FQDN: linux.local-localhost DNS-SD: subtype: _universal._sub._ipp._tcp DNS-SD: HP LaserJet M16a (435CA7) (USB): publishing requested DNS-SD: HP LaserJet M16a (435CA7) (USB): AVAHI_ENTRY_GROUP_REGISTERING DNS-SD: HP LaserJet M16a (435CA7) (USB): AVAHI_ENTRY_GROUP_ESTABLISHED DNS-SD: HP LaserJet M16a (435CA7) (USB): published auth: operation requested: print (HTTP POST /ipp/print) auth: address check: client-addr ::1 localtrue server-addr ::1 localtrue auth: client UID-1 (auth rules dont use UID) auth: UID -1 resolved: user names: * group names: * auth: allowed operations: config,fax,print,scan auth: access granted HTTP[002]: POST http://localhost:60000/ipp/print HTTP[002]: request body: got 173 bytes; EOF HTTP[002]: body is small (173 bytes), prefetched before sending USB[2]: connection allocated, 1 in use: --- --- a-- HTTP[002]: connection 2 allocated USB[2]: zero-size read ...此处省略大量 zero-size read HTTP[002]: POST http://localhost:60000/ipp/print - 200 OK USB[2]: zero-size read ...此处省略大量 zero-size read HTTP[002]: response body: got 45675 bytes; EOF USB[2]: connection released, 0 in use: --- --- --- HTTP[002]: done with response body auth: operation requested: config (HTTP GET /ipp/strings/en-us) auth: address check: client-addr ::1 localtrue server-addr ::1 localtrue auth: client UID-1 (auth rules dont use UID) auth: UID -1 resolved: user names: * group names: * auth: allowed operations: config,fax,print,scan auth: access granted HTTP[003]: GET http://localhost:60000/ipp/strings/en-us HTTP[003]: body is empty, sending as is USB[0]: connection allocated, 1 in use: a-- --- ---