Skip to content

[Issue]: Can't use the GPU in Jellyfin QNAP Docker image for hardware acceleration #9806

Closed as not planned
@DrakeHamString

Description

Please describe your bug

Hi there,
I'm having the issue that I can't get Jellyfin to use my GPU (Nvidia Quadro P400) on my QNAP TS-673A due to persistent Nvidia driver in the kernel.
I was following your guide here: https://jellyfin.org/docs/general/administration/hardware-acceleration/
and working on the command line inside of the docker image.

I'm already passing the GPU to the container and its recognized:

root@Jellyfin:/# lshw -C display
  *-display                 
       description: VGA compatible controller
       product: GP107GL [Quadro P400]
       vendor: NVIDIA Corporation
       physical id: 0
       bus info: pci@0000:01:00.0
       version: a1
       width: 64 bits
       clock: 33MHz
       capabilities: vga_controller bus_master cap_list rom
       configuration: driver=nvidia latency=0
       resources: irq:91 memory:f6000000-f6ffffff memory:e0000000-efffffff memory:f0000000-f1ffffff ioport:f000(size=128) memory:c0000-dffff

OS inside of the container:

root@Jellyfin:/# cat /etc/*rel*
PRETTY_NAME="Debian GNU/Linux 11 (bullseye)"
NAME="Debian GNU/Linux"
VERSION_ID="11"
VERSION="11 (bullseye)"
VERSION_CODENAME=bullseye
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"

Your guide also guided me to this site, where I followed the instructions to install the GPU driver for Debian 11 "Bullseye":
https://wiki.debian.org/NvidiaGraphicsDrivers

From that I used those commands:
Added this to /etc/apt/sources.list

deb http://deb.debian.org/debian/ bullseye main contrib non-free
# apt update
# apt install -y jellyfin-ffmpeg5
# apt install -y nvidia-driver firmware-misc-nonfree
# apt install -y libnvcuvid1 libnvidia-encode1

While Installing I get this message:

Mismatching nvidia kernel module loaded

The NVIDIA driver that is being installed (version 470.182.03) does not match the nvidia kernel module currently loaded (version 515.48.07).

The X server, OpenGL, and GPGPU applications may not work properly.

The easiest way to fix this is to reboot the machine once the installation has finished. You can also stop the X server (usually by stopping the login manager, e.g. gdm3, sddm, or xdm), manually unload the module ("modprobe -r nvidia"), and restart the X server.

(none of those suggested things worked)

When executing nvidia-smi I get this:

Failed to initialize NVML: Driver/library version mismatch

So I suspect that there is already a newer version of the Nvidia driver embedded in the kernel of this docker image, which I cant use.
Kernel info:

root@Jellyfin:/# uname -a
Linux Jellyfin 5.10.60-qnap #1 SMP Fri Apr 21 07:36:35 CST 2023 x86_64 GNU/Linux

I already tried to purge everything (apt purge nvidia* libnvidia*) and installed again. Same error.

When installed:

root@Jellyfin:/# dkms status
nvidia-current, 470.182.03, 5.10.0-23-amd64, x86_64: installed

(it outputs nothing when no driver installed)

And no, reboot did not help too (I can't do more than stopping and starting the container)

When trying to enable hardware encoding in the Jellyfin settings and start a video, then I get the iconic error message with incompatible media.

I hope you can help with with that issue.

Jellyfin Version

Other

if other:

10.8.10

Environment

- OS: Debian 11 Bullseye
- Linux Kernel: Linux Jellyfin 5.10.60-qnap #1 SMP Fri Apr 21 07:36:35 CST 2023 x86_64 GNU/Linux
- Virtualization: Docker
- Clients: Browser
- Browser: Chrome, Edge
- FFmpeg Version: 5.1.3-Jellyfin
- Playback Method: Transcode
- Hardware Acceleration: NVENC (Not Working)
- GPU Model: Nvidia Quadro P400
- Plugins: none
- Reverse Proxy: Nginx Proxy Manger
- Base URL: --
- Networking: Bridged with own IP address
- Storage: Jellyfin runs on a NAS

Jellyfin logs

No response

FFmpeg logs

/usr/lib/jellyfin-ffmpeg/ffmpeg -analyzeduration 200M -init_hw_device cuda=cu:0 -filter_hw_device cu -hwaccel cuda -hwaccel_output_format cuda -threads 1 -autorotate 0 -i file:"/media/Filme/Lorem.mkv" -autoscale 0 -map_metadata -1 -map_chapters -1 -threads 0 -map 0:0 -map 0:2 -map -0:0 -codec:v:0 h264_nvenc -preset p1 -b:v 27690523 -maxrate 27690523 -bufsize 55381046 -profile:v:0 high -g:v:0 72 -keyint_min:v:0 72 -filter_complex "[0:5]scale=s=1920x1080:flags=fast_bilinear,format=yuva420p,hwupload=derive_device=cuda[sub];[0:0]setparams=color_primaries=bt709:color_trc=bt709:colorspace=bt709,scale_cuda=format=yuv420p[main];[main][sub]overlay_cuda=eof_action=endall:shortest=1:repeatlast=0" -start_at_zero -codec:a:0 libfdk_aac -ac 6 -ab 640000 -copyts -avoid_negative_ts disabled -max_muxing_queue_size 2048 -f hls -max_delay 5000000 -hls_time 3 -hls_segment_type mpegts -start_number 0 -hls_segment_filename "/config/transcodes/619157c251631fe5937ebb12ac305373%d.ts" -hls_playlist_type vod -hls_list_size 0 -y "/config/transcodes/619157c251631fe5937ebb12ac305373.m3u8"


ffmpeg version 5.1.3-Jellyfin Copyright (c) 2000-2022 the FFmpeg developers
  built with gcc 10 (Debian 10.2.1-6)
  configuration: --prefix=/usr/lib/jellyfin-ffmpeg --target-os=linux --extra-libs=-lfftw3f --extra-version=Jellyfin --disable-doc --disable-ffplay --disable-ptx-compression --disable-static --disable-libxcb --disable-sdl2 --disable-xlib --enable-lto --enable-gpl --enable-version3 --enable-shared --enable-gmp --enable-gnutls --enable-chromaprint --enable-libdrm --enable-libass --enable-libfreetype --enable-libfribidi --enable-libfontconfig --enable-libbluray --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libopenmpt --enable-libdav1d --enable-libwebp --enable-libvpx --enable-libx264 --enable-libx265 --enable-libzvbi --enable-libzimg --enable-libfdk-aac --arch=amd64 --enable-libsvtav1 --enable-libshaderc --enable-libplacebo --enable-vulkan --enable-opencl --enable-vaapi --enable-amf --enable-libmfx --enable-ffnvcodec --enable-cuda --enable-cuda-llvm --enable-cuvid --enable-nvdec --enable-nvenc
  libavutil      57. 28.100 / 57. 28.100
  libavcodec     59. 37.100 / 59. 37.100
  libavformat    59. 27.100 / 59. 27.100
  libavdevice    59.  7.100 / 59.  7.100
  libavfilter     8. 44.100 /  8. 44.100
  libswscale      6.  7.100 /  6.  7.100
  libswresample   4.  7.100 /  4.  7.100
  libpostproc    56.  6.100 / 56.  6.100
[AVHWDeviceContext @ 0x55da004dc800] cu->cuInit(0) failed -> CUDA_ERROR_SYSTEM_DRIVER_MISMATCH: system has unsupported display driver / cuda driver combination
Device creation failed: -542398533.
Failed to set value 'cuda=cu:0' for option 'init_hw_device': Generic error in an external library
Error parsing global options: Generic error in an external library

Please attach any browser or client logs here

No response

Please attach any screenshots here

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    downstreamThis issue is due to a downstream packaging or projectwontfixThis will not be worked on

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions