From Fedora Project Wiki

(Created page with "= '''Firefox Hardware acceleration on Fedora''' = Firefox supports hardware acceleration on Linux so let's look how to configure it and diagnose potential issues. == Web pag...")
 
No edit summary
Line 11: Line 11:
=== Web page rendering on Wayland ===
=== Web page rendering on Wayland ===


Hardware acceleration should work out-of-the-box on Wayland. If not please [https://bugzilla.mozilla.org file a bug] for it.
Hardware acceleration should work out-of-the-box on Wayland. If not please [https://bugzilla.mozilla.org/enter_bug.cgi?product=Core&component=Graphics%3A+WebRender file a bug] for it.


=== Web page rendering on X11 ===
=== Web page rendering on X11 ===


X11 backend can tun in two modes - [https://mastransky.wordpress.com/2021/10/30/firefox-94-comes-with-egl-on-x11/ '''EGL and XGL'''].
X11 backend can tun in two modes - [https://mastransky.wordpress.com/2021/10/30/firefox-94-comes-with-egl-on-x11/ '''EGL and XGL''']. You should be on '''EGL''' unless you're running NVIDIA proprietary drivers.


== Video decoding ==
== Video decoding ==
Hardware accelerated video decoding (for video playback or for WebRTC) is [https://mastransky.wordpress.com/2020/09/29/firefox-81-on-fedora-with-va-api-webrtc-and-x11/ available on Intel/AMD] via. VA-API for both X11(EGL) and Wayland and can be enabled by preferences at '''about:config'''.
Right now it's blocked by [https://bugzilla.mozilla.org/show_bug.cgi?id=1698778 RDD Firefox sandbox]. RDD is a new sandboxed process used for safe video decoding. You can disable it which reverts Firefox back to state before RDD implementation.
=== Video decoding on AMD ===
Accelerated video decoding works well on AMD as free drivers are available. You can enable it by these steps:
* Verify you're running on HW accelerated backend ('''WebRender''') under '''Wayland''' or '''X11/EGL''' at '''about:support'''.
* Install install '''ffmpeg''', '''libva''' and '''libva-utils''' from [https://rpmfusion.org/ RPM Fusion repository].
* Run '''vainfo''' on terminal to verify that [https://en.wikipedia.org/wiki/Video_Acceleration_API VA-API works].
* At '''about:config''' page set '''media.ffmpeg.vaapi.enabled''' to '''true''' and '''media.rdd-process.enabled''' to '''false'''. Warning: '''Disabling the RDD process sandbox is a security risk!'''
* Restart browser.


== Video encoding ==
== Video encoding ==
Hardware accelerated video encoding (for WebRTC for instance) is not supported/implemented in Firefox, no matter which preference you set at '''about:config''' page.

Revision as of 07:45, 12 November 2021

Firefox Hardware acceleration on Fedora

Firefox supports hardware acceleration on Linux so let's look how to configure it and diagnose potential issues.

Web page rendering

Accelerated web page rendering is supported on both X11 and Wayland backends via. WebRender.

You can check hardware acceleration state at about:support page, look at Compositing row. If there's WebRender, you're running on hardware. If there's WebRender (software) you're on non-accelerated backend.

Web page rendering on Wayland

Hardware acceleration should work out-of-the-box on Wayland. If not please file a bug for it.

Web page rendering on X11

X11 backend can tun in two modes - EGL and XGL. You should be on EGL unless you're running NVIDIA proprietary drivers.

Video decoding

Hardware accelerated video decoding (for video playback or for WebRTC) is available on Intel/AMD via. VA-API for both X11(EGL) and Wayland and can be enabled by preferences at about:config.

Right now it's blocked by RDD Firefox sandbox. RDD is a new sandboxed process used for safe video decoding. You can disable it which reverts Firefox back to state before RDD implementation.

Video decoding on AMD

Accelerated video decoding works well on AMD as free drivers are available. You can enable it by these steps:

  • Verify you're running on HW accelerated backend (WebRender) under Wayland or X11/EGL at about:support.
  • Install install ffmpeg, libva and libva-utils from RPM Fusion repository.
  • Run vainfo on terminal to verify that VA-API works.
  • At about:config page set media.ffmpeg.vaapi.enabled to true and media.rdd-process.enabled to false. Warning: Disabling the RDD process sandbox is a security risk!
  • Restart browser.

Video encoding

Hardware accelerated video encoding (for WebRTC for instance) is not supported/implemented in Firefox, no matter which preference you set at about:config page.