-
-
Notifications
You must be signed in to change notification settings - Fork 14.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
nixos/jellyfin: fix hardware acceleration #108224
Conversation
issue mentioned in NixOS#98176
I propose we stop providing our own |
Hello! In retrospect, I really should have tried to upstream these options first, instead of trusting my own very limited testing 😕 Is there an RFC that specifies which behavior maintainers should adopt when making a systemd service? (diverging from upstream, security considerations, NixOS-specific adjustments, ...) If not, I really think it would be useful to have, I believe there is a lot of things to be said from both sides of the argument, and we definitely need a coherent distribution behavior from all NixOS services. |
With the way NixOS is structured I think it will be difficult to find consensus on that 😄 My opinion is that I've recently become a fan of the Are you interested in creating a PR upstream to add your changes, then seeing if we can get the upstream unit to work on NixOS? Even if it doesn't work out it will still be a set of upstream eyes reviewing and commenting on your changes. @GrahamcOfBorg test jellyfin |
I marked this as stale due to inactivity. → More info |
@minijackson is this still an issue? |
I think when the upstream doesn't provide any hardening it is appropriate to add it manually. I agree that we should reach upstream as well. |
I can confirm that the equivalent of this works as a workaround (Intel QSV via VAAPI): {
systemd.services.jellyfin.serviceConfig = {
DeviceAllow = lib.mkForce [ "char-drm rw" ];
PrivateDevices = lib.mkForce false;
};
} I did not seem to require the $ ls -alh /dev/dri/renderD128
crw-rw-rw- 1 root render 226, 128 Oct 18 11:07 /dev/dri/renderD128 |
@aanderse Would you care to expand a little on how configuring using the upstream unit would work? I looked at those PRs you linked and played around with it for a bit but I have to admit I couldn't figure it out. |
@matthiasdv sure! I continue to encourage the use of I'll assume you already looked at our manual which doesn't do a great job explaining things. How familiar are you with When you include an upstream unit via There are a few things to keep in mind. Some NixOS specific, others are just general Did you have any specific questions, or specific examples that you need an explanation on? |
This doesn't fix NVENC/NVDEC hardware acceleration |
#175439 should have superseeded this PR, so I'm closing this one |
Issue mentioned in #98176
Motivation for this change
Hardware acceleration on jellyfin broke due to added systemd security options in #98176 (sorry about that...). This hopefully fixes it. I did some rudimentary tests on my server, but my video card doesn't seem to support h264 encoding via VAAPI. Playing h264 videos with hardware decoding enabled seems to work fine, though.
@xwvvvvwx Can confirm that this adds hardware encoding / decoding back for you?
Things done
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)nix path-info -S
before and after)