Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Segmentation Fault with Intel Arc A380 (jellyfin/jellyfin:10.8.10 container) #251

Closed
AWildBeard opened this issue Jun 5, 2023 · 8 comments
Labels
bug Something isn't working

Comments

@AWildBeard
Copy link

AWildBeard commented Jun 5, 2023

Describe The Bug

FFmpeg and vainfo within the Jellyfin container 10.8.10 segmentation fault immediately after init function __vaDriverInit_1_18.
FFmpeg and vainfo on the Ubuntu Server LTS host do not segfault and correctly recognize the A380 (as far as I can tell).

Steps To Reproduce

  1. Follow the guides on jellyfin.org/docs to enable hardware decode in the jellyfin linux container
  2. Use either Ubuntu LTS kernel 5.15.X or the documented & recommended hardware-enablement kernel
  3. Use either linuxserver/jellyfin or jellyfin/jellyfin containers (I tested both)
  4. Expose Arc A380 to container in any of the various ways, I.E using --device & --privileged or with Intel Kubernetes i915 controller, etc.
  5. Within the container; either built-in jellyfin-ffmpeg (5.1.3-Jellyfin) or latest packaged jellyfin-ffmpeg (5.1.3-Jellyfin) from the 5.1.3-2-bullseye package
  6. Execute them and witness a coredump

Expected Behavior

jellyfin-ffmpeg properly execute without a segmentation fault

System:

  • Platform: Linux
  • Operating System: Ubuntu 22.04 with hardware enablement kernel or default LTS kernel (I tested both)
  • Virtualization: Docker, ContainerD, Kubernetes
  • Jellyfin Version: 10.8.10
  • Jellyfin-FFmpeg Version: Tested against default jellyfin-ffmpeg in container and 5.1.3-2-bullseye
  • Hardware Acceleration: QSV, VAAPI I think?????
  • CPU & GPU Model: 2x Intel Xeon E5-2630v2, Intel Asrock A380

MediaInfo

N/A, will not process or open media files at all.

FFmpeg Logs

In container jellyfin/jellyfin:10.8.10 :

FFmpeg default in container ❌
root@jellyfin:/# /usr/lib/jellyfin-ffmpeg/ffmpeg -v verbose -init_hw_device vaapi=va:/dev/dri/renderD128 -init_hw_device opencl
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 @ 0x55ac25ba2100] libva: VA-API version 1.18.0
[AVHWDeviceContext @ 0x55ac25ba2100] libva: Trying to open /usr/lib/jellyfin-ffmpeg/lib/dri/iHD_drv_video.so
[AVHWDeviceContext @ 0x55ac25ba2100] libva: Found init function __vaDriverInit_1_18
double free or corruption (!prev)
Aborted (core dumped)
vainfo default in container ❌
root@jellyfin:/usr/lib/jellyfin-ffmpeg# ./vainfo --display drm --device /dev/dri/renderD128
Trying display: drm
libva info: VA-API version 1.18.0
libva info: Trying to open /usr/lib/jellyfin-ffmpeg/lib/dri/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_18
double free or corruption (!prev)
Aborted (core dumped)
FFmpeg 5.1.3-2-bullseye ❌
root@jellyfin:~# apt update && apt upgrade -y

--- SNIP ---

Setting up libwebp6:amd64 (0.6.1-2.1+deb11u1) ...
Setting up openssl (1.1.1n-0+deb11u5) ...
Setting up libwebpmux3:amd64 (0.6.1-2.1+deb11u1) ...
Setting up jellyfin-ffmpeg5 (5.1.3-2-bullseye) ...
Processing triggers for libc-bin (2.31-13+deb11u6) ...

root@jellyfin:~# /usr/lib/jellyfin-ffmpeg/ffmpeg -v verbose -init_hw_device vaapi=va:/dev/dri/renderD128 -init_hw_device opencl
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 @ 0x55fc4ec2f100] libva: VA-API version 1.18.0
[AVHWDeviceContext @ 0x55fc4ec2f100] libva: Trying to open /usr/lib/jellyfin-ffmpeg/lib/dri/iHD_drv_video.so
[AVHWDeviceContext @ 0x55fc4ec2f100] libva: Found init function __vaDriverInit_1_18
double free or corruption (!prev)
Aborted (core dumped)
Also because I'm an absolute monkey, I tried this against /dev/dri/card0 for the giggles I guess
FFmpeg 5.1.3-2-bullseye with -init_hw_device_vaapi=va:/dev/dri/card0 ❌
root@jellyfin:/# /usr/lib/jellyfin-ffmpeg/ffmpeg -v verbose -init_hw_device vaapi=va:/dev/dri/card0 -init_hw_device opencl
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 @ 0x557da221f100] libva: VA-API version 1.18.0
[AVHWDeviceContext @ 0x557da221f100] libva: Trying to open /usr/lib/jellyfin-ffmpeg/lib/dri/iHD_drv_video.so
[AVHWDeviceContext @ 0x557da221f100] libva: Found init function __vaDriverInit_1_18
double free or corruption (!prev)
Aborted (core dumped)

On host:

FFmpeg 4.4.2-0ubuntu0.22.04.1+esm1 ✅
root@compute (23-06-05T:39Z) ~> ffmpeg -v verbose -init_hw_device vaapi=va:/dev/dri/renderD128 -init_hw_device opencl@va
ffmpeg version 4.4.2-0ubuntu0.22.04.1+esm1 Copyright (c) 2000-2021 the FFmpeg developers
  built with gcc 11 (Ubuntu 11.3.0-1ubuntu1~22.04)
  configuration: --prefix=/usr --extra-version=0ubuntu0.22.04.1+esm1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libdav1d --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librabbitmq --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzimg --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --enable-pocketsphinx --enable-librsvg --enable-libmfx --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared
  libavutil      56. 70.100 / 56. 70.100
  libavcodec     58.134.100 / 58.134.100
  libavformat    58. 76.100 / 58. 76.100
  libavdevice    58. 13.100 / 58. 13.100
  libavfilter     7.110.100 /  7.110.100
  libswscale      5.  9.100 /  5.  9.100
  libswresample   3.  9.100 /  3.  9.100
  libpostproc    55.  9.100 / 55.  9.100
[AVHWDeviceContext @ 0x55cbfa07a580] libva: VA-API version 1.18.0
[AVHWDeviceContext @ 0x55cbfa07a580] libva: Trying to open /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so
[AVHWDeviceContext @ 0x55cbfa07a580] libva: Found init function __vaDriverInit_1_18
[AVHWDeviceContext @ 0x55cbfa07a580] libva: va_openDriver() returns 0
[AVHWDeviceContext @ 0x55cbfa07a580] Initialised VAAPI connection: version 1.18
[AVHWDeviceContext @ 0x55cbfa07a580] VAAPI driver: Intel iHD driver for Intel(R) Gen Graphics - 23.1.6 ().
[AVHWDeviceContext @ 0x55cbfa07a580] Driver not found in known nonstandard list, using standard behaviour.
[AVHWDeviceContext @ 0x55cbfa0aa080] 0.0: Intel(R) OpenCL HD Graphics / Intel(R) Arc(TM) A380 Graphics
[AVHWDeviceContext @ 0x55cbfa0aa080] Intel QSV to OpenCL mapping function found (clCreateFromVA_APIMediaSurfaceINTEL).
[AVHWDeviceContext @ 0x55cbfa0aa080] Intel QSV in OpenCL acquire function found (clEnqueueAcquireVA_APIMediaSurfacesINTEL).
[AVHWDeviceContext @ 0x55cbfa0aa080] Intel QSV in OpenCL release function found (clEnqueueReleaseVA_APIMediaSurfacesINTEL).
Hyper fast Audio and Video encoder
usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}...

Use -h to get full help or, even better, run 'man ffmpeg'
vainfo ✅
root@compute (23-06-05T:41Z) ~> vainfo --display drm --device /dev/dri/renderD128
Trying display: drm
libva info: VA-API version 1.18.0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_18
libva info: va_openDriver() returns 0
vainfo: VA-API version: 1.18 (libva 2.18.0)
vainfo: Driver version: Intel iHD driver for Intel(R) Gen Graphics - 23.1.6 ()
vainfo: Supported profile and entrypoints
      VAProfileNone                   : VAEntrypointVideoProc
      VAProfileNone                   : VAEntrypointStats
      VAProfileMPEG2Simple            : VAEntrypointVLD
      VAProfileMPEG2Main              : VAEntrypointVLD
      VAProfileH264Main               : VAEntrypointVLD
      VAProfileH264Main               : VAEntrypointEncSliceLP
      VAProfileH264High               : VAEntrypointVLD
      VAProfileH264High               : VAEntrypointEncSliceLP
      VAProfileJPEGBaseline           : VAEntrypointVLD
      VAProfileJPEGBaseline           : VAEntrypointEncPicture
      VAProfileH264ConstrainedBaseline: VAEntrypointVLD
      VAProfileH264ConstrainedBaseline: VAEntrypointEncSliceLP
      VAProfileHEVCMain               : VAEntrypointVLD
      VAProfileHEVCMain               : VAEntrypointEncSliceLP
      VAProfileHEVCMain10             : VAEntrypointVLD
      VAProfileHEVCMain10             : VAEntrypointEncSliceLP
      VAProfileVP9Profile0            : VAEntrypointVLD
      VAProfileVP9Profile0            : VAEntrypointEncSliceLP
      VAProfileVP9Profile1            : VAEntrypointVLD
      VAProfileVP9Profile1            : VAEntrypointEncSliceLP
      VAProfileVP9Profile2            : VAEntrypointVLD
      VAProfileVP9Profile2            : VAEntrypointEncSliceLP
      VAProfileVP9Profile3            : VAEntrypointVLD
      VAProfileVP9Profile3            : VAEntrypointEncSliceLP
      VAProfileHEVCMain12             : VAEntrypointVLD
      VAProfileHEVCMain422_10         : VAEntrypointVLD
      VAProfileHEVCMain422_12         : VAEntrypointVLD
      VAProfileHEVCMain444            : VAEntrypointVLD
      VAProfileHEVCMain444            : VAEntrypointEncSliceLP
      VAProfileHEVCMain444_10         : VAEntrypointVLD
      VAProfileHEVCMain444_10         : VAEntrypointEncSliceLP
      VAProfileHEVCMain444_12         : VAEntrypointVLD
      VAProfileHEVCSccMain            : VAEntrypointVLD
      VAProfileHEVCSccMain            : VAEntrypointEncSliceLP
      VAProfileHEVCSccMain10          : VAEntrypointVLD
      VAProfileHEVCSccMain10          : VAEntrypointEncSliceLP
      VAProfileHEVCSccMain444         : VAEntrypointVLD
      VAProfileHEVCSccMain444         : VAEntrypointEncSliceLP
      VAProfileAV1Profile0            : VAEntrypointVLD
      VAProfileAV1Profile0            : VAEntrypointEncSliceLP
      VAProfileHEVCSccMain444_10      : VAEntrypointVLD
      VAProfileHEVCSccMain444_10      : VAEntrypointEncSliceLP

Additional Context

In container jellyfin/jellyfin:10.8.10 :

User groups
root@jellyfin:/usr/lib/jellyfin-ffmpeg# id
uid=0(root) gid=0(root) groups=0(root),44(video),109,1000
/dev/dri

The video group is 44, the render group is 109

root@jellyfin:~# ls -al /dev/dri filesystem
total 0
drwxr-xr-x  3 root root       100 Jun  5 19:56 .
drwxr-xr-x 16 root root      4860 Jun  5 20:25 ..
drwxr-xr-x  2 root root        80 Jun  5 19:56 by-path
crw-rw----  1 root video 226,   0 Jun  5 19:56 card0
crw-rw----  1 root   109 226, 128 Jun  5 19:56 renderD128

On host:

Kernel
root@compute (23-06-05T:39Z) ~> uname -a
Linux compute 5.19.0-43-generic #44~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Mon May 22 13:39:36 UTC 2 x86_64 x86_64 x86_64 GNU/Linux
GPU Hardware Info
38: PCI 8300.0: 0300 VGA compatible controller (VGA)
  [Created at pci.386]
  Unique ID: ------
  Parent ID: ------
  SysFS ID: /devices/pci0000:80/0000:80:03.0/0000:81:00.0/0000:82:01.0/0000:83:00.0
  SysFS BusID: 0000:83:00.0
  Hardware Class: graphics card
  Model: "Intel VGA compatible controller"
  Vendor: pci 0x8086 "Intel Corporation"
  Device: pci 0x56a5
  SubVendor: pci 0x1849 "ASRock Incorporation"
  SubDevice: pci 0x6004
  Revision: 0x05
  Driver: "i915"
  Driver Modules: "i915"
  Memory Range: 0xfa000000-0xfaffffff (rw,non-prefetchable)
  Memory Range: 0xe0000000-0xefffffff (ro,non-prefetchable)
  Memory Range: 0x000c0000-0x000dffff (rw,non-prefetchable,disabled)
  IRQ: 94 (130 events)
  Module Alias: "pci:v00008086d000056A5sv00001849sd00006004bc03sc00i00"
  Driver Info #0:
    Driver Status: i915 is active
    Driver Activation Cmd: "modprobe i915"
  Config Status: cfg=new, avail=yes, need=no, active=unknown
  Attached to: #19 (PCI bridge)
GuC & HuC
root@compute (23-06-05T:30Z) ~> cat /sys/kernel/debug/dri/0/gt0/uc/guc_info
GuC firmware: i915/dg2_guc_70.6.4.bin
        status: RUNNING
        version: found 70.6.4
        uCode: 377152 bytes
        RSA: 384 bytes
GuC status 0x8003f0ec:
        Bootrom status = 0x76
        uKernel status = 0xf0
        MIA Core status = 0x3
Scratch registers:
         0:     0x0
         1:     0xa03d7
         2:     0x2c800
         3:     0x4
         4:     0x40
         5:     0x400
         6:     0x56a50005
         7:     0x0
         8:     0x0
         9:     0x0
        10:     0x0
        11:     0x0
        12:     0x0
        13:     0x0
        14:     0x0
        15:     0x0

GuC log relay not created
CT enabled
H2G Space: 1800
Head: 573
Tail: 573
G2H Space: 12284
Head: 129
Tail: 129
GuC Submission API Version: 1.1.5
GuC Number Outstanding Submission G2H: 0
GuC tasklet count: 0
Requests in GuC submit tasklet:

Global scheduling policies:
  DPC promote time   = 500000
  Max num work items = 15
  Flags              = 0
root@compute (23-06-05T:32Z) ~> cat /sys/kernel/debug/dri/0/gt0/uc/huc_info
HuC firmware: i915/dg2_huc_7.10.3_gsc.bin
        status: RUNNING
        version: found 7.10.3
        uCode: 0 bytes
        RSA: 0 bytes
HuC status: 0x00164001
/dev/dri
root@compute (23-06-05T:32Z) ~> ls -al /dev/dri
total 0
drwxr-xr-x  3 root root        100 Jun  5 19:56 .
drwxr-xr-x 20 root root       5040 Jun  5 20:29 ..
drwxr-xr-x  2 root root         80 Jun  5 19:56 by-path
crw-rw----  1 root video  226,   0 Jun  5 19:56 card0
crw-rw----  1 root render 226, 128 Jun  5 19:56 renderD128
@AWildBeard AWildBeard added the bug Something isn't working label Jun 5, 2023
@AWildBeard
Copy link
Author

AWildBeard commented Jun 5, 2023

Gave the latest jellyfin-ffmpeg6_6.0-3-jammy_amd64.deb a try on my host and same issue where the ubuntu packaged one (demonstrated in original bug message) works as expected;

jellyfin-ffmpeg6_6.0-3-jammy_amd64.deb ❌
root@compute (23-06-05T:54Z) ~> dpkg -i jellyfin-ffmpeg6_6.0-3-jammy_amd64.deb
(Reading database ... 121929 files and directories currently installed.)
Preparing to unpack jellyfin-ffmpeg6_6.0-3-jammy_amd64.deb ...
Unpacking jellyfin-ffmpeg6 (6.0-3-jammy) over (6.0-3-jammy) ...
Setting up jellyfin-ffmpeg6 (6.0-3-jammy) ...
Processing triggers for libc-bin (2.35-0ubuntu3.1) ...

root@compute (23-06-05T:54Z) ~> cd /usr/lib/jellyfin-ffmpeg/

root@compute (23-06-05T:55Z) .../jellyfin-ffmpeg> ./ffmpeg -v verbose -init_hw_device vaapi=va:/dev/dri/renderD128 -init_hw_device opencl@va
ffmpeg version 6.0-Jellyfin Copyright (c) 2000-2023 the FFmpeg developers
  built with gcc 11 (Ubuntu 11.3.0-1ubuntu1~22.04.1)
  configuration: --prefix=/usr/lib/jellyfin-ffmpeg --target-os=linux --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-libvpl --enable-ffnvcodec --enable-cuda --enable-cuda-llvm --enable-cuvid --enable-nvdec --enable-nvenc
  libavutil      58.  2.100 / 58.  2.100
  libavcodec     60.  3.100 / 60.  3.100
  libavformat    60.  3.100 / 60.  3.100
  libavdevice    60.  1.100 / 60.  1.100
  libavfilter     9.  3.100 /  9.  3.100
  libswscale      7.  1.100 /  7.  1.100
  libswresample   4. 10.100 /  4. 10.100
  libpostproc    57.  1.100 / 57.  1.100
[AVHWDeviceContext @ 0x55fe9c2854c0] libva: VA-API version 1.18.0
[AVHWDeviceContext @ 0x55fe9c2854c0] libva: Trying to open /usr/lib/jellyfin-ffmpeg/lib/dri/iHD_drv_video.so
[AVHWDeviceContext @ 0x55fe9c2854c0] libva: Found init function __vaDriverInit_1_18
double free or corruption (!prev)
Aborted (core dumped)

@nyanmisaka
Copy link
Member

@AWildBeard Please refer to these comments:

DKMS is not supported by Jellyfin FFmpeg. We only support Arc GPU on Linux 6.2+ kernels and the public media-driver.
https://jellyfin.org/docs/general/administration/hardware-acceleration/intel#arc-gpu-support

You can build a custom version of Jellyfin FFmpeg with DKMS support enabled by following #191. The reason why we can't do that in our builds is - it's incompatible with any public kernel and will break the hardware transcoding on other intel graphics.

@nyanmisaka nyanmisaka closed this as not planned Won't fix, can't repro, duplicate, stale Jun 6, 2023
@AWildBeard
Copy link
Author

Thanks for getting back to me! I'll see if I can get away with building my own ffmpeg off of #191

@nyanmisaka
Copy link
Member

1, modify docker-build.sh by following #191

2, build jellyfin-ffmpeg deb package

  • ./build jammy amd64 /path/to/output for lsio image
  • ./build bullseye amd64 /path/to/output for official image

3, install the deb package into the container

@AWildBeard
Copy link
Author

I actually figured this out in parallel to you commenting! Doing the builds now! :D Thanks for commenting the procedure though!

@AWildBeard
Copy link
Author

Got it built.

Runs great on both the Ubuntu Server 22.04 LTS w/ HWE kernel (don't plan to downgrade back to normal stable now lol) host & in container

For anyone that reads this in the future because they too want A380 on LTS Ubuntu with Jellyfin-ffmpeg I'll document the one issue I had and it's fix;

Ran into a small issue with cloning a few of the "larger" git repos used. Namely;

  • AMF
  • Mesa

AFAICT it's just because these are big repos or have lots of history/objects. My issue cloning these repos could be due to any number of reasons; Killer WiFi card, doing this in WSL2 + Docker Desktop + Windows 11, Running Kubernetes in Docker Desktop, take your pick. My target deployment infra is not WSL2, etc for the record...

Error
error: RPC failed; curl 56 GnuTLS recv error (-54): Error in the pull function.
error: 1349 bytes of body are still expected
fetch-pack: unexpected disconnect while reading sideband packet
fatal: early EOF
fatal: fetch-pack: invalid index-pack output
Fix
while true; do
    [git clone command here] && break || sleep 5
done

As of #245 I needed to wrap that loop around the git clone commands on lines:

I also threw in;

git config --global http.maxRequestBuffer 524288000
git config --global core.compression 0

for the giggles

@martimors
Copy link

Just to be sure - this won't be an issue on 24.04, but until then the custom built debian package is the way to go?

@nyanmisaka
Copy link
Member

Just to be sure - this won't be an issue on 24.04, but until then the custom built debian package is the way to go?

Intel Arc will be supported by 24.04 LTS out of the box.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants