mrjay42 5 Posted October 5, 2025 Posted October 5, 2025 Hi Everyone, I am well aware that this is a common issue. I have read some topics on the forum: The documentation of course: https://emby.media/support/articles/Hardware-Acceleration-Overview.html?q=nvidia Problem I think I failed to have Emby Premiere to accelerate my transcoding operations on Linux, using the available RTX4060Ti. Emby Setup My Emby is installed using Portainer and Docker. My current setup is the following version: "2.3" services: emby: image: emby/embyserver container_name: embyserver2 runtime: nvidia # Use NVIDIA GPU acceleration networks: - private_secured_network # Connect to your existing external network environment: - UID=1000 # User ID - GID=1000 # Group ID - GIDLIST=1000 # Additional groups if needed - NVIDIA_VISIBLE_DEVICES=all - NVIDIA_DRIVER_CAPABILITIES=compute,utility,video volumes: - /home/mrjay/Desktop/apps/emby2:/config - /home/mrjay/Desktop/data/Downloads/transmission/completed:/mnt/share1 ports: - "8097:8096" # Host 8097 → Container 8096 (HTTP) - "8921:8920" # Optional HTTPS devices: - /dev/dri:/dev/dri # Hardware acceleration restart: on-failure networks: private_secured_network: external: true I tried to follow things from the documentation and also from some stuff I read here and there on the forum, to no success so far. How do I detect whether my GPU is being used So what I do is pretty simple: I start a terminal on Linux, I run: watch -n 0.1 nvidia-smi I open Emby I start a movie And I transcode it to whatever resolution feels 'fun' Keep an eye on nvidia-smi -> if we're at a strict 0% I deduce that my GPU is not being used Random Observation It doesn't seem that I have much options there. I've seen on the forum screenshots of people's Embys which looks kinda different with some more options there? (am I cray-cray?) Operating system $ lsb_release -a No LSB modules are available. Distributor ID: Debian Description: Debian GNU/Linux forky/sid Release: n/a Codename: forky $ uname -a Linux minibip 6.16.8+deb14-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.16.8-1 (2025-09-21) x86_64 GNU/Linux Installed Drivers Here I'm trying to provide as much information as possible $ nvidia-smi Mon Oct 6 00:38:45 2025 +-----------------------------------------------------------------------------------------+ | NVIDIA-SMI 550.163.01 Driver Version: 550.163.01 CUDA Version: 12.4 | |-----------------------------------------+------------------------+----------------------+ | GPU Name Persistence-M | Bus-Id Disp.A | Volatile Uncorr. ECC | | Fan Temp Perf Pwr:Usage/Cap | Memory-Usage | GPU-Util Compute M. | | | | MIG M. | |=========================================+========================+======================| | 0 NVIDIA GeForce RTX 4060 Ti Off | 00000000:02:00.0 Off | N/A | | 0% 32C P8 1W / 165W | 19MiB / 16380MiB | 0% Default | | | | N/A | +-----------------------------------------+------------------------+----------------------+ +-----------------------------------------------------------------------------------------+ | Processes: | | GPU GI CI PID Type Process name GPU Memory | | ID ID Usage | |=========================================================================================| | 0 N/A N/A 2677 G /usr/lib/xorg/Xorg 9MiB | | 0 N/A N/A 2742 G /usr/bin/gnome-shell 2MiB | +-----------------------------------------------------------------------------------------+ I have attached a file called "nvidia-smi-detailed.txt" that contains the results of the following command: nvidia-smi -q In terms of installed packages I have the following: $ dpkg -l | grep nvidia ii firmware-nvidia-graphics 20250808-1 all Binary firmware for Nvidia GPU chips ii firmware-nvidia-gsp 550.163.01-3 amd64 NVIDIA GSP firmware ii glx-alternative-nvidia 1.2.2 amd64 allows the selection of NVIDIA as GLX provider ii libegl-nvidia0:amd64 550.163.01-3 amd64 NVIDIA binary EGL library ii libgl1-nvidia-glvnd-glx:amd64 550.163.01-3 amd64 NVIDIA binary OpenGL/GLX library (GLVND variant) ii libgles-nvidia1:amd64 550.163.01-3 amd64 NVIDIA binary OpenGL|ES 1.x library ii libgles-nvidia2:amd64 550.163.01-3 amd64 NVIDIA binary OpenGL|ES 2.x library ii libglx-nvidia0:amd64 550.163.01-3 amd64 NVIDIA binary GLX library ii libnvidia-allocator1:amd64 550.163.01-3 amd64 NVIDIA allocator runtime library ii libnvidia-cfg1:amd64 550.163.01-3 amd64 NVIDIA binary OpenGL/GLX configuration library ii libnvidia-container-tools 1.18.0~rc.5-1 amd64 NVIDIA container runtime library (command-line tools) ii libnvidia-container1:amd64 1.18.0~rc.5-1 amd64 NVIDIA container runtime library ii libnvidia-egl-gbm1:amd64 1.1.2.1-1 amd64 GBM EGL external platform library for NVIDIA ii libnvidia-egl-wayland1:amd64 1:1.1.18-1 amd64 Wayland EGL External Platform library -- shared library ii libnvidia-eglcore:amd64 550.163.01-3 amd64 NVIDIA binary EGL core libraries ii libnvidia-encode1:amd64 550.163.01-3 amd64 NVENC Video Encoding runtime library ii libnvidia-glcore:amd64 550.163.01-3 amd64 NVIDIA binary OpenGL/GLX core libraries ii libnvidia-glvkspirv:amd64 550.163.01-3 amd64 NVIDIA binary Vulkan Spir-V compiler library ii libnvidia-gpucomp:amd64 550.163.01-3 amd64 NVIDIA binary GPU compiler library ii libnvidia-ml1:amd64 550.163.01-3 amd64 NVIDIA Management Library (NVML) runtime library ii libnvidia-pkcs11-openssl3:amd64 550.163.01-3 amd64 NVIDIA PKCS #11 Library (OpenSSL 3) ii libnvidia-ptxjitcompiler1:amd64 550.163.01-3 amd64 NVIDIA PTX JIT Compiler library ii libnvidia-rtcore:amd64 550.163.01-3 amd64 NVIDIA binary Vulkan ray tracing (rtcore) library ii nvidia-alternative 550.163.01-3 amd64 allows the selection of NVIDIA as GLX provider ii nvidia-container-toolkit 1.18.0~rc.5-1 amd64 NVIDIA Container toolkit ii nvidia-container-toolkit-base 1.18.0~rc.5-1 amd64 NVIDIA Container Toolkit Base ii nvidia-docker2 2.14.0-1 all NVIDIA Container Toolkit meta-package ii nvidia-driver 550.163.01-3 amd64 NVIDIA metapackage ii nvidia-driver-bin 550.163.01-3 amd64 NVIDIA driver support binaries ii nvidia-driver-libs:amd64 550.163.01-3 amd64 NVIDIA metapackage (OpenGL/GLX/EGL/GLES libraries) ii nvidia-egl-common 550.163.01-3 amd64 NVIDIA binary EGL driver - common files ii nvidia-egl-icd:amd64 550.163.01-3 amd64 NVIDIA EGL installable client driver (ICD) ii nvidia-installer-cleanup 20240109+1 amd64 cleanup after driver installation with the nvidia-installer ii nvidia-kernel-common 20240109+1 amd64 NVIDIA binary kernel module support files ii nvidia-kernel-dkms 550.163.01-3 amd64 NVIDIA binary kernel module DKMS source ii nvidia-kernel-support 550.163.01-3 amd64 NVIDIA binary kernel module support files ii nvidia-legacy-check 550.163.01-3 amd64 check for NVIDIA GPUs requiring a legacy driver ii nvidia-modprobe 570.133.07-1 amd64 utility to load NVIDIA kernel modules and create device nodes ii nvidia-persistenced 550.163.01-1 amd64 daemon to maintain persistent software state in the NVIDIA driver ii nvidia-settings 550.163.01-1 amd64 tool for configuring the NVIDIA graphics driver ii nvidia-smi 550.163.01-3 amd64 NVIDIA System Management Interface ii nvidia-support 20240109+1 amd64 NVIDIA binary graphics driver support files ii nvidia-suspend-common 550.163.01-3 amd64 NVIDIA driver - systemd power management scripts ii nvidia-vdpau-driver:amd64 550.163.01-3 amd64 Video Decode and Presentation API for Unix - NVIDIA driver ii nvidia-vulkan-common 550.163.01-3 amd64 NVIDIA Vulkan driver - common files ii nvidia-vulkan-icd:amd64 550.163.01-3 amd64 NVIDIA Vulkan installable client driver (ICD) ii xserver-xorg-video-nvidia 550.163.01-3 amd64 NVIDIA binary Xorg driver You can see that I have nvidia-docker2 installed ^^ ---- Alright, I hope I provided the right amount of info about this matter. I feel kinda guilty for asking about this, because I can see that this is a pretty common topic. But by gathering info and trying things on my side, I didn't manage to make my GPU transcode anything with Emby Thank you in advance for your help nvidia-smi-detailed.txt
mrjay42 5 Posted October 5, 2025 Author Posted October 5, 2025 Oh actually, I opened the "advanced" option in the select menu in the "transcoding" menu in the settings of Emby and I have this: I'm relatively confident that it means that no hardware option is available
mrjay42 5 Posted October 6, 2025 Author Posted October 6, 2025 (edited) UPDATE I managed to have the transcoding options visible as in the screenshot below (I clicked all the options available, not knowing what's best) And the GPU 'seems' to be used by Emby for transcoding. BUUUUUUUUUUUUUUUUUUUUUUUUUUUUT -> now all my media crash when I try to play them with transcoding They crash like this: I have included the logs from Emby and ffmpeg, corresponding to the time/date of when I'm doing my tests. ...help? EDIT: I forgot to say that I managed to have the transcoding options and the GPU to be "hit" by Emby by adding the following to my docker compose yml in Portainer : deploy: resources: reservations: devices: - driver: nvidia count: all capabilities: [gpu] So the complete file looks like this: version: "3.9" # must be 3.x, deploy is ignored in 2.x services: emby: image: emby/embyserver container_name: embyserver2 networks: - private_secured_network environment: - UID=1000 - GID=1000 - GIDLIST=1000 - NVIDIA_VISIBLE_DEVICES=all - NVIDIA_DRIVER_CAPABILITIES=compute,utility,video volumes: - /home/mrjay/Desktop/apps/emby2:/config - /home/mrjay/Desktop/data/Downloads/transmission/completed:/mnt/share1 ports: - "8097:8096" - "8921:8920" deploy: resources: reservations: devices: - driver: nvidia count: all capabilities: [gpu] restart: on-failure networks: private_secured_network: external: true ffmpeg-transcode-05fc98cf-be40-45af-adc2-62c8cc591d21_1.txt ffmpeg-transcode-5d98f451-f201-4394-a061-b179ce92a540_1.txt ffmpeg-transcode-38db3eb0-fc78-4279-bea5-c69ea3a50127_1.txt ffmpeg-transcode-41010e05-a14b-4d2e-9efc-0ba0c67a1306_1.txt ffmpeg-transcode-aea280da-cea3-42d6-a715-8348787d1fee_1.txt ffmpeg-transcode-b56efd52-83a5-4711-b608-28d716a19663_1.txt embyserver.txt Edited October 6, 2025 by mrjay42 adding yml docker compose info
Solution mrjay42 5 Posted October 6, 2025 Author Solution Posted October 6, 2025 (edited) Oh well, after a reboot. I discovered that my nvidia drivers had been disabled Probably because I'm running a Debian testing on my server and the headers were not 'easily' available with that newest Kernel, and as a consequence NVidia drivers had trouble being installed/enabled. So this is what I did Fix “NVIDIA-SMI has failed because it couldn’t communicate with the NVIDIA driver” on Debian (kernel 6.16+) Problem After a reboot, you run: nvidia-smi and get: NVIDIA-SMI has failed because it couldn't communicate with the NVIDIA driver. Make sure that the latest NVIDIA driver is installed and running. This usually happens right after a kernel update, when the NVIDIA kernel module wasn’t rebuilt for the new kernel. Step-by-step fix Check if the NVIDIA module is loaded lsmod | grep nvidia If there’s no output, try loading it: sudo modprobe nvidia If you get: modprobe: FATAL: Module nvidia-current not found in directory /lib/modules/6.x.x → it means the kernel module isn’t built for your new kernel. Check your NVIDIA driver installation dpkg -l | grep nvidia-driver You should see something like: ii nvidia-driver 550.163.01-3 amd64 NVIDIA metapackage If it’s missing, install or update it: sudo apt install nvidia-driver Identify your current kernel uname -r Example: 6.16.9+deb14-amd64 Install the matching kernel headers Without headers, DKMS (which builds the NVIDIA module) can’t compile anything. sudo apt install linux-headers-$(uname -r) If that fails with “Unable to locate package”, update your sources and retry: sudo apt update sudo apt install linux-headers-$(uname -r) should see packages like: linux-headers-6.16.9+deb14-amd64 linux-headers-6.16.9+deb14-common linux-kbuild-6.16.9+deb14 Rebuild the NVIDIA DKMS module Once headers are installed: sudo dkms autoinstall You should see: Building for 6.16.9+deb14-amd64 DKMS: install completed. This compiles and installs: /lib/modules/$(uname -r)/updates/dkms/nvidia-current.ko.xz Load the driver manually (to test) sudo modprobe nvidia nvidia-smi If you see your GPU table — success! Reboot and verify Finally, reboot once: sudo reboot After booting: nvidia-smi If it still works right away, your system is fully fixed — DKMS will automatically rebuild the module on future kernel updates. Quick Recap Command Purpose `lsmod grep nvidia` sudo modprobe nvidia Try to load module manually sudo apt install linux-headers-$(uname -r) Install kernel headers sudo dkms autoinstall Rebuild NVIDIA kernel module sudo modprobe nvidia && nvidia-smi Test driver sudo reboot Verify persistence after restart Tested environment Debian Trixie/Sid Kernel: 6.16.9+deb14-amd64 Driver: nvidia-driver 550.163.01-3 GPU: NVIDIA GeForce RTX 4060 Ti Now, with this correction and the aforementioned (in the first post on this topic) packages and the correct docker compose yml code (in the previous post just before this one) -> everything works Edited October 6, 2025 by mrjay42 small correction 1
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now