mirror of
https://github.com/netblue30/firejail.git
synced 2026-05-15 14:16:14 -06:00
[GH-ISSUE #6509] Nvidia driver 560.35.03 cannot access gpu #3292
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#3292
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 @valandyr on GitHub (Oct 17, 2024).
Original GitHub issue: https://github.com/netblue30/firejail/issues/6509
Description
firejail cannot access nvidia gpu.
driver is functional outside of sandbox.
Steps to Reproduce
firejail --noprofile --private nvidia-smiExpected behavior
Show GPU information/status.
Actual behavior
Failed to initialize NVML: GPU access blocked by the operating systemBehavior without a profile
Failed to initialize NVML: GPU access blocked by the operating systemAdditional context
Last working driver is version 555.58.02
Environment
Linux archlinux 6.11.3-arch1-1
Arch Linux
firejail version 0.9.72
Compile time support:
- always force nonewprivs support is disabled
- AppArmor support is enabled
- AppImage support is enabled
- chroot support is enabled
- D-BUS proxy support is enabled
- file transfer support is enabled
- firetunnel support is disabled
- IDS support is disabled
- networking support is enabled
- output logging is enabled
- overlayfs support is disabled
- private-home support is enabled
- private-cache and tmpfs as user enabled
- SELinux support is disabled
- user namespace support is enabled
- X11 sandboxing support is enabled
Checklist
/usr/bin/vlc) "fixes" it).https://github.com/netblue30/firejail/issues/1139)browser-allow-drm yes/browser-disable-u2f noinfirejail.configto allow DRM/U2F in browsers.--profile=PROFILENAMEto set the right profile. (Only relevant for AppImages)Log
Output of
LC_ALL=C firejail /path/to/programOutput of
LC_ALL=C firejail --debug /path/to/program@pjhfggij commented on GitHub (Oct 18, 2024):
UPDATE this suggestion solved this for me
not sure why arch being a rolling distro still hasn't picked up these changes and everyone needs to look this up on individual basis
add to corresponding profiles:
I've tried previously different combinations of these lines, but somehow they didn't do the trick for some reason - not sure why:
I can reproduce this (Driver Version: 560.35.03, Arch)
also I first noticed issues with nvidia card (optmius laptop) in March this year, when trying to run wine under firejail, it wasn't able to access nvidia card, but it worked fine without firejail
I believe that it previously worked
Tried adding this to wine.local, but to no effect:
@kmk3 commented on GitHub (Oct 19, 2024):
@pjhfggij on Oct 18:
The changes from #6387 are only in the development version.
@valandyr
Does it work with the above lines?
Does it work with firejail-git (AUR)?
A
noblacklistline should match an existingblacklistline.See
blacklist /sys/modulein fs.c.@rusty-snake commented on GitHub (Oct 19, 2024):
Try
firejail --profile=noprofile /usr/bin/nvidia-smi.If this fails, someone needs to strace into it.
@valandyr commented on GitHub (Oct 19, 2024):
@rusty-snake
firejail --profile=noprofile /usr/bin/nvidia-smiworks!How does using a profile works and not using one fails?
In this context
--noprofile --private=/path/to/dir --net=none --dbus-system=none --dbus-user=none --private-tmp --nonewprivsIf i replace
--noprofilewith--profile=noprofilecan i expect the same behavior?@kmk3
firejail --noprofile --whitelist=/sys/module/nvidia* --read-only=/sys/module/nvidia* /usr/bin/nvidia-smiFailed to initialize NVML: GPU access blocked by the operating system
Doesn't work.
@rusty-snake commented on GitHub (Oct 19, 2024):
--noprofiledoes not use a profile / an empty profile.noprofile.profileis a profile that does nothing beyond lifting (some) restrictions remaining with--noprofile(the most features is opt-in but a few are opt-out).Play with the commands in noprofile.profile to findout which are required.
@valandyr commented on GitHub (Oct 19, 2024):
I assumed that --noprofile would disable everything, thanks for explaining.
firejail --noblacklist=/sys/module nvidia-smiworks.firejail --noblacklist=/sys/module/nvidia* nvidia-smidoesn't work.Probably additional modules are necessary with driver version 560.
Feel free to close this issue whenever.
@rusty-snake commented on GitHub (Oct 19, 2024):
As @kmk3 said: "A noblacklist line should [must] match an existing blacklist line."
"The changes from https://github.com/netblue30/firejail/pull/6387 are only in the development version."
I leave it open for now (~1day). Anybody else, fell free to close.
Can anybody with firejail from git-master and a nvidia system check that
firejail --profile=noprofile ls /sys/moduleactually outputs the same asls /sys/module. If it outputs nothing (i.e. empty directory), we have a "bug" in noprofile.profile.@kmk3 commented on GitHub (Oct 25, 2024):
Duplicate of #6372