Closed Bug 1832215 Opened 1 year ago Closed 1 year ago

Color management [with installed display color profile] broken in version 113.0

Categories

(Core :: Graphics: Color Management, defect, P1)

Firefox 113
defect

Tracking

()

VERIFIED FIXED
115 Branch
Tracking Status
relnote-firefox --- 113+
firefox-esr102 --- unaffected
firefox113 + verified
firefox114 + verified
firefox115 + verified

People

(Reporter: ben-grieve, Assigned: jgilbert)

References

(Blocks 1 open bug, Regressed 3 open bugs, Regression)

Details

(Keywords: regression)

Attachments

(13 files)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/113.0

Steps to reproduce:

Updated to latest version, 113.0

Actual results:

Color management is broken.

Expected results:

Color management should not have been broken. This happened before with another update.

I set gfx.color_management.native_srgb from true to false and it seems to have resolved the problem.

Component: Untriaged → Graphics: Color Management
Product: Firefox → Core

Would you be willing to run https://mozilla.github.io/mozregression/ to pinpoint what changeset caused this regression?

See Also: → 1831762

I am experiencing the same issue however setting gfx.color_management.native_srgb from true to false did not fix it.

Do you have an example image where color management is broken?

Flags: needinfo?(ben-grieve)

For me it is broken everywhere, from the websites down to the UI of the browser itself.

I ran the Mozregression tool, and here is the result:

2023-05-10T17:09:17.288000: DEBUG : Found commit message:
Bug 1799258: apply code formatting via Lando

Before this commit, everything was fine. After this commit, every color is heavily oversaturated, even in the GUI.

The last good build:

2023-03-13 21:47:43.919000

The first bad build:

2023-03-13 22:01:45.319000

This was about when two new options appeared dealing with color management:

gfx.color_management.rec2020_gamma_as_rec709
gfx.color_management.rec709_gamma_as_srgb

No idea, what these options are about.

Hope that helps!

Keywords: regression
Regressed by: 1799258

Experiencing the same. Neither setting gfx.color_management.native_srgb false nor disabling the new rec gamma options resolves it.
I've got mode set to 1 (always colour manage).

Attaching a screenshot with on the left FF 113.0 and on the right a colour managed photo viewer showing the same AdobeRGB photo.
Before today's update (so in FF 112.0) these used to agree, now you see Firefox's rendering is over saturated.

Ben or [:Propheticus] can you also attach your display profile to the bug?

Same problem here. Everything is now over-saturated as of today (5/10/23) on my Adobe RGB (1998) monitor. All was fine yesterday, but today everything is over-saturated. Even sRGB-tagged images are over-saturated. Have not changed my about:config settings, but tried various new combinations but to no avail. Nothing fixes this. Chrome still properly color manages my RGB-tagged images, but not Firefox. So, this doesn't appear to be a computer or an image tagging issue. I'm pretty sure this is problem with the new version (113.0) of Firefox.

(In reply to [:Propheticus] from comment #8)

Created attachment 9332668 [details]
FF113_brokenColourMgmt.png

Experiencing the same. Neither setting gfx.color_management.native_srgb false nor disabling the new rec gamma options resolves it.
I've got mode set to 1 (always colour manage).

Attaching a screenshot with on the left FF 113.0 and on the right a colour managed photo viewer showing the same AdobeRGB photo.
Before today's update (so in FF 112.0) these used to agree, now you see Firefox's rendering is over saturated.

Can you attach the original image of this?

Flags: needinfo?(jgilbert) → needinfo?(1rufad7o3)

I'm investigating.

Assignee: nobody → jgilbert
Severity: -- → S2

Please attach an about:support for an affected Firefox config.

Flags: needinfo?(1rufad7o3)

For those seeing this, what is your value for gfx.color_management.mode?

gfx.color_management.mode = 1

Attached file aboutSupport.txt
Attached file support.txt

(In reply to Jeff Muizelaar [:jrmuizel] from comment #17)

For those seeing this, what is your value for gfx.color_management.mode?

Does not appear to affect the issue. Have it set to 1, but reverting to 2 does not fix.

This is a screen capture using Shift+CTRL+S on a Windows 10 computer. It shows a comparison between the Firefox v 1.1.3 browser rendition of a website image and the rendition of the same website in Chrome. The flower image displayed here is tagged with an embedded sRGB profile. The screen shot was taken with on an Adobe RGB monitor, so I pasted it into a Photoshop document set to Adobe RGB as the working color space. I then saved a jpg of the image embedding the Adobe RGB color profile in the jpg. The Firefox version is very over-saturated compared with the Chrome version. Not just the image, but the text and favicons and the social media links at the bottom. Everything is over-saturated in Firefox 1.1.3, not just images (regardless of whether or not they have an embedded color profile).

For those seeing this, what is your value for gfx.color_management.mode?

Mine is set to "2" but changing to "1" does not solve this problem.

(In reply to [:Propheticus] from comment #8)

Created attachment 9332668 [details]
FF113_brokenColourMgmt.png

Experiencing the same. Neither setting gfx.color_management.native_srgb false nor disabling the new rec gamma options resolves it.
I've got mode set to 1 (always colour manage).

Attaching a screenshot with on the left FF 113.0 and on the right a colour managed photo viewer showing the same AdobeRGB photo.
Before today's update (so in FF 112.0) these used to agree, now you see Firefox's rendering is over saturated.

I have to correct myself here.
setting gfx.color_management.native_srgb to false does seem to solve the issue. Not sure what happened earlier when I tried this.

setting gfx.color_management.native_srgb to false does seem to solve the issue.

setting gfx.color_management.native_srgb to false does NOT solve the problem for me. Everything remains over-saturated.

I'm choosing this as The Official Bug.

Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Flags: needinfo?(ben-grieve)
Priority: -- → P1

(In reply to tkuyper from comment #25)

setting gfx.color_management.native_srgb to false does seem to solve the issue.

setting gfx.color_management.native_srgb to false does NOT solve the problem for me. Everything remains over-saturated.

Then this sounds like it might be a issue. (Be aware that after changing that pref, you must restart the browser!)
Please post your about:support either here or in a new bug!

Set release status flags based on info from the regressing bug 1799258

Workaround

In about:config, set gfx.color_management.native_srgb to false.

Symptoms

With the pref change, in-browser color-management is assuming a display color space of (and therefore converting to) srgb instead of the color space indicated by any color profile associated with the display.

For instance, for srgb-100%-red, if the display profile is display-p3, faithfully reproducing srgb-100%-red means giving the OS [0.91749, 0.20029, 0.13856].
In this case, if we give the OS [1.0, 0.0, 0.0] instead, we will see a redder display-p3-100%-red.
The larger the destination gamut, the more visibly incorrect the colors will look.

Repro

We can test this on a non-wide-gamut display.

  1. Install a deliberately-wrong color profile for the (primary/in-use) display. (e.g. IdentityRGB-elle-V4-g10.icc)
  2. For the version of Firefox in question, start the browser. (restarting it if already running)
    a. Ensure that in about:support, the base64 value for CMSOutputProfile matches the base64 value for the profile from #1 (such as via https://base64.guru/converter/encode/file)
  3. View an image. (e.g. 230510084955-prince-harry-230506.jpg)

Colors should match e.g. Chrome. An affected version of Firefox will display (possibly wildly) different colors.

Timeline

In bug 1799258, we flipped the default for gfx.color_management.native_srgb from false to true on Windows.
This passed code review and tests on CI.
This regression appears to have been first filed in bug 1823400, which was triaged as S3.
We have seen a number of likely-identical bug reports which I will dupe onto this one.

Reach

This affects users:

  • On Windows, and
  • with gfx.color_management.native_srgb left at default, and
  • a color profile installed for a display
    • where the profile is powerful/different-from-identity enough that it's obvious when it's skipped

We are mostly looking then at graphical media creators/workers, that have wider-gamuts displays.
I believe most plug-and-play users with wide-gamut displays will not install a color profile, and so would be unaffected. (Such users are used to and expect the "wrong" over-saturated colors, including in e.g. Chrome)

[Tracking Requested - why for this release]:
Some users with installed monitor/display color profiles will see incorrect (usually over-saturated) colors.

Summary: Color management broken in version 113.0 → Color management [with installed display color profile] broken in version 113.0
Duplicate of this bug: 1832293
Duplicate of this bug: 1831762
Duplicate of this bug: 1823400

Added as a known issue to the Fx113 relnotes.

Users on some Windows systems may see incorrect and/or over-saturated colors. We are investigating this issue and will address it in an upcoming bugfix release. As a temporary workaround, setting the gfx.color_management.native_srgb preference to false may alleviate the issue.

See Also: 1831762
Again, the following suggested workaround does not work for me: >Users on some Windows systems may see incorrect and/or over-saturated colors. We are investigating this issue and will address it in an upcoming bugfix release. As a temporary workaround, setting the gfx.color_management.native_srgb preference to false may alleviate the issue. about:support copied below. This is the raw data.

Yes, I'm using a wide-gamut monitor (Adobe RGB 1998) but it's not just profile-tagged or untagged images that are affected. EVERYTHING is over-saturated, including colored text.

I also wanted to point out that changing gfx.color_management.native_srgb to false now affects videos. Version 107 was the last time I had made any changes to these settings, so perhaps it was a more recent update I hadn't noticed. Not saying this is bad. I've been wanting this for a while now.

@tkuyper, given that reverting the preference isn't working for you, it might be worth confirming that the regression you're seeing was in fact from the same change that this bug has been attributed to. Would you also be willing to try narrowing down a culprit with the mozregression tool mentioned in comment 2? Thanks!

Flags: needinfo?(tkuyper)
Attached image mozregression.jpg

I can't figure out how to download Mozregression GUI. This what I see when I follow the link in the video description. It doesn't match what is shown in the video, so I'm lost.

Flags: needinfo?(tkuyper)

https://github.com/mozilla/mozregression/releases/download/5.3.2/mozregression-gui.exe is a direct link to the latest Windows installer. If you have a python environment, the command line version can also be installed via pip.

I couldn't find a good build using Mozregression. But now when I set gfx.color_management.native_srgb to false, images tagged with a color file display correctly on my wide-gamut monitor. Colored text is still oversaturated, but at least images look right, and this is the most important thing for me.

I had set gfx.color_management.native_srgb to false earlier today and restarted FF and didn't see a change. But, after working with Moxregression, that change fixed the over-saturation for images. Really weird. Doesn't seem to make sense. Regardless, colored text is still over-saturated.

Attached image FF-fixed.jpg

OK, it's now completely fixed with these settings. Both text and images are NOT oversaturated any longer.

(In reply to tkuyper from comment #45)

Created attachment 9332995 [details]

OK, it's now completely fixed with these settings. Both text and images are NOT oversaturated any longer.

The issue (or one issue) seems to be that 113 sets gfx.color_management.native_srgb to true by default (it was previously false).

I can't find any definition of what that setting does, but it appears that setting it true means it doesn't use the monitor profile, but renders the image to sRGB. This is not a good choice if what you want is colour management. It absolutely guarantees that colour management won't work correctly unless you have a monitor whose colour space is identical to sRGB. Mozilla should change the default back to false.

Also needed: set gfx.color_management.mode to 1, as the default setting is not to colour manage untagged graphic elements (this is contrary to WWW recommendations, and I don't know why Mozilla insist on ignoring WWW recommendations).

I don't think altering the rendering intent (gfx.color_management.rendering_intent) directly affects this issue.

I have a test page at http://simongarrett.uk/simon/colour-management-information/colour-management-test-page/ that checks if a browser is doing colour management properly.

Pushed by jgilbert@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/2a3a45421336 Use display-color-profile by default on Windows. (again) r=jrmuizel

Comment on attachment 9332967 [details]
Bug 1832215 - Use display-color-profile by default on Windows. (again)

Beta/Release Uplift Approval Request

  • User impact if declined: Incorrect (generally over-saturated) colors for Windows users with installed monitor/display color profiles, with incorrectness proportional to the degree of color correction in the color profile. (Users with color profiles on wide-gamut displays are the most affected)
  • Is this code covered by automated tests?: No
  • Has the fix been verified in Nightly?: No
  • Needs manual test from QE?: No
  • If yes, steps to reproduce:
  • List of other uplifts needed: None
  • Risk to taking this patch: Medium
  • Why is the change risky/not risky? (and alternatives if risky): Code-wise, this was almost certainly just this pref flip, so here we revert that part.
    The main risk is that we haven't gotten much user testing for the old pref value since 113 when the default changed. (very few people change this pref)
    The old codepaths should all still work as before, but that's the core risk. If anything did change in the old codepath, we will not have had good in-the-wild testing for it to find regressions since 113.
  • String changes made/needed: none
  • Is Android affected?: No
Attachment #9332967 - Flags: approval-mozilla-release?
Attachment #9332967 - Flags: approval-mozilla-beta?

For risk, more specifically, there's very low likelihood regressions, but if there are regressions here they might be quite bad. (incorrect/missing page elements) Normal QA testing would find these, as would users, but that's something to worry about when jumping all the way to Release here.

Comment on attachment 9332967 [details]
Bug 1832215 - Use display-color-profile by default on Windows. (again)

Approved for 114.0b3 and 113.0.1.

Attachment #9332967 - Flags: approval-mozilla-release?
Attachment #9332967 - Flags: approval-mozilla-release+
Attachment #9332967 - Flags: approval-mozilla-beta?
Attachment #9332967 - Flags: approval-mozilla-beta+

(In reply to [:Propheticus] from comment #8)

Created attachment 9332668 [details]
FF113_brokenColourMgmt.png

Experiencing the same. Neither setting gfx.color_management.native_srgb false nor disabling the new rec gamma options resolves it.
I've got mode set to 1 (always colour manage).

Attaching a screenshot with on the left FF 113.0 and on the right a colour managed photo viewer showing the same AdobeRGB photo.
Before today's update (so in FF 112.0) these used to agree, now you see Firefox's rendering is over saturated.

You need to restart Firefox. I experienced the same, until I restarted Firefox.

Added to the 113.0.1 relnotes:

Fixed incorrect colors for Windows users with installed monitor/display color profiles, particularly on wide gamut displays

Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 115 Branch
Flags: qe-verify+

I was able to reproduce the issue on Firefox 113.0 on Windows 11 with a LG 4k monitor by using the informations provided in Comment 29.

The issue is fixed on Firefox 113.0.1, Firefox 114.0b3 and Firefox 115.0a1 (treeherder builds) on the same system. Also verified that the value for CMSOutputProfile matches the base64 value for the profile "IdentityRGB-elle-V4-g10.icc".

Status: RESOLVED → VERIFIED
Flags: qe-verify+
Regressions: 1832971
Regressions: 1832881
Regressions: 1833030
Regressions: 1832956
Blocks: 1837681
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: