mirror of
https://github.com/netblue30/firejail.git
synced 2026-05-15 14:16:14 -06:00
[GH-ISSUE #2351] OpenGL does not work even with --noprofile (NixOS) #1568
Labels
No labels
LTS merge
LTS merge
bug
bug
converted-to-discussion
doc-todo
documentation
duplicate
enhancement
file-transfer
firecfg
firejail-in-firejail
firetools
graphics
help wanted
information_old
installation
invalid
modif
moved
needinfo
networking
notabug
notourbug
old-version
overlayfs
packaging
profile-request
pull-request
question
question_old
removal
runtime-permissions
sandbox-ipc
security
stale
wiki
wiki
wontfix
wordpress
workaround
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/firejail#1568
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @neirenoir on GitHub (Jan 20, 2019).
Original GitHub issue: https://github.com/netblue30/firejail/issues/2351
I am not sure why this is happening, but Firefox just refuses to play WebGL content, even if it is run with --noprofile.
Steps to reproduce
Extra information
When running Firefox through a console, it spews the following:
I have double checked my Firefox settings and all seems clear. WebGL is enabled, the gfx.blacklist option that's often mentioned does not even exist anymore (or at least on my build), tried force-enabling WebGL with webgl.force-enable, but it just refuses to run. It just works whenever I run Firefox without Firejail, so I know it can run just well.
Version info
Might be a NixOS specific issue, but I do not know why it wouldn't work even after setting --noprofile, while working just well when run without firejail. If nobody else is experiencing the issue, I will take it to their bug tracker.
@SkewedZeppelin commented on GitHub (Jan 20, 2019):
I think I've seen this before, but it could've been a conflict with something else
@chiraag-nataraj commented on GitHub (Jan 20, 2019):
Hmm, I don't seem to be seeing the issue with a completely new profile under Debian. Does it happen on your end if you try with a completely new firefox profile? You can create a temporary one using my
private-profile.shscript here if you don't want to clutter your default firefox install with extra profiles.@neirenoir commented on GitHub (Jan 30, 2019):
I have tried the same procedure on a different computer, with the same distro, different Firefox version, and different graphical drivers (noveau), and the result is the same. I will take this to the NixOS bug tracker, but it would be nice to know what does firejail do behind the scenes when set as --noprofile, which I assume are the "defaults" of firejail.
@chiraag-nataraj Wouldn't any profile be more likely to cause errors than --noprofile, due to being less lax?
@SkewedZeppelin commented on GitHub (Jan 30, 2019):
Firejail by default applies the default.profile which has many restrictions.
--noprofile has minimal restrictions: process namespace + restricted /boot, etc.
@chiraag-nataraj commented on GitHub (Feb 7, 2019):
@shirona
I meant a firefox profile, not a firejail profile (confusing, I know).
firejailprofiles enable restrictions on what the program can do.firefoxprofiles are to segregate user data (so you can have different sets of extensions, different preferences, and so on). I asked if this happens with a new firefox profile.@PalinuroSec commented on GitHub (Feb 7, 2019):
i have the same issue with firefox 65 and firejail 0.9.58 (debian testing)
@neirenoir commented on GitHub (Feb 9, 2019):
@chiraag-nataraj Yes, it happens in a new profile as well. In fact, I have recently discovered it is happening on all OpenGL applications in general, except Steam games (I suspect the reason is it uses a weird chroot in NixOS that remaps a lot of stuff). This should be reproducible by running
firejail --noprofile glxgears. An interesting detail is that Vulkan applications do work.The command above prints the following before closing the window (which lasts for a frame and never gets to render the gears):
@PalinuroSec Could you try running
firejail --noprofile glxgears?@PalinuroSec commented on GitHub (Feb 14, 2019):
@shirona
┌─[palinuro@parrot]─[~]
└──╼ $firejail --noprofile glxgears
Parent pid 11104, child pid 11105
Child process initialized in 38.28 ms
Error: couldn't get an RGB, Double-buffered visual
Parent is shutting down, bye...
p.s.
we fixed the firefox bug by disabling `noexec ${HOME} which is pretty weird but mandatory in order to have firefox working again with webgl or with DRM-powered websites like netflix
@neirenoir commented on GitHub (Apr 14, 2019):
This still doesn't work in
firejail 0.9.58.2. @netblue30, any ideas as to what could be interfering with OpenGL? Tried @PalinuroSec's fix withnoexec $HOMEin Firefox, but it didn't work. Truth is no OpenGL program works but Steam, but then again, Steam has its own SteamRT and a full blown FHS chroot in NixOS, so it may be something else.I have been told it may have to do with
/run/opengl-drivernot being accessible, but it is fully accessible under any profile, let alone--noprofile, so I don't know what else could it be.@neirenoir commented on GitHub (Apr 25, 2019):
Alright, ran some tests today to find out why did Steam run OpenGL just fine despite being firejailed. I found the answer to be... really simple. I'm sorry for not having noticed earlier that the issue was that all firejail was doing was not inheriting/expunging
LD_LIBRARY_PATH. In NixOS,LD_LIBRARY_PATHcomes preconfigured to point to the path of the OpenGL libraries, so the issue was as simple as that. Steam ran alright because it has some set up scripts that re-set this variable later on in the launch process.So... yeah, sorry for wasting your time like this. Gonna close this issue, as it is more of a problem with NixOS, and not even that.
--deterministic-shutdown#3082--deterministic-shutdown#3082