Repository navigation
Open
Description
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
ippbackend sets the printer-state-reasoncups-waiting-for-job-completedwhile it waits for the printer to finish (cupsbackend/ipp.c). CUPS clears it infinalize_jobonce the job is done. StateReason.get_level()classifies every reason without a-reportor-warningsuffix, and not in its explicit list, asERROR. 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.- Do not notify on 'cups-waiting-for-job-completed' because it's not an… #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 theERRORlevel.
Steps to reproduce
- Use a driverless IPP printer (here via a cups-browsed
implicitclass://queue; anyipp/ippsqueue uses the same backend code path). - Open the job viewer:
system-config-printer --show-jobs <queue>. - Print a multi-page document.
- 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
masterat c40cbbb - CUPS 2.4.7, cups-browsed 2.0.0
- Linux Mint 22.3 (Cinnamon)
- Printer: HP Color LaserJet Pro MFP 3302 (IPPS)
Metadata
Metadata
Assignees
Labels
No labels
Activity
statereason: use printer-state to infer severity for unrecognized rea…