Open Bug 1823282 Opened 2 years ago Updated 1 year ago

VAAPI/AMD Rembrandt: artifacts, video stops, crashes

Categories

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

Firefox 110
Desktop
Linux
defect

Tracking

()

Tracking Status
firefox111 --- disabled

People

(Reporter: mwolf, Unassigned)

References

(Blocks 2 open bugs)

Details

Attachments

(2 files)

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

Steps to reproduce:

  1. open youtube
  2. play any video
  3. wait for artifacts / video stopping (audio continues to play)
    3a (sometimes the entire amdgpu driver hangs

Actual results:

artifacts, video stopping for a few seconds while audio is still playing, crashes of amdgpu driver.

I already filed a bug report at freedesktop.org:

https://gitlab.freedesktop.org/mesa/mesa/-/issues/8303

It contains the infos about my system and the error itself.

Expected results:

normal playback without stutter, hangs or crashes

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

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

Please attach your about:support page. May be dupe of Bug 1802844.

Flags: needinfo?(mwolf)

(In reply to Martin Stránský [:stransky] (ni? me) from comment #3)

Can you try latest nightly?
https://fedoraproject.org/wiki/How_to_debug_Firefox_problems#Testing_Mozilla_binaries
Thanks.

I will give it a try after work.

Can you try to disable HW video decoding?
https://fedoraproject.org/wiki/Firefox_Hardware_acceleration#Video_decoding
Thanks.

Flags: needinfo?(mwolf)

without HW video decoding, the problem is gone.

Flags: needinfo?(mwolf)

(In reply to Martin from comment #7)

without HW video decoding, the problem is gone.

Good. Then please try the latest nightly. We need to check if your GPU works ok with disabled zero copy playback.

Flags: needinfo?(mwolf)

I tried in my lunch-break.
With the latest nightly it feels better, but I think I had a few rare hickups with 60FPS videos.

Flags: needinfo?(mwolf)

We'd need to update blocklist then, Thanks.

it makes sense, since the gpu in the other bug report is also RDNA2

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)

Looks like VA-API drivers are not ready yet.

Summary: artifacts / video stops / crashes with vaapi decoded video in firefox on amdgpu → [AMD Rembrandt] artifacts / video stops / crashes with vaapi decoded video in firefox on amdgpu
Flags: needinfo?(mwolf)
Severity: -- → S3
Flags: needinfo?(jmathies)
OS: Unspecified → Linux
Hardware: Unspecified → Desktop
Summary: [AMD Rembrandt] artifacts / video stops / crashes with vaapi decoded video in firefox on amdgpu → VAAPI/AMD Rembrandt: artifacts, video stops, crashes

I will run it tonight. About the crashes, they are very random and rare. I am not sure, if I can capture one.
But I will focus on the video issues. Ty for your effort!

The bug has a release status flag that shows some version of Firefox is affected, thus it will be considered confirmed.

Status: UNCONFIRMED → NEW
Ever confirmed: true

I tested with the latest nightly and I have no hickups or artifacts.

Flags: needinfo?(mwolf)

I have to revert my comment above. It happens much rarer but the video sometimes freezes.

(In reply to Martin from comment #18)

I have to revert my comment above. It happens much rarer but the video sometimes freezes.

So looks like Bug 1802844 helped only partially here.

I watched 6 videos, where no freezes occured, but then I tested these shorts or reels, where I ran into a freeze basically every fith "short".
I am not sure if there is a coincidence. I will test tonight more.

Can you test mpv video player in VA-API mode?

mpv --hwdec=vaapi test_clip

Flags: needinfo?(mwolf)

I will test with your suggested settings tomorrow.
Btw. it happened today with this particular regular video on youtube as well:
https://www.youtube.com/watch?v=BbybZyj_5PM
VP9 + Opus Codec

One more question:
Does it matter what Video I watch on the player? I think I might have a mp4 .

On youtube I had major issues with this video (firefox nightly)
https://www.youtube.com/watch?v=5TMx5ibD6pI

downloaded with yt-dlp and played it in mpv

the issues persisted also with

mpv --hwdec=vaapi video.webm
 (+) Video --vid=1 (*) (vp9 1920x1080 23.976fps)
 (+) Audio --aid=1 --alang=eng (*) (opus 2ch 48000Hz)
[vo/gpu/wayland] GNOME's wayland compositor lacks support for the idle inhibit protocol. This means the screen can blank during playback.
Using hardware decoding (vaapi).
AO: [pipewire] 48000Hz stereo 2ch floatp
VO: [gpu] 1920x1080 vaapi[nv12]
AV: 00:00:33 / 00:02:46 (20%) A-V:  0.000
Flags: needinfo?(mwolf)

If you see the bugs with mpv it's definitely issue with your gfx drivers so Mesa folks should fix that.

I understand, would it be possible, that you write that on the mesa bug report please?
https://gitlab.freedesktop.org/mesa/mesa/-/issues/8303

(In reply to Martin from comment #26)

I understand, would it be possible, that you write that on the mesa bug report please?
https://gitlab.freedesktop.org/mesa/mesa/-/issues/8303

There's no point to poke them as I don't have such hardware.

Priority: -- → P3

Mesa 23.1.1 contains AMD fix for surfaces (https://gitlab.freedesktop.org/mesa/mesa/-/issues/8996). Can you try that? It's already shipped in Fedora 38 for instance.
Thanks.

Flags: needinfo?(mwolf)

I will try over the weekend.

sadly the problem is still present.

Flags: needinfo?(mwolf)

(In reply to Martin from comment #30)

sadly the problem is still present.

Does the problem still occur after setting media.ffmpeg.vaapi.force-surface-zero-copy=1, webgl.threadsafe-gl.force-disabled=true, gfx.canvas.accelerated=false (plus if you test Nightly: webgl.out-of-process.async-present.force-sync=true to avoid bug bug 1831548) on about:config and restarting Firefox?

I will give it a try in the next few days.

sorry, I was sick. I'm testing now. Will let you know (I used every setting except the one for nightly)

@Darkspirit
sadly it does not help.

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: