Jellyfin Forum
SOLVED: My odyssey with a new server with Intel A40 Pro. - 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: My odyssey with a new server with Intel A40 Pro. (/t-solved-my-odyssey-with-a-new-server-with-intel-a40-pro)



My odyssey with a new server with Intel A40 Pro. - Itow - 2024-10-11

Hello, I would like to share my experience building a new server for Jellyfin.

Server specifications:
OS: Kernel: Jellyfin: Power consumption (measured at the UPS) :
  • Idle ~50 Watt
  • Transcoding of multiple streams 4k>1080p ~80Watt

First problem: temperatures 

The X550 chip easily reaches temperatures above 100°C and the chipset above 70°C, while the CPU reaches 55°C in idle mode and 80°C under load.

After modifying the chassis and adding fans:
[Image: roaq7hs.jpeg]
[Image: cHAFFTu.jpeg]

Second problem: server crashes after a few minutes of transcoding 

This was really a problem and I could not find the culprit. I ran stress test on cpu and memtest86 for hours without any problem.
For gpu I was not able to find an easy to use stresstest.

I found that the HuC and GuC firmware were not compatible with the GPU, so I installed the Intel firmware from backports, which solved the problem.
I was only able to solve the crashes that occurred after a few minutes of transcoding when I disabled ASPM for the GPU in the BIOS.

The only thing that still doesn't work is AV1 encoding.

Log:
Code:
[matroska,webm @ 0x644887cf5000] sub2video: using 3840x2160 canvas
libva info: VA-API version 1.22.0
libva info: Trying to open /usr/lib/jellyfin-ffmpeg/lib/dri/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_22
libva info: va_openDriver() returns 0
libva info: VA-API version 1.22.0
libva info: Trying to open /usr/lib/jellyfin-ffmpeg/lib/dri/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_22
libva info: va_openDriver() returns 0
libva info: VA-API version 1.22.0
libva info: Trying to open /usr/lib/jellyfin-ffmpeg/lib/dri/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_22
libva info: va_openDriver() returns 0
libva info: VA-API version 1.22.0
libva info: Trying to open /usr/lib/jellyfin-ffmpeg/lib/dri/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_22
libva info: va_openDriver() returns 0
[av1_qsv @ 0x64488ebce040] Current profile is unsupported
[av1_qsv @ 0x64488ebce040] Selected ratecontrol mode is unsupported
[av1_qsv @ 0x64488ebce040] Current frame rate is unsupported
[av1_qsv @ 0x64488ebce040] Current picture structure is unsupported
[av1_qsv @ 0x64488ebce040] Current resolution is unsupported
[av1_qsv @ 0x64488ebce040] Current pixel format is unsupported
[av1_qsv @ 0x64488ebce040] some encoding parameters are not supported by the QSV runtime. Please double check the input parameters.
[vost#0:0/av1_qsv @ 0x644887ed8980] Error initializing output stream: Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height
[libfdk_aac @ 0x644887e62980] 2 frames left in the queue on closing
Conversion failed!

At the moment I'm happy that the server is lightning fast and stable, but AV1 would be the cherry on top.


RE: My odyssey with a new server with Intel A40 Pro. - nyanmisaka - 2024-10-11

Arc A40 Pro should be no different from Arc A380 in hardware transcoding capabilities.

Some firmware or kernel options not enabled may cause AV1 encoding failures.
But your CPU contains an iGPU that doesn't support AV1 encoding. Make sure jellyfin is using the dGPU instead of the iGPU.

https://jellyfin.org/docs/general/administration/hardware-acceleration/intel/#arc-gpu-support

https://jellyfin.org/docs/general/administration/hardware-acceleration/intel/#configure-and-verify-lp-mode-on-linux


RE: My odyssey with a new server with Intel A40 Pro. - Itow - 2024-10-11

Thank you for your answer.

For renderD128 i get:
Code:
root@b24c045e1aef:/# /usr/lib/jellyfin-ffmpeg/vainfo --display drm --device /dev/dri/renderD128
Trying display: drm
libva info: VA-API version 1.22.0
libva info: Trying to open /usr/lib/jellyfin-ffmpeg/lib/dri/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_22
libva info: va_openDriver() returns 0
vainfo: VA-API version: 1.22 (libva 2.22.0)
vainfo: Driver version: Intel iHD driver for Intel(R) Gen Graphics - 24.2.5 (12561f6)
vainfo: Supported profile and entrypoints
      VAProfileNone                  : VAEntrypointVideoProc
      VAProfileNone                  : VAEntrypointStats
      VAProfileMPEG2Simple            : VAEntrypointVLD
      VAProfileMPEG2Simple            : VAEntrypointEncSlice
      VAProfileMPEG2Main              : VAEntrypointVLD
      VAProfileMPEG2Main              : VAEntrypointEncSlice
      VAProfileH264Main              : VAEntrypointVLD
      VAProfileH264Main              : VAEntrypointEncSlice
      VAProfileH264Main              : VAEntrypointFEI
      VAProfileH264Main              : VAEntrypointEncSliceLP
      VAProfileH264High              : VAEntrypointVLD
      VAProfileH264High              : VAEntrypointEncSlice
      VAProfileH264High              : VAEntrypointFEI
      VAProfileH264High              : VAEntrypointEncSliceLP
      VAProfileVC1Simple              : VAEntrypointVLD
      VAProfileVC1Main                : VAEntrypointVLD
      VAProfileVC1Advanced            : VAEntrypointVLD
      VAProfileJPEGBaseline          : VAEntrypointVLD
      VAProfileJPEGBaseline          : VAEntrypointEncPicture
      VAProfileH264ConstrainedBaseline: VAEntrypointVLD
      VAProfileH264ConstrainedBaseline: VAEntrypointEncSlice
      VAProfileH264ConstrainedBaseline: VAEntrypointFEI
      VAProfileH264ConstrainedBaseline: VAEntrypointEncSliceLP
      VAProfileHEVCMain              : VAEntrypointVLD
      VAProfileHEVCMain              : VAEntrypointEncSlice
      VAProfileHEVCMain              : VAEntrypointFEI
      VAProfileHEVCMain              : VAEntrypointEncSliceLP
      VAProfileHEVCMain10            : VAEntrypointVLD
      VAProfileHEVCMain10            : VAEntrypointEncSlice
      VAProfileHEVCMain10            : VAEntrypointEncSliceLP
      VAProfileVP9Profile0            : VAEntrypointVLD
      VAProfileVP9Profile0            : VAEntrypointEncSliceLP
      VAProfileVP9Profile1            : VAEntrypointVLD
      VAProfileVP9Profile1            : VAEntrypointEncSliceLP
      VAProfileVP9Profile2            : VAEntrypointVLD
      VAProfileVP9Profile2            : VAEntrypointEncSliceLP
      VAProfileVP9Profile3            : VAEntrypointVLD
      VAProfileVP9Profile3            : VAEntrypointEncSliceLP
      VAProfileHEVCMain12            : VAEntrypointVLD
      VAProfileHEVCMain12            : VAEntrypointEncSlice
      VAProfileHEVCMain422_10        : VAEntrypointVLD
      VAProfileHEVCMain422_10        : VAEntrypointEncSlice
      VAProfileHEVCMain422_12        : VAEntrypointVLD
      VAProfileHEVCMain422_12        : VAEntrypointEncSlice
      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
      VAProfileHEVCSccMain444_10      : VAEntrypointVLD
      VAProfileHEVCSccMain444_10      : VAEntrypointEncSliceLP

root@b24c045e1aef:/# /usr/lib/jellyfin-ffmpeg/ffmpeg -v verbose -init_hw_device vaapi=va:/dev/dri/renderD128 -init_hw_device opencl@va
ffmpeg version 6.0.1-Jellyfin Copyright (c) 2000-2023 the FFmpeg developers
  built with gcc 13 (Ubuntu 13.2.0-23ubuntu4)
  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-opencl --enable-libdrm --enable-libxml2 --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-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 @ 0x58e18273c300] libva: VA-API version 1.22.0
[AVHWDeviceContext @ 0x58e18273c300] libva: Trying to open /usr/lib/jellyfin-ffmpeg/lib/dri/iHD_drv_video.so
[AVHWDeviceContext @ 0x58e18273c300] libva: Found init function __vaDriverInit_1_22
[AVHWDeviceContext @ 0x58e18273c300] libva: va_openDriver() returns 0
[AVHWDeviceContext @ 0x58e18273c300] Initialised VAAPI connection: version 1.22
[AVHWDeviceContext @ 0x58e18273c300] VAAPI driver: Intel iHD driver for Intel(R) Gen Graphics - 24.2.5 (12561f6).
[AVHWDeviceContext @ 0x58e18273c300] Driver not found in known nonstandard list, using standard behaviour.
[AVHWDeviceContext @ 0x58e18273c7c0] 1.0: Intel(R) OpenCL Graphics / Intel(R) UHD Graphics 770
[AVHWDeviceContext @ 0x58e18273c7c0] Intel QSV to OpenCL mapping function found (clCreateFromVA_APIMediaSurfaceINTEL).
[AVHWDeviceContext @ 0x58e18273c7c0] Intel QSV in OpenCL acquire function found (clEnqueueAcquireVA_APIMediaSurfacesINTEL).
[AVHWDeviceContext @ 0x58e18273c7c0] 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'

and for renderD129:
Code:
root@b24c045e1aef:/# /usr/lib/jellyfin-ffmpeg/vainfo --display drm --device /dev/dri/renderD129
Trying display: drm
libva info: VA-API version 1.22.0
libva info: Trying to open /usr/lib/jellyfin-ffmpeg/lib/dri/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_22
libva info: va_openDriver() returns 0
vainfo: VA-API version: 1.22 (libva 2.22.0)
vainfo: Driver version: Intel iHD driver for Intel(R) Gen Graphics - 24.2.5 (12561f6)
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_10        : VAEntrypointEncSliceLP
      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

root@b24c045e1aef:/# /usr/lib/jellyfin-ffmpeg/ffmpeg -v verbose -init_hw_device vaapi=va:/dev/dri/renderD129 -init_hw_device opencl@va
ffmpeg version 6.0.1-Jellyfin Copyright (c) 2000-2023 the FFmpeg developers
  built with gcc 13 (Ubuntu 13.2.0-23ubuntu4)
  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-opencl --enable-libdrm --enable-libxml2 --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-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 @ 0x65379ae95300] libva: VA-API version 1.22.0
[AVHWDeviceContext @ 0x65379ae95300] libva: Trying to open /usr/lib/jellyfin-ffmpeg/lib/dri/iHD_drv_video.so
[AVHWDeviceContext @ 0x65379ae95300] libva: Found init function __vaDriverInit_1_22
[AVHWDeviceContext @ 0x65379ae95300] libva: va_openDriver() returns 0
[AVHWDeviceContext @ 0x65379ae95300] Initialised VAAPI connection: version 1.22
[AVHWDeviceContext @ 0x65379ae95300] VAAPI driver: Intel iHD driver for Intel(R) Gen Graphics - 24.2.5 (12561f6).
[AVHWDeviceContext @ 0x65379ae95300] Driver not found in known nonstandard list, using standard behaviour.
[AVHWDeviceContext @ 0x65379ae957c0] 0.0: Intel(R) OpenCL Graphics / Intel(R) Arc(TM) Pro A40/A50 Graphics
[AVHWDeviceContext @ 0x65379ae957c0] Intel QSV to OpenCL mapping function found (clCreateFromVA_APIMediaSurfaceINTEL).
[AVHWDeviceContext @ 0x65379ae957c0] Intel QSV in OpenCL acquire function found (clEnqueueAcquireVA_APIMediaSurfacesINTEL).
[AVHWDeviceContext @ 0x65379ae957c0] 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'

RenderD129 seems to be the Intel A40 Pro.

How do I force Intel QuickSync (QSV) to use renderD129? 

I can do that if I use VAAPI, but as far as I know QSV is better suited for modern hardware.

Thanks for helping out.

---edit

Tested VAAPI with renderD129:

Code:
Stream mapping:
  Stream #0:0 (hevc) -> setparams:default (graph 0)
  Stream #0:3 (pgssub) -> scale:default (graph 0)
  hwupload_vaapi:default (graph 0) -> Stream #0:0 (av1_vaapi)
  Stream #0:1 -> #0:1 (dts (dca) -> aac (libfdk_aac))
Press [q] to stop, [?] for help
[matroska,webm @ 0x63b94a739e80] sub2video: using 3840x2160 canvas
[av1_vaapi @ 0x63b94ba5e1c0] No usable encoding entrypoint found for profile VAProfileAV1Profile0 (32).
[vost#0:0/av1_vaapi @ 0x63b94ba739c0] Error initializing output stream: Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height
[libfdk_aac @ 0x63b94ba6fd00] 2 frames left in the queue on closing
Conversion failed!



RE: My odyssey with a new server with Intel A40 Pro. - nyanmisaka - 2024-10-11

Currently you can achieve this by passing only the specific GPU to docker.

Code:
/dev/dri/renderD129:/dev/dri/renderD129



RE: My odyssey with a new server with Intel A40 Pro. - Itow - 2024-10-11

Thank you, I will try it out right away.


RE: My odyssey with a new server with Intel A40 Pro. - Itow - 2024-10-11

Your awesome Thank you; it is working now. 

[Image: r7nRnmg.png]

But I will leave ASPM deactivated for fear of instability.