[TRACKING] AMD, Fedora 39 Beta and Firefox

I’m noticing on my AMD board while I’m watching YouTube on Firefox, on Fedora 39 Beta, that ever 10/20 secs or so the video freezes and the sound keeps going. This lasts only for a second or two and then the video catches up.

I was wondering if anyone else is seeing this?

2 Likes

I’m seeing similar behavior, and my FW AMD will lock up soon after. I had to boot in to windows to get some work done. I will post the logs later today.

Are you using an external monitor? I am, and I’m wondering if that might be part of the issue.

Are you running the 3.03 beta BIOS update?

1 Like

I noticed this issue as well on NixOS, using the “enhanced-h264ify” extension to disable VP9 codec mostly stopped the issue. I still see it occasionally when scrubbing through a video.

EDIT: BIOS 3.03 beta as well.

1 Like

BigT - yes for me. 3.03 and updated Fedora.

Cody - Thanks, I’ll try that.

Are you using the firefox-wayland instead of firefox if you use Wayland?

$ sudo dnf install firefox-wayland
$ rpm -qf /bin/firefox-wayland
firefox-wayland-117.0.1-1.fc38.x86_64

I did not know there was such a thing. Trying that now. Thanks!

1 Like

It’s just a wrapper script to run Firefox on Wayland properly. :smile:

$ cat /bin/firefox-wayland
#!/usr/bin/bash
#
# Run Firefox under Wayland
#

export MOZ_ENABLE_WAYLAND=1
exec /usr/bin/firefox "$@"
3 Likes

I am running two external monitors but have the issue without them. There does seem to be a bunch of external monitor issues. I’ve probably encountered 5 or so bugs around them.

Yes

I’m using the firefox that came with the installation.

The firefox-wayland is just a sub-package of firefox package including the wrapper script calling the original firefox binary file with the installation.

$ rpm -ql firefox-wayland
/usr/bin/firefox-wayland
/usr/share/applications/firefox-wayland.desktop
1 Like

@junaruga

Yep I understand I’m giving the environment variable a shot to see if it improves things.

It’s really a messy fix though considering how easy it is to check if an application is running on Wayland. Not to mention all the apps that just open firefox and do not know to look for firefox-wayland. I may just add MOZ_ENABLE_WAYLAND=1 to /etc/environment like is recommended elsewhere.

@nomb85 As you told me, I am not sure why the MOZ_ENABLE_WAYLAND is used, when it looks easy to check if the application is running on Wayland or X-Windows.

I am still using the X-Window-based tiling window manager i3 too as a backup window manager of the sway (a Wayland-based tiling window manager).

So, I am adding the following setting in my ~/.bashrc, though it’s not only for Firefox.

.bashrc

# Wayland
# https://wiki.archlinux.org/title/Wayland
# https://ask.fedoraproject.org/t/tips-of-xwayland-with-sway/30314
if [ "${XDG_SESSION_TYPE}" = wayland ]; then
    export MOZ_ENABLE_WAYLAND=1
    export GDK_BACKEND=x11
    # For Java application
    export _JAVA_AWT_WM_NONREPARENTING=1
else
    unset MOZ_ENABLE_WAYLAND
    unset GDK_BACKEND
    unset _JAVA_AWT_WM_NONREPARENTING
fi

Please keep us updated as to how @junaruga’s suggestion worked out.

Do let us know if you are seeing anything in the logs.

Using the environment variable appears to help in Firefox and setting it int the /etc/environment also seems to work VS having to use the weird wrapper. :slight_smile:

This might be an issue with Hardware Acceleration and the VP9 codec.

Testing on Firefox 118 & 119, there was no change when using Firefox on Wayland. Disabling the VP9 codec outright though, as noted by Cody Evans, resolves the issue.

To try and reproduce:

  1. Verify hardware encoding is available via about:config → HARDWARE_VIDEO_DECODING
  2. Find a VP9 encoded video using the stats for nerds panel on youtube.
  3. Just watch and wait for pauses on video with no drop in audio.

Once you have a video you can reproduce you can use about:config to modify “media.mediasource.vp9.enabled” to false. Note: this may change the available resolutions in playback.

Refresh your page with the video and reopen the stats for nerds panel to confirm the codec is no longer using VP9.

Watching the video again should result in no freezing.

If there is any additional information I can gather let me know although I don’t think this is an issue on Frameworks end.

3 Likes

I’ve found that I have gotten better performance with the following kernel options.

amdgpu.sg_display=0 amd_iommu=off

The first fixed glitchy blocks covering lots of the desktop. The second seemed to fix those glitchy videos on Firefox.

1 Like

Use the flathub version of FireFox so that you don’t have to worry aboot it. Everything is included for hardware accelerated decoding. It’s a real treat.

Great, anyone else having issues, please try this and report back.

Does anyone have a sample video they’ve had issues with?

I’m trying this video, which is a 4k vp9 video, and I’m having no issues running the official FlatHub version of FireFox, version 119.0.

While video is playing I see an RDD process running for FireFox, consuming around 6% CPU, which I believe is the hardware accelerated decoding- it comes and goes as it throttles.

I’m using systemd-boot with no special kernel parameters.

about:config - Firefox:
media.hardware-video-decoding.enabled true

OS: Arch
WM: Hyprland (Wayland)
Kernel: 6.5.9

1 Like

Not something I have dug into recently, however this may help.

2 Likes