Enabling VAAPI in Firefox on Fedora KDE + Wayland with Optimus Laptop (AMD x NVIDIA)

Hello Fedora community,

I am currently using Fedora KDE with Wayland on an Optimus laptop, which has an AMD integrated GPU and a dedicated NVIDIA GPU. I am interested in enabling VAAPI in Firefox.

I understand that the process might be different for an Optimus setup compared to a standard configuration with a single GPU. I’ve searched through the forums and online resources, but I haven’t found any clear instructions on how to achieve this on Fedora KDE with Wayland.

Could anyone provide guidance or share their experience on how to properly set up VAAPI in Firefox under these conditions? Is that even possible at the moment?

Thank you in advance for your assistance and expertise!

Greetings

Did you already go through, Firefox Hardware acceleration - Fedora Project Wiki

1 Like

Thank you for posting the documentation. I redid this steps and recognized, that I do not have the freeworld packages, so I swapped them.

Somehow I’ve a hard time verifying that VAAPI works. I tried it with vainfo , this is the output:

libva info: VA-API version 1.16.0
libva info: Trying to open /usr/lib64/dri/radeonsi_drv_video.so
libva info: Found init function __vaDriverInit_1_16
libva info: va_openDriver() returns 0
vainfo: VA-API version: 1.16 (libva 2.16.0)
vainfo: Driver version: Mesa Gallium driver 22.3.7 for AMD Radeon Graphics (renoir, LLVM 15.0.7, DRM 3.49, 6.1.18-200.fc37.x86_64)
vainfo: Supported profile and entrypoints
      VAProfileMPEG2Simple            : VAEntrypointVLD
      VAProfileMPEG2Main              : VAEntrypointVLD
      VAProfileVC1Simple              : VAEntrypointVLD
      VAProfileVC1Main                : VAEntrypointVLD
      VAProfileVC1Advanced            : VAEntrypointVLD
      VAProfileH264ConstrainedBaseline: VAEntrypointVLD
      VAProfileH264ConstrainedBaseline: VAEntrypointEncSlice
      VAProfileH264Main               : VAEntrypointVLD
      VAProfileH264Main               : VAEntrypointEncSlice
      VAProfileH264High               : VAEntrypointVLD
      VAProfileH264High               : VAEntrypointEncSlice
      VAProfileHEVCMain               : VAEntrypointVLD
      VAProfileHEVCMain               : VAEntrypointEncSlice
      VAProfileHEVCMain10             : VAEntrypointVLD
      VAProfileHEVCMain10             : VAEntrypointEncSlice
      VAProfileJPEGBaseline           : VAEntrypointVLD
      VAProfileVP9Profile0            : VAEntrypointVLD
      VAProfileVP9Profile2            : VAEntrypointVLD
      VAProfileNone                   : VAEntrypointVideoProc

And I tried it with running firefox with this environment variable MOZ_LOG="PlatformDecoderModule:5" firefox as suggested in the troubleshooting section to look at the logs, but there are no logs produced.

If you go to about:support what does it indicate for Compositing, it should show WebRender if VAAPI is enabled.

Running with MOZ_LOG=“PlatformDecoderModule:5” set will output to the terminal

If you wanted to save a log file you would need to do something like
MOZ_LOG="PlatformDecoderModule:5" firefox > firefox.txt 2>&1

You’ll need to play a video in firefox to see output.

1 Like

Yes, something a little embarrassing happened to me. I simply had media.ffmpeg.vaapi.enabled not set to true on about:config. Now I see the logs and WebRender in about:support.

Thanks for assisting, Joe! I’ll mark your post as solution.

1 Like