Firefox is printing in color even when choosing printing in black and white
Categories
(Core :: Printing: Output, defect)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox-esr140 | --- | unaffected |
| firefox150 | --- | wontfix |
| firefox151 | --- | wontfix |
| firefox152 | --- | fixed |
People
(Reporter: david.vantyghem, Assigned: emilio)
References
(Regression)
Details
(Keywords: regression)
Attachments
(2 files)
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:149.0) Gecko/20100101 Firefox/149.0
Steps to reproduce:
I print a web page or a PDF with Firefox menu File - Print...
Then, I choose Black and White in the preview interface, choose to print the current page choose my printer (Brother HL-3170CDN) and click on Print button.
Actual results:
The preview is in black and white but the printed page is in color.
Expected results:
The printed page should be in black and white.
| Reporter | ||
Updated•5 months ago
|
Comment 1•5 months ago
|
||
The Bugbug bot thinks this bug should belong to the 'Core::Printing: Output' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.
Comment 2•5 months ago
|
||
Could you check if you get the same results from other programs (with the same printer)?
As I recall, the black and white setting is really just a flag that we pass to the printer, so it's possible the printer is ignoring it... (e.g. due to a bug in the printer driver)
| Reporter | ||
Comment 3•5 months ago
|
||
When I print with Thunderbird, it works, I've got the problem only with Firefox, since a few days (after an update?).
Comment 4•5 months ago
|
||
Thanks. The most recent update would have been 149.0.2, in which I think the only clearly-print-related change was for bug 2026109; but that wouldn't have had any impact on print settings at all, let alone color-printing, so it's unlikely for that update to have been responsible for breaking this...
We've had older reports of this same sort of issue a few years back, in bug 1846816 -- but in that case at least, it likely wasn't a Firefox-specific bug because affected users observed that Chrome was also hitting the same problem.
I don't have a color printer available locally, so I can't directly investigate to try to confirm at the moment. (I do have a virtual "cups-PDF" software-printer installed, which supposedly supports color-or-monochrome printing, but everything I print to it always ends up producing a color PDF, regardless of that setting, no matter what program I use to print to it.)
Could you check a few things:
(1) Could you also try printing from a non-Mozilla program -- e.g. your PDF viewer (probably evince or papers) with a PDF that has color, like this one: https://www.adobe.com/support/products/enterprise/knowledgecenter/media/c4611_sample_explain.pdf
If that prints in color when you ask for black-and-white, then I think we can rule out a Firefox bug here.
But if that behaves as you expect (it respects your black-and-white print setting), my next questions would be:
(2) Are you running Firefox 149.0.2? (Help | About)
(3) Is your Thunderbird version 149.0.2 as well? (That's the latest release for thunderbird - and if you've got the same Thunderbird/Firefox release version, their print backends should essentially work the same, which would make your observation in comment 3 surprising...)
(3) Could you double-check that the content you're testing in Thunderbird actually has color elements to be printed? (note that background colors/images are suppressed if the "print backgrounds" checkbox is unchecked) One good testcase there would be the "Troubleshooting Information" built-in page, which has some blue links on the first page. (You can get there from Thunderbird's main "hamburger" menu, Help, Troubleshooting Information")
(4) Are you using the same built-in print-preview UI for both Firefox and Thunderbird? (i.e. you're not clicking through to "Print using System Dialog")
Also: if this really did just become broken recently, https://mozilla.github.io/mozregression/ is a tool that you can use to bisect among Firefox Nightly builds to see which one is the first-bad one (usually only requiring 5-10 trials through the magic of binary-search -- maybe a few more if we're able to bisect per-changeset builds on the first-bad day).
| Reporter | ||
Comment 5•5 months ago
|
||
-
I printed https://www.adobe.com/support/products/enterprise/knowledgecenter/media/c4611_sample_explain.pdf with https://github.com/linuxmint/xreader/
It's printed in black and white when I choose to print in black and white. -
I'm using Mozilla for Linux Mint version 149.0.2 (64 bits).
-
I'm using Thunderbird for Linux Mint version 140.9.1esr (64 bits).
-
The "Troubleshooting Information" built-in page has blue links and blue tables background on the screen but there's no menu or icon to print it with Thunderbird.
-
In both cases, I use File - Print menu, then there's a preview where the page is displayed in black and white, then I click on Print button.
Comment 6•5 months ago
|
||
(In reply to David VANTYGHEM from comment #5)
I printed [...] with https://github.com/linuxmint/xreader/
It's printed in black and white when I choose to print in black and white.
OK, thanks. That increases the confidence that this is indeed a Firefox bug then (as compared to bug 1846816 where it seemed to be system-wide).
I'm using Thunderbird for Linux Mint version 140.9.1esr (64 bits).
Ah, OK. Then this might affect Thunderbird as well when you update to > 149, I guess.
The "Troubleshooting Information" built-in page has blue links and blue tables background on the screen but there's no menu or icon to print it with Thunderbird.
If you press Ctrl+P, it would give you a print dialog there. (But probably no need.)
In both cases, I use File - Print menu, then there's a preview where the page is displayed in black and white, then I click on Print button.
Thanks - that sounds like the same built-in print UI in Firefox and Thunderbird, then.
Comment 7•5 months ago
•
|
||
Given that this seems to be a recent regression (between 140 and 149 at least, based on your Thunderbird vs Firefox versions), that gives a bit of a possible regression window. Looking back in commits from the v140-149 timeframe, it's conceivable this could have been from bug 1985667 ("Simplify GTK CUPS monochrome implementation")... That landed in Firefox 144. Would you mind testing Nightly builds before/after that change landed, to see if that's where the issue appeared?
You can do that using mozregression if you're willing to install that tool: https://mozilla.github.io/mozregression/
With that installed, you would try this:
(launching build before bug 1985667's patch, suspecting "good"):
mozregression --launch 2025-09-06
(launching build after bug 1985667's patch, suspecting "bad"):
mozregression --launch 2025-09-07
Or if you'd prefer, you could download the first 2025-09-06 Nightly build vs. last 2025-09-07 build directly from FTP (and extract/launch them), but it's a few more steps and easier to mess up, so mozregression helps to simplify the process.
Either way, it'd be great to know whether each of those two builds is "good" vs "bad". Thanks!
| Reporter | ||
Comment 8•5 months ago
|
||
I tried with CTRL-P in Thunderbird and B&W preview of "Troubleshooting Information" is printed in B&W.
Comment 9•5 months ago
|
||
Thanks! That confirms 140 is "good".
See request jn comment 7 which would potentially confirm the suspected patch that introduced this, if you don't mind...
Comment 10•5 months ago
|
||
Hi, I unfortunately don't have a color printer to try and repro this.
It'd be great if you could try comment 7, or try to print with print.cups.monochrome-gtk-simple.enabled set to false, which was introduced in bug bug 1985667.
| Reporter | ||
Comment 11•5 months ago
|
||
When I print in B&W with print.cups.monochrome-gtk-simple.enabled set to true, it's printed in color.
When I print in B&W with print.cups.monochrome-gtk-simple.enabled set to false, it's printed in black and white.
Updated•5 months ago
|
Comment 12•5 months ago
|
||
:emilio, since you are the author of the regressor, bug 1985667, could you take a look? Also, could you set the severity field?
For more information, please visit BugBot documentation.
| Assignee | ||
Comment 13•5 months ago
|
||
Updated•5 months ago
|
Comment 14•5 months ago
|
||
Set release status flags based on info from the regressing bug 1985667
| Assignee | ||
Comment 15•5 months ago
|
||
A bit sad. This is technically a driver bug, because the CUPS setting would be nice to honor. But...
Comment 16•5 months ago
|
||
Comment 17•5 months ago
|
||
Comment 18•5 months ago
|
||
Backed out for causing build bustages
- Backout link
- Push with failures
- Failure Log
- Failure line: ./../../../checkouts/gecko/widget/nsPrinterCUPS.cpp:X:23: error: no member named 'print_cups_monochrome_enabled' in namespace 'mozilla::StaticPrefs'
| Assignee | ||
Updated•5 months ago
|
Updated•5 months ago
|
Comment 19•5 months ago
|
||
Comment 20•5 months ago
|
||
| bugherder | ||
Comment 21•5 months ago
|
||
The patch landed in nightly and beta is affected.
:emilio, is this bug important enough to require an uplift?
- If yes, please nominate the patch for beta approval.
- See https://wiki.mozilla.org/Release_Management/Requesting_an_Uplift for documentation on how to request an uplift.
- If no, please set
status-firefox151towontfix.
For more information, please visit BugBot documentation.
| Assignee | ||
Comment 22•5 months ago
|
||
I'd rather let printing fixes ride the trains, there's always new surprises.
Updated•4 months ago
|
Description
•