FASTER FIREFOX ON WAYLAND
Firefox 75, which is included in Ubuntu 20.04, introduced support for hardware accelerated video decoding and WEBGL via VA-API. This support is currently only available if you’re using Wayland, rather than the traditional X11 display server. You’ll also need VA-API set up for your hardware (check the vainfo command), which the dimensions of this box preclude us from helping you with. This is all still considered experimental, so don’t be too surprised if it doesn’t work, or you have to cherry pick options.
Start Firefox from a terminal with MOZ_ENABLE_WAYLAND=1 firefox . Then head to about:support and check that the Window Protocol (in the Graphics section) is indeed set to Wayland. Good. Either Opengl or Webrender (even more experimental) compositing should be enabled, so scroll back to the start of the Graphics section and check the Compositing option doesn’t report Basic. If it does (meaning your hardware hasn’t been whitelisted for this voodoo) you can force one or the other by opening about:config and setting (use the search box) either layers.acceleration. force-enabled or gfx.webrender.all to true . Next, find the widget.waylanddmabuf-vaapi.enabled option and set it to true . And finally disable Firefox’s built-in FFMPEG (for accelerated VPX decoding) by setting media.ffvpx. enabled to false .
Restart Firefox and see if things work. The Arch Wiki Firefox page is helpful: see the Hardware video acceleration section at https://wiki.archlinux.org/index.php/ Firefox for updates.