cups-filters icon indicating copy to clipboard operation
cups-filters copied to clipboard

can't print PDF-based files using IPP Everywhere with a Brother MFC-L6900DW

Open mario-tux opened this issue 3 years ago • 11 comments

I'm using CUPS 2.4.1 on Arch Linux with the above network printer. It worked well using automatic IPP Everywhere auto-generated configuration. Some weeks ago it stopped to print some files (PDFs from Evince, web pages from Chrome or images from eog) but it worked with the same PDFs using some specific program (Master PDF Editor, ...). When I print one them the printer looks to start to warmup but it early stop without any output or feedback on the display. As long as I can say it looks a regression from CUPS side as I didn't update the firmware until recent days trying to fix the problem. Now I'm on firmware 1.54 of the Brother printer. I tried to revert to CUPS 2.3.3 without any progression. A printer bug?

I was able to print again removing the *cupsFilter2: "application/vnd.cups-pdf application/pdf 10 -" line from the auto-generated PPD file leaving as only option the *cupsFilter2: "image/urf image/urf 100 -" one. This should force the use of the Apple raster format: not nice but it works.

I'm wondering what went wrong and how it can be fixed on upstream.

This is the configuration generated by lpadmin -p test -v ipp://boromir.lan -E -m everywhere:

*PPD-Adobe: "4.3"
*FormatVersion: "4.3"
*FileVersion: "2.4"
*LanguageVersion: English
*LanguageEncoding: ISOLatin1
*PSVersion: "(3010.000) 0"
*LanguageLevel: "3"
*FileSystem: False
*PCFileName: "ippeve.ppd"
*Manufacturer: "Brother"
*ModelName: "MFC-L6900DW series"
*Product: "(MFC-L6900DW series)"
*NickName: "MFC-L6900DW series - IPP Everywhere"
*ShortNickName: "MFC-L6900DW series - IPP Everywhere"
*ColorDevice: False
*cupsVersion: 2.4
*cupsSNMPSupplies: False
*cupsLanguages: "it_IT"
*APSupplies: "http://boromir.lan/net/net/airprint.html"
*cupsFilter2: "application/vnd.cups-pdf application/pdf 10 -"
*cupsFilter2: "image/urf image/urf 100 -"
*OpenUI *PageSize: PickOne
*OrderDependency: 10 AnySetup *PageSize
*DefaultPageSize: A4
*PageSize 215x345mm: "<</PageSize[609.448818897638 977.952755905512]>>setpagedevice"
*PageSize 3x5: "<</PageSize[216 360]>>setpagedevice"
*PageSize A4: "<</PageSize[595.275590551181 841.889763779528]>>setpagedevice"
*PageSize A5: "<</PageSize[419.527559055118 595.275590551181]>>setpagedevice"
*PageSize A6: "<</PageSize[297.637795275591 419.527559055118]>>setpagedevice"
*PageSize Env10: "<</PageSize[296.985826771654 684]>>setpagedevice"
*PageSize EnvC5: "<</PageSize[459.212598425197 649.133858267717]>>setpagedevice"
*PageSize EnvDL: "<</PageSize[311.811023622047 623.622047244094]>>setpagedevice"
*PageSize EnvMonarch: "<</PageSize[278.985826771654 540]>>setpagedevice"
*PageSize Executive: "<</PageSize[522 756]>>setpagedevice"
*PageSize FanFoldGermanLegal: "<</PageSize[612 936]>>setpagedevice"
*PageSize ISOB5: "<</PageSize[498.897637795276 708.661417322835]>>setpagedevice"
*PageSize Legal: "<</PageSize[612 1008]>>setpagedevice"
*PageSize Letter: "<</PageSize[612 792]>>setpagedevice"
*PageSize Oficio: "<</PageSize[612 964.8]>>setpagedevice"
*CloseUI: *PageSize
*OpenUI *PageRegion: PickOne
*OrderDependency: 10 AnySetup *PageRegion
*DefaultPageRegion: A4
*PageRegion 215x345mm: "<</PageSize[609.448818897638 977.952755905512]>>setpagedevice"
*PageRegion 3x5: "<</PageSize[216 360]>>setpagedevice"
*PageRegion A4: "<</PageSize[595.275590551181 841.889763779528]>>setpagedevice"
*PageRegion A5: "<</PageSize[419.527559055118 595.275590551181]>>setpagedevice"
*PageRegion A6: "<</PageSize[297.637795275591 419.527559055118]>>setpagedevice"
*PageRegion Env10: "<</PageSize[296.985826771654 684]>>setpagedevice"
*PageRegion EnvC5: "<</PageSize[459.212598425197 649.133858267717]>>setpagedevice"
*PageRegion EnvDL: "<</PageSize[311.811023622047 623.622047244094]>>setpagedevice"
*PageRegion EnvMonarch: "<</PageSize[278.985826771654 540]>>setpagedevice"
*PageRegion Executive: "<</PageSize[522 756]>>setpagedevice"
*PageRegion FanFoldGermanLegal: "<</PageSize[612 936]>>setpagedevice"
*PageRegion ISOB5: "<</PageSize[498.897637795276 708.661417322835]>>setpagedevice"
*PageRegion Legal: "<</PageSize[612 1008]>>setpagedevice"
*PageRegion Letter: "<</PageSize[612 792]>>setpagedevice"
*PageRegion Oficio: "<</PageSize[612 964.8]>>setpagedevice"
*CloseUI: *PageRegion
*DefaultImageableArea: A4
*DefaultPaperDimension: A4
*ImageableArea 215x345mm: "12.245669291339 12.245669291339 597.203149606299 965.707086614173"
*PaperDimension 215x345mm: "609.448818897638 977.952755905512"
*ImageableArea 3x5: "12.245669291339 12.245669291339 203.754330708661 347.754330708661"
*PaperDimension 3x5: "216 360"
*ImageableArea A4: "12.245669291339 12.245669291339 583.029921259842 829.644094488189"
*PaperDimension A4: "595.275590551181 841.889763779528"
*ImageableArea A5: "12.245669291339 12.245669291339 407.28188976378 583.029921259842"
*PaperDimension A5: "419.527559055118 595.275590551181"
*ImageableArea A6: "12.245669291339 12.245669291339 285.392125984252 407.28188976378"
*PaperDimension A6: "297.637795275591 419.527559055118"
*ImageableArea Env10: "12.245669291339 12.245669291339 284.740157480315 671.754330708661"
*PaperDimension Env10: "296.985826771654 684"
*ImageableArea EnvC5: "12.245669291339 12.245669291339 446.966929133858 636.888188976378"
*PaperDimension EnvC5: "459.212598425197 649.133858267717"
*ImageableArea EnvDL: "12.245669291339 12.245669291339 299.565354330709 611.376377952756"
*PaperDimension EnvDL: "311.811023622047 623.622047244094"
*ImageableArea EnvMonarch: "12.245669291339 12.245669291339 266.740157480315 527.754330708661"
*PaperDimension EnvMonarch: "278.985826771654 540"
*ImageableArea Executive: "12.245669291339 12.245669291339 509.754330708661 743.754330708661"
*PaperDimension Executive: "522 756"
*ImageableArea FanFoldGermanLegal: "12.245669291339 12.245669291339 599.754330708661 923.754330708661"
*PaperDimension FanFoldGermanLegal: "612 936"
*ImageableArea ISOB5: "12.245669291339 12.245669291339 486.651968503937 696.415748031496"
*PaperDimension ISOB5: "498.897637795276 708.661417322835"
*ImageableArea Legal: "12.245669291339 12.245669291339 599.754330708661 995.754330708661"
*PaperDimension Legal: "612 1008"
*ImageableArea Letter: "12.245669291339 12.245669291339 599.754330708661 779.754330708661"
*PaperDimension Letter: "612 792"
*ImageableArea Oficio: "12.245669291339 12.245669291339 599.754330708661 952.554330708661"
*PaperDimension Oficio: "612 964.8"
*HWMargins: "12.245669291339 12.245669291339 12.245669291339 12.245669291339"
*ParamCustomPageSize Width: 1 points 216 612
*ParamCustomPageSize Height: 2 points 360 1008
*ParamCustomPageSize WidthOffset: 3 points 0 0
*ParamCustomPageSize HeightOffset: 4 points 0 0
*ParamCustomPageSize Orientation: 5 int 0 3
*CustomPageSize True: "pop pop pop <</PageSize[5 -2 roll]/ImagingBBox null>>setpagedevice"
*OpenUI *InputSlot: PickOne
*OrderDependency: 10 AnySetup *InputSlot
*DefaultInputSlot: Auto
*InputSlot Auto: "<</MediaPosition 0>>setpagedevice"
*it_IT.InputSlot Auto/auto: ""
*InputSlot ByPassTray: "<</MediaPosition 19>>setpagedevice"
*it_IT.InputSlot ByPassTray/by-pass-tray: ""
*InputSlot Tray1: "<</MediaPosition 20>>setpagedevice"
*it_IT.InputSlot Tray1/tray-1: ""
*CloseUI: *InputSlot
*OpenUI *MediaType: PickOne
*OrderDependency: 10 AnySetup *MediaType
*DefaultMediaType: Stationery
*MediaType Stationery: "<</MediaType(Stationery)>>setpagedevice"
*it_IT.MediaType Stationery/stationery: ""
*MediaType StationeryLightweight: "<</MediaType(StationeryLightweight)>>setpagedevice"
*it_IT.MediaType StationeryLightweight/stationery-lightweight: ""
*MediaType StationeryHeavyweight: "<</MediaType(StationeryHeavyweight)>>setpagedevice"
*it_IT.MediaType StationeryHeavyweight/stationery-heavyweight: ""
*MediaType StationeryCover: "<</MediaType(StationeryCover)>>setpagedevice"
*it_IT.MediaType StationeryCover/stationery-cover: ""
*MediaType Envelope: "<</MediaType(Envelope)>>setpagedevice"
*it_IT.MediaType Envelope/envelope: ""
*MediaType EnvelopeHeavyweight: "<</MediaType(EnvelopeHeavyweight)>>setpagedevice"
*it_IT.MediaType EnvelopeHeavyweight/envelope-heavyweight: ""
*MediaType EnvelopeLightweight: "<</MediaType(EnvelopeLightweight)>>setpagedevice"
*it_IT.MediaType EnvelopeLightweight/envelope-lightweight: ""
*MediaType StationeryRecycled: "<</MediaType(StationeryRecycled)>>setpagedevice"
*it_IT.MediaType StationeryRecycled/stationery-recycled: ""
*MediaType Labels: "<</MediaType(Labels)>>setpagedevice"
*it_IT.MediaType Labels/labels: ""
*MediaType StationeryBond: "<</MediaType(StationeryBond)>>setpagedevice"
*it_IT.MediaType StationeryBond/stationery-bond: ""
*MediaType StationeryColored: "<</MediaType(StationeryColored)>>setpagedevice"
*it_IT.MediaType StationeryColored/stationery-colored: ""
*MediaType StationeryLetterhead: "<</MediaType(StationeryLetterhead)>>setpagedevice"
*it_IT.MediaType StationeryLetterhead/stationery-letterhead: ""
*CloseUI: *MediaType
*DefaultResolution: 300dpi
*OpenUI *cupsPrintQuality: PickOne
*OrderDependency: 10 AnySetup *cupsPrintQuality
*it_IT.Translation cupsPrintQuality/Print Quality: ""
*DefaultcupsPrintQuality: Normal
*cupsPrintQuality Draft: "<</HWResolution[300 150]>>setpagedevice"
*it_IT.cupsPrintQuality Draft/Draft: ""
*cupsPrintQuality Normal: "<</HWResolution[300 300]>>setpagedevice"
*it_IT.cupsPrintQuality Normal/Normale: ""
*cupsPrintQuality High: "<</HWResolution[1200 1200]>>setpagedevice"
*it_IT.cupsPrintQuality High/High: ""
*CloseUI: *cupsPrintQuality
*% ColorModel from urf-supported
*OpenUI *ColorModel: PickOne
*OrderDependency: 10 AnySetup *ColorModel
*it_IT.Translation ColorModel/Modalità colore: ""
*ColorModel Gray: "<</cupsColorSpace 18/cupsBitsPerColor 8/cupsColorOrder 0/cupsCompression 0>>setpagedevice"
*it_IT.ColorModel Gray/Scala di grigi: ""
*DefaultColorModel: Gray
*CloseUI: *ColorModel
*APPrinterPreset Gray_with_Paper_Auto-Detect_-_Draft/Draft B&W: "
  *cupsPrintQuality Draft *ColorModel Gray
  com.apple.print.preset.graphicsType General
  com.apple.print.preset.quality low
  com.apple.print.preset.media-front-coating autodetect
  com.apple.print.preset.output-mode monochrome"
*End
*APPrinterPreset Gray_with_Paper_Auto-Detect/Black and White: "
  *cupsPrintQuality Normal *ColorModel Gray
  com.apple.print.preset.graphicsType General
  com.apple.print.preset.quality mid
  com.apple.print.preset.media-front-coating autodetect
  com.apple.print.preset.output-mode monochrome"
*End
*APPrinterPreset Photo_with_Paper_Auto-Detect/Photo: "
  *cupsPrintQuality High *ColorModel Gray
  com.apple.print.preset.graphicsType Photo
  com.apple.print.preset.quality high
  com.apple.print.preset.media-front-coating autodetect
  com.apple.print.preset.output-mode color"
*End
*OpenUI *Duplex: PickOne
*OrderDependency: 10 AnySetup *Duplex
*it_IT.Translation Duplex/2-Sided Printing: ""
*DefaultDuplex: None
*Duplex None: "<</Duplex false>>setpagedevice"
*it_IT.Duplex None/Off (1-Sided): ""
*Duplex DuplexNoTumble: "<</Duplex true/Tumble false>>setpagedevice"
*it_IT.Duplex DuplexNoTumble/Long-Edge (Portrait): ""
*Duplex DuplexTumble: "<</Duplex true/Tumble true>>setpagedevice"
*it_IT.Duplex DuplexTumble/Short-Edge (Landscape): ""
*CloseUI: *Duplex
*cupsBackSide: Normal
*OpenUI *OutputBin: PickOne
*OrderDependency: 10 AnySetup *OutputBin
*DefaultOutputBin: FaceDown
*DefaultOutputOrder: Normal
*OutputBin FaceDown: ""
*it_IT.OutputBin FaceDown/face-down: ""
*PageStackOrder FaceDown: Normal
*CloseUI: *OutputBin

mario-tux avatar May 04 '22 14:05 mario-tux

@mario-tux Please attach a problematic PDF file. It sounds like this Brother printer supports PDF badly, and doesn't properly set the document-unprintable-error state keyword if it is unable to print the file, which would trigger a fallback to raster (URF) printing.

michaelrsweet avatar May 04 '22 17:05 michaelrsweet

It happens with, as long as I can see, with ANY PDF file. I did a fresh test with the first googled "pdf test file": https://www.orimi.com/pdf-test.pdf . I can't print it using evince but I did with Master PDF Editor.

the error log during the failure: https://pastebin.com/QrKgVAHn

mario-tux avatar May 04 '22 19:05 mario-tux

@mario-tux As near as I can tell from the log, your PDF files are getting processed by the cups-filters pdftopdf filter, and that the printer doesn't like the resulting PDF output. The backend sees a "document-format-error" status from the printer and flags it as needing a retry as raster, but since the job state isn't 'aborted' it doesn't return an error so cupsd doesn't do the retry...

It also looks like the backend is seeing a Kerberos challenge at some point which triggers setting the "auth-info-required" attribute to "negotiate"...

So some weird stuff is happening.

Let's try a simple test to isolate whether the printer's PDF interpreter is really bad or just that it doesn't like the QPDF output from the pdftopdf filter. Try running (adjust the first PDF filename path as needed, the second is a standard CUPS example file):

ipptool -tf /PATH/TO/pdf-test.pdf ipp://boromir.lan print-job.test
ipptool -tf /usr/share/cups/ipptool/document-a4.pdf ipp://boromir.lan print-job.test

michaelrsweet avatar May 05 '22 11:05 michaelrsweet

@michaelrsweet I carried out the tests you suggested:

  • ipptool -tf /PATH/TO/pdf-test.pdf ipp://boromir.lan print-job.test: it worked with the correct paper sheet;
  • ipptool -tf /usr/share/cups/ipptool/document-a4.pdf ipp://boromir.lan print-job.test: it worked too;
  • again, I used evince to print the pdf-test.pdf file: the printer warmed up but then it stopped without anything in the paper tray.

The cups error log of the three experiments is available at https://pastebin.com/FeSrYkYR

mario-tux avatar May 06 '22 10:05 mario-tux

OK, moving this to cups-filters, since the core issue is the pdftopdf filter. Will file a separate CUPS bug to address the IPP backend not returning the "retry" exit code.

michaelrsweet avatar May 06 '22 13:05 michaelrsweet

Filed CUPS issue #391 to track the CUPS IPP backend fix.

michaelrsweet avatar May 06 '22 13:05 michaelrsweet

@jberkenbilt could you have a look here and work out with @mario-tux why QPDF-generated PDF output is not printing on the Brother MFC-L6900DW and perhaps also other Brother printers? Thanks.

tillkamppeter avatar May 07 '22 18:05 tillkamppeter

@tillkamppeter Sure, I"ll comment on the other issue.

jberkenbilt avatar May 07 '22 21:05 jberkenbilt

@jberkenbilt any idea on this?

tillkamppeter avatar Dec 17 '22 19:12 tillkamppeter

@jberkenbilt any idea on this?

None aside from the discussion in https://github.com/OpenPrinting/cups/issues/391

jberkenbilt avatar Dec 20 '22 23:12 jberkenbilt

In OpenPrinting/cups#391 the printer ended up printing as with newer versions of cups-filters it receives Raster and not PDF. One would need to do the tests described in there with the newest QPDF available to see whether one gets PDF which this printer understands.

tillkamppeter avatar Dec 21 '22 00:12 tillkamppeter