Jellyfin Forum
SOLVED: Hardware acceleration on docker Intel arc a380 - Printable Version

+- Jellyfin Forum (https://forum.jellyfin.org)
+-- Forum: Support (https://forum.jellyfin.org/f-support)
+--- Forum: Troubleshooting (https://forum.jellyfin.org/f-troubleshooting)
+--- Thread: SOLVED: Hardware acceleration on docker Intel arc a380 (/t-solved-hardware-acceleration-on-docker-intel-arc-a380)



Hardware acceleration on docker Intel arc a380 - sthtyekujetyk - 2024-01-12

I have been following this guide

My setup: proxmox ve --> debian VM --> docker --> jellyfin

Output of lshw -C display in debian host:

Code:
  *-display               
      description: VGA compatible controller
      product: DG2 [Arc A380]
      vendor: Intel Corporation
      physical id: 0
      bus info: pci@0000:01:00.0
      logical name: /dev/fb0
      version: 05
      width: 64 bits
      clock: 33MHz
      capabilities: pciexpress msi pm vga_controller bus_master cap_list rom fb
      configuration: depth=32 driver=i915 latency=0 mode=3840x2160 resolution=3840,2160 visual=truecolor xres=3840 yres=2160
      resources: iomemory:c00-bff irq:125 memory:80000000-80ffffff memory:c000000000-c1ffffffff

Output of ls -l /dev/dri in debian host:
Code:
total 0
drwxr-xr-x 2 root root        80 Jan 12 21:53 by-path
crw-rw---- 1 root video  226,  0 Jan 12 21:53 card0
crw-rw---- 1 root render 226, 128 Jan 12 17:37 renderD128

Container creation (yes 105 is my render group):
Code:
docker run -d \
--name=jellyfin \
--volume jellyfin_config:/config \
--volume jellyfin_cache:/cache \
--volume /mnt/media:/media \
--user 1006:1002 \
--group-add="105" \
--net=host \
--restart=unless-stopped \
--device /dev/dri/renderD128:/dev/dri/renderD128 \
jellyfin/jellyfin

Output of docker exec -it jellyfin /usr/lib/jellyfin-ffmpeg/vainfo:
Code:
rying display: drm
libva info: VA-API version 1.20.0
libva info: Trying to open /usr/lib/jellyfin-ffmpeg/lib/dri/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_20
libva info: va_openDriver() returns 0
vainfo: VA-API version: 1.20 (libva 2.20.0)
vainfo: Driver version: Intel iHD driver for Intel(R) Gen Graphics - 23.4.0 (05e4d0d)
vainfo: Supported profile and entrypoints
      VAProfileNone                  : VAEntrypointVideoProc
      VAProfileNone                  : VAEntrypointStats

Output of docker exec -it jellyfin /usr/lib/jellyfin-ffmpeg/ffmpeg -v verbose -init_hw_device vaapi=va -init_hw_device opencl@va:
Look at the last few lines
Code:
ffmpeg version 5.1.4-Jellyfin Copyright (c) 2000-2023 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 @ 0x561cb5d40100] Trying to use DRM render node for device 0.
[AVHWDeviceContext @ 0x561cb5d40100] libva: VA-API version 1.20.0
[AVHWDeviceContext @ 0x561cb5d40100] libva: Trying to open /usr/lib/jellyfin-ffmpeg/lib/dri/iHD_drv_video.so
[AVHWDeviceContext @ 0x561cb5d40100] libva: Found init function __vaDriverInit_1_20
[AVHWDeviceContext @ 0x561cb5d40100] libva: va_openDriver() returns 0
[AVHWDeviceContext @ 0x561cb5d40100] Initialised VAAPI connection: version 1.20
[AVHWDeviceContext @ 0x561cb5d40100] VAAPI driver: Intel iHD driver for Intel(R) Gen Graphics - 23.4.0 (05e4d0d).
[AVHWDeviceContext @ 0x561cb5d40100] Driver not found in known nonstandard list, using standard behaviour.
[AVHWDeviceContext @ 0x561cb5d6c240] Failed to get number of OpenCL platforms: -1001.
Device creation failed: -19.
Failed to set value 'opencl@va' for option 'init_hw_device': No such device
Error parsing global options: No such device

Transcoding settings:
(i am not entirely sure what to enable or disable nor where to get that information, if anyone can clarify this it would be great)
   

Playback doesn't work trying to transcode a 4k AV1:
Transcoding logs

Jellyfin logs


RE: Hardware acceleration on docker Intel arc a380 - TheDreadPirate - 2024-01-12

What kernel is proxmox and debian running?

You've setup GPU passthrough from Proxmox to Debian? Pretty sure you did this if the Debian VM can see the devices.


RE: Hardware acceleration on docker Intel arc a380 - sthtyekujetyk - 2024-01-12

Proxmox kernel is 6.5.11-4-pve
Debian kernel is 6.5.0-0.deb12.4-amd64

Yes I setup gpu passtrough


RE: Hardware acceleration on docker Intel arc a380 - TheDreadPirate - 2024-01-12

Do you have an Intel CPU in your system?


RE: Hardware acceleration on docker Intel arc a380 - sthtyekujetyk - 2024-01-12

Ryzen 9 7900, if you want to try to passthrough the other GPU it's a no-go. Proxmox host crashes immediately


RE: Hardware acceleration on docker Intel arc a380 - TheDreadPirate - 2024-01-12

Enable Low Power Encoding in the jellyfin settings. The docs say it is required by Arc.

https://jellyfin.org/docs/general/administration/hardware-acceleration/intel/#lp-mode-hardware-support


RE: Hardware acceleration on docker Intel arc a380 - sthtyekujetyk - 2024-01-13

It still crashes

Jellyfin log

Transcode log


RE: Hardware acceleration on docker Intel arc a380 - tmsrxzar - 2024-01-13

give this link a read https://www.reddit.com/r/homelab/comments/z7d6a8/proxmox_arc_a380_passthrough_jellyfin_hardware


RE: Hardware acceleration on docker Intel arc a380 - sthtyekujetyk - 2024-01-13

I did everything in that guide until the driver installation section
Since i am running linux 6.5 I think there is no need to install additional drivers right?
Are the last few lines of the last code section in my first message normal/expected?


RE: Hardware acceleration on docker Intel arc a380 - sthtyekujetyk - 2024-01-14

Solved it myself!

The solution was to:

- Install firmware-linux-nonfree from non-free apt repository
- Download dg2_huc_gsc.bin from here and copy it in /lib/firmware/i915/dg2_huc_gsc.bin
  I have no idea why was this missing
- Instead of running docker exec -it jellyfin /usr/lib/jellyfin-ffmpeg/ffmpeg -v verbose -init_hw_device vaapi=va -init_hw_device opencl@va
  I ran docker exec -it jellyfin /usr/lib/jellyfin-ffmpeg/ffmpeg -v verbose -init_hw_device vaapi=va:/dev/dri/renderD128 -init_hw_device opencl@va

Now it transcodes correctly