Closed Bug 1961610 Opened 2 months ago Closed 2 months ago

HDR video is forced on Youtube on non HDR display and settings

Categories

(Core :: Audio/Video: Playback, defect, P2)

Firefox 139
x86_64
Linux
defect

Tracking

()

RESOLVED FIXED
139 Branch
Tracking Status
relnote-firefox --- 138+
firefox-esr128 --- unaffected
firefox137 --- wontfix
firefox138 --- fixed
firefox139 --- fixed

People

(Reporter: glite60, Assigned: stransky)

References

(Blocks 1 open bug, Regression)

Details

(Keywords: regression)

Attachments

(2 files, 2 obsolete files)

Attached file about:support

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:138.0) Gecko/20100101 Firefox/138.0

Steps to reproduce:

Linux, Firefox nightly 139 and beta 138
Ubuntu 25.04, Gnome 48
gfx.webrender.compositor disabled
gfx.wayland.hdr disabled

Open HDR video in Youtube

Actual results:

Youtube quality selector shows that HDR video is playing back and video is grayish, doesn't allow to select non HDR format.

Expected results:

Youtube plays standard non HDR video.

OS: Unspecified → Linux
Hardware: Unspecified → x86_64

As a workaround I tried enabling gfx.wayland.hdr, this makes colors look correct, meaning there is some tonemapping active, but with some artifacts and being too bright.
This snippet https://jsfiddle.net/jimmathies/dhws9852/38/ shows this:
screen: no
decode: yes

The Bugbug bot thinks this bug should belong to the 'Core::Graphics: WebRender' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → Graphics: WebRender
Product: Firefox → Core

I see the same on GNOME 48, Arch Linux, with only a SDR screen.

I tested using https://www.youtube.com/watch?v=5z43FTxB30A

With older builds, YouTube chooses its SDR video, which looks much better. The HDR video is either desaturated (gfx.wayland.hdr off) or too dark (gfx.wayland.hdr on).

Last good revision: ab15b94c2e9bce73b278b1c71af19eb738d654bc
First bad revision: a011cae095cd555562c1798414e8b8dc906105df
Pushlog: https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=ab15b94c2e9bce73b278b1c71af19eb738d654bc&tochange=a011cae095cd555562c1798414e8b8dc906105df

Regressed by bug 1948007.

I see two issues here:

  • With gfx.wayland.hdr off, HDR capability is exposed to YouTube
  • With gfx.wayland.hdr on, HDR capability is exposed to YouTube even without a HDR monitor
Keywords: regression
Regressed by: 1948007

:stransky, since you are the author of the regressor, bug 1948007, could you take a look?

For more information, please visit BugBot documentation.

Flags: needinfo?(stransky)
Priority: -- → P2
Regressed by: 1934497
No longer regressed by: 1948007
Assignee: nobody → stransky
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Component: Graphics: WebRender → Audio/Video: Playback
Flags: needinfo?(stransky)

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

Pushed by stransky@redhat.com: https://hg.mozilla.org/integration/autoland/rev/3efa51ad1d24 [Wayland] Advertise HDR support only of gfx.wayland.hdr pref is set r=emilio

Comment on attachment 9480190 [details]
Bug 1961610 [Wayland] Advertise HDR support only of gfx.wayland.hdr pref is set r?emilio

Beta/Release Uplift Approval Request

  • User impact if declined/Reason for urgency: Advertise HDR video playback capability although HDR itself is disabled so if user selects HDR broken video is played.
  • 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: Low
  • Why is the change risky/not risky? (and alternatives if risky): Disable HDR according to pref (which is off by default).
  • String changes made/needed:
  • Is Android affected?: No
Attachment #9480190 - Flags: approval-mozilla-beta?
Flags: needinfo?(stransky)

Doesn't look clear why IsHDREnabled returns true, could that be some mutter bug?

Attachment #9480239 - Attachment is obsolete: true

(In reply to Eduard Kachur from comment #10)

Doesn't look clear why IsHDREnabled returns true, could that be some mutter bug?

That function currently checks for the ability to create parametric image descriptions, which is used to signal the HDR colorspace information to the compositor. This is always available and doesn't tell you whether any output supports HDR.

I think Firefox needs to check the outputs' parameters (maybe maximum luminance or PQ transfer function?) whenever a website queries either HDR decoding or HDR display, to avoid getting locked into HDR on/off at startup (this is assuming gfx.wayland.hdr is enabled).

Flags: needinfo?(stransky)
Pushed by stransky@redhat.com: https://hg.mozilla.org/integration/autoland/rev/11bb99361d4c [Wayland] Advertise HDR support only of gfx.wayland.hdr pref is set r=emilio

So it looks like current implementation even with config check, could create a situation with dual displays, that HDR playback will be enabled for non HDR display.

(In reply to Eduard Kachur from comment #15)

So it looks like current implementation even with config check, could create a situation with dual displays, that HDR playback will be enabled for non HDR display.

Yes, you're right.

Backed out for causing failures on StaticPrefList_layers.h

Flags: needinfo?(stransky)

It looks like the MakeScreenGtk runs before prefs are loaded? So accessing an AtStartup pref locks all of them in, and when prefs are actually loaded later you run into an assert.

That's interesting, Thanks.

Attachment #9480190 - Flags: approval-mozilla-beta?
Attachment #9480190 - Attachment is obsolete: true
Flags: needinfo?(stransky)

Comment on attachment 9480518 [details]
Bug 1961610 [Wayland] Don't advertise HDR support on Wayland r?emilio

Beta/Release Uplift Approval Request

  • User impact if declined/Reason for urgency: HDR content is served on Wayland where HDR protocol is present which leads to washed out video.
  • 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: Low
  • Why is the change risky/not risky? (and alternatives if risky): Flip HDR support pref as it was before.
  • String changes made/needed:
  • Is Android affected?: No
Attachment #9480518 - Flags: approval-mozilla-beta?
Pushed by stransky@redhat.com: https://hg.mozilla.org/integration/autoland/rev/8a05f6d8590d [Wayland] Don't advertise HDR support on Wayland r=emilio

Comment on attachment 9480518 [details]
Bug 1961610 [Wayland] Don't advertise HDR support on Wayland r?emilio

There are no more betas left in the 138 cycle. Moving the request to release, and leaving this open for consideration into the 138 dot release.

Attachment #9480518 - Flags: approval-mozilla-beta? → approval-mozilla-release?
Status: ASSIGNED → RESOLVED
Closed: 2 months ago
Resolution: --- → FIXED
Target Milestone: --- → 139 Branch

The patch landed in nightly and beta is affected.
:stransky, is this bug important enough to require an uplift?

For more information, please visit BugBot documentation.

Flags: needinfo?(stransky)

Yes, please ship that to release, it's just a pref flip.

Flags: needinfo?(stransky)
QA Whiteboard: [qa-triage-done-c140/b139]

Comment on attachment 9480518 [details]
Bug 1961610 [Wayland] Don't advertise HDR support on Wayland r?emilio

Approved for 138.0.3

Attachment #9480518 - Flags: approval-mozilla-release? → approval-mozilla-release+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: