无法再使用 CUPS 进行打印

无法再使用 CUPS 进行打印

我有一台Brother_HL_L3270CDW_series开箱即用的打印机,可以通过 WiFi 被 Ubuntu 22.04 检测到并可以立即打印。

它停止工作了,我不知道为什么。cupsctl --debug-logging以下是/var/log/cups/error_log使用 Ubuntu 设置应用程序删除打印机时的情况(抱歉重复了很多次——简短的过滤版本在底部):

D [29/Oct/2022:11:38:06 +0100] cupsdSetBusyState: newbusy="Active clients", busy="Not busy"
D [29/Oct/2022:11:38:06 +0100] [Client 69] Server address is "/run/cups/cups.sock".
D [29/Oct/2022:11:38:06 +0100] [Client 69] Accepted from localhost (Domain)
D [29/Oct/2022:11:38:06 +0100] [Client 69] Waiting for request.
I [29/Oct/2022:11:38:06 +0100] Expiring subscriptions...
D [29/Oct/2022:11:38:06 +0100] [Client 69] POST / HTTP/1.1
D [29/Oct/2022:11:38:06 +0100] cupsdSetBusyState: newbusy="Active clients", busy="Active clients"
D [29/Oct/2022:11:38:06 +0100] [Client 69] Read: status=200, state=6
D [29/Oct/2022:11:38:06 +0100] [Client 69] No authentication data provided.
D [29/Oct/2022:11:38:06 +0100] [Client 69] 2.0 Get-Printer-Attributes 1
D [29/Oct/2022:11:38:06 +0100] Get-Printer-Attributes ipp://localhost/printers/Brother_HL_L3270CDW_series
D [29/Oct/2022:11:38:06 +0100] Get-Printer-Attributes client-error-not-found: The printer or class does not exist.
D [29/Oct/2022:11:38:06 +0100] [Client 69] Returning IPP client-error-not-found for Get-Printer-Attributes (ipp://localhost/printers/Brother_HL_L3270CDW_series) from localhost.
D [29/Oct/2022:11:38:06 +0100] [Client 69] Content-Length: 130
D [29/Oct/2022:11:38:06 +0100] [Client 69] cupsdSendHeader: code=200, type="application/ipp", auth_type=0
D [29/Oct/2022:11:38:06 +0100] [Client 69] con->http=0x5607c3896200
D [29/Oct/2022:11:38:06 +0100] [Client 69] cupsdWriteClient error=0, used=0, state=HTTP_STATE_POST_SEND, data_encoding=HTTP_ENCODING_LENGTH, data_remaining=130, response=0x5607c391ffe0(IPP_STATE_DATA), pipe_pid=0, file=-1
D [29/Oct/2022:11:38:06 +0100] [Client 69] Writing IPP response, ipp_state=IPP_STATE_DATA, old wused=0, new wused=0
D [29/Oct/2022:11:38:06 +0100] [Client 69] bytes=0, http_state=0, data_remaining=130
D [29/Oct/2022:11:38:06 +0100] [Client 69] Flushing write buffer.
D [29/Oct/2022:11:38:06 +0100] [Client 69] New state is HTTP_STATE_WAITING
D [29/Oct/2022:11:38:06 +0100] [Client 69] Waiting for request.
D [29/Oct/2022:11:38:06 +0100] cupsdSetBusyState: newbusy="Not busy", busy="Active clients"
D [29/Oct/2022:11:38:06 +0100] [Client 69] POST /admin/ HTTP/1.1
D [29/Oct/2022:11:38:06 +0100] cupsdSetBusyState: newbusy="Active clients", busy="Not busy"
D [29/Oct/2022:11:38:06 +0100] [Client 69] Read: status=200, state=6
D [29/Oct/2022:11:38:06 +0100] [Client 69] No authentication data provided.
D [29/Oct/2022:11:38:06 +0100] [Client 69] 2.0 CUPS-Delete-Printer 2
D [29/Oct/2022:11:38:06 +0100] CUPS-Delete-Printer ipp://localhost/printers/Brother_HL_L3270CDW_series
D [29/Oct/2022:11:38:06 +0100] CUPS-Delete-Printer client-error-not-found: The printer or class does not exist.
D [29/Oct/2022:11:38:06 +0100] [Client 69] Returning IPP client-error-not-found for CUPS-Delete-Printer (ipp://localhost/printers/Brother_HL_L3270CDW_series) from localhost.
D [29/Oct/2022:11:38:06 +0100] [Client 69] Content-Length: 130
D [29/Oct/2022:11:38:06 +0100] [Client 69] cupsdSendHeader: code=200, type="application/ipp", auth_type=0
D [29/Oct/2022:11:38:06 +0100] [Client 69] con->http=0x5607c3896200
D [29/Oct/2022:11:38:06 +0100] [Client 69] cupsdWriteClient error=0, used=0, state=HTTP_STATE_POST_SEND, data_encoding=HTTP_ENCODING_LENGTH, data_remaining=130, response=0x5607c391fd20(IPP_STATE_DATA), pipe_pid=0, file=-1
D [29/Oct/2022:11:38:06 +0100] [Client 69] Writing IPP response, ipp_state=IPP_STATE_DATA, old wused=0, new wused=0
D [29/Oct/2022:11:38:06 +0100] [Client 69] bytes=0, http_state=0, data_remaining=130
D [29/Oct/2022:11:38:06 +0100] [Client 69] Flushing write buffer.
D [29/Oct/2022:11:38:06 +0100] [Client 69] New state is HTTP_STATE_WAITING
D [29/Oct/2022:11:38:06 +0100] [Client 69] Waiting for request.
D [29/Oct/2022:11:38:06 +0100] cupsdSetBusyState: newbusy="Not busy", busy="Active clients"
I [29/Oct/2022:11:38:07 +0100] Expiring subscriptions...
D [29/Oct/2022:11:38:37 +0100] [Client 69] HTTP_STATE_WAITING Closing for error 32 (Broken pipe)
D [29/Oct/2022:11:38:37 +0100] [Client 69] Closing connection.
D [29/Oct/2022:11:38:37 +0100] cupsdSetBusyState: newbusy="Not busy", busy="Not busy"
I [29/Oct/2022:11:38:37 +0100] Expiring subscriptions...
D [29/Oct/2022:11:38:37 +0100] Report: clients=3
D [29/Oct/2022:11:38:37 +0100] Report: jobs=0
D [29/Oct/2022:11:38:37 +0100] Report: jobs-active=0
D [29/Oct/2022:11:38:37 +0100] Report: printers=0
D [29/Oct/2022:11:38:37 +0100] Report: stringpool-string-count=366
D [29/Oct/2022:11:38:37 +0100] Report: stringpool-alloc-bytes=6144
D [29/Oct/2022:11:38:37 +0100] Report: stringpool-total-bytes=6336
I [29/Oct/2022:11:38:38 +0100] Expiring subscriptions...

我点击“添加打印机”,打印机被找到了,但无法下载驱动程序

日志太大,无法直接粘贴,因此:

“添加打印机”按钮变成灰色,所以我关闭了“设置”应用

D [29/Oct/2022:11:39:47 +0100] [Client 70] HTTP_STATE_WAITING Closing for error 32 (Broken pipe)
D [29/Oct/2022:11:39:47 +0100] [Client 70] Closing connection.
D [29/Oct/2022:11:39:47 +0100] cupsdSetBusyState: newbusy="Dirty files", busy="Dirty files"
I [29/Oct/2022:11:39:47 +0100] Expiring subscriptions...
D [29/Oct/2022:11:39:47 +0100] Report: clients=6
D [29/Oct/2022:11:39:47 +0100] Report: jobs=0
D [29/Oct/2022:11:39:47 +0100] Report: jobs-active=0
D [29/Oct/2022:11:39:47 +0100] Report: printers=0
D [29/Oct/2022:11:39:47 +0100] Report: stringpool-string-count=366
D [29/Oct/2022:11:39:47 +0100] Report: stringpool-alloc-bytes=6144
D [29/Oct/2022:11:39:47 +0100] Report: stringpool-total-bytes=6336
I [29/Oct/2022:11:39:48 +0100] Expiring subscriptions...
D [29/Oct/2022:11:39:48 +0100] cupsdSetBusyState: newbusy="Active clients and dirty files", busy="Dirty files"
D [29/Oct/2022:11:39:48 +0100] [Client 78] Server address is "/run/cups/cups.sock".
D [29/Oct/2022:11:39:48 +0100] [Client 78] Accepted from localhost (Domain)
D [29/Oct/2022:11:39:48 +0100] [Client 78] Waiting for request.
D [29/Oct/2022:11:39:48 +0100] [Client 78] POST / HTTP/1.1
D [29/Oct/2022:11:39:48 +0100] cupsdSetBusyState: newbusy="Active clients and dirty files", busy="Active clients and dirty files"
D [29/Oct/2022:11:39:48 +0100] [Client 78] Read: status=200, state=6
D [29/Oct/2022:11:39:48 +0100] [Client 78] No authentication data provided.
D [29/Oct/2022:11:39:48 +0100] [Client 78] 2.0 Cancel-Subscription 21
D [29/Oct/2022:11:39:48 +0100] Cancel-Subscription /
D [29/Oct/2022:11:39:48 +0100] cupsdIsAuthorized: requesting-user-name="bernie"
D [29/Oct/2022:11:39:48 +0100] cupsdMarkDirty(----S)
D [29/Oct/2022:11:39:48 +0100] cupsdSetBusyState: newbusy="Active clients and dirty files", busy="Active clients and dirty files"
D [29/Oct/2022:11:39:48 +0100] [Client 78] Returning IPP successful-ok for Cancel-Subscription (/) from localhost.
D [29/Oct/2022:11:39:48 +0100] [Client 78] Content-Length: 75
D [29/Oct/2022:11:39:48 +0100] [Client 78] cupsdSendHeader: code=200, type="application/ipp", auth_type=0
D [29/Oct/2022:11:39:48 +0100] [Client 78] con->http=0x5607c3896200
D [29/Oct/2022:11:39:48 +0100] [Client 78] cupsdWriteClient error=0, used=0, state=HTTP_STATE_POST_SEND, data_encoding=HTTP_ENCODING_LENGTH, data_remaining=75, response=0x5607c389f3f0(IPP_STATE_DATA), pipe_pid=0, file=-1
D [29/Oct/2022:11:39:48 +0100] [Client 78] Writing IPP response, ipp_state=IPP_STATE_DATA, old wused=0, new wused=0
D [29/Oct/2022:11:39:48 +0100] [Client 78] bytes=0, http_state=0, data_remaining=75
D [29/Oct/2022:11:39:48 +0100] [Client 78] Flushing write buffer.
D [29/Oct/2022:11:39:48 +0100] [Client 78] New state is HTTP_STATE_WAITING
D [29/Oct/2022:11:39:48 +0100] [Client 78] Waiting for request.
D [29/Oct/2022:11:39:48 +0100] cupsdSetBusyState: newbusy="Dirty files", busy="Active clients and dirty files"
D [29/Oct/2022:11:39:48 +0100] [Client 78] POST / HTTP/1.1
D [29/Oct/2022:11:39:48 +0100] cupsdSetBusyState: newbusy="Active clients and dirty files", busy="Dirty files"
D [29/Oct/2022:11:39:48 +0100] [Client 78] Read: status=200, state=6
D [29/Oct/2022:11:39:48 +0100] [Client 78] No authentication data provided.
D [29/Oct/2022:11:39:48 +0100] [Client 78] 2.0 Cancel-Subscription 22
D [29/Oct/2022:11:39:48 +0100] Cancel-Subscription /
D [29/Oct/2022:11:39:48 +0100] Cancel-Subscription client-error-not-found: Subscription #0 does not exist.
D [29/Oct/2022:11:39:48 +0100] [Client 78] Returning IPP client-error-not-found for Cancel-Subscription (/) from localhost.
D [29/Oct/2022:11:39:48 +0100] [Client 78] Content-Length: 125
D [29/Oct/2022:11:39:48 +0100] [Client 78] cupsdSendHeader: code=200, type="application/ipp", auth_type=0
D [29/Oct/2022:11:39:48 +0100] [Client 78] con->http=0x5607c3896200
D [29/Oct/2022:11:39:48 +0100] [Client 78] cupsdWriteClient error=0, used=0, state=HTTP_STATE_POST_SEND, data_encoding=HTTP_ENCODING_LENGTH, data_remaining=125, response=0x5607c388ee70(IPP_STATE_DATA), pipe_pid=0, file=-1
D [29/Oct/2022:11:39:48 +0100] [Client 78] Writing IPP response, ipp_state=IPP_STATE_DATA, old wused=0, new wused=0
D [29/Oct/2022:11:39:48 +0100] [Client 78] bytes=0, http_state=0, data_remaining=125
D [29/Oct/2022:11:39:48 +0100] [Client 78] Flushing write buffer.
D [29/Oct/2022:11:39:48 +0100] [Client 78] New state is HTTP_STATE_WAITING
D [29/Oct/2022:11:39:48 +0100] [Client 78] Waiting for request.
D [29/Oct/2022:11:39:48 +0100] cupsdSetBusyState: newbusy="Dirty files", busy="Active clients and dirty files"
D [29/Oct/2022:11:39:48 +0100] [Client 78] HTTP_STATE_WAITING Closing for error 32 (Broken pipe)
D [29/Oct/2022:11:39:48 +0100] [Client 78] Closing connection.
D [29/Oct/2022:11:39:48 +0100] cupsdSetBusyState: newbusy="Dirty files", busy="Dirty files"
I [29/Oct/2022:11:39:49 +0100] Expiring subscriptions...
D [29/Oct/2022:11:39:57 +0100] [Client 74] HTTP_STATE_WAITING Closing for error 32 (Broken pipe)
D [29/Oct/2022:11:39:57 +0100] [Client 74] Closing connection.
D [29/Oct/2022:11:39:57 +0100] cupsdSetBusyState: newbusy="Dirty files", busy="Dirty files"
I [29/Oct/2022:11:39:57 +0100] Expiring subscriptions...
D [29/Oct/2022:11:39:57 +0100] [Client 76] HTTP_STATE_WAITING Closing for error 32 (Broken pipe)
D [29/Oct/2022:11:39:57 +0100] [Client 76] Closing connection.
D [29/Oct/2022:11:39:57 +0100] cupsdSetBusyState: newbusy="Dirty files", busy="Dirty files"
D [29/Oct/2022:11:39:57 +0100] [Client 75] HTTP_STATE_WAITING Closing for error 32 (Broken pipe)
D [29/Oct/2022:11:39:57 +0100] [Client 75] Closing connection.
D [29/Oct/2022:11:39:57 +0100] cupsdSetBusyState: newbusy="Dirty files", busy="Dirty files"
I [29/Oct/2022:11:39:58 +0100] Expiring subscriptions...

我重新打开“设置”应用,发现打印机已添加

在此处输入图片描述

我尝试打印

大约一分钟后,应用程序(libreoffice)报告打印作业失败

D [29/Oct/2022:11:41:22 +0100] [Client 103] POST / HTTP/1.1
D [29/Oct/2022:11:41:22 +0100] cupsdSetBusyState: newbusy="Active clients and dirty files", busy="Dirty files"
D [29/Oct/2022:11:41:22 +0100] [Client 103] Read: status=200, state=6
D [29/Oct/2022:11:41:22 +0100] [Client 103] No authentication data provided.
D [29/Oct/2022:11:41:22 +0100] [Client 103] 2.0 Get-Printer-Attributes 131
D [29/Oct/2022:11:41:22 +0100] Get-Printer-Attributes ipp://localhost/printers/Brother_HL_L3270CDW_series
D [29/Oct/2022:11:41:22 +0100] [Client 103] Returning IPP successful-ok for Get-Printer-Attributes (ipp://localhost/printers/Brother_HL_L3270CDW_series) from localhost.
D [29/Oct/2022:11:41:22 +0100] [Client 103] Content-Length: 98
D [29/Oct/2022:11:41:22 +0100] [Client 103] cupsdSendHeader: code=200, type="application/ipp", auth_type=0
I [29/Oct/2022:11:41:22 +0100] Expiring subscriptions...

然后看起来像是重复了很多次

D [29/Oct/2022:11:41:22 +0100] [Client 103] con->http=0x5607c3896200
D [29/Oct/2022:11:41:22 +0100] [Client 103] cupsdWriteClient error=0, used=0, state=HTTP_STATE_POST_SEND, data_encoding=HTTP_ENCODING_LENGTH, data_remaining=98, response=0x5607c388f240(IPP_STATE_DATA), pipe_pid=0, file=-1
D [29/Oct/2022:11:41:22 +0100] [Client 103] Writing IPP response, ipp_state=IPP_STATE_DATA, old wused=0, new wused=0
D [29/Oct/2022:11:41:22 +0100] [Client 103] bytes=0, http_state=0, data_remaining=98
D [29/Oct/2022:11:41:22 +0100] [Client 103] Flushing write buffer.
D [29/Oct/2022:11:41:22 +0100] [Client 103] New state is HTTP_STATE_WAITING
D [29/Oct/2022:11:41:22 +0100] [Client 103] Waiting for request.
D [29/Oct/2022:11:41:22 +0100] cupsdSetBusyState: newbusy="Dirty files", busy="Active clients and dirty files"
D [29/Oct/2022:11:41:23 +0100] [Client 103] POST / HTTP/1.1
D [29/Oct/2022:11:41:23 +0100] cupsdSetBusyState: newbusy="Active clients and dirty files", busy="Dirty files"
D [29/Oct/2022:11:41:23 +0100] [Client 103] Read: status=200, state=6
D [29/Oct/2022:11:41:23 +0100] [Client 103] No authentication data provided.
D [29/Oct/2022:11:41:23 +0100] [Client 103] 2.0 Get-Printer-Attributes 132
D [29/Oct/2022:11:41:23 +0100] Get-Printer-Attributes ipp://localhost/printers/Brother_HL_L3270CDW_series
D [29/Oct/2022:11:41:23 +0100] [Client 103] Returning IPP successful-ok for Get-Printer-Attributes (ipp://localhost/printers/Brother_HL_L3270CDW_series) from localhost.
D [29/Oct/2022:11:41:23 +0100] [Client 103] Content-Length: 98
D [29/Oct/2022:11:41:23 +0100] [Client 103] cupsdSendHeader: code=200, type="application/ipp", auth_type=0
I [29/Oct/2022:11:41:23 +0100] Expiring subscriptions...

然后

这个日志能解释出问题是什么吗?

我已经剪切并抓取了这些日志以提取可能更有意义的行(无特定顺序):

CUPS-Get-Classes client-error-not-found: No destinations added.
CUPS-Get-Default client-error-not-found: No default printer.
CUPS-Get-Printers client-error-not-found: No destinations added.
Get-Jobs client-error-not-found: The printer or class does not exist.
Get-Printer-Attributes client-error-not-found: The printer or class does not exist.
[Client 99] HTTP_STATE_WAITING Closing for error 32 (Broken pipe)
[Client 99] Returning IPP client-error-not-found for Get-Printer-Attributes (ipp://localhost/printers/Brother_HL_L3270CDW_series) from localhost.
CUPS-Add-Modify-Printer server-error-internal-error: cups-driverd failed to get PPD file - see error_log for details.
CUPS-Delete-Printer client-error-not-found: The printer or class does not exist.
[Client 83] Returning IPP client-error-not-found for Get-Jobs (ipp://localhost/printers/Brother_HL_L3270CDW_series) from localhost.
[Client 84] HTTP_STATE_WAITING Closing for error 32 (Broken pipe)
[Client 78] Returning IPP client-error-not-found for Cancel-Subscription (/) from localhost.
[Client 79] HTTP_STATE_WAITING Closing for error 32 (Broken pipe)
[Client 79] Returning IPP client-error-not-found for CUPS-Get-Default (no URI) from localhost.
[Client 79] Returning IPP client-error-not-found for CUPS-Get-Printers (no URI) from localhost.
[Client 79] Returning IPP client-error-not-found for Get-Jobs (ipp://localhost/printers/Brother_HL_L3270CDW_series) from localhost.
Cancel-Subscription client-error-not-found: Subscription #0 does not exist.

我很好奇但可能得不到答案的问题:

  • 打印机无法下载驱动程序是什么原因?
  • 为什么下载驱动程序失败后仍会添加打印机?
  • 为什么添加打印机后打印仍然失败?

主要问题:

我可以逐步修复此问题吗,例如通过下载合适的驱动程序?

或者,由于这在开始时有效,然后发生了一些变化,有没有办法清除所有打印机设置,以便系统处于全新安装 Ubuntu 后的状态?

相关内容