CUPS failing to print due to missing mdns_minimal in /etc/nsswitch.conf

I’m on Fedora Silverblue 40. Since a while, i’ve had issues with my network printer (Brother HL, but I think this is not important for this here).

GNOME wouldn’t let me add the printer (“Failed to add printer” error) and the one that is listed without adding one, just won’t print without any user facing error message.

Looking through the cups messages, i’ve found this when trying to add the printer in GNOME settings:

$ sudo journalctl -u cups.service
<...> Cannot connect to remote printer ipp://abc.local
copy_model: empty PPD file
<...>

The search engine the routed me to https://wiki.archlinux.org/title/CUPS/Troubleshooting → 3.4 Unable to locate PPD file

Indeed, my /etc/nsswitch.conf was missing the mdns keywoard in the hosts line.

I figured out, that on Fedora I need to enable it with these commands:

sudo authselect enable-feature with-mdns6
sudo authselect enable-feature with-mdns4

(maybe just one of the is enough)

This will add the mdns_minimal to the /etc/nsswitch.conf:

$ grep ^hosts /etc/nsswitch.conf 
hosts:      files mdns_minimal [NOTFOUND=return] resolve [!UNAVAIL=return] myhostname dns

Maybe i’ve overridden the old nsswitch.conf when I was initially using sudo authselect select local.