apple / cups

Apple CUPS Sources
https://www.cups.org
Apache License 2.0
1.95k stars 464 forks source link

direct IPP printing broken #5693

Closed andyrtr closed 4 years ago

andyrtr commented 4 years ago

Direct printing to my Samsung M2825DW IPP capable printer is broken either using cups temporary queue or the one created on the fly by cups-browsed. Printing does work when setting up a classic shared queue and allow printing from network.

As reported here: https://github.com/OpenPrinting/cups-filters/issues/177 the issue seems to be caused by a different "MediaPosition" output breaking the print. Till suggested to report it here. @michaelrsweet any idea where this may come from and how to fix it? Any further logs required?

tillkamppeter commented 4 years ago

To better explain it, the driverless IPP printing PPD file generated by CUPS' PPD generator creates for the input tray listed as "tray-1" under "media-source-supported" in the response to the get-printer-attributes IPP request an entry like this:

*InputSlot Tray1: "<</MediaPosition 20>>setpagedevice"

If this option gets selected, the rastertopwg filter generates Apple Raster with the setting "MediaPosition = 20" (according to CUPS error_log) and this the printer does not print. A PPD file generated by the PPD generator of cups-filters has an entry like this for "tray-1":

 *InputSlot Tray1: ""

and with this the rastertopwg filter sends Apple Raster with "MediaPosition = 0" and the printer prints.

michaelrsweet commented 4 years ago

This is interesting, as until today the Apple Raster support didn't embed the MediaPosition value at all. I don't see how the differences in the PPD would make any difference at all.

Anyways, this particular printer doesn't support all of the MediaPosition values corresponding to the media-source-supported attribute - "IS1" in urf-supported means "support MediaPosition (InputSlot) value 1", which corresponds to the "main" media-source value (which isn't listed but I assume is what they were thinking for tray-1... Given the age of the printer, it is pretty clear it went through AirPrint certification before the necessary checks for this were added.

It looks like updated firmware is available from HP who now owns all of the Samsung printing products. Please verify that you have the latest firmware installed on your printer, but unfortunately there isn't anything we can do here without breaking printers that conform to the standards...