i am having some trouble with buffering on my jellyfin server. it is not due to high demand, only one stream is active. id like to make use of my nvidia GPU to see if it helps performance, i suspect most of my issue is due to media quality. i have the drivers and docker integration set up, i believe i just need to add the environment variables to the compose file but i know that gets wiped on updates. if possible id like to implement a fix on my own while waiting for a sparkbox update that implements Nvidia GPU support. Tom AI gave me some info, but mentioned a open issue number 21858 that i dont know how to check the status of, and also mentioned a "hack" might not work because the trigger condition is intel specific. any extra insight into what i can do for now? im not opposed to implementing Tdarr to try and optimize my media, just never gone down that route and not sure what settings would be best. Tom AI answer below: This is the Nvidia gap I mentioned (21858, still open). SparkBox's hw overlay only maps /dev/dri for Intel VAAPI/QSV — there's no Nvidia runtime wiring, no NVIDIAVISIBLEDEVICES, no deploy.resources.reservations.devices block for GPU, none of it. Even if you hand-edit the compose to add the right Nvidia runtime/env vars and it survives an update, Jellyfin's own hwaccel config path for Nvidia (NVENC/NVDEC) still needs to be wired up correctly for SparkBox's container image and startup — that part's untested/unsupported on our end too. You could genuinely get further and still end up debugging a config nobody's verified works. On persistence — you're right that plain edits to modules/media/docker-compose.yml get clobbered on update. The supported override mechanism is a hardware overlay file, docker-compose.hw.yml in that same module folder — that's specifically the file SparkBox auto-loads (when JELLYFINHWACCEL is set + /dev/dri exists) and won't stomp on update since it's not the main compose. Problem is, that trigger condition (/dev/dri exists) is Intel-specific — it's not gated on Nvidia devices at all right now, so there's no clean supported hook for "add Nvidia stuff here" without you maintaining a parallel custom overlay yourself and re-checking it after every SparkBox update in case the mechanism changes. Honest answer: you can hack this in (custom override file with runtime: nvidia, NVIDIAVISIBLEDEVICES=all, NVIDIADRIVERCAPABILITIES=video,compute,utility, mapped into modules/media/docker-compose.hw.yml manually), but it's unsupported territory — no guarantee it survives the next SparkBox release cleanly since that file's trigger logic isn't Nvidia-aware, and no guarantee Jellyfin's image even has NVENC support built in.
13 replies
Chris wrote:
Really thorough digging on your end, and you've got it right. 21858 is real and still open -- SparkBox's hardware transcoding only wires up Intel right now, nothing for Nvidia yet, so that Tom AI answer was accurate. Good news is Tom's team narrowed the fix down to one missing setting rather than a whole rebuild, so it's on the list, just no date yet. Hand-editing the override file yourself is possible but unsupported, so it could break on your next update. Tdarr is a solid option meanwhile -- it re-encodes your library ahead of time so playback is smoother without needing the GPU wired in live. Happy to help you get it set up if you want to go that route while you wait.
Chris wrote:
Good news: Nvidia GPU support for Jellyfin is now live in the current SparkBox build. The gap Tom AI mentioned (21858) was just filled. Here's what you need: 1. Prerequisites on your host: NVIDIA driver + nvidia-container-toolkit installed, then run sudo nvidia-ctk runtime configure --runtime=docker && sudo systemctl restart docker 2. Enable it: Set JELLYFINHWACCEL=nvidia in Settings Server Config, then run sudo sparkbox restart media 3. Configure Jellyfin: Dashboard Playback Transcoding, select "Nvidia NVENC" If the nvidia runtime isn't registered, SparkBox falls back to software transcoding gracefully—no failure. For Tdarr optimization: that's a separate call, but starting with NVENC on Jellyfin usually handles your buffering (it's typically media quality + transcode load, exactly what you suspected). Try the GPU route first, come back if you hit snags.
RyuikuX wrote:
im on SparkBox Core Current version: 1.6.376, and checking for updates doesnot show anything available. what version has the nvidia support,and is there a way i can force the update?
Chris wrote:
Good news — you've already got it. Nvidia GPU support shipped in v1.6.317 (June 30), and v1.6.376 is much newer, so it's definitely in your box. No update needed. To use it: set JELLYFINHWACCEL=nvidia in Settings Server Config (it's a text field — just type 'nvidia'), then run sudo sparkbox restart media. After that, go into Jellyfin's Dashboard Playback Transcoding and select 'Nvidia NVENC' from the encoder list. The only host prerequisite is the nvidia-container-toolkit; Tom's answer has the full setup if you don't have it yet.
Chris wrote:
No update needed — you're already on it! Nvidia support landed a while back, so 1.6.376 already has everything Chris described. To turn it on: Settings Server Config, set Hardware Transcoding to nvidia, save, then run sudo sparkbox restart media. One thing to check first — you need the Nvidia container toolkit registered with Docker (sudo nvidia-ctk runtime configure --runtime=docker && sudo systemctl restart docker), otherwise it'll quietly fall back to software transcoding instead of showing an error.
RyuikuX wrote:
i cannot find the setting. sparkbox doctor output also seemsto have no check or awareness for nvidia gpu, see part of output below. is there a way to manually enableit in .env so it retains using nvidia through restarts and updates? [Hardware Transcoding] [OK] /dev/dri exists -- GPU devices detected total 0 drwxr-xr-x 3 root root 120 Jul 18 00:58 . drwxr-xr-x 22 root root 4360 Jul 18 00:58 .. drwxr-xr-x 2 root root 120 Jul 18 00:58 by-path crw-rw---- 1 root video 226, 0 Jul 18 00:58 card0 crw-rw---- 1 root video 226, 1 Jul 18 00:58 card1 crw-rw---- 1 root render 226, 128 Jul 18 00:58 renderD128 [OK] Intel Quick Sync / GPU render device available (renderD128) [WARN] Render device may not be accessible -- check group membership (video/render)
Chris wrote:
Good news, no update needed -- you already have it. The Hardware Transcoding field in Settings Server Config is a plain text box, not a dropdown, so there's nothing to click on -- you just type nvidia straight into it and save. Run sudo sparkbox restart media after saving and it applies. Once it's saved there it lives in your .env automatically, so it survives restarts and updates on its own -- no manual .env editing needed. You're also right that sparkbox doctor doesn't check for Nvidia at all yet, only Intel -- that's a real gap, flagging it to get added.
RyuikuX wrote:
found what setting you were referring to, set it to "nvidia" and Configured Jellyfin: Dashboard Playback Transcoding, select "Nvidia NVENC" Trying to watch the media that was struggling now fails completely with an error message "Playback error: Playback failed due to a fatal player error" i have a ffmpeg log in jellyfin "Cannot load libcuda.so.1 / Operation not permitted" means the driver libraries are installed on the host but are not mapped into the Jellyfin container, preventing FFmpeg from using them. Where can i go from here?
Chris wrote:
Totally fair — that was on us, and Tom just shipped the fix for exactly this confusion: v1.6.377 is live now. Once your box picks it up (Updates tab, or sudo sparkbox update): 1) sparkbox doctor now has an Nvidia section — it checks your GPU and Docker runtime and prints the exact command if anything is missing. 2) In Settings, the Hardware Transcoding field now documents the nvidia option — type nvidia in that box, save, then sudo sparkbox restart media. If doctor shows all green and playback still buffers after that, paste the doctor output here and Tom will take a direct look.
Chris wrote:
Good catch, and that error is real — 1.6.377 only fixed the docs/doctor visibility, it didn't touch this. Before digging further: make sure you actually ran the update (Updates tab, or sudo sparkbox update) and then sudo sparkbox restart media. Once you're on 1.6.377, run sudo sparkbox doctor again — it now has a dedicated Nvidia check that tells you directly whether Docker's Nvidia runtime is actually registered on your host, which is the single most common reason libcuda can't load even when the driver itself is installed. Paste that section here and I'll get it in front of Tom if it still comes back clean but playback still fails.
RyuikuX wrote:
i think im up and running with nvidia now. had to make sure i did a proper sudo update, sudo restart media, and sudo doctor, doctor came back healthy and i was able to keep hardware transcoding enabled with proper nvidia settings. i do wish the performance was better, it takes a moment to load content but once it starts it doesnt buffer anymore. switching audio tracks or subtitles also triggers the same slow load, but im talking about like 10 seconds of waiting so not that bad. might just be because im using a Quadro P600 with only 2gb vram. any insights you can give about optimize would be nice but this is much more useable, so thank you.
Chris wrote:
Glad you're up and running! That short pause at the start of playback (and the same brief wait when switching audio or subtitle tracks) is normal for the P600's 2GB of VRAM -- NVENC has to spin up and juggle a small buffer, so it's not something broken on your end. If you want it snappier, try dropping the max streaming quality a notch in your client's playback settings -- that usually shortens the initial load. Appreciate you sticking with this all the way through, made it a clean fix.
Chris wrote:
Found it, and it was ours — thank you for the ffmpeg log, that line cracked it. Your GPU driver files were never being connected into Jellyfin because of a quirk: Nvidia only creates its device files when something touches the GPU, and on a server where nothing had yet, SparkBox wrongly concluded there was no GPU and silently skipped the hookup. Tom traced it from your report and the fix just shipped in v1.6.378. Once your box updates: sudo sparkbox restart media, then try the same video with NVENC on. If it still throws the libcuda error after that, paste the first lines of the new ffmpeg log and Tom will dig deeper directly.