3.3 KiB
Proposal
Why
macOS adds the queue with Use: = Generic PostScript Printer instead of the
driverless AirPrint Printer, so duplex, colour and tray 2 stay hidden — the
generic PPD gates duplex behind APOptionalDuplexer False. The certificate is
no longer the cause: curl https://podp.local:631/ succeeds, CUPS serves the
expected certificate, and every IPP query the Mac makes against the queue
succeeds (7/7 HTTP_STATUS_OK, ipp status 0). iOS, which queries the printer
live, already offers every option.
The remaining cause is a Bonjour sub-type. Disassembling
AddPrinter.app/Contents/Frameworks/PMBrowser.framework (macOS 27.0.1) shows the
gate for the AirPrint driver entry:
-[DNSSDPrinter isShared]returns YES as soon as any of the printer's registration types ends in,_cups; the registration types are theregTypestrings the Bonjour browse callback reports.-[DNSSDPrinter airprintMatch]returns nothing whenisSharedis YES, and only builds the AirPrint driver whenisAirPrintis YES — that is, when the service was browsed under_ipp._tcp,_universalor_ipps._tcp,_universal.-[DNSSDBrowser startBrowsing]browses_ipp._tcp,_cupsand_ipp._tcp,_universal(and the_ippsequivalents), so a printer that carries both sub-types is classified as shared and never gets the AirPrint driver.
CUPS registers DNSSDSubTypes, whose default is _cups,_print,_universal
(scheduler/conf.c), which is exactly that combination. The queue is therefore
advertised as a shared CUPS printer and macOS falls back to its generic driver.
The sub-types are configurable with the BrowseDNSSDSubTypes directive.
What Changes
- Set
BrowseDNSSDSubTypes _print,_universalincupsd.conf, so the queue is advertised with the AirPrint (_universal) sub-type and without the CUPS (_cups) one._printis kept for clients that look for it. - Keep CUPS' own advertising otherwise (the unconditional
_printer._tcpregistration, theprinter-typeTXT key and the resulting/cupsdevice URI), so CUPS clients keep resolving the queue exactly as before. - Correct the README: the "macOS adds the printer as a Generic PostScript printer" section blames the certificate alone and recommends adding the queue from the command line; it now documents the sub-type cause first and how to confirm what is advertised.
Non-goals: hand-written Avahi service files, and patching CUPS' TXT record. Neither is needed unless the sub-type alone turns out to be insufficient.
Capabilities
New Capabilities
Modified Capabilities
printserver/cups: the "Printer is shared and discoverable" requirement gains a scenario that fixes which Bonjour sub-types are advertised, because the advertised sub-types decide whether macOS offers the driverless AirPrint driver.
Impact
cupsd.conf: one directive plus an explanatory comment.README.md: troubleshooting section corrected.openspec/specs/printserver/cups/spec.md: one scenario added.- Clients: macOS should offer AirPrint Printer under Use:; the
_ipp/_ippsservices, the/cupsdevice URI and Linux/Windows clients are unaffected. macOS caches the old classification per printer entry, so an existing entry has to be removed and added again.