mirror of
https://github.com/netblue30/firejail.git
synced 2026-05-15 14:16:14 -06:00
[GH-ISSUE #3335] mpv: hardware video decoding nvdec does not work #2093
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#2093
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 @gedec-coin-one on GitHub (Apr 9, 2020).
Original GitHub issue: https://github.com/netblue30/firejail/issues/3335
seems
nvdecneednvidia_uvmkernel module loadded to work.Without firejail, when I running mpv, it will load
nvidia_uvmmodule automatically (if it not loaded yet),but inside firejail, it not gonna work, so
nvdeccan't work either.temporary workaround:
mannually load
nvidia_uvmmodule, eg.sudo modprobe nvidia_uvm.FYI:
firejail version: 0.9.62
kernel version: 5.6.3
nvidia-drivers version: 440.82
my current mpv.local file:
@ghost commented on GitHub (Apr 9, 2020):
Might be similar to #2447. That was never actually cleared-up.
IMO it's not mpv but the linux kernel that loads the nvidia_uvm module. In any case, the mpv profile uses
private-bin env,mpv,python*,youtube-dl, which might be too restrictive in this context. I suggest ignoring that too. Another possibility (in combination with what you already ignored) isnoroot. Did you try the --build/--build= options yet?@gedec-coin-one commented on GitHub (Apr 9, 2020):
I tried
--noprofiletoo, not work.English is not my first language, I meant mpv triggered something then made kernel loads that.
I tried
ignore private-bin env,mpv,python*,youtube-dlandignore noroot,each then both,and the
--build/--build=options, still not work.here is the profile
--build=option generated:@ghost commented on GitHub (Apr 9, 2020):
Thanks for posting the --build output. Did that actually work to run mpv with nvdec?
@gedec-coin-one commented on GitHub (Apr 10, 2020):
no, it's still not work unless load nvidia_uvm module manually.
@ghost commented on GitHub (Apr 10, 2020):
After a decent portion of sleep I think this is probably seccomp related. Can you try the seccomp.keep list seen in your output from the --build command instead of seccomp?
@rusty-snake commented on GitHub (Apr 10, 2020):
@glitsj16 with
--noprofile, there are no seccomp filters.@gedec-coin-one have you (or your distro) set force-nonewprivs (or anythin else) in firejail.config?
@ghost commented on GitHub (Apr 10, 2020):
@rusty-snake Right. I guess I need more/better sleep heh. Too bad I don't have hardware to fully test mpv with nvdec. Our profile seems to cause issues with that specifically, cfr. #2447.
@gedec-coin-one commented on GitHub (Apr 10, 2020):
I'm using Gentoo right now, seems force-nonewprivs is disabled by default.
firejail.config
@Ryujinra commented on GitHub (Apr 10, 2020):
I should weigh in here since I created #2447, found the problem, and found a solution that works for me (I forgot to return to #2447 and post this solution earlier).
The issue is that the
nvidia-uvmdevice node is not created in/devwhenmpvis run via firejail, which in turn prevents CUDA/NVDEC from working.To solve this without any changes to firejail, you can just use the script nvidia provides to setup the device nodes manually on startup: https://docs.nvidia.com/cuda/cuda-installation-guide-linux/index.html#runfile-verifications. Must be run as root.
Now, the setting up of these device nodes is supposed to be the job of
nvidia-modprobefrom what I can tell, but it doesn't work properly for some reason on some machines (maybe related to it being a setuid binary), so in these cases I believe firejail is preventing the (kernel's?) automatic setup of any missing device nodes when a program likempvis called from within the firejail container. You can take a closer look at nvidia's script above to see exactly what permissions are needed to set up these nodes and what internal firejail restrictions may be preventing this process.Hope this helps get to the bottom of this tricky issue.
@ghost commented on GitHub (Apr 10, 2020):
@Ryujinra Thank you very much for providing this vital piece of information here. Chances are that we can work with this missing piece of the mpv/nvdec puzzle. I just added a comment to #2447 so users can find this thread more easily. Appreciated, stay healthy!
@rusty-snake commented on GitHub (Apr 10, 2020):
@gedec-coin-one can you try
firejail --noprofile --noblacklist=/sys/module mpv@gedec-coin-one commented on GitHub (Apr 11, 2020):
still not work