Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#75246 - Autodiscovered driverless printers do not appear in Qt print dialog

Attached to Project: Arch Linux
Opened by Sergio Callegari (callegar) - Tuesday, 05 July 2022, 08:22 GMT
Last edited by Antonio Rojas (arojas) - Friday, 29 July 2022, 06:56 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To No-one
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:

Cups supports autodiscovery of network printers supporting driverless operation. This is increasingly important in office environments as large shared printers and multifunction devices more and more often only support driverless operation for linux.

Using autodiscovered printers is generally possible in arch. In KDE they correctly appear in the "system settings" "Printers" page. Most applications print just fine on these autodiscovered printers (e.g. libreoffice, gimp, etc.).

Unfortunately, it is impossible to print on these autodiscovered printers from Qt applications, because the Qt print dialog does not list these autodiscovered printers among the possible destinations, so it is not possible to target them for printing. This is a problem affecting all KDE applications including okular, kate, etc.

The issue is not present on other distros (e.g., ubuntu 22.04).

Additional info:
Qt 5.15.5

Steps to reproduce:
1. activate `cups-browsed` if not active
2. check that you have some auto-discoverd printer in the system settings printers page or accessing localhost:631
3. open a document in okular
4. Pick print from the file menu
5. Observe the print dialog opening and note that the auto discovered printer is not there, so you cannot print on it
This task depends upon

Closed by  Antonio Rojas (arojas)
Friday, 29 July 2022, 06:56 GMT
Reason for closing:  Fixed
Additional comments about closing:  qt5-base 5.15.5+kde+r174-1
Comment by Sergio Callegari (callegar) - Wednesday, 06 July 2022, 15:58 GMT
I have googled about this issue. Apparently every distro patches Qt in some different way wrt the handling of autodiscovered printers. This appears to be because the way in which this is implemented in Qt is rather suboptimal wrt the other toolkits and may involve some delay in the appearance of the print dialog when autodiscovered printers are meant to be displayed. Some distros enable this feature by default but let users disable it by setting an environment variable. Other distros do it the other way round (e.g., see https://forums.opensuse.org/archive/index.php/t-530664.html).

Now what is unclear is what arch does in this sense. IMHO, a way to enable the listing of autodiscovered printers in Qt applications should be introduced (or just documented if it is already there), otherwise users won't be able to print at all in certain office environments. I also suggest enabling the listing of autodiscovered printers by default, letting experienced users opt-out (rather than the other way round), otherwise Qt applications are inconsistent with anything else.
Comment by Antonio Rojas (arojas) - Wednesday, 06 July 2022, 16:11 GMT
I see in opensuse they have a patch that adds this feature (disabled by default), which hints that Qt does not support this out of the box. Which other distros are you refering to?
Comment by Sergio Callegari (callegar) - Thursday, 07 July 2022, 07:11 GMT
My other direct experience is with ubuntu that enables by default the listing of the auto-discovered printers. In ubuntu, not long ago, I have personally witnessed the large delay in the appearance of the Qt print dialog, but more recently something must have changed because the Qt print dialog now is shown almost instantaneously. Cannot say if this is due to changes in ubuntu itself or our network, or some printer in our network, though.

I have questioned people at openprinting and this is what they say toghether with some considerations of mine:
- cups developers say the list of available printers should be obtained via the the `cupsGetDests` and `cupsEnumDests` APIs that also report auto discovered printers. These should be used together with the corresponding CUPS APIs that handle creating a temporary print queue (for the auto-discovered printers) as needed. This is the recommended way. I suspect that some patched version of the Qt print dialog were probably doing it differently, so the delay.
- one of the reasons for *not* showing the autodiscovered printers (apart from the delay) is that in certain environments the print dialog may end up with a list of printers that is huge or very messy. Clearly, installing locally only the interesting printers and not showing the autodiscovered ones avoids this (and indeed only shows the interesting printers!). However, this has two major disadvantages: it does not work for those printers that can print driverless and so do not have drivers for linux; and it does not work well in environments where printers get routinely replaced with different models (e.g. because of leasing) without giving proper notice about the new ones and their drivers, so that trying to print, realizing there is a different printer, having to interrupt whatever task was done to install the new one looking for the drivers is not nice. The cups people say that the issue of the messiness of the printers list should be solved using *filters*, that unfortunately do not yet have a nice GUI for configuration.
Comment by Antonio Rojas (arojas) - Thursday, 07 July 2022, 16:09 GMT
That doesn't really give me much to go with, unfortunately. Unless there's some (very well) hidden configuration option or missing dependency that I'm missing, it seems to me that this relies on unofficial patches, which we're not going to use.

Loading...