Closed Bug 1982336 Opened 2 months ago Closed 1 month ago

Youtube Resolution restricted due to Processor Mitigation

Categories

(Core :: Privacy: Anti-Tracking, defect)

defect

Tracking

()

RESOLVED FIXED
144 Branch
Tracking Status
firefox-esr128 --- unaffected
firefox-esr140 --- unaffected
firefox141 --- unaffected
firefox142 --- unaffected
firefox143 --- fixed
firefox144 --- fixed

People

(Reporter: tjr, Assigned: fkilic)

References

(Blocks 1 open bug, Regression)

Details

(Keywords: regression)

Attachments

(1 file)

From https://bugzilla.mozilla.org/show_bug.cgi?id=1954197#c1

Keep in mind that, YouTube restricts the higher quality (at the offered bitrates) AV1 codec depending on the reported hardwareConcurency, which made it so that, when this value is set to 2 by the logic introduced in Bug 1978414, AV1 is restricted to 480p and lower.

So how can I verify this? I found an 8k stream on youtube, and compared it in a signed-in-profile that's set to always prefer av1 reporting 64 cores; and a PBM window not signed in reporting 2 core. Both videos allowed me to choose 8k resolution, and both videos seem to be giving it to me when I choose it from the dropdown...

The default resolution for my PBM window is 720 it seems.

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

It may be depended on other information such as the screen resolution, I don't know. I'm testing this on a 1080p monitor with a GPU without AV1 hardware support. I can confirm, however, that spoofing hardwareConcurency is the cause in my case, by disabling ETP and setting dom.maxHardwareConcurrency:2, instead.

Even before that, AV1 was restricted to =<1080p, which isn't great, but it's the same behaviour as Chromium on Linux. I think the only browser that I've seen actually using AV1 for >1080p on this hardware is Edge on Windows.

Actually, I just went and check on Windows11, and right now, regardless of the ETP settings, Nightly seems to be the only browser (between Release, Nightly and Edge) that allows AV1 at any resolution... So, clearly there's more going on than the CPU count.

I wrote the following violentmonkey script to see if I can figure out the callpath and what other things are considered

// ==UserScript==
// @name        Proto Intercept
// @namespace   Violentmonkey Scripts
// @match       https://www.youtube.com/*
// @grant       none
// @version     1.0
// ==/UserScript==

delete Object.getPrototypeOf(navigator).hardwareConcurrency;
Object.defineProperty(navigator, 'hardwareConcurrency', { get: () => {
  debugger;
  return 2;
} });

and I don't know if it is minification or obfuscation but trying to understand the callpath is really hard. I couldn't figure out why. Sharing it just in case someone else wants to try. (just fyi it is read twice, and the second one is easy to understand but it looks like it is read for analysis/reporting, and not for resolution decision making)

On W11, media.ffvpx-hw.enabled:true (enabled in Bug 1936128) is what makes Nightly always preferring AV1 (when available). Indeed by disabling it, or by running Nightly in safemode, I get the same behaviour as on Linux. Also, in about:support, on W11, it's reported erroneously, that my GPU supports AV1 hardware decoding. So they likely take into account hardware capabilities.

See Also: → 1984132

Does this reproduce this with dom.maxHardwareConcurrency = 4 (with ETP standard (or privacy.fingerpritingProtection = false)) ?

Flags: needinfo?(tgnff242)

No, this doesn't happen for any value above 2 (when not overridden by ETP).

Flags: needinfo?(tgnff242)

Awesome, thank you!

This should also be fixed by Bug 1984333 then.

Status: NEW → RESOLVED
Closed: 1 month ago
Depends on: 1984333
Resolution: --- → FIXED
Target Milestone: --- → 144 Branch
Assignee: nobody → mozbugzilla
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: