Bug 2193385

Summary: avahi-daemon does not add network printer to CUPS
Product: [Fedora] Fedora Reporter: Kirill Malgichev <kmalgich>
Component: avahiAssignee: Michal Sekletar <msekleta>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 38CC: msekleta, mzeuom, pemensik, rdieter, zdohnal
Target Milestone: ---Keywords: Desktop
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-09-05 13:03:27 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 2123634    
Bug Blocks:    

Description Kirill Malgichev 2023-05-05 13:23:54 UTC
I have freshly installed Fedora 38 and found that Google Chrome does not show my network printer (HP ENVY 5530 printer + scanner) in the printing dialog that can be opened with the Chrome Ctrl+P shortcut or via the browser menu.

The printer was automatically found and configured by avahi-daemon. I can see it in GNOME Control Center, but there is no printer at the CUPS Web UI (http://localhost:631/printers/).

I tried to add the printer manually using the "Add printer" button in GNOME Control Center. It was added successfully to CUPS and also updated in GNOME Control Center. Now I can see the printer in the Google Chrome printing dialog, but there seem to be some driver problems since I can only print in low quality and only in black and white, even though it was different in Chrome.

The next step was to disable avahi-daemon completely and add the printer manually using the "Add printer" button in GNOME Control Center. This seemed to fix all the problems with Google Chrome printing. However, I now need to enter the root password every time I try to use the scanner with the simple-scan application. Additionally, I think I will need to reinstall the printer each time its IP address changes.

Finally, I found that the cups-browsed service was disabled. So, I removed the manually installed printer, enabled the avahi-daemon service again, and also enabled the cups-browsed service. Now I can see my network printer configured automatically in GNOME Control Center as well as in the CUPS UI. I have my printer as an option in the Google Chrome printing dialog as well, and everything works as expected.

I wonder why the cups-browsed service is disabled by default?

Reproducible: Always

Steps to Reproduce:
1. Use correctly configured network printer.
2. Check that it was added to the gnome-control-center by the avahi-daemon service
3. Check printer at CUPS UI at http://localhost:631/printers/
Actual Results:  
Printer is configured at gnome-control-center and available for some GNOME apps but not added at CUPS, so it does not available for applications that relies on CUPS.

Expected Results:  
Printer should be configured at both gnome-control-center and CUPS.

This is reproducible on freshly installed Fedora 38 Workstation. Enabling cups-browsed service seemed to fix the problem but this service is disabled by the default.

Comment 1 Zdenek Dohnal 2023-09-05 13:03:27 UTC
This is Google Chrome bug - the print dialog should be able to see CUPS temporary queue via cupsGetDests2() or cupsGetNamedDest() API.

In case you would like to use Chromium, it is affected as well - https://bugzilla.redhat.com/show_bug.cgi?id=2123634 .

Closing this as NOTABUG, since Google Chrome is not in official Fedora repos.