DEV Community

loading...

Fixing Firefox graphics configuration using Nvidia on Ubuntu Linux

Carlos Saltos
I code in Scala, Elm, Javascript, Svelte, Python and Ruby. Now trying to learn Haskell and Rust.
・2 min read

What ?

A quick tip on how to fix the graphics GPU acceleration on Firefox 83 using Ubuntu Linux LTS 20.04 and Nvidia cards.

Why ?

Because I love Firefox but on Ubuntu with Wayland was very slow, specially the scrolling and the video ... so I tried to fix it and now I want to share the trick with others that it might help.

How ?

  • Ensure you have the Nvidia drivers active (you can do this at the "Aditional Drivers" section of the "Software & Update" configuration app ... on my computer now I use "Nvidia Server driver 450")

  • Also ensure you have the mesa-va-drivers and libvdpau-va-gl1 packages installed (you can install them with apt)

  • Reboot your computer (if it fails try to start in safe graphics mode and try again with other drivers)

  • Open Firefox and go to about:config (you may skip the warning page when appears)

  • At the about:config page add these parameters:

media.ffmpeg.vaapi.enabled = true
widget.wayland-dmabuf-vaapi.enabled = true
media.ffmpeg.vaapi-drm-display.enabled = true
media.ffmpeg.enabled = true
Enter fullscreen mode Exit fullscreen mode
  • Restart Firefox and check the scrolling is working and the video it's also working with Netflix or Youtube (you can also go to about:support to check if the Compositing feature is WebRender and more info about Firefox configuration)

Who ?

This trick is possible thanks to Martin Stransky's hack for fixing Firefox with Fedora -> https://mastransky.wordpress.com/2020/06/03/firefox-on-fedora-finally-gets-va-api-on-wayland/

IMPORTANT: You may brake the video if the drivers are not the right ones and with that have no access to your computer desktop, please try to have an USB or DVD with Ubuntu ready to try to regain access before trying this trick.

Discussion (0)