Closed Bug 1769431 Opened 2 years ago Closed 2 years ago

Intermittent black video playback

Categories

(Core :: Graphics, defect, P3)

x86_64
Windows 10
defect

Tracking

()

RESOLVED FIXED
107 Branch
Tracking Status
firefox102 --- wontfix
firefox105 --- wontfix
firefox106 --- disabled
firefox107 --- fixed

People

(Reporter: h.winnemoeller, Assigned: sotaro)

References

(Blocks 1 open bug)

Details

Attachments

(3 files)

STR

  1. Open any website with video playback, e.g. YouTube
  2. Play several videos

Expected result
Video playback is functional.

Actual result
At some point, the video stops presenting, the video is completely black while audio is still playing. Using another instance of Firefox exhibits correct video playback. Also, restarting the affected instance resolves the issue.

Still, decoding is happening, no errors are reported on about:support and the Windows Task-Manager reports activity on the "Video Decode" portion of the GPU tab. Switching to PIP mode briefly shows the expected current video frame. Also, taking a screenshot shows the expected current video frame. This happens regardless of the used codec, e.g. H264, VP9 or AV1.

Device details
Firefox: 102.0a1, 20220514213937
Windows Version: Windows 10 21H2
RAM: 64 GiB
GPU: NVIDIA RTX 3080

This sounds graphics related.

Henrik, could you please help us by 1) posting your about:support text, and if possible, 2) collect a Firefox performance profile using the 'Graphics' settings in the drop down of the toolbar button when you see this happening? Thanks.

https://profiler.firefox.com/

Blocks: gfx-triage
Flags: needinfo?(h.winnemoeller)

Henrik, is this is a regression? Do you think you could try to get a regression window with mozregression?

Attached file about:support text
(In reply to Jim Mathies [:jimm] from comment #1) > This sounds graphics related. > > Henrik, could you please help us by 1) posting your about:support text, and if possible, 2) collect a Firefox performance profile using the 'Graphics' settings in the drop down of the toolbar button when you see this happening? Thanks. > > https://profiler.firefox.com/ I cannot reproduce this anymore on the current 102.0a1 Build 20220520093126. In any case, here is the about:support text. @jrmuizel, do you still think mozregression is worth a try if I cannot reproduce it anymore/easily?
Flags: needinfo?(h.winnemoeller)
Flags: needinfo?(jmuizelaar)

Thanks for posting back. Feel free to reopen if you run into the issue again.

No longer blocks: gfx-triage
Status: NEW → RESOLVED
Closed: 2 years ago
Flags: needinfo?(jmuizelaar)
Resolution: --- → WORKSFORME

I was able to reproduce the issue after a 30 min browsing session viewing many videos on 102.0a1 20220526093328, here is the perf profile using the graphics preset: https://share.firefox.dev/3wMd5DM (Playback of https://www.youtube.com/watch?v=Pj-h6MEgE7I with AV1 hardware decoding and 2x switch to PIP-mode)

Also, there are no errors reported on about:support.

Triggering a device reset resolves the issue.

I could try inspecting the browser with RenderDoc, but I will have to try to reproduce the issue which can take very long or does not happen at all on some sessions.

Status: RESOLVED → REOPENED
Resolution: WORKSFORME → ---
Blocks: video-perf

The severity field is not set for this bug.
:jimm, could you have a look please?

For more information, please visit auto_nag documentation.

Flags: needinfo?(jmathies)

This issue has been bothering me since around february this year, and I have some additional information:

With regular videos, it seems to happen most often when I switch to a tab with a video in it. With Twitch streams however, I have seen it happen randomly during playback.

When the issue starts, the video that is currently playing will usually strobe at first, like in https://bugzilla.mozilla.org/show_bug.cgi?id=1760762. It will keep strobing until I switch to a different tab and when I then switch back, the video (and any others, both already loaded and new videos) will be black with only audio playing. With Twitch streams they will strobe for a few seconds and then turn black by themselves.

It ONLY affects my primary display. If I position the window so the video shows on multiple monitors, only the video area that is on my primary display is black. My primary display is 120hz and gsync enabled (connected to an rtx2080ti). The issue has started both when gsync was on and when it was turned off. I have not yet tried reproducing the issue with my primary display at 60hz, but I have tried switching to 60hz after the issue started which did not help.

It is an annoyingly intermittent issue, but the most reliable way I have found to reproduce it is by having multiple videos and/or twitch streams running at the same time, and switching between those tabs a lot. Like others have mentioned, restarting firefox will (temporarily) resolve the issue.

I'm also on a 120 Hz monitor with G-Sync, maybe this is some requirement to trigger this issue? Just today I managed to reproduce the issue again on Nightly 20220716190510.

(In reply to Henrik Winnemöller from comment #8)

I'm also on a 120 Hz monitor with G-Sync, maybe this is some requirement to trigger this issue? Just today I managed to reproduce the issue again on Nightly 20220716190510.

Maybe, but I did just reproduce it again with gsync disabled, build 20220716092056

Another thing I just noticed as the issue happened again: once the issue is triggered, other browsers and even VLC will have the same issue until the firefox instance is restarted. As if something in firefox is blocking the output of the hardware decoder to the main display. Once Firefox is restarted (I haven't tried just closing it) the other applications will immediately start showing videos on the main screen again.

This detail is straying a bit far from firefox but oddly enough discord embedded videos work fine on the main display but turn black when fullscreened

Component: Audio/Video: Playback → Graphics
Flags: needinfo?(jmathies)

The severity field is not set for this bug.
:bhood, could you have a look please?

For more information, please visit auto_nag documentation.

Flags: needinfo?(bhood)
Flags: needinfo?(bhood)

The severity field is not set for this bug.
:bhood, could you have a look please?

For more information, please visit auto_nag documentation.

Flags: needinfo?(bhood)

Sotaro, could you please have a look at this when you get a chance? Adjust the severity as you see fit.

Severity: -- → S3
Flags: needinfo?(bhood) → needinfo?(sotaro.ikeda.g)
Priority: -- → P3
See Also: → 1760762
See Also: → 1778560

(In reply to johan.bontekoe from comment #7)

This issue has been bothering me since around february this year, and I have some additional information:

Hi johan.bontekoe, does the problem still happen on your PC? I wonder if the problem is related to YUV video overlay usage. It is enabled by Bug 1758601. And it is disabled by Bug 1780815. Video overlay is not enabled on release on NVIDIA gpu

Flags: needinfo?(johan.bontekoe)

Hi Henrik Winnemöller, does the problem still happen on nightly?

Flags: needinfo?(h.winnemoeller)

(In reply to Sotaro Ikeda [:sotaro] from comment #14)

(In reply to johan.bontekoe from comment #7)

This issue has been bothering me since around february this year, and I have some additional information:

Hi johan.bontekoe, does the problem still happen on your PC? I wonder if the problem is related to YUV video overlay usage. It is enabled by Bug 1758601. And it is disabled by Bug 1780815. Video overlay is not enabled on release on NVIDIA gpu

It looks like YUV overlay was disabled again 2 months ago in version 105 but the issue still happened to me yesterday in some iteration of v107. I have just updated to the latest nightly (2022-09-21) just to be sure and I will report back once it happens again.

For the past months this issue has basically been my cue to apply the newly downloaded updates since I have to restart the firefox instance anyway. So I'm rarely more than 1 or 2 builds behind the latest release.

Flags: needinfo?(johan.bontekoe)

(In reply to johan.bontekoe from comment #16)

(In reply to Sotaro Ikeda [:sotaro] from comment #14)

(In reply to johan.bontekoe from comment #7)

This issue has been bothering me since around february this year, and I have some additional information:

Hi johan.bontekoe, does the problem still happen on your PC? I wonder if the problem is related to YUV video overlay usage. It is enabled by Bug 1758601. And it is disabled by Bug 1780815. Video overlay is not enabled on release on NVIDIA gpu

It looks like YUV overlay was disabled again 2 months ago in version 105 but the issue still happened to me yesterday in some iteration of v107. I have just updated to the latest nightly (2022-09-21) just to be sure and I will report back once it happens again.

For the past months this issue has basically been my cue to apply the newly downloaded updates since I have to restart the firefox instance anyway. So I'm rarely more than 1 or 2 builds behind the latest release.

Well that was quick. Switching between several tabs that have livestreams running seems to be the most effective way to reproduce this.
In about:support I do see
OverlaySupport NV12=Scaling YUV2=Scaling BGRA8=Software RGB10A2=None
But in about:config I see
gfx.webrender.dcomp-video-yuv-overlay-win = false

Attached file about-support
I am getting exactly this issue on 106.0b4 (Developer) Especially when switching tabs between twitch livestreams. But it also happens on youtube. Using 120hz refresh rate. ```

johan.bontekoe and Per Thulin, can you check if the problem could be addressed by either the following pref change. The pref could be changed from about:config. Thank you.

  • pref gfx.webrender.dcomp-video-overlay-win = false
  • pref media.wmf.zero-copy-nv12-textures = false
Flags: needinfo?(per)
Flags: needinfo?(johan.bontekoe)

(In reply to Sotaro Ikeda [:sotaro] from comment #19)

johan.bontekoe and Per Thulin, can you check if the problem could be addressed by either the following pref change. The pref could be changed from about:config. Thank you.

  • pref gfx.webrender.dcomp-video-overlay-win = false
  • pref media.wmf.zero-copy-nv12-textures = false

pref gfx.webrender.dcomp-video-overlay-win = false does indeed make the issue go away.
pref media.wmf.zero-copy-nv12-textures = false does not.

In the instance the issue starts, sometimes the video blinks, where every other frame is black.

Reproduction steps (on my system):
Open two tabs of a twitch live stream, such as https://www.twitch.tv/oldtimeycomputershow and play.
Switch between the two tabs 150 times (Ctrl+Tab). At 100 switches I typically get the issue, on a freshly started browser.

Flags: needinfo?(per)

(In reply to Per Thulin from comment #20)

pref gfx.webrender.dcomp-video-overlay-win = false does indeed make the issue go away.
pref media.wmf.zero-copy-nv12-textures = false does not.

In the instance the issue starts, sometimes the video blinks, where every other frame is black.

Reproduction steps (on my system):
Open two tabs of a twitch live stream, such as https://www.twitch.tv/oldtimeycomputershow and play.
Switch between the two tabs 150 times (Ctrl+Tab). At 100 switches I typically get the issue, on a freshly started browser.

I can see the same behaviour on my system using these reproduction steps and pref changes. I'm on Nightly Version 107.0a1, Build ID 20220926093803.

Flags: needinfo?(h.winnemoeller)

(In reply to Per Thulin from comment #20)

pref gfx.webrender.dcomp-video-overlay-win = false does indeed make the issue go away.
pref media.wmf.zero-copy-nv12-textures = false does not.

In the instance the issue starts, sometimes the video blinks, where every other frame is black.

Reproduction steps (on my system):
Open two tabs of a twitch live stream, such as https://www.twitch.tv/oldtimeycomputershow and play.
Switch between the two tabs 150 times (Ctrl+Tab). At 100 switches I typically get the issue, on a freshly started browser.

What a genius way to reproduce this, just hold ctrl + tab until it happens. I can confirm these results as well, I have not been able to reproduce it after setting pref gfx.webrender.dcomp-video-overlay-win = false, the other option had no impact.

Flags: needinfo?(johan.bontekoe)

Thank you for the detailed information! I could reproduce the problem with the STR of Comment 20. I am going to look into the problem.

Assignee: nobody → sotaro.ikeda.g
Flags: needinfo?(sotaro.ikeda.g)

Video overlay is enabled until early beta on NVIDIA GPU.

Pushed by sikeda.birchill@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/000a666b87ee Ensure to release SwapChain surface handle r=gfx-reviewers,lsalzman
Status: REOPENED → RESOLVED
Closed: 2 years ago2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 107 Branch

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

  • If yes, please nominate the patch for beta approval.
  • If no, please set status-firefox106 to wontfix.

For more information, please visit auto_nag documentation.

Flags: needinfo?(sotaro.ikeda.g)

Comment on attachment 9296417 [details]
Bug 1769431 - Ensure to release SwapChain surface handle

Beta/Release Uplift Approval Request

  • User impact if declined: Video rendering could become black on Windows with NVIDIA gpu.
  • Is this code covered by automated tests?: Yes
  • Has the fix been verified in Nightly?: Yes
  • 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): The fix just added releasing resource.
  • String changes made/needed: none
  • Is Android affected?: No
Flags: needinfo?(sotaro.ikeda.g)
Attachment #9296417 - Flags: approval-mozilla-beta?

Sotaro, does this issue happen for late betas or only nightly and early betas?

Flags: needinfo?(sotaro.ikeda.g)

It happens only on nightly and early betas.

Flags: needinfo?(sotaro.ikeda.g)

Comment on attachment 9296417 [details]
Bug 1769431 - Ensure to release SwapChain surface handle

Given that it's a nightly & early beta build issue and that we just shipped our last early beta this cycle, we don't need to uplift this fix, thanks!

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

Attachment

General

Created:
Updated:
Size: