Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bad default/normal driverless printing quality on Brother MFC-J5955DW #1108

Open
Hoeze opened this issue Dec 8, 2024 · 18 comments
Open

Bad default/normal driverless printing quality on Brother MFC-J5955DW #1108

Hoeze opened this issue Dec 8, 2024 · 18 comments
Labels
waiting for reporter There are data requested from the reporter

Comments

@Hoeze
Copy link

Hoeze commented Dec 8, 2024

Describe the bug
When printing driverless to a freshly bought Brother MFC-J5955DW, the normal printing quality is significantly worse using cups than on Android or when using a USB-stick with the PDF.
High print quality solves the issue, but is unbearably slow.

To Reproduce
Steps to reproduce the behavior:

  1. Add printer with driverless driver to Ubuntu 24.10 or Arch linux
  2. Print any file, e.g.: Lorem Ipsum - All the facts - Lipsum generator.pdf
  3. Experience bad print quality. It looks like the print resolution is very low.
  4. Try printing the same file with an Android smartphone (without any manual configuration) and realize it has to be a Linux/cups issue

See also the following scans:

Expected behavior
The normal printing mode should meet the same quality using cups as using an Android smartphone.

System Information:

  • OS and its version: Ubuntu 24.10 + Arch linux
  • Application: Okular, Firefox, lp
  • CUPS version:
    • Arch linux: cups 2:2.4.11-1
    • Ubuntu 24.10: 2.4.10-1ubuntu2

Additional context
Output of:

  • driverless driverless:ipp://Brother%20MFC-J5955DW._ipp._tcp.local > Brother%20MFC-J5955DW.ppd
  • ipptool -tv ipp://<printer-IP>/ipp/print get-printer-attributes.test > Brother%20MFC-J5955DW.ipp_attributes.txt
    Brother%20MFC-J5955DW.zip
@ferdnyc
Copy link

ferdnyc commented Dec 9, 2024

Hmm. The ipptool dump shows the default resolution as 300dpi:

print-quality-default (enum) = normal
printer-resolution-default (resolution) = 300dpi
[...]
print-quality-supported (1setOf enum) = normal,high,draft
printer-resolution-supported (resolution) = 300dpi

But the generated PPD shows both Draft and Normal quality as only having a resolution of TWO hundred dpi, which is also the reported default:

*DefaultResolution: 200dpi
*OpenUI *cupsPrintQuality/Print Quality: PickOne
*OrderDependency: 10 AnySetup *cupsPrintQuality
*DefaultcupsPrintQuality: Normal
*cupsPrintQuality Draft/Draft: "<</HWResolution[200 200]>>setpagedevice"
*cupsPrintQuality Normal/Normal: "<</HWResolution[200 200]>>setpagedevice"
*cupsPrintQuality High/High: "<</HWResolution[300 300]>>setpagedevice"
*CloseUI: *cupsPrintQuality

...All are far, far below Brother's claimed maximum print resolution of 4800×1200dpi, though I'd be surprised to see that high a resolution directly selectable in a printer driver.

(complete dart-throw of a guess:) The printer supports 11×17/A3 printing, perhaps that's throwing the DPI calculations off?

@zdohnal
Copy link
Member

zdohnal commented Dec 9, 2024

@ferdnyc driverless PPD generator from cups-filters which uses libppd < 2.1.0 prefers Apple Raster, so it takes resolution from urf-supported:

 urf-supported (1setOf keyword) = SRGB24,W8,CP1,IS19-20-21,MT1-8-11,OB9,PQ3-4-5,RS200-300,OFU0,V1.5,DM3

where RS200-300 defines resolution - it would explain the resolution 200x200, but that is not in printer-resolution-supported...

@Hoeze do you have the latest firmware updates for your printer?

If you do, do you get better results with IPP Everywhere model? Try printing to this new queue:

$ lpadmin -p <queue-name> -v ipp://Brother%20MFC-J5955DW._ipp._tcp.local -m everywhere -E

@zdohnal
Copy link
Member

zdohnal commented Dec 9, 2024

If the IPP Everywhere works better, then the issue is in cups-filters family projects.

@zdohnal zdohnal added the waiting for reporter There are data requested from the reporter label Dec 9, 2024
@michaelrsweet
Copy link
Member

@zdohnal The "urf-supported" and "pwg-raster-document-resolution-supported" attributes provide the supported raster (file) resolutions, while "printer-resolution-supported" provides the supported print engine resolutions.

I've never seen an inkjet/laser printer report 200dpi in urf-supported (usually the bottom end is 300dpi for quality reasons), but given the reported performance experiences, my guess is that this printer is so bare-bones that this Brother printer couldn't provide the "driver parity performance" required by AirPrint certification without dropping the default resolution to 200dpi.

What is also interesting is that the "printer-device-id" attribute reports "RS200-600" vs. the "RS200-300" in the "urf-supported" attribute, and "pwg-raster-document-resolution-supported" only reports 300dpi. This printer needs long-edge feed raster data when printing letter or A4 for optimal performance, so that might also be a reason for the slow printing at 300dpi. We currently don't check the "media-source-properties" member attribute in "media-col-database", but if we did we could output "landscape" dimensions/margins for the corresponding sizes so that pdftoraster provides the correctly rotated raster data...

@Hoeze
Copy link
Author

Hoeze commented Dec 9, 2024

@Hoeze do you have the latest firmware updates for your printer?

Just did that!

If you do, do you get better results with IPP Everywhere model? Try printing to this new queue:

$ lpadmin -p <queue-name> -v ipp://Brother%20MFC-J5955DW._ipp._tcp.local -m everywhere -E

@zdohnal I tried printing first with the default settings and then after running your lpadmin command. Both printouts look exactly the same.

@zdohnal
Copy link
Member

zdohnal commented Dec 10, 2024

@Hoeze can you enable debug2 log level in cupsd (see man cupsd.conf), print to the IPP Everywhere queue and upload here cupsd logs and the PPD for IPP Everywhere queue?

@zdohnal
Copy link
Member

zdohnal commented Dec 10, 2024

@michaelrsweet so if I understand your comment correctly, we can't do much about print quality since the printer reports low resolutions.

Ad media-source-properties - does it have PPD equivalent? Or if we are going to implement its support by member of printer object and then use it when starting the job?

@michaelrsweet
Copy link
Member

@zdohnal WRT media-source-properties, there is no PPD equivalent. Apple will put out transverse media definitions when creating a PPD for an AirPrint printer, e.g.:

*PageSize Letter: “<</PageSize[792 612]>>setpagedevice”
*PageRegion Letter: “<</PageSize[792 612]>>setpagedevice”
*PaperDimension Letter: “792 612”
*ImageableArea Letter: “12 12 780 600”

That way the raster data sent to the printer will be landscape.

@Hoeze
Copy link
Author

Hoeze commented Dec 10, 2024

  • Why is it doing rasterization? According to the specs is should support PCL6, BR-Script3, PDF version1.7, XPS version 1.0. This is the reason why I bought this printer.
  • Why can I not manually select the resolution?
  • Is there a way to fix this issue or should I send it back? (I have six more days to decide that)

@Hoeze can you enable debug2 log level in cupsd (see man cupsd.conf), print to the IPP Everywhere queue and upload here cupsd logs and the PPD for IPP Everywhere queue?

OK, here the access log:

localhost - - [10/Dec/2024:14:15:51 +0100] "POST /printers/Brother-MFC-J5955DW HTTP/1.1" 200 415 Create-Job successful-ok
localhost - - [10/Dec/2024:14:15:51 +0100] "POST /printers/Brother-MFC-J5955DW HTTP/1.1" 200 161393 Send-Document successful-ok

Here the error log:
cups_error_log.txt
Here the ppd (had to rename it bc github):
Brother-MFC-J5955DW.ppd.txt

@michaelrsweet
Copy link
Member

  • Why is it doing rasterization? According to the specs is should support PCL6, BR-Script3, PDF version1.7, XPS version 1.0. This is the reason why I bought this printer.

According to the ipptool output, this printer doesn't support those languages via IPP...

  • Why can I not manually select the resolution?

The resolution of the print engine ("printer-resolution") and the resolution of the rasterized print data are independent of each other. The "print-quality" option effectively selects the print data resolution - draft (3) is the lowest resolution supported by the printer, normal (4) is the middle resolution, and high (5) is the highest resolution. We leave it up to the printer to select and appropriate engine resolution based on print-quality, media-type, etc.

In the case of this printer, it advertises a relatively low resolution for the print engine (300dpi) compared to the actual print engine capabilities (4800x1200dpi), so even if you specified the print engine resolution ("-o printer-resolution=300dpi") it would only be able to specify that one "supported" value.

  • Is there a way to fix this issue or should I send it back? (I have six more days to decide that)

Short of getting a firmware update from Brother, it is unlikely that the issues you are seeing will be resolved. We may be able to update the PPD generators and pdftoraster program to spit out landscape raster data for letter and A4 (which should speed things up a little) but you need updated firmware to get native PDF support... :/

@zdohnal
Copy link
Member

zdohnal commented Dec 10, 2024

@Hoeze the logs show printing via driverless queue, not IPP Everywhere one - can you get me the debug2 logs for IPP Everywhere one?

@Hoeze
Copy link
Author

Hoeze commented Dec 10, 2024

@zdohnal how would I do that? I thought I did that already:

$> lpstat -v
Gerät für Brother-MFC-J5955DW: ipp://BRN94DDF80A0D1D.local:631/ipp/print
Gerät für Brother_MFC_J5955DW: implicitclass://Brother_MFC_J5955DW/

$> lpadmin -p Brother-MFC-J5955DW -v ipp://Brother%20MFC-J5955DW._ipp._tcp.local -m everywhere -E

$> lpstat -v                                                                                     
Gerät für Brother-MFC-J5955DW: ipp://Brother%20MFC-J5955DW._ipp._tcp.local
Gerät für Brother_MFC_J5955DW: implicitclass://Brother_MFC_J5955DW/

$> lp -d Brother-MFC-J5955DW Lorem.Ipsum.-.All.the.facts.-.Lipsum.generator.pdf 
Anfrage-ID ist Brother-MFC-J5955DW-275 (1 Datei(en))

@zdohnal
Copy link
Member

zdohnal commented Dec 11, 2024

Because the cups_error_log.txt file you've sent do not show printing to the ipp everywhere queue, only to the driverless queue. Driverless model is not part of CUPS project, so it would be great to have most data relevant to CUPS project.

@Hoeze
Copy link
Author

Hoeze commented Dec 11, 2024

@zdohnal I am sorry but I do not understand what I am supposed to do to get a different type of logs.
The error log I sent you is from /var/log/cups/error_log after enabling debug2 and then printing to ipp://Brother%20MFC-J5955DW._ipp._tcp.local (see commands in #1108 (comment)).

Can you please clarify what you would like me to do?

@Hoeze
Copy link
Author

Hoeze commented Dec 11, 2024

@zdohnal I tried adding the printer on arch linux using the CUPS webinterface. This time I am absolutely sure, that it is using IPP Everywhere:
image

  • Access log:
localhost - - [11/Dec/2024:23:45:45 +0100] "POST /printers/IPP_Brother_MFC-J5955DW HTTP/1.1" 200 486 Create-Job successful-ok
localhost - - [11/Dec/2024:23:45:45 +0100] "POST /printers/IPP_Brother_MFC-J5955DW HTTP/1.1" 200 161397 Send-Document successful-ok

Unfortunately, the printout gets cut off:
IPP_brother_mfcj5955dw.pdf

@zdohnal
Copy link
Member

zdohnal commented Dec 12, 2024

@Hoeze the issue with logs was there were logs only for another queue with a different driver - or at least PRINTER_INFO showed it is using driverless driver:

D [10/Dec/2024:14:15:51 +0100] [Job 275] envp[22]="PRINTER_INFO=Brother MFC-J5955DW (driverless)"

Now the logs are fine - so the output is different from #1108 (comment) ? This would be an interesting finding.

I can find something in the logs or get an idea by the different behavior of IPP Everywhere, but either way, I would heed Mike's advice - ask for firmware update (those resolutions are strange... and to get native PDF support), or, if you don't want to bother, return the printer and change for another model.

@ferdnyc
Copy link

ferdnyc commented Dec 15, 2024

@Hoeze

If you decide to hang on to the printer after all, you may get better results by installing Brother's Linux "drivers" for the printer (which consist of their brother_lpdwrapper_mfcj5955dw Perl script and cupswrappermfcj5955dw bash script, plus a PPD, along with a compiled filter program for rasterizing print data). Driverless is a nice idea and all, when it works, but clearly it doesn't with this printer. And if nothing else, the bundled PPD in the brother packages shows the default resolution as 300dpi, not 200dpi, so that's a step up right there.

I used a 2006-vintage Brother MFC-5460CN for a good decade+ before it finally died on me, and having the Brother software installed was definitely key to getting reasonable output from the printer. Though IIRC I built mine from source (which was surprisingly obtainable from them, if you looked hard), because at the time Brother's pre-packaged ones were all built 32-bit (SIGH). Now, looking at the purportedly 32-bit RPM package for your printer, it actually contains both 32- and 64-bit builds of the filter program(s), and will use the appropriate ones. (Meaning, in all cases, the x86_64 build, since there haven't been any i686 Linux distros for years.)

(Having their scan-key tool installed was also nice, since it meant that once I had it properly configured and poked the necessary holes in my desktop firewall, I could initiate a scan from the printer's ADF to a folder in $HOME/Documents/ right from the printer's control panel. Something that even my < 2-year-old HP replacement can't even hope to achieve.)

@Hoeze
Copy link
Author

Hoeze commented Dec 15, 2024

Thank you for your suggestion @ferdnyc. Previously I had a very bad experience with a MFC-J6940DW, which was a pure GDI-Printer:

  • Proprietary driver does not work on ARM, e.g. Raspberry Pi
  • Print quality is limited to 300dpi
    After checking the MFC-J5955DW driver, the same restrictions apply also to this printer.

However, I noticed that Brother offers two additional drivers on Windows-based systems for PCL 5e and BRScript 3 a.k.a. PostScript. This led me to trying out various generic CUPS drivers:

  • Generic PDF driver:
    • Works much better than IPP but produces washed-out look
    • Many configuration options, 1200dpi option leads to black/white printing
  • Generic PostScript driver:
    • Works perfectly 🎉 Incredible difference in print quality without any difference in speed.
    • No configuration options unfortunately
  • Generic PCL driver:
    • Only black/white printing -> useless

Afterwards, I also tried to extract the BRScript3 driver. This indeed gives me a PPD driver file which works as well as the Generic PostScript driver, but has additional configuration options for the paper tray and paper type selection.

Overall, printing with PostScript works fine now. It is however a shame, that I cannot select an even higher quality setting / specific printing resolution.

Also, if it does support PostScript and PDF why does it not announce so via IPP?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
waiting for reporter There are data requested from the reporter
Projects
None yet
Development

No branches or pull requests

4 participants