[GH-ISSUE #4893] Firefox WebRender acceleration broken with proprietary nvidia driver #2807

Closed
opened 2026-05-05 09:27:50 -06:00 by gitea-mirror · 0 comments
Owner

Originally created by @jmetrius on GitHub (Feb 2, 2022).
Original GitHub issue: https://github.com/netblue30/firejail/issues/4893

Description

Currently WebRender hardware acceleration is broken in Firefox if running in a Wayland session with the proprietary Nvidia driver. Instead, Firefox falls back to software rendering. This is because access to the necessary loader files from egl-wayland (https://github.com/NVIDIA/egl-wayland) is denied by the current profile. The loader files reside in /usr/share/egl/ which is currently not whitelisted in etc/inc/whitelist-usr-share-common.inc

Programs other than Firefox depending on egl-wayland might also be affected.

Steps to Reproduce

  1. Run Firefox Nightly with firejail on Wayland with the nvidia driver
  2. Open about:support
  3. Scroll down to the Graphics section

Expected behavior

Compositing should read: Webrender, GPU 1 show the Nvidia GPU -> indicating hardware acceleration

Actual behavior

Compositing reads: Webrender (Software), GPU 1 shows llvmpipe -> indicating software rendering

Behavior without a profile

With --noprofile Firefox behaves as expected

Environment

  • Arch Linux with nvidia 510.47
  • Firejail version 0.9.68rc1

Checklist

  • The issues is caused by firejail (i.e. running the program by path (e.g. /usr/bin/vlc) "fixes" it).
  • I can reproduce the issue without custom modifications (e.g. globals.local).
  • The program has a profile. (If not, request one in https://github.com/netblue30/firejail/issues/1139)
  • The profile (and redirect profile if exists) hasn't already been fixed upstream.
  • I have performed a short search for similar issues (to avoid opening a duplicate).
    • I'm aware of browser-allow-drm yes/browser-disable-u2f no in firejail.config to allow DRM/U2F in browsers.

Log

Output of strace -f firefox | grep /usr/share/egl/ (without firejail)

36738 openat(AT_FDCWD, "/usr/share/egl/egl_external_platform.d", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY <unfinished ...>
36738 stat("/usr/share/egl/egl_external_platform.d/10_nvidia_wayland.json",  <unfinished ...>
36738 openat(AT_FDCWD, "/usr/share/egl/egl_external_platform.d/10_nvidia_wayland.json", O_RDONLY <unfinished ...>
36738 stat("/usr/share/egl/egl_external_platform.d/15_nvidia_gbm.json",  <unfinished ...>
36738 openat(AT_FDCWD, "/usr/share/egl/egl_external_platform.d/15_nvidia_gbm.json", O_RDONLY <unfinished ...>
36771 openat(AT_FDCWD, "/usr/share/egl/egl_external_platform.d", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY <unfinished ...>
36771 stat("/usr/share/egl/egl_external_platform.d/10_nvidia_wayland.json",  <unfinished ...>
36771 openat(AT_FDCWD, "/usr/share/egl/egl_external_platform.d/10_nvidia_wayland.json", O_RDONLY <unfinished ...>
36771 stat("/usr/share/egl/egl_external_platform.d/15_nvidia_gbm.json",  <unfinished ...>
36771 openat(AT_FDCWD, "/usr/share/egl/egl_external_platform.d/15_nvidia_gbm.json", O_RDONLY <unfinished ...>

Originally created by @jmetrius on GitHub (Feb 2, 2022). Original GitHub issue: https://github.com/netblue30/firejail/issues/4893 <!-- See the following links for help with formatting: https://guides.github.com/features/mastering-markdown/ https://docs.github.com/en/github/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax --> ### Description Currently WebRender hardware acceleration is broken in Firefox if running in a Wayland session with the proprietary Nvidia driver. Instead, Firefox falls back to software rendering. This is because access to the necessary loader files from egl-wayland (https://github.com/NVIDIA/egl-wayland) is denied by the current profile. The loader files reside in /usr/share/egl/ which is currently not whitelisted in etc/inc/whitelist-usr-share-common.inc Programs other than Firefox depending on egl-wayland might also be affected. ### Steps to Reproduce 1. Run Firefox Nightly with firejail on Wayland with the nvidia driver 2. Open about:support 3. Scroll down to the Graphics section ### Expected behavior Compositing should read: Webrender, GPU 1 show the Nvidia GPU -> indicating hardware acceleration ### Actual behavior Compositing reads: Webrender (Software), GPU 1 shows llvmpipe -> indicating software rendering ### Behavior without a profile With `--noprofile` Firefox behaves as expected ### Environment - Arch Linux with nvidia 510.47 - Firejail version 0.9.68rc1 ### Checklist <!-- Note: Items are checked with an "x", like so: - [x] This is a checked item. --> - [X] The issues is caused by firejail (i.e. running the program by path (e.g. `/usr/bin/vlc`) "fixes" it). - [X] I can reproduce the issue without custom modifications (e.g. globals.local). - [X] The program has a profile. (If not, request one in `https://github.com/netblue30/firejail/issues/1139`) - [X] The profile (and redirect profile if exists) hasn't already been fixed [upstream](https://github.com/netblue30/firejail/tree/master/etc). - [X] I have performed a short search for similar issues (to avoid opening a duplicate). - [X] I'm aware of `browser-allow-drm yes`/`browser-disable-u2f no` in `firejail.config` to allow DRM/U2F in browsers. ### Log <details> <summary>Output of <code>strace -f firefox | grep /usr/share/egl/</code> (without firejail)</summary> <p> ``` 36738 openat(AT_FDCWD, "/usr/share/egl/egl_external_platform.d", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY <unfinished ...> 36738 stat("/usr/share/egl/egl_external_platform.d/10_nvidia_wayland.json", <unfinished ...> 36738 openat(AT_FDCWD, "/usr/share/egl/egl_external_platform.d/10_nvidia_wayland.json", O_RDONLY <unfinished ...> 36738 stat("/usr/share/egl/egl_external_platform.d/15_nvidia_gbm.json", <unfinished ...> 36738 openat(AT_FDCWD, "/usr/share/egl/egl_external_platform.d/15_nvidia_gbm.json", O_RDONLY <unfinished ...> 36771 openat(AT_FDCWD, "/usr/share/egl/egl_external_platform.d", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY <unfinished ...> 36771 stat("/usr/share/egl/egl_external_platform.d/10_nvidia_wayland.json", <unfinished ...> 36771 openat(AT_FDCWD, "/usr/share/egl/egl_external_platform.d/10_nvidia_wayland.json", O_RDONLY <unfinished ...> 36771 stat("/usr/share/egl/egl_external_platform.d/15_nvidia_gbm.json", <unfinished ...> 36771 openat(AT_FDCWD, "/usr/share/egl/egl_external_platform.d/15_nvidia_gbm.json", O_RDONLY <unfinished ...> ``` </p> </details>
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/firejail#2807
No description provided.