Job viewer shows "Printer error" for cups-waiting-for-job-completed

オープン 初心者向け
#494 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 2 日以内に返信

@RonitMehta08 がすでに取り組んでいます。

2026年11月13日 から。

  • #500 @RonitMehta08 による — オープン

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
86/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
python
領域
desktop

調査の方向性

statereason.py、特に StateReason.get_level() を読み、jobviewer.py が JobViewer.update_status() で理由レベルをどのように使用しているかを追ってください。指定されたCUPSの理由を情報分類に追加し、ジョブが完了を待っている間、ステータスバーにエラーが表示されなくなることを確認してください。issueではテストファイルは指定されていません。

索引モデルが issue の本文から書いたものです。

説明

Note: This issue was written by my clanker. While I try to verify its steps as much as possible, it might not be 100% correct.


Summary

At the end of each job sent to an IPP printer, the job viewer's status bar shows "Printer error", even though the job prints and completes successfully.

Cause

  • After sending the document, the CUPS ipp backend sets the printer-state-reason cups-waiting-for-job-completed while it waits for the printer to finish (cups backend/ipp.c). CUPS clears it in finalize_job once the job is done.
  • StateReason.get_level() classifies every reason without a -report or -warning suffix, and not in its explicit list, as ERROR. So this normal reason becomes an error titled "Printer error".
  • JobViewer.update_status() pushes the worst reason's description to the status bar, so the error is shown while the job finishes.
  • #72 already added this reason to the blacklist in notify_printer_state_reason_if_important(), so desktop notifications are suppressed, but the status bar path still uses the ERROR level.

Steps to reproduce

  1. Use a driverless IPP printer (here via a cups-browsed implicitclass:// queue; any ipp/ipps queue uses the same backend code path).
  2. Open the job viewer: system-config-printer --show-jobs <queue>.
  3. Print a multi-page document.
  4. When all data has been sent and the printer is still printing, the status bar shows "Printer error".

Expected: no error; the job completes normally.
Actual: "Printer error" while the backend waits for completion. The job ends as completed and the printer reports job-completed-successfully.

Suggested fix

Classify the reason as REPORT in StateReason.get_level(), next to the other cups-* informational reasons. This fixes the status bar and the notification path at their shared source:

         if (self.reason.endswith ("-report") or
             self.reason in ["connecting-to-device",
+                            "cups-waiting-for-job-completed",
                             "cups-ipp-missing-cancel-job",

Environment

  • system-config-printer 1.5.18 (Ubuntu package 1.5.18-1ubuntu9), code unchanged on master at c40cbbb
  • CUPS 2.4.7, cups-browsed 2.0.0
  • Linux Mint 22.3 (Cinnamon)
  • Printer: HP Color LaserJet Pro MFP 3302 (IPPS)
主要言語
Python
スター
209
フォーク
111
平均マージ
2日 3時間
マージ済み PR(30日)
8

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

OpenPrinting/system-config-printer のほかの issue

OpenPrinting/system-config-printer の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。