Firefox video acceleration with nvidia-vaapi-driver

I’m not very experienced with Linux.
I really need hardware accelerated video in a browser, at least YouTube.

What do I have:

  • Manjaro 21.3
  • KDE Plasma 5.24.5
  • X11
  • Firefox 102.0.1 (64-bit)
  • NVIDIA GeForce GTX 1060 6GB
  • No integrated video card
  • Nvidia Driver Version: 515.57

According to the article “wiki(dot)archlinux(dot)org/title/Firefox#Hardware_video_acceleration” , the only way to get it work with NVIDIA’s proprietary driver is using “nvidia-vaapi-driver”.

So I installed it from AUR ( libva-nvidia-driver v0.0.6-1 ).

“vainfo” shows this:

vainfo: VA-API version: 1.14 (libva 2.14.0)
vainfo: Driver version: VA-API NVDEC driver
vainfo: Supported profile and entrypoints
      VAProfileMPEG2Simple            : VAEntrypointVLD
      VAProfileMPEG2Main              : VAEntrypointVLD
      VAProfileVC1Simple              : VAEntrypointVLD
      VAProfileVC1Main                : VAEntrypointVLD
      VAProfileVC1Advanced            : VAEntrypointVLD
      <unknown profile>               : VAEntrypointVLD
      VAProfileH264Main               : VAEntrypointVLD
      VAProfileH264High               : VAEntrypointVLD
      VAProfileH264ConstrainedBaseline: VAEntrypointVLD
      VAProfileHEVCMain               : VAEntrypointVLD
      VAProfileVP9Profile0            : VAEntrypointVLD

Everything seems to be ok. ( ? )

Then I did everything that is said in the readme:

This library requires that the nvidia_drm kernel module is configured with the parameter nvidia-drm.modeset=1

I’m not quite sure how to do it correctly, but after some googling, I did this:
in file

then ran command
sudo update-grub

Then I set these settings in Firefox:

media.ffmpeg.vaapi.enabled = true
media.rdd-ffmpeg.enabled = true
media.av1.enabled = false
gfx.x11-egl.force-enabled = true
widget.dmabuf.force-enabled = true

Saved it, closed Firefox, then launched it with command:

Firefox info (about:support):

Graphics info in Firefox

Compositing WebRender

GPU #1
Active Yes
Description NVIDIA GeForce GTX 1060 6GB/PCIe/SSE2
Vendor ID 0x10de
Device ID 0x1c03
Driver Vendor nvidia/unknown
Driver Version 515.57.0.0

Then open any YouTube video and get >40% CPU usage (> 100% on 4k videos), and 0% “Video Engine Utilization” in NVIDIA Settings info :frowning:

It feels like I’m the only one with this problem. I’m doing something wrong, but I can’t figure out what I’m doing wrong.
I would be grateful for any help.

1 Like

I have this problem too.

Ok, it seems I just was unlucky.
The current version of driver doesn’t seem to work with the current stable version of Firefox (102).
But it works great with the current Firefox Developer Edition (103.0b5).
Readme instruction is enough.

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.