Closed Bug 1613770 Opened 5 years ago Closed 5 years ago

Purple flicker when playing video with AV1 codec with NVIDIA graphics card.

Categories

(Core :: Graphics: WebRender, defect, P3)

72 Branch
Desktop
Windows 10
defect

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: TheSkynet1337, Unassigned)

References

Details

Attachments

(2 files)

Attached file Profile used. (deleted) —

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

Steps to reproduce:

  1. Open a YouTube video.
  2. Make sure NVIDIA GPU is used for hardware acceleration.
  3. Make sure it uses av01.0.09M.08 or av01.0.08M.08 encoding(check Stats for nerds' codecs section).
  4. Move the mouse

Actual results:

The video flickers purple intermittently at seemingly random intervals.
Video of flickering: https://www.youtube.com/watch?v=AlHnb5pi6I4 (left side is a fresh profile in FF right side is a fresh Chrome install)

Expected results:

The video should play back normally without visual artifacts.

Things I have tried so far:
-Use Intel GPU instead of NVIDIA: No flickering when using no hardware acceleration or when using Intel GPU for hardware acceleration.
-Fresh profile and resetting Firefox: Flickering persists.

-Video playback using VP09 or avc1 do not flicker.

Windows version: Windows 10 1909(OS Build 18363.592)
NVIDIA driver version: 442.19

Component: Untriaged → Audio/Video: Playback
Product: Firefox → Core

According to our discussion, it seems more a graphic issue. :jolin would post his assumption later.

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

FF doesn't use HW decoder for AV1 and the decoded contents should not be affected by GPU.

From the attached video it looks like the pixels are read (by compositor?) while the decoder is writing the buffer (or the other way around). In either case, access to the buffers seems not properly fenced. If it only happens only on Nvidia GPU but not Intel GPU, that could be a driver issue.

Flags: needinfo?(jolin)

Watching back the video and doing some more testing I noticed that Chrome is dropping frames, according to the stats for nerds' Viewport/Frames row, when using av01.0.09M.08 or av01.0.08M.08.
So perhaps the issue is actually present on both FF and Chrome but Chrome is dropping the affected frames whilst FF displays them.

Could you try disabling webrender by flipping the pref gfx.webrender.force-disabled and see if it still happens?

Flags: needinfo?(TheSkynet1337)

After setting gfx.webrender.force-disabled to true I could not observe anymore flickering.

(In reply to TheSkynet1337 from comment #4)

Watching back the video and doing some more testing I noticed that Chrome is dropping frames, according to the stats for nerds' Viewport/Frames row, when using av01.0.09M.08 or av01.0.08M.08.

This was still the case though, with FF not reporting any dropped frames but Chrome steadily dropping frames whilst the mouse is moving.

Flags: needinfo?(TheSkynet1337)

HW acceleration with the Intel device in about:support should get WR based on driver version and device ID (it is on the allowed list). So I guess it is specific to NVIDIA.

Blocks: wr-75
Component: Graphics → Graphics: WebRender
Flags: needinfo?(sotaro.ikeda.g)
OS: Unspecified → Windows 10
Priority: -- → P3
Hardware: Unspecified → Desktop

TheSkynet1337, can you check if the problem still happens with latest Firefox release(73) and nightly? Thanks!

Flags: needinfo?(TheSkynet1337)

The problem persists on both 73.0 and 75.0a1 Nightly. The work-around of setting gfx.webrender.force-disabled also works on both.
I tested with a fresh profile in both instances.

Flags: needinfo?(TheSkynet1337)

Thank you for the checking!
When AV1 video playback happened, like the following, RenderBufferTextureHost is used for video rendering. From it, I wonder if RenderBufferTextureHost::Lock() was failed by some reasons.

Depends on: 1615980

It seems that GPUVideoTextureHost seems to have a problem that could cause this bug, though I could not reproduce the problem with default source.

WebRenderTextureHost tries to create RenderTextureHost. But when wrapped TextureHost is GPUVideoTextureHost, there could be a case that RenderTextureHost is not created. It could happen when wrapped TextureHost of GPUVideoTextureHost is not ready yet. It was added by Bug 1562616.

Depends on: 1617096

TheSkynet1337, can you check if the problem is addressed with latest nightly? Bug 1562616 addressed one possible cause of the problem. Thanks.

Flags: needinfo?(TheSkynet1337)
Attached file Nightly Profile (deleted) —
I can not reproduce the problem on Nightly version 75.0a1 with build ID 20200226092757. I have attached the profile in case I made some changes since the last time checking that could invalidate my results but it appears to me that the issue is resolved in the nightly build.

I can not reproduce the problem on Nightly version 75.0a1 with build ID 20200226092757.
I have attached the profile in case I made some changes since the last time I checked that could invalidate my results but it appears to me that the issue is resolved in the nightly build.

Flags: needinfo?(TheSkynet1337)

Good! Thank you for the checking.

Status: UNCONFIRMED → RESOLVED
Closed: 5 years ago
Flags: needinfo?(sotaro.ikeda.g)
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: