Issues with AMD GPU setup for use with VAAPI encode/decoding in a LXC

Theyo101

New Member
Mar 2, 2024
1
0
1
CPU: AMD Ryzen 7 5800X
Motherboard: TUF GAMING B550-PLUS
GPU: FXF 5700

I've been running into some errors while trying to get drivers setup for a Jellyfin LXC (privileged) I have.
There's been a few problems which I cannot find a similar issue online to help me fix this with.
Vainfo has been returning this error (On both PVE and LXC)
Code:
vainfo
error: can't connect to X server!
libva info: VA-API version 1.17.0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/radeonsi_drv_video.so
libva info: va_openDriver() returns -1
vaInitialize failed with error code -1 (unknown libva error),exit

glxinfo returns
Code:
glxinfo
Error: unable to open display

Following the Jellyfin documentation on AMD GPU setup I've been seeing this error when checking the OpenCL runtime on the LXC
Code:
sudo /usr/lib/jellyfin-ffmpeg/ffmpeg -v debug -init_hw_device opencl=ocl:.0,device_vendor="Advanced Micro Devices"
ffmpeg version 5.1.4-Jellyfin Copyright (c) 2000-2023 the FFmpeg developers
  built with gcc 11 (Ubuntu 11.4.0-1ubuntu1~22.04)
  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-libsvtav1 --enable-libwebp --enable-libvpx --enable-libx264 --enable-libx265 --enable-libzvbi --enable-libzimg --enable-libfdk-aac --arch=amd64 --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
Splitting the commandline.
Reading option '-v' ... matched as option 'v' (set logging level) with argument 'debug'.
Reading option '-init_hw_device' ... matched as option 'init_hw_device' (initialise hardware device) with argument 'opencl=ocl:.0,device_vendor=Advanced Micro Devices'.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option v (set logging level) with argument debug.
Applying option init_hw_device (initialise hardware device) with argument opencl=ocl:.0,device_vendor=Advanced Micro Devices.
[AVHWDeviceContext @ 0x5fa61dea16c0] 2 OpenCL platforms found.
[AVHWDeviceContext @ 0x5fa61dea16c0] No devices found on platform "AMD Accelerated Parallel Processing".
[AVHWDeviceContext @ 0x5fa61dea16c0] 1 OpenCL devices found on platform "Clover".
[AVHWDeviceContext @ 0x5fa61dea16c0] device_vendor does not match ("AMD").
[AVHWDeviceContext @ 0x5fa61dea16c0] No matching devices found.
Device creation failed: -19.
Failed to set value 'opencl=ocl:.0,device_vendor=Advanced Micro Devices' for option 'init_hw_device': No such device
Error parsing global options: No such device

Hopefully this information is usefull this is my first forum post. Any help would be greatly apprecieted.