[cups] Autoselect correct PPD on Mac OS X?

Michael Sweet msweet at apple.com
Thu Jun 30 06:36:08 PDT 2016


Julian,

macOS prefers the "product" TXT record key when matching a PostScript driver (to the Product values in the PPD files); if that doesn't exist, we try (through a series of heuristics) to match the "ty" (make and model) key value against what is in the NickName of each PPD.  The make and model matching is, unfortunately, less than ideal thanks to missing or doubled manufacturer names in the TXT record and different names in the PPDs.

Different versions of macOS will behave differently - this is expected as bugs and differences in technology at the time will influence how each version will choose a driver.  Even how and when Add Printer looks up drivers that are available in Software Update is different in each macOS release.

When you publish a printer on your DNS server, make sure to include ALL of the TXT record key/value pairs.  As noted above, we start with the "product" key when matching a driver.  Also, the Bonjour Printing specification requires that a printer register the LPD protocol (_printer._tcp), even if it is not supported (port = 0), as it is considered the "flagship" protocol for service discovery (meaning that if you own the service instance name for _printer then you own it for _pdl-datastream, _ipp, _ipps, etc.)  Some versions of macOS enforced this and would not work without it, while newer versions are less pragmatic.



> On Jun 29, 2016, at 3:41 PM, Julian Daniel <jdaniel at smcdsb.on.ca> wrote:
> 
> After exhaustive testing, here's what I've found:
> 
> *Operating System CUPS Ver Comment*
> Mac OS X 10.4 1.1.23 Can't browse for IPP queues
> Mac OS X 10.5 1.3.11 Autoconfig chooses correct PPD
> Mac OS X 10.6 1.4.7 Generic PPD
> Mac OS X 10.7 1.5.4 Autoconfig chooses correct PPD
> Mac OS X 10.8 1.6.2 Generic PPD
> Mac OS X 10.9 1.7.2 Generic PPD
> Mac OS X 10.10 2.0.0 Generic PPD
> Mac OS X 10.11 2.10 Autoconfig chooses correct PPD
> Mac OS X 10.12DP 2.2 Autoconfig chooses correct PPD
> 
> Mac OS X 10.5, 10.7, 10.11, and 10.12 all correctly autoconfigure the PPD
> (downloading from the CUPS server if it doesn't exist pre-installed on the
> client CUPS) when choosing Xerox copiers.
> 
> Mac OS X 10.6, 10.8, 10.9, and 10.10 all fail to autoconfig and instead
> choose the Generic PPD when attempting to add a Xerox copier.
> 
> Mac OS X 10.4 will autoconfigure the PPD if I publish an LPR queue in
> addition to an IPP queue using Wide Area Bonjour.
> 
> All of the Macs tested were stock OSes with all current software updates
> installed. No Xerox software was installed on any of them. No additional
> apps besides those that install with the OS.
> 
> Do you have any idea why 10.6 and 10.8-10.10 don't autoconfigure the PPD -
> even with the Xerox driver installed? As I've mentioned previously, HP,
> Brother, and Samsung printers autoconfig on all OSes - it's just the Xerox
> copiers (5755, 5845, 5955, 7835) that self-configure as generic on certain
> OSes. A packet capture seems to show that the client queries local, then
> wide area Bonjour, then the CUPS server, and finally uses SNMP to query the
> printer directly. And do you have any suggestions for how either the client
> or the server/wide area bonjour could be hacked to work properly?
> 
> 
> Julian Daniel
> Network Administrator,
> Information & Communications Technology (ICT)
> Catholic Education Centre
> Simcoe Muskoka CDSB
> +1-705-722-3555 ext 201 <+17057223555,201>
> jdaniel at smcdsb.on.ca
> 
> 
> 
> On 27 June 2016 at 14:22, Julian Daniel <jdaniel at smcdsb.on.ca> wrote:
> 
>> If I select an HP printer - ANY HP, or Brother or Samsung printer, of any
>> vintage - the correct PPD is selected automatically with any version of Mac
>> OS X (10.4-10.11 tested).
>> 
>> Even with all Xerox drivers installed, the correct Xerox PPD installed,
>> the correct PPD specified in DNS (wide area bonjour service and text
>> records) and on the CUPS server, only Mac OS X 10.4-10.5 or 10.11 will
>> choose the correct PPD.
>> 
>> Mac OS X 10.6 to 10.10 will select Generic PPD every time - unless you
>> connect directly to the printer (which according to DNS-SD is showing
>> "Xerox WorkCentre 5955 v1" as the model rather than "Xerox WorkCentre 5955"
>> or "Xerox WorkCentre 5955, 3.80" that would match an existing PPD). Choose
>> Auto Select while talking to the CUPS shared queue or the WAB version of
>> the queue, and Xerox copiers default to Generic.
>> 
>> Here is direct from the printer:
>> 
>> Device: uri =
>> dnssd://AAA-295._ipp._tcp.local./?uuid=0123456789ab-1111-2222-3333-ba9876543210
>> 
>>        class = network
>> 
>>        info = AAA-295
>> 
>>        make-and-model = Xerox Xerox WorkCentre 5955 v1
>> 
>>        device-id = MFG:Xerox;MDL:WorkCentre 5955
>> v1CMD:PDF,PS,PCL,TIFF,JPEG,PWG;
>> 
>> Here is the CUPS server:
>> 
>> Device: uri =
>> dnssd://aaa-295%202nd%20floor%20copier%20ipp%20q._ipp._tcp.tech.aaa.smcdsb.yyy./cups
>> 
>>        class = network
>> 
>>        info = aaa-295 2nd floor copier ipp q
>> 
>>        make-and-model = Xerox Xerox WorkCentre 5955
>> 
>>        device-id = MFG:Xerox;MDL:WorkCentre
>> 5955CMD:PDF,PS,JPEG,PNG,PWG,URF;
>> 
>> (note that make-and-model in the latter is an exact match for an existing
>> installed PPD, while the former, with " v1" tacked on the end of the model,
>> doesn't match any PPDs)
>> 
>> 
>> Julian Daniel
>> Network Administrator,
>> Information & Communications Technology (ICT)
>> Catholic Education Centre
>> Simcoe Muskoka CDSB
>> +1-705-722-3555 ext 201 <+17057223555,201>
>> jdaniel at smcdsb.on.ca
>> 
>> 
>> 
>> On 27 June 2016 at 14:02, Michael Sweet <msweet at apple.com> wrote:
>> 
>>> Julian,
>>> 
>>>> On Jun 27, 2016, at 9:59 AM, Julian Daniel <jdaniel at smcdsb.on.ca>
>>> wrote:
>>>> ...
>>>> For some reason, El Crapitan (10.11) chooses the correct driver
>>> regardless
>>>> - I guess newer versions of CUPS client must revert to other information
>>>> sources besides SNMP printer info. I think Mac OS X 10.5 and lower also
>>>> worked correctly.
>>> 
>>> SNMP information is rarely used to choose a printer driver.
>>> 
>>> The preferred "driver" on OS X is (hopefully not a surprise) AirPrint.
>>> 
>>> If the printer does not support AirPrint (rare these days), we use the
>>> make, model, and product information that is published in the Bonjour TXT
>>> record or USB printer descriptor to match against a PPD (installed or
>>> available via Software Update).
>>> 
>>> For shared printers, we use the server's PPD with the printer-specific
>>> filters replaced with "null" filters for the standard file formats (so we
>>> let the server run the drivers).  If for some reason we cannot connect to
>>> the server within 30 seconds, the queue is not created.
>>> 
>>>> Is there anything that can be done on the server side to force the
>>> client
>>>> to choose/use/download the PPD from the server rather than trying to
>>> get it
>>>> from the printer and defaulting to generic?
>>> 
>>> You can't force it but you have to go out of your way, i.e., add the
>>> print queue manually, to add a shared printer without the server's PPD.
>>> 
>>> _________________________________________________________
>>> Michael Sweet, Senior Printing System Engineer
>>> 
>>> _______________________________________________
>>> cups mailing list
>>> cups at cups.org
>>> https://www.cups.org/mailman/listinfo/cups
>>> 
>> 
>> 
> 
> -- 
> This is a staff email account managed by Simcoe Muskoka Catholic District 
> School Board.  This email and any files transmitted with it are 
> confidential and intended solely for the use of the individual or entity to 
> whom they are addressed. If you have received this email in error please 
> notify the sender.
> _______________________________________________
> cups mailing list
> cups at cups.org
> https://www.cups.org/mailman/listinfo/cups

_________________________________________________________
Michael Sweet, Senior Printing System Engineer




More information about the cups mailing list