Bug 1765328 - [RFE] gnome-control-center should handle cups temporary queues in some way
Summary: [RFE] gnome-control-center should handle cups temporary queues in some way
Keywords:
Status: ASSIGNED
Alias: None
Product: Fedora
Classification: Fedora
Component: gnome-control-center
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
Assignee: Marek Kašík
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 1567984 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-10-24 20:31 UTC by Pierre-YvesChibon
Modified: 2023-07-13 15:26 UTC (History)
9 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed:
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Pierre-YvesChibon 2019-10-24 20:31:38 UTC
Description of problem:
I have an new printer, an epson WF-C5710 which has some surprising behaviors in Fedora.

If I install the printer via USB, I see this in the cups' logs when trying to print something:
Oct 24 22:11:18 flame.pingoured.fr cupsd[671]: REQUEST localhost - - "POST /printers/WF-C5710 HTTP/1.1" 200 113049 Print-Job successful-ok
Oct 24 22:11:19 flame.pingoured.fr cupsd[671]: WF-C5710 pierrey 149 [24/Oct/2019:22:11:19 +0200] total 0 - localhost 202001_Hotel_Mariage_Etienne.pdf - two-sided-long-edge

nothing is printed.

If I install the printer via network and try to print the same document, this is what's in the logs:
Oct 24 22:15:10 flame.pingoured.fr cupsd[3588]: REQUEST localhost - - "POST / HTTP/1.1" 200 347 Create-Printer-Subscriptions successful-ok
Oct 24 22:15:16 flame.pingoured.fr cupsd[3588]: REQUEST localhost - - "POST / HTTP/1.1" 200 6851852 CUPS-Get-PPDs -
Oct 24 22:15:24 flame.pingoured.fr cupsd[3588]: [Client 721] Returning IPP server-error-not-accepting-jobs for Print-Job (ipp://localhost/printers/EPSON_WF_C5710_Series) from localhost.
Oct 24 22:15:24 flame.pingoured.fr cupsd[3588]: REQUEST localhost - - "POST /printers/EPSON_WF_C5710_Series HTTP/1.1" 200 425 Print-Job server-error-not-accepting-jobs


Now where this gets funny is that if instead of trying to print a pdf, I try to print via libreoffice:
- it prints successfully by usb
- it can print successfully by wifi

Which then allows me to print successfully a pdf as well only by network though, by usb it'll tell me the print has completed while it did not happen and on the journal of the printer it appears has having been cancelled.


If I then restart cups, in the logs I see:
Oct 24 22:21:38 flame.pingoured.fr systemd[1]: Stopping CUPS Scheduler...
Oct 24 22:21:38 flame.pingoured.fr systemd[1]: cups.service: Succeeded.
Oct 24 22:21:38 flame.pingoured.fr systemd[1]: Stopped CUPS Scheduler.
Oct 24 22:21:38 flame.pingoured.fr systemd[1]: Starting CUPS Scheduler...
Oct 24 22:21:38 flame.pingoured.fr cupsd[5949]: [Job 143] Files have gone away.
Oct 24 22:21:38 flame.pingoured.fr cupsd[5949]: Unable to queue job for destination "ipp://flame.pingoured.fr/printers/EPSON_WF_C5710_Series".
Oct 24 22:21:38 flame.pingoured.fr cupsd[5949]: Unable to queue job for destination "ipp://flame.pingoured.fr/printers/EPSON_WF_C5710_Series".
Oct 24 22:21:38 flame.pingoured.fr systemd[1]: Started CUPS Scheduler.

If I try to print a pdf, the printer has disappeared from the menu and the USB one shows its usual "everything-is-fine-except-for-the-part-that-I-in-fact-did-not-print-anything"

Back to libreoffice where the network printer still appears and prints correctly, allowing the printer to appear again on evince and print successfully a pdf.

So in summary:
- LibreOffice does things* right and it just works (*: but I have no idea which "things")
- Evince/GNOME never works via USB and via the network only works if I've printed something in libreoffice before



Version-Release number of selected component (if applicable):
cups-2.2.12-2.fc30.x86_64
epson-inkjet-printer-escpr-1.6.41-1.1lsb3.2.fc30.x86_64  (though the behavior seems unrelated to this package as I had it before installing it)

How reproducible:
always now that I've found the flow to reproduce it

Steps to Reproduce:
1. Install the printer
2. Try printing by USB or network from Evince
3. Try printing from libreoffice
4. Try printing by USB or network from Evince (or Firefox)

Actual results:
Step 2 doesn't print anything
Step 3 works fine
Step 4 works in the network case and not in the USB one

Expected results:
USB and network behave the same and preferably print :)

Additional info:
Note: I found out that epson-inkjet-printer-escpr-1.6.41-1.1lsb3.2.fc30.x86_64 doesn't ship the driver for that printer (reported in https://bugzilla.redhat.com/show_bug.cgi?id=1765324) but trying to install the ppd manually doesn't seem to change anything to the situation.

This is also reproducible in a fully updated F31 machine.

Comment 1 Zdenek Dohnal 2019-10-25 08:48:04 UTC
Hi Pierre,

thank you for reporting the issue!

I'll underscore the questions in the text below, because it will be quite long :)

Would you mind telling me your network topology? Because if the printer is in the same network as your machine, it would explain a lot.
------------------------------------------------

Let's assume it is true.

CUPS, since aprox 2.2.0 IIRC, has a feature of CUPS temporary queues for IPP everywhere enabled printers - that means you do not need any print queue installation and no drivers for to be able to print. When you check 'lpstat -a' which usually shows you local print queues, there is nothing. And that's the correct behavior.

The print queue will appear only when you really want to print - that means it will appear only when you are in print dialog of an application and it will disappear after successful printing.

The problem is, not all apps are actually aware of/support this feature, because they use old CUPS API or someone's else API. The point is, from what I found out, LibreOffice is capable of CUPS temporary queues, but at least evince is not.

That's all the case if the printer is in your local network.

Other questions:
----------------

1) What did you mean by 'installed'? There are several means of installation - GNOME printers, CUPS web ui, found by cups-browsed, system-config-printer, by command line...

2) Would you mind attaching ppd of the print queue which is created by app you used for installation?

Tip:
----

If your printer supports ipp everywhere (it probably does, based on libreoffice behavior) and have port 631 opened, you can even create permanent print queue too, either by command (uri has common structure, but some vendors do not respect it, if it won't work, run 'sudo lpinfo -l -v' and use ipp uri found there):

$ sudo lpadmin -p <your_print_queue_name> -v ipp://<IP or hostname of printer>:631/ipp/print -m everywhere

or by CUPS web ui (when cups service is running) - choose 'Administration' -> 'Add printer' -> 'ipp printer' -> enter uri -> choose 'Epson' manufacturer -> model 'IPP everywhere'.

I tried it only on network printer, I do not have usb ipp everywhere printer, so I'm not sure how it will work for usb printer with IPP eve.

Comment 2 Pierre-YvesChibon 2019-10-28 19:44:06 UTC
Sorry for the late reply.

> Would you mind telling me your network topology? Because if the printer is in the same network as your machine, it would explain a lot.

The printer is in the same house-network indeed.

> What did you mean by 'installed'? There are several means of installation - GNOME printers, CUPS web ui, found by cups-browsed, system-config-printer, by command line...

I have installed it via the GNOME UI for printer, so I guess GNOME printers.

> Would you mind attaching ppd of the print queue which is created by app you used for installation?

Happy to, do you know where I'll find it?

``lpinfo -l -v`` points me to:

````
Device: uri = ipp://EPSONAB3686.local:631/ipp/print
        class = network
        info = EPSON WF-C5710 Series (driverless)
        make-and-model = EPSON WF-C5710 Series
        device-id = MFG:EPSON;MDL:WF-C5710 Series;CMD:PWGRaster,AppleRaster,PWG,URF,JPEG;
        location = 
````

in 
> $ sudo lpadmin -p <your_print_queue_name> -v ipp://<IP or hostname of printer>:631/ipp/print -m everywhere

Where/how can I define the value of <your_print_queue_name>? Can I pick anything or are there standard I should follow?


Thank you for your detailed answer, the explanation you gave sounds quite close to the behavior I am seeing!

Comment 3 Zdenek Dohnal 2019-10-29 07:53:37 UTC
(In reply to Pierre-YvesChibon from comment #2)
> Happy to, do you know where I'll find it?

You can find ppds in /etc/cups/ppd dir.


> in 
> > $ sudo lpadmin -p <your_print_queue_name> -v ipp://<IP or hostname of printer>:631/ipp/print -m everywhere

I'm sorry, I forgot you need to have '-E' at the end of command too.

> 
> Where/how can I define the value of <your_print_queue_name>? Can I pick
> anything or are there standard I should follow?

It cannot contain symbols from the start of ASCII table to ' ' (space) included, '/', 'DEL' (symbol from ascii table at value 127) and '/'.  

> 
> 
> Thank you for your detailed answer, the explanation you gave sounds quite
> close to the behavior I am seeing!

Comment 4 Pierre-YvesChibon 2019-12-17 09:05:58 UTC
Sorry for the response time.

I have got the printer working nicely using:
``
sudo lpadmin -p EPSON_WF_C5710 -v ipp://EPSONAB3686.local:631/ipp/print -m everywhere -E
``

I can now print fine from evince, firefox without having to print an empty page in libreoffice first :)

Thanks for your help.


I don't know what we want to do about this ticket, technically we got things working but it feels like a workaround more than a proper fix, but I don't that this ticket is the right place to track the proper fix.
What do you think/recommend?

Comment 5 Zdenek Dohnal 2019-12-17 12:41:06 UTC
Hi Pierre,

in my opinion gnome control center/evince/gtk should support cups temporary queues correctly instead of needing to add print queue as permanent.

So I'll reassign the bug and change the component.

Comment 6 Zdenek Dohnal 2019-12-17 13:27:09 UTC
Hi Pete,

there is cups temporary queues feature in CUPS since 2.1.x and it would be good if gnome-control-center was able to work with them.

What is cups temporary queue?
-----------------------------

It is a queue, which is designed to show up only when an user needs it - during printing dialog. It disappears after successful printing. This feature is supported by most printers released 2010 and newer and it uses IPP 2.0 protocol for getting all needed information about printer (instead of installing ppd file) and Avahi for discovering printer.

How to find out that printer supports such behavior:
----------------------------------------------------

You can f.e. see it in output of 'sudo lpinfo -l -v':

Device: uri = ipp://EPSONAB3686.local:631/ipp/print
        class = network
        info = EPSON WF-C5710 Series (driverless)
        make-and-model = EPSON WF-C5710 Series
        device-id = MFG:EPSON;MDL:WF-C5710 Series;CMD:PWGRaster,AppleRaster,PWG,URF,JPEG;
        location = 

or you can see it by 'lpstat -e'.

You can ask for it through CUPS API - more info[1].


GNOME control center now supports those temporary queues in kind of way, which confuses users - it tries to install them with ppd found by scp-dbus-service instead of does not installing them at all or making temporary queue permanent.

I have several ideas on my mind:

1) control-center will show temporary queues when user will search for printers, noting that they are temporary and if you will install them, you will make them permanent

2) control-center will show temporary queues by default when user opens 'Printers' tab - when user clicks on one of them, he will show that it is temporary queue and you can make them permanent

(printing options for temporary queue are available only during printing dialog, so options in GNOME control center should be unavailable)

3) ignore such queues


Would you mind coordinating with upstream and finding out how it should be solved?

[1] https://www.cups.org/doc/cupspm.html#finding-available-destinations

Comment 7 Pete Walter 2020-01-10 10:40:10 UTC
Hi Zdenek,

mkasik works on the printers support, not me. Reassigning.

Comment 8 Zdenek Dohnal 2020-02-17 17:08:33 UTC
*** Bug 1567984 has been marked as a duplicate of this bug. ***

Comment 9 Zdenek Dohnal 2021-01-04 15:30:46 UTC
*** Bug 1910013 has been marked as a duplicate of this bug. ***

Comment 10 Zdenek Dohnal 2023-07-13 15:26:07 UTC
*** Bug 2221364 has been marked as a duplicate of this bug. ***


Note You need to log in before you can comment on or make changes to this bug.