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.
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?
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
That freezing was already fixed in a VCN firmware update around 4 months ago, so it might be that it’s not in Ubuntu yet (it got to the kernel tree at the end of February).
This is the version I have right now (journalctl -k -b0 | grep VCN)
kernel: [drm] Found VCN firmware Version ENC: 1.21 DEC: 8 VEP: 0 Revision: 2
but it was also definitely fixed in
kernel: [drm] Found VCN firmware Version ENC: 1.19 DEC: 7 VEP: 0 Revision: 0