Youtube + Firefox + AMD = Display Crash

Is there a fix for the Firefox + Youtube + AMDGPU Black Display issue?
I’m on a FW13. Latest BIOS. Fedora 40. Wayland enabled.

Jul 20 10:23:02 fw13 kernel: [drm:amdgpu_job_timedout [amdgpu]] *ERROR* ring vcn_unified_0 timeout, signaled seq=930, emitted seq=932
Jul 20 10:23:02 fw13 kernel: [drm:amdgpu_job_timedout [amdgpu]] *ERROR* Process information: process RDD Process pid 20774 thread firefox:cs0 pid 25689
Jul 20 10:23:02 fw13 kernel: amdgpu 0000:c1:00.0: amdgpu: GPU reset begin!
Jul 20 10:23:03 fw13 kernel: [drm] Register(0) [regUVD_POWER_STATUS] failed to reach value 0x00000001 != 0x00000002n
Jul 20 10:23:03 fw13 kernel: [drm] Register(0) [regUVD_RB_RPTR] failed to reach value 0x00000180 != 0x00000100n
Jul 20 10:23:03 fw13 kernel: [drm] Register(0) [regUVD_POWER_STATUS] failed to reach value 0x00000001 != 0x00000002n
Jul 20 10:23:03 fw13 kernel: amdgpu 0000:c1:00.0: amdgpu: MODE2 reset
Jul 20 10:23:03 fw13 kernel: amdgpu 0000:c1:00.0: amdgpu: GPU reset succeeded, trying to resume
3 Likes

Currently having the same issue on Firefox. There is no issue in video playback on Brave though.

Could it be related to the VP9 codec? I read in another thread that there may be some connection when watching VP9 encoded YT vids in Firefox in Wayland but no idea if it’s related. I just unpacked this FW13 yesterday and brand new Fedora 40 install so not leaving a good taste.

I am not sure about this. I don’t really do Linux stuff in depth

I have had the slowdown AMDGPU DMUB thing, but that hasn’t happened in forever. All the codecs etc are installed?

Reproduced here using this youtube video.

FW13 7840U, Fedora 40, kernel 6.9.10 from updates-testing, Firefox 128.0-2.fc40.

Jul 20 10:43:50 kernel: [drm:amdgpu_job_timedout [amdgpu]] *ERROR* ring vcn_unified_0 timeout, signaled seq=191, emitted seq=192
Jul 20 10:43:50 kernel: [drm:amdgpu_job_timedout [amdgpu]] *ERROR* Process information: process RDD Process pid 38115 thread firefox:cs0 pid 42816
Jul 20 10:43:50 kernel: amdgpu 0000:c1:00.0: amdgpu: GPU reset begin!
Jul 20 10:43:50 kernel: [drm] Register(0) [regUVD_POWER_STATUS] failed to reach value 0x00000001 != 0x00000002n
Jul 20 10:43:50 kernel: [drm] Register(0) [regUVD_RB_RPTR] failed to reach value 0x00000180 != 0x00000140n
Jul 20 10:43:50 kernel: [drm] Register(0) [regUVD_POWER_STATUS] failed to reach value 0x00000001 != 0x00000002n
Jul 20 10:43:50 kernel: amdgpu 0000:c1:00.0: amdgpu: MODE2 reset
Jul 20 10:43:50 kernel: amdgpu 0000:c1:00.0: amdgpu: GPU reset succeeded, trying to resume
Jul 20 10:43:50 kernel: [drm] PCIE GART of 512M enabled (table at 0x000000807FD00000).
Jul 20 10:43:50 kernel: amdgpu 0000:c1:00.0: amdgpu: SMU is resuming...
Jul 20 10:43:50 kernel: amdgpu 0000:c1:00.0: amdgpu: SMU is resumed successfully!
Jul 20 10:43:50 kernel: [drm] DMUB hardware initialized: version=0x08003D00
Jul 20 10:44:11 kernel: [drm:amdgpu_dm_process_dmub_aux_transfer_sync [amdgpu]] *ERROR* wait_for_completion_timeout timeout!
Jul 20 10:44:21 kernel: [drm:amdgpu_dm_process_dmub_aux_transfer_sync [amdgpu]] *ERROR* wait_for_completion_timeout timeout!
Jul 20 10:44:32 kernel: [drm:amdgpu_dm_process_dmub_aux_transfer_sync [amdgpu]] *ERROR* wait_for_completion_timeout timeout!

Needed a hard reboot (hold power button) after that.

This isn’t really a slowdown, it’s a display goes black and then sometimes crashes issue. What codecs need to be installed? This is a Fedora 40 install with Firefox.

I know, sorry, but I thought since they both involved the amdgpu dmub maybe they could be related.

I meant just the regular stuff like these

I am also experiencing this issue. It is related to AV1 I guess. At least all VP9 Videos work perfectly for me, while all AV1 videos show some weird behaviour (from just visual bugs to the computer becoming unresponsive). I just updated a few minutes ago, unfortunately via gnome software. This means I can’t check my dnf history and pkcon get-transactions segfaults on me :(.

Downgrading the kernel from 6.9.9 to 6.9.8 did not help.
Disabling Hardware Acceleration fixes this bug. So if you are just looking for a quick solution, disable hardware acceleration.

In FF?

Yes, you can disable hardware acceleration in firefox and it should resolve the issue for the time being.

I have no idea though if other areas are affected.

Just tried it out, oof, what a performance hit, everything is like 15fps now. Hopefully there’s a fix around the corner :frowning:

Good News: there is.
Bad News: No idea when this is available in the fedora repos but it should take no more than a few days.

To everybody else, maybe hold off on updating mesa for a few days.
If you want to keep track of the issue, also check these threads, there should be updates on the issue there.
https://bodhi.fedoraproject.org/updates/FEDORA-2024-1ce911b57d

https://bugzilla.redhat.com/show_bug.cgi?id=2299031

3 Likes

That is really good news, I’ll wait this out and see what happens. Awesome find, thanks.

This is EXACTLY the same issue I’m having. Thank you for finding this!

System Info:
FW16, Batch 18, Ryzen 7 7840HS, 32GB RAM with 7700S dGPU installed.

Fedora 40, kernel 6.9.9-200.fc40.x86_64 (64-bit), KDE Plasma 6.1.2 (Tried on both x11 and wayland), VA-API 1.21.0, AMD Mesa Gallium Driver 24.1.4 (Radeon 780M), Firefox 128.0-2.fc40 (native fedora linux, not flatpack)
Firefox’s hardware acceleration is forced on according to about:support (Compositing: Webrender , HARDWARE_VIDEO_DECODING available, gfx.webrender.software = false, media.hardware-video-decoding.enabled = true)

I’ve made sure everything’s up to date (dnf upgrade) and installed all relevant/recommended codecs/VA-API stuff according to these two sites ( Firefox Hardware acceleration - Fedora Project Wiki and Firefox Hardware acceleration - Fedora Project Wiki )

=========================

Observations:
I reused the same youtube test video that you linked for my testing here.

The crashing manifests in both x11 KDE Plasma and wayland. Either it crashes to a blackscreen that’s not recoverable (without a hard reboot) or it recovers and popups state “xwayland has crashed”

I don’t believe I’ve noticed this bug/crashing behaviour before a week or so ago. A recent driver update may have triggered it, but that’s speculation on my part.

Furthermore, if it recovers and attempts to play the video, I get grey/glitchy bands on the left side of the player:

=========================

Workarounds/Solutions?:
1.I’ve confirmed that disabling hardware acceleration in Firefox has prevented the crashing however the performance has greatly suffered.

2.However I’ve also noticed that installing the enhanced-h264ify ( enhanced-h264ify – Get this Extension for 🦊 Firefox (en-US) ) addon for Firefox (with hardware acceleration turned on) has fixed this issue. The addon seems to block av1/vp9/vp8 codecs on youtube videos, forcing h264.

So this might be a temporary fix until Mesa gets sorted out. Looks like Mesa isn’t playing nice with the AV1/VP9 codecs…?

As far as I read the core issue is in ffmpeg. The problem is ffmpeg patches sometimes take a bit of time to reach distributions and some software like firefox even bring their own ffmpeg. Until then let’s hope fedora applies the workaround provided by the mesa people.

Tracked upstream as a mesa/ffmpeg issue as mentioned before. I just wanted to point out that I also got this symptom without a video involved.

1 Like

Same issue here with a FW16, 64GB RAM, w/ dGPU installed.

Very annoying that this causes a hard crash. Is there any way to downgrade mesa until this issue is resolved?

It’s super annoying. I’ve installed that browser extension linked above, seems to have solved it for me for now. But will definitely uninstall it when this issue is fixed.