"driverless" printer workflow has bad usability/ is partly broken

Bug #1813825 reported by Christian González
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
gnome-control-center (Ubuntu)
Incomplete
Low
Till Kamppeter

Bug Description

Hi,
since Ubuntu uses IPP ("driverless") printing, I have a bad time using printers. I don't know exactly which package this bug belongs to, I think it is gnome-control-center.

I have a Kyocera EcosysP6026cdn network printer, which provides a PPD file by the manufacturer. (But I tested this behaviour as well with other printers from eg. Brother, etc., and on Debian and Arch linux too). When I switch on the printer, after a few seconds, it is found in Ubuntu and installed automatically as "Kyocera_ECOSYS_P6026cdn". So far, so good.

1) I can't remove this printer. If I WANT to install it using another protocol (dnss etc), it adds another printer, and I have 2 Printers. So it should be easy to switch off "driverless" printing.

2) Using it as "Default printer" does not work. Clicking the cog wheel, and using the menu item "Use printer by default" is clickable, but it does not save any setting: "printers-cc-panel-WARNING **: 20:45:36.812: cups-pk-helper: setting default printer to Kyocera_ECOSYS_P6026cdn failed: client-error-not-found"

3) "Printing Options" opens an empty dialog, see screenshot attached. This dialog is useless.

4) The "Printer Detail" dialog shows a "null" address and links to "(null):631", which is a 404.

I think this "driverless" printing is still in a very "unstable" state. It helps discovering printers in new Networks where I attach too with my laptop, and I can print there basically, But most of the day I use my own printer in my office or at home, and I want to have my special settings for exact this printer with color profile, duplex settings etc.
And this all is not possible with driverless printing.

So, if you don't "fix" all the not-working options in the UI, please at least give us an option to easily switch off driverless printing at all. I really prefer the "old school" way of installing printers.

ProblemType: Bug
DistroRelease: Ubuntu 18.04
Package: gnome-control-center 1:3.28.2-0ubuntu0.18.04.2
ProcVersionSignature: Ubuntu 4.15.0-43.46-generic 4.15.18
Uname: Linux 4.15.0-43-generic x86_64
ApportVersion: 2.20.9-0ubuntu7.5
Architecture: amd64
CurrentDesktop: ubuntu:GNOME
Date: Tue Jan 29 19:34:39 2019
InstallationDate: Installed on 2019-01-27 (1 days ago)
InstallationMedia: Ubuntu 18.04.1 LTS "Bionic Beaver" - Release amd64 (20180725)
SourcePackage: gnome-control-center
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Christian González (droetker) wrote :
Revision history for this message
Christian González (droetker) wrote :

Additionally, since "driverless" printing, I always have a printer named "print" in my printing dialog, which I can't print to, and can't delete neither. Print jobs are denied at any time there.

Revision history for this message
Sebastien Bacher (seb128) wrote :

Thank you for your bug report. Could you attach your journalctl log from a boot where you triggered the issues described?
Could you also add your logs from /var/log/cups?

Till, do you have any idea about those issues?

Changed in gnome-control-center (Ubuntu):
assignee: nobody → Till Kamppeter (till-kamppeter)
importance: Undecided → Low
status: New → Incomplete
Revision history for this message
Christian González (droetker) wrote :

I'm sorry to write "more than" one problems into one bug, but from a users POV they are all the same - seen as "usability" bug. If you tell mo more how I can help, I can also file separate ones if this is needed. But to gather information, maybe it's best to leave it ATM as one?
Logs attached, irrelevant parts snipped.

Revision history for this message
Christian González (droetker) wrote :
Revision history for this message
Sebastien Bacher (seb128) wrote :

Thanks for the info, the logs don't have much though :/

The journal has that
gnome-control-c[31150]: gtk_container_add: assertion 'GTK_IS_CONTAINER (container)' failed

It would be interesting to get a backtrace of that warning, unsure if you know your were around debugging enough to do that though?

Basically you would need to
- enable the debug packages repository as explained on https://wiki.ubuntu.com/Debug%20Symbol%20Packages and install the gnome-control-center-dbgsym libgtk-3-0-dbgsym libglib2.0-0-dbgsym at least
- get a backtrace using gdb, the principle is explained on https://wiki.ubuntu.com/Backtrace but to get the one from the log you would need to "b g_log" and type "c" until you get to a call corresponding to the gtk_container_add warning

If you want to try that it would be nice, if it's too technical for you that's fine

Reading the description again I think the issues are

1- there is no easy way to "block" a specific ipp printer to be auto-added, which can either be a feature missing from cups or one that exists but has no UI interface, Till should know about that

2- the 'cups-pk-helper: setting default printer to Kyocera_ECOSYS_P6026cdn failed: client-error-not-found' error, which is probably a problem on the cups/cups-pk-helper side. It's weird that nothing got logged about in the journal or cups logs though...

3- the settings UI not dealing well without the 'situation' (unsure what bits are confusing it though)

Does system-config-printer deal works better? Does it list the right printer and allow you to see the options or does it have issues as well?

Revision history for this message
Christian González (droetker) wrote :

Ok; I never used gdb before, just visual debuggers.
I'm not sure this is not a blind alley. The "gtk_container_add warning" is not reproducible and has IMHO nothing to do with this bug(s) (just IMHO).

As far as I understood, "b g_log" sets a breakpoint at the g_log() function, right?
Just too understand right; I first have to set "b g_log", and then "run" the program, right, and "c" means "continue".
I tried everything here, including deleteing the printer, and watching it respawn. Only logs I got was:

    Thread 1 "gnome-control-c" hit Breakpoint 1, g_log (log_domain=log_domain@entry=0x5555556b6a97 "printers-cc-panel",
        log_level=log_level@entry=G_LOG_LEVEL_DEBUG,
        format=format@entry=0x5555556b8428 "Could not check 'Clean' maintenance command: %s") at ../../../../glib/gmessages.c:1428
    1428 in ../../../../glib/gmessages.c

Which seems completely unrelated to me.

BTW: system-config-printer does NOT show the "driverless" printer at all.

Revision history for this message
Sebastien Bacher (seb128) wrote :

It seems you used gdb just right yes.

I was expecting those warnings to print when you try to open the printer options/details since those dialogs show empty and the warning looks like they add with missing widgets. Oh well, thanks for trying :)

At this point we should wait for Till (who is the maintainer of the print stack in Ubuntu) to comment, maybe he has more ideas on the issue

Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

First, driverless printers (automatically created queues for IPP printers) can be generated by cups-browsed and by CUPS.

So as a first approach you could try to stop cups-browsed to see whether you still get auto-created printers or not.

sudo systemctl stop cups-browsed

stops cu[ps-browsed and

sudo systemctl start cups-browsed

starts it again. Please tell whether this makes the auto-created printer go away or whether it changes its behavior to the better or to the worse.

Another point to investigate is the PPD file (/etc/cups/ppd/<queue name>.ppd) of the auto-created printer. If it is not present or broken, the GUI can misbehave. The PPD files are automatically generated based on information polled from the printer via IPP. The IPP 2.x standards require that the printer provides sufficient information.

Print queues auto-created by cups-browsed are full-featured CUPS queues and are present all the time while the printer is turned on and cups-browsed is running. So they have a PPD file all the time.

Print queues auto-created by CUPS do only temporarily appear. They are created when a job is printed and they stay only for 1 minute after the job finishes. These queues are created purely by CUPS, cups-browsed does not need to be running.

So check the presence of

/etc/cups/ppd/Kyocera_ECOSYS_P6026cdn.ppd

Does it exist? Please attach it.

If it does not exist, run following command:

lp -d Kyocera_ECOSYS_P6026cdn ~/,bashrc

and post the screen output here. Does the job get printed?

Then immediately check the presence of

/etc/cups/ppd/Kyocera_ECOSYS_P6026cdn.ppd

Does it exist? Please attach it.

You can also check by yourself:

sudo cupstestppd /etc/cups/ppd/Kyocera_ECOSYS_P6026cdn.ppd

Does this give any FAILs? Please post the output here.

You can also display the options defined by a printer's PPD file via

lpoptions -p Kyocera_ECOSYS_P6026cdn -l

If the queue is a temporarily auto-created queue from CUPS you most probably will need to run this command within 1 minute after printing.

You can list queues which CUPS would auto-generate on-demand via

lpstat -e

The queues listed here but not listed by

lpstat -v

are queues which CUPS creates on-demand.

A problem is that the GUIs often do not fully support such temporary, on-demand queues. Therefore we keep cups-browsed on Ubuntu so that we get permanent auto-generated queues.

Please also run the following command (printer must be turned on):

driverless

This will give you the printer's IPP URI as output. Please post it here.

ipptool -tv <URI> get-printer-attributes-2.0.test > attrs.txt

Replace <URI> by the URI you obtained with the "driverless" command and attach the output file, attrs.txt to this bug report. This is the information which gets polled from the printer to auto-generate the PPD file.

Please do not compress and do not package together any of the files we ask you to attach. Please attch them one-by-one, so that one can easily read them out of the browser when reading this bug report. Thanks.

Revision history for this message
Christian González (droetker) wrote :

First small thing: stopping cups-browsed dowsn't change anything. Even when stopped, deleting a driverless printer lets it popup again after a few seconds.
Rest tomorrow.

Changed in gnome-control-center (Ubuntu):
status: Incomplete → New
Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

Christian, where is the rest which you wanted to post the day after Jan 30?

Changed in gnome-control-center (Ubuntu):
status: New → Incomplete
Revision history for this message
Christian González (droetker) wrote :

one shouldn't make promises. Follows ASAP. Give me a few days.

Revision history for this message
Christian González (droetker) wrote :

This file is named .0 because I have the printer installed with a custom ppd file (from kyocera) manually - with the same name, so I think cups adds the .0 automatically.

Revision history for this message
Christian González (droetker) wrote :

Second file. The printer is added automatically twice. Maybe this is because the printer has a print server, which exports the printer again and announces it to the network? KM15881D.local is the network name of the printer.

Revision history for this message
Christian González (droetker) wrote :

I deleted all printers and waited for CUPS / driverless to find them again.
Here a few CLI outputs (which are small enough so I dare to spost them inline )

$ ls -1 /etc/cups/ppd/
Kyocera_ECOSYS_P6026cdn.ppd
Kyocera-ECOSYS-P6026cdn.ppd
Kyocera_ECOSYS_P6026cdn.ppd.O
Kyocera-ECOSYS-P6026cdn.ppd.O

$ sudo systemctl stop cups-browsed
$ ls -1 /etc/cups/ppd/
Kyocera-ECOSYS-P6026cdn.ppd
Kyocera-ECOSYS-P6026cdn.ppd.O

$ sudo systemctl stop cups-browsed

I see 2 in the GUI, why there are 4 files here - I don't know why.
Seems that cups-browsed adds the "_" separated files

$ lp -d Kyocera-ECOSYS-P6026cdn ~/.bashrc
Anfrage-ID ist Kyocera-ECOSYS-P6026cdn-52 (1 Datei(en))

$ sudo cupstestppd /etc/cups/ppd/Kyocera-ECOSYS-P6026cdn.ppd
/etc/cups/ppd/Kyocera-ECOSYS-P6026cdn.ppd: FAIL
      **FAIL** Missing choice *Option18 SDCard in UIConstraints "*KCCollate CustomBox *Option18 SDCard".
      **FAIL** Missing choice *Option18 SDCard in UIConstraints "*Option18 SDCard *KCCollate CustomBox".
        WARN Datei einthält gemischt CR, LF, und CR LF Zeilenmenden.
        WARN Size "A5" should be "149x210mm".
        WARN Size "A6" should be "105x149mm".
        WARN Size "B6" should be "128x182mm".
        WARN Size "OficioII" should be the Adobe standard name "FanFoldGermanLegal".
        WARN Size "P16K" should be "7,75x10,75".
        WARN Size "OficioMX" should be the Adobe standard name "Oficio".

$ lpstat -e
Kyocera-ECOSYS-P6026cdn

$ lpstat -v
Gerät für Kyocera-ECOSYS-P6026cdn: dnssd://Kyocera%20ECOSYS%20P6026cdn._ipp._tcp.local/?uuid=4509a320-003a-00ad-0042-0025074ef136

$ driverless
ipp://KM15881D.local:631/ipp/print

But where is the "get-printer-attributes-2.0.test" file - I cant find this file.

$ ipptool -tv ipp://KM15881D.local:631/ipp/print get-printer-attributes-2.0.test > ~/attrs.txt
ipptool: Unable to open test file get-printer-attributes-2.0.test - No such file or directory

It seems so confusing to me as there are no reliable on/offs: sometimes the files are available, sometimes not.
Maybe this outputs help a bit. Hope you see something in there.

Revision history for this message
Clint Steed (steedalion) wrote :

If I can expand upon duplex printing I have encountered an issue in the control centre 18.10 too.
When enabling duplex in gnome-control-center it does not work,

$>lpoptions -l
...
Duplex/Two-sided: *None DuplexNoTumble DuplexTumble
...

but when doing so in system-config-printer it does

$>lpoptions -l
...
Duplex/Two-sided: None *DuplexNoTumble DuplexTumble
...

Revision history for this message
Sebastien Bacher (seb128) wrote :

@Clint, that seems another issue, could you maybe open a new bug about that one?

Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

Christian, first, it seems that you did "cupstestppd" on a PPD file which is not auto-generated:

----------
$ sudo cupstestppd /etc/cups/ppd/Kyocera-ECOSYS-P6026cdn.ppd
/etc/cups/ppd/Kyocera-ECOSYS-P6026cdn.ppd: FAIL
      **FAIL** Missing choice *Option18 SDCard in UIConstraints "*KCCollate CustomBox *Option18 SDCard".
      **FAIL** Missing choice *Option18 SDCard in UIConstraints "*Option18 SDCard *KCCollate CustomBox".
        WARN Datei einthält gemischt CR, LF, und CR LF Zeilenmenden.
        WARN Size "A5" should be "149x210mm".
        WARN Size "A6" should be "105x149mm".
        WARN Size "B6" should be "128x182mm".
        WARN Size "OficioII" should be the Adobe standard name "FanFoldGermanLegal".
        WARN Size "P16K" should be "7,75x10,75".
        WARN Size "OficioMX" should be the Adobe standard name "Oficio".
----------

This seems to be from a manufacturer-supplied PPD file. The auto-generated ones do not have "UIConstraints" lines. They also do not contain mixed line ends.

Also sorry for giving you a wrong "ipptool" command line. Please run the command line

ipptool -tv ipp://KM15881D.local:631/ipp/print get-printer-attributes.test > ~/attrs.txt

The file get-printer-attributes-2.0.test only came with a later CUPS version.

Please attach the attrs.txt file.

*.O files are generated by CUPS, to put the original version of a PPD file when they change or replace it. Only the files without ".O" are relevant for their print queue.

Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

Christian, both your attached PPD files are auto-generated, and both pass cupstestppd.

Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

I think the problem here is CUPS' own method of generating temporary queues for discovered driverless printers. gnome-control-center, and probably other GUIs, like the GTK print dialog, cannot cope with this. So we leave this bug report assigned to gnome-control-center for now.

Christian, if you stop cups-browsed you have still auto-generated print queues. This is because CUPS itself kicks in here.

If you run

lpstat -e

you see queue names which you do not see with

lpstat -v

The extra queue names are temporary CUPS queues. These are created by CUPS if you try to print on them or to access them in general, and they are removed by CUPS again after 1 minute of inactivity.

gnome-control-center probably gets completely confused by that. It can have seen such a queue as actual queue, shortly after such a queue was used, and added it to its list. Now, more than a minute later, the user clicks on the entry, the queue is not there any more, and he gets something unexpected, an error message, an empty option dialog, a "(null):631".

gnome-control-center and all other printing GUIs need to be adapted to CUPS' temporary print queues.

Revision history for this message
Christian González (droetker) wrote :

First, here the new attrs.txt

Revision history for this message
Christian González (droetker) wrote :

Exactly:

# lpstat -e
ECOSYS-P6026cdn
Kyocera_ECOSYS_P6026cdn

# lpstat -v
Device for ECOSYS-P6026cdn: socket://192.168.4.2

That makes sense to me - as I could swear that I really printed on a printer, and later (maybe after rebooting, the next day etc) I try to print on the same one, and it doesn't work.

Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

This temporary queue (Kyocera_ECOSYS_P6026cdn) is actually not needed here. Therefore I have reported this upstream issue on CUPS:

https://github.com/apple/cups/issues/5546

But anyhow, the GUIs need to correctly support temporary print queues of CUPS.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.