[RESPONDED] AMD Ryzen 7040 - VP9 Hardwaredecoding (vaapi) stuttering (e.g. in Firefox, etc.)

I recognized a random stuttering and picture freezing, when playing hardwareaccelerated VP9 Videos, e.g. youtubevideos in firefox, chromium or mpv via vaapi.

After a research i found that this is a well known issue as shown here or here.

The mentioned workaround is to set amd_iommu=off. This resolves the issue on my system. An other approach ist to disable VP9 Videos via browser extension (e.g. h264ify) as AV1 and h264 Videos are not affected.

6 Likes

I’m running Fedora 39 with the latest bios, stock gnome and I keep the updates-testing coming daily. I’ve been having lots of stuttering with Firefox playing youtube videos.

I’ve noticed there is another mutter update (mutter-45.1-1.fc39.x86_64). There’s been some similar behavior that was caused by mutter in the past.

I’ve also added the workaround you mentioned. I am now not seeing the stuttering, but…BUT, I don’t know what fixed it and I can’t tell you until much later today and if I remember to test each…

Could provide more details on what distro, bios, kerrnel, etc. you are running?

1 Like

Thanks @Mistral24 , looks like a solid tip running into same issue with AMD Ryzen.
Also welcome to the forums :slight_smile:

Thank you for sharing a fix. I thought it was some odd stuff that I was doing here.

It’s hard to figure out, but what are the implications of disabling IOMMU? Is this just a security mechanism? What’s the trade off here?

1 Like

There are more info in this topic:
https://community.frame.work/t/responded-amd-fedora-39-beta-and-firefox

Probably the topics should be merged.

I hit this as well.

OS: NixOS (unstable, to get latest firmware for everything)
Kernel: Linux 6.6.1-zen1 #1-NixOS ZEN SMP PREEMPT_DYNAMIC
Browser: Firefox 119.0.1
Window Protocol: wayland
Desktop Environment: kde
linux-firmware: 20231111
BIOS Firmware: 3.03

Nothing interesting in dmesg; except for once when the browser literally crashed. Most of the time that hasn’t happened so I’m not even sure if it’s related to the stuttering.

Setting media.mediasource.vp9.enabled to false in about:config is what I’m using as a workaround right now - but happy to try other debugging steps or workarounds if it would be helpful to anyone? The issue is fairly reliably reproducible for me.

I’m not sure if setting the environment variable as described in the linked thread is still relevant - Firefox 121 is going to ship with Wayland on by default, and about:support shows that it correctly detected it was running in Wayland on my machine?

Try adding git mesa to your install (xxmitsu/mesa-git);

I resolved it by moving kernel - but you might get lucky and find it’s mesa driver related. You can revert using copr ( dnf copr disable xxmitsu/mesa-git ; distro-sync) very easily if it doesn’t