Bug 203058

Summary: print/cups: lpstat shows "waiting for printer to finish." after the printer finished the job
Product: Ports & Packages Reporter: lenzi.sergio
Component: Individual Port(s)Assignee: Tijl Coosemans <tijl>
Status: Closed FIXED    
Severity: Affects Many People CC: cohen_nat, tijl
Priority: --- Keywords: patch
Version: Latest   
Hardware: Any   
OS: Any   
Bug Depends on: 207746    
Bug Blocks:    
Attachments:
Description Flags
this fix the message after socket close
none
patch-backend_socket.c none

Description lenzi.sergio 2015-09-12 12:53:01 UTC
Created attachment 160955 [details]
this fix the message after socket close

CUPS operation

Printer after finishing the job, shows "Waiting for printer to finish."
in lpstat and in the web interface

This is due to the socket.c that after closing the socket, does not rewrite the message

the fix writes another message: "Ready to print." after closing the socket
Comment 1 Tijl Coosemans freebsd_committer freebsd_triage 2016-03-11 14:32:25 UTC
Can you test again with cups 2.1.3?
Comment 2 lenzi.sergio 2016-03-12 21:26:06 UTC
(In reply to Tijl Coosemans from comment #1)
I installed cups & cups-filers  (removed foomatic)

and until now, it is working as expected...
Comment 3 lenzi.sergio 2016-04-29 20:55:20 UTC
the problem remains printing from a cups-2.1.3_2 FreeBSD10.3 amd64 to a brother PS printer. it prints but the brother machine does not close the socket at once
so the message in lpstat remains: "waiting for print to finish job"

The FIX applied solved the PROBLEM
Comment 4 Tijl Coosemans freebsd_committer freebsd_triage 2016-04-30 12:56:13 UTC
Created attachment 169832 [details]
patch-backend_socket.c

Can you try this patch instead?

I think these messages need to be printed using the DEBUG channel instead of other channels like INFO.  Channels like INFO are used when the backend fails to print because of a problem with the printer.  A message can then be passed along to indicate the reason for the failure.  The message you're seeing is just a debug message.  There's nothing wrong with the printer.
Comment 5 commit-hook freebsd_committer freebsd_triage 2016-06-25 15:41:41 UTC
A commit references this bug:

Author: tijl
Date: Sat Jun 25 15:41:39 UTC 2016
New revision: 417473
URL: https://svnweb.freebsd.org/changeset/ports/417473

Log:
  - Update to 2.1.4.
  - Let the socket backend print debug messages on the DEBUG channel.  The
    other channels affect the printer status message in lpstat(1) which can
    be confusing. [1]

  PR:		203058 [1]

Changes:
  head/print/cups/Makefile
  head/print/cups/distinfo
  head/print/cups/files/patch-backend_socket.c
  head/print/cups/pkg-plist
Comment 6 Nate 2016-09-06 20:14:28 UTC
I'm having the same issue with my HP Color LaserJet (hplip) connected with RJ45. Cups version is 2.1.4-4 on Raspbian.

The printer seems to work as expected but I'm still having the message "Waiting for printer to finish" after the first print.
Comment 7 Nate 2016-09-06 20:15:40 UTC
(In reply to Nate from comment #6)
Sorry, I forgot to say that the model is a HP Color LaserJet 2605dn
Comment 8 Tijl Coosemans freebsd_committer freebsd_triage 2016-09-07 08:57:02 UTC
(In reply to Nate from comment #6)
FreeBSD is a different Operating System than Raspbian.  You'll have to file a bug report at https://www.raspbian.org/RaspbianBugs.  In that report you can say there is a patch available in this FreeBSD bug.