• Login
  • Register
  • Login Register
    Login
    Username/Email:
    Password:
    Or login with a social network below
  • Forum
  • Website
  • GitHub
  • Status
  • Translation
  • Features
  • Team
  • Rules
  • Help
  • Feeds
User Links
  • Login
  • Register
  • Login Register
    Login
    Username/Email:
    Password:
    Or login with a social network below

    Useful Links Forum Website GitHub Status Translation Features Team Rules Help Feeds
    Jellyfin Forum Support Troubleshooting SOLVED: Trying to get hardware acceleration to work with intel arc a380

     
    • 0 Vote(s) - 0 Average

    SOLVED: Trying to get hardware acceleration to work with intel arc a380

    user learns how to get hardware acceleration to work with Intel Arc A380 and Debian
    iif2fo
    Offline

    Junior Member

    Posts: 14
    Threads: 5
    Joined: 2024 Aug
    Reputation: 0
    #1
    2024-08-27, 12:20 AM (This post was last modified: 2024-08-27, 05:09 PM by iif2fo. Edited 5 times in total. Edit Reason: Added full lshw output )
    Hello, I'm trying to get hardware acceleration to work with my media server. But, I'm getting "Playback failed due to a fatal player error." when I try playing any videos. (Playback works if I disable hardware acceleration.)

    Here's my server hardware.
    Code:
    $ sudo lshw -c display
      *-display               
          description: VGA compatible controller
          product: DG2 [Arc A380]
          vendor: Intel Corporation
          physical id: 0
          bus info: pci@0000:03:00.0
          version: 05
          width: 64 bits
          clock: 33MHz
          capabilities: pciexpress msi pm vga_controller bus_master cap_list rom
          configuration: driver=i915 latency=0
          resources: irq:148 memory:91000000-91ffffff memory:80000000-8fffffff memory:92000000-921fffff
      *-display
          description: VGA compatible controller
          product: ASPEED Graphics Family
          vendor: ASPEED Technology, Inc.
          physical id: 0
          bus info: pci@0000:09:00.0
          logical name: /dev/fb0
          version: 41
          width: 32 bits
          clock: 33MHz
          capabilities: pm msi vga_controller cap_list rom fb
          configuration: depth=32 driver=ast latency=0 resolution=1024,768
          resources: irq:17 memory:93000000-93ffffff memory:94000000-9401ffff ioport:3000(size=128) memory:c0000-dffff


    $ sudo lshw -C processor
      *-cpu                   
          description: CPU
          product: Intel(R) Core(TM) i3-9300 CPU @ 3.70GHz
          vendor: Intel Corp.
          physical id: 29
          bus info: cpu@0
          version: 6.158.11
          serial: To Be Filled By O.E.M.
          slot: CPU
          size: 4276MHz
          capacity: 4300MHz
          width: 64 bits
          clock: 100MHz
          capabilities: lm fpu fpu_exception wp vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe
    syscall nx pdpe1gb rdtscp x86-64 constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cp
    l vmx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_
    fault epb pti ssbd ibrs ibpb stibp tpr_shadow flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid mpx rdseed adx smap clflushopt i
    ntel_pt xsaveopt xsavec xgetbv1 xsaves dtherm ida arat pln pts hwp hwp_notify hwp_act_window hwp_epp vnmi md_clear flush_l1d arch_capabilities cpufreq
          configuration: cores=4 enabledcores=4 microcode=244 threads=4

    (I have this Supermicro motherboard https://www.supermicro.com/en/products/m.../X11SCL-IF)

    I'm on plain Debian, no Docker.
    Code:
    $ uname -a
    Linux debian 6.9.7+bpo-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.9.7-1~bpo12+1 (2024-07-03) x86_64 GNU/Linux
    $ lsb_release -a
    No LSB modules are available.
    Distributor ID: Debian
    Description:    Debian GNU/Linux 12 (bookworm)
    Release:        12
    Codename:      bookworm

    I followed the steps here: https://jellyfin.org/docs/general/admini...nux-setups

    Code:
    # Installed jellyfin-ffmpeg6
    $ apt policy jellyfin-ffmpeg6
    jellyfin-ffmpeg6:
      Installed: 6.0.1-8-bookworm
      Candidate: 6.0.1-8-bookworm
      Version table:
    *** 6.0.1-8-bookworm 500
            500 https://nyc1.mirror.jellyfin.org/debian bookworm/main amd64 Packages
            100 /var/lib/dpkg/status

    # Installed intel-opencl-icd
    $ apt policy intel-opencl-icd
    intel-opencl-icd:
      Installed: 24.26.30049.6
      Candidate: 24.26.30049.6
      Version table:
    *** 24.26.30049.6 100
            100 /var/lib/dpkg/status
        22.43.24595.41-1 500
            500 http://deb.debian.org/debian bookworm/main amd64 Packages

    To install intel-opencl-icd, I went here https://github.com/intel/compute-runtime/releases and followed the instructions to download the debs with wget and install the debs manually.

    At least one renderD device exists.

    Code:
    $ ls -l /dev/dri
    total 0
    drwxr-xr-x 2 root root        100 Aug 26 16:22 by-path
    crw-rw---- 1 root video  226,  0 Aug 26 16:22 card0
    crw-rw---- 1 root video  226,  1 Aug 26 16:22 card1
    crw-rw---- 1 root render 226, 128 Aug 26 16:22 renderD128


    Then I tried doing step 7: "Check the supported QSV / VA-API codecs"

    Code:
    $ sudo /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

    I see iHD, so I'm guessing "iHD driver indicates support for the QSV and VA-API interfaces." applies to me? Not sure...

    But, then I feel like this is where things really go off the rails. It says "Failed to get number of OpenCL platforms".

    Code:
    $ sudo /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 12 (Debian 12.2.0-14)
      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-chromap
    rint --enable-opencl --enable-libdrm --enable-libxml2 --enable-libass --enable-libfreetype --enable-libfribidi --enable-libfontconfig --enable-libbluray --enabl
    e-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 --ena
    ble-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 @ 0x555ef97db480] libva: VA-API version 1.22.0
    [AVHWDeviceContext @ 0x555ef97db480] libva: Trying to open /usr/lib/jellyfin-ffmpeg/lib/dri/iHD_drv_video.so
    [AVHWDeviceContext @ 0x555ef97db480] libva: Found init function __vaDriverInit_1_22
    [AVHWDeviceContext @ 0x555ef97db480] libva: va_openDriver() returns 0
    [AVHWDeviceContext @ 0x555ef97db480] Initialised VAAPI connection: version 1.22
    [AVHWDeviceContext @ 0x555ef97db480] VAAPI driver: Intel iHD driver for Intel(R) Gen Graphics - 24.2.5 (12561f6).
    [AVHWDeviceContext @ 0x555ef97db480] Driver not found in known nonstandard list, using standard behaviour.
    [AVHWDeviceContext @ 0x555ef980a080] 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

    And then when I try clinfo, I get this.
    Code:
    $ sudo clinfo
    Number of platforms                              0

    ICD loader properties
      ICD loader Name                                OpenCL ICD Loader
      ICD loader Vendor                              OCL Icd free software
      ICD loader Version                              2.3.1
      ICD loader Profile                              OpenCL 3.0

    I also found this thread to try to fix the opencl no platforms error: https://forum.jellyfin.org/t-solved-arch...ranscoding
    I added this:
    Code:
    (Service)
    Environment="NEOReadDebugKeys=1"
    Environment="OverrideGpuAddressSpace=48"
    via sudo systemctl edit jellyfin.service, but it didn't seem to do anything.

    Nevertheless, I decided to try enabling hardware acceleration in Jellyfin.

    I went to dashboard/playback/transcoding and enabled:
    Hardware acceleration:  Video Acceleration API (VAAPI)
    VA-API Device: /dev/dri/renderD128
    Enable hardware decoding for: H264, VC1, HEVC 10bit, VP910bit
    Hardware encoding options: Enable hardware encoding
    Encoding format options: Allow encoding in HEVC format, Allow encoding in AV1 format, Enable VPP Tone mapping, Enable Tone mapping

    And then when I try to play anything, I get "Playback failed due to a fatal player error.".

    I also attached some logs. The logs start from when I press play and go until I get the fatal player error message.

    Maybe the most interesting part of the logs is this.
    Code:
    Aug 26 17:08:14 jellyfin[970]: [17:08:14] [INF] /usr/lib/jellyfin-ffmpeg/ffmpeg -analyzeduration 200M -probesize 1G -noautorotate -i file:"/data/jellyfin/global/shows/silicon-valley_2014/season-01/silicon-valley_s01e01.mkv" -map_metadata -1 -map_chapters -1 -threads 0 -map 0:0 -map 0:1 -map -0:s -codec:v:0 av1_vaapi -rc_mode VBR -b:v 5446614 -maxrate 5446614 -bufsize 10893228 -force_key_frames:0 "expr:gte(t,n_forced*3)" -vf "setparams=color_primaries=bt709:color_trc=bt709:colorspace=bt709,scale=trunc(min(max(iw\,ih*a)\,min(1920\,1080*a))/2)*2:trunc(min(max(iw/a\,ih)\,min(1920/a\,1080))/2)*2,format=nv12,hwupload_vaapi" -codec:a:0 libfdk_aac -ac 2 -vbr:a 5 -af "volume=2" -copyts -avoid_negative_ts disabled -max_muxing_queue_size 2048 -f hls -max_delay 5000000 -hls_time 3 -hls_segment_type fmp4 -hls_fmp4_init_filename "9ace91e7131ce94ddcfcffc9ec0969c2-1.mp4" -start_number 0 -hls_segment_filename "/var/cache/jellyfin/transcodes/9ace91e7131ce94ddcfcffc9ec0969c2%d.mp4" -hls_playlist_type vod -hls_list_size 0 -y "/var/cache/jellyfin/transcodes/9ace91e7131ce94ddcfcffc9ec0969c2.m3u8"
    Aug 26 17:08:14 jellyfin[970]: [17:08:14] [ERR] FFmpeg exited with code 1
    Aug 26 17:08:14 jellyfin[970]: [17:08:14] [ERR] Error processing request. URL GET /videos/216f7c3b-e3e1-8902-4e55-9896e7b234e8/hls1/main/-1.mp4.
    Aug 26 17:08:14 jellyfin[970]: MediaBrowser.Common.FfmpegException: FFmpeg exited with code 1


    Attached Files
    .txt   jellyfin-log.txt (Size: 24.81 KB / Downloads: 88)
    Go to solution
    TheDreadPirate
    Offline

    Community Moderator

    Posts: 15,374
    Threads: 10
    Joined: 2023 Jun
    Reputation: 460
    Country:United States
    #2
    2024-08-27, 12:54 AM
    Do you have another GPU in the system? Even an iGPU? If it is an iGPU, you will have to disable it in the BIOS.
    Jellyfin 10.10.7 (Docker)
    Ubuntu 24.04.2 LTS w/HWE
    Intel i3 12100
    Intel Arc A380
    OS drive - SK Hynix P41 1TB
    Storage
        4x WD Red Pro 6TB CMR in RAIDZ1
    [Image: GitHub%20Sponsors-grey?logo=github]
    iif2fo
    Offline

    Junior Member

    Posts: 14
    Threads: 5
    Joined: 2024 Aug
    Reputation: 0
    #3
    2024-08-27, 02:17 AM
    My Supermicro X11SCL-iF motherboard has a Intel C242 chipset and does come with onboard video. I actually truncated the original output from lshw. I have now updated the original post to correctly reflect that there were two entries for the lshw command.

    After disabling the onboard video, this is the full output of lshw.
    Code:
    $ sudo lshw -c display
      *-display               
          description: VGA compatible controller
          product: DG2 [Arc A380]
          vendor: Intel Corporation
          physical id: 0
          bus info: pci@0000:03:00.0
          version: 05
          width: 64 bits
          clock: 33MHz
          capabilities: pciexpress msi pm vga_controller bus_master cap_list rom
          configuration: driver=i915 latency=0
          resources: irq:148 memory:91000000-91ffffff memory:80000000-8fffffff memory:c0000-dffff

    Now there is only 1 display entry in total.

    I disabled the onboard video for my motherboard by following these instructions: https://www.supermicro.com/support/faqs/...?faq=21023

    Quote:(a)  BIOS settings >> Advanced >> PCI settings >> changed VGA priorities to “Off Board”, save and then exit. (b) Change JPG1 Jumper from Pin1-2 {Enable} to Pin2-3 {Disable}.

    (This also had the side effect of disabling the terminal video in the motherboard management console.)

    After disabling the video onboard, I tried playing a file again. However, I'm still seeing the same error: "Playback failed due to a fatal player error"

    I found this error in the logs during the playback attempt. (Same as before.)
    Code:
    Aug 26 19:11:50 jellyfin[613]: [19:11:50] [INF] /usr/lib/jellyfin-ffmpeg/ffmpeg -analyzeduration 200M -probesize 1G -init_hw_device vaapi=va:/dev/dri/renderD128,driver=iHD -noautorotate -i file:"/data/jellyfin/global/shows/silicon-valley_2014/season-01/silicon-valley_s01e01.mkv" -map_metadata -1 -map_chapters -1 -threads 0 -map 0:0 -map 0:1 -map -0:s -codec:v:0 av1_vaapi -rc_mode VBR -b:v 5446614 -maxrate 5446614 -bufsize 10893228 -force_key_frames:0 "expr:gte(t,n_forced*3)" -vf "setparams=color_primaries=bt709:color_trc=bt709:colorspace=bt709,scale=trunc(min(max(iw\,ih*a)\,min(1920\,1080*a))/2)*2:trunc(min(max(iw/a\,ih)\,min(1920/a\,1080))/2)*2,format=nv12,hwupload_vaapi" -codec:a:0 libfdk_aac -ac 2 -vbr:a 5 -af "volume=2" -copyts -avoid_negative_ts disabled -max_muxing_queue_size 2048 -f hls -max_delay 5000000 -hls_time 3 -hls_segment_type fmp4 -hls_fmp4_init_filename "20af5c47b352e69bd2d97ac0caf343dc-1.mp4" -start_number 0 -hls_segment_filename "/var/cache/jellyfin/transcodes/20af5c47b352e69bd2d97ac0caf343dc%d.mp4" -hls_playlist_type vod -hls_list_size 0 -y "/var/cache/jellyfin/transcodes/20af5c47b352e69bd2d97ac0caf343dc.m3u8"
    Aug 26 19:11:50 jellyfin[613]: [19:11:50] [ERR] FFmpeg exited with code 1
    Aug 26 19:11:50 jellyfin[613]: [19:11:50] [ERR] Error processing request. URL GET /videos/216f7c3b-e3e1-8902-4e55-9896e7b234e8/hls1/main/-1.mp4.
    TheDreadPirate
    Offline

    Community Moderator

    Posts: 15,374
    Threads: 10
    Joined: 2023 Jun
    Reputation: 460
    Country:United States
    #4
    2024-08-27, 02:28 AM
    Can you share the ffmpeg logs in full via pastebin?

    It will be in the same directory and the file name will start with FFmpeg.Transcode.
    Jellyfin 10.10.7 (Docker)
    Ubuntu 24.04.2 LTS w/HWE
    Intel i3 12100
    Intel Arc A380
    OS drive - SK Hynix P41 1TB
    Storage
        4x WD Red Pro 6TB CMR in RAIDZ1
    [Image: GitHub%20Sponsors-grey?logo=github]
    iif2fo
    Offline

    Junior Member

    Posts: 14
    Threads: 5
    Joined: 2024 Aug
    Reputation: 0
    #5
    2024-08-27, 04:52 AM (This post was last modified: 2024-08-27, 05:08 AM by iif2fo. Edited 3 times in total.)
    OK, I grabbed the log file from the /var/log/jellyfin directory. I made sure to first try playback and grabbed the latest log created from that failed attempt. The file is called FFmpeg.Transcode-2024-08-26_21-40-02_216f7c3be3e189024e559896e7b234e8_ab653dba.log.

    Here's the pastebin link: https://pastebin.com/ejweC4nS

    Here's the error just at the end of the logs.

    Code:
    [libfdk_aac @ 0x56136e405180] Note, the VBR setting is unsupported and only works with some parameter combinations
    [av1_vaapi @ 0x56136e407200] No usable encoding profile found.
    [vost#0:0/av1_vaapi @ 0x56136e3c2100] 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 @ 0x56136e405180] 2 frames left in the queue on closing
    Conversion failed!

    I also attached a screenshot of what my transcoding page looks like.

    Also, I guess my vainfo shouldn't say this, huh. Did I just buy the wrong GPU?
    Code:
    vainfo: Supported profile and entrypoints
          VAProfileNone                  : VAEntrypointVideoProc
          VAProfileNone                  : VAEntrypointStats

    Here's the GPU I have: https://www.newegg.com/asrock-low-profil...814930110R

    Here's the CPU I have: https://www.intel.com/content/www/us/en/...tions.html


    Attached Files Thumbnail(s)
       
    iif2fo
    Offline

    Junior Member

    Posts: 14
    Threads: 5
    Joined: 2024 Aug
    Reputation: 0
    #6
    2024-08-27, 05:52 AM
    Oops, I forgot to install necessary packages.

    The Debian wiki helped. https://wiki.debian.org/HardwareVideoAcceleration

    I added this to my /etc/apt/sources.list file.

    Code:
    deb http://deb.debian.org/debian/ bookworm main non-free-firmware contrib non-free
    deb-src http://deb.debian.org/debian/ bookworm main non-free-firmware contrib non-free

    Then I installed these packages.

    Code:
    $ sudo apt update
    $ sudo apt install intel-media-va-driver
    $ sudo apt install intel-media-va-driver-non-free
    $ sudo apt install firmware-misc-nonfree

    I also added i915.enable_guc=2 to my kernel parameters.

    I updated /etc/default/grub to add:

    Code:
    GRUB_CMDLINE_LINUX_DEFAULT="quiet i915.enable_guc=2"

    Then I updated grub and rebooted.

    Code:
    $ sudo update-grub
    $ sudo reboot

    Now my vainfo, looks better!

    Code:
    $ sudo /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
          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
          VAProfileVP9Profile1            : VAEntrypointVLD
          VAProfileVP9Profile2            : VAEntrypointVLD
          VAProfileVP9Profile3            : VAEntrypointVLD
          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

    AND my ffmpeg opencl command looks good.

    Code:
    $ sudo /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 12 (Debian 12.2.0-14)
      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 @ 0x5647c6f23480] libva: VA-API version 1.22.0
    [AVHWDeviceContext @ 0x5647c6f23480] libva: Trying to open /usr/lib/jellyfin-ffmpeg/lib/dri/iHD_drv_video.so
    [AVHWDeviceContext @ 0x5647c6f23480] libva: Found init function __vaDriverInit_1_22
    [AVHWDeviceContext @ 0x5647c6f23480] libva: va_openDriver() returns 0
    [AVHWDeviceContext @ 0x5647c6f23480] Initialised VAAPI connection: version 1.22
    [AVHWDeviceContext @ 0x5647c6f23480] VAAPI driver: Intel iHD driver for Intel(R) Gen Graphics - 24.2.5 (12561f6).
    [AVHWDeviceContext @ 0x5647c6f23480] Driver not found in known nonstandard list, using standard behaviour.
    [AVHWDeviceContext @ 0x5647c6f54fc0] 0.0: Intel(R) OpenCL Graphics / Intel(R) Arc(TM) A380 Graphics
    [AVHWDeviceContext @ 0x5647c6f54fc0] Intel QSV to OpenCL mapping function found (clCreateFromVA_APIMediaSurfaceINTEL).
    [AVHWDeviceContext @ 0x5647c6f54fc0] Intel QSV in OpenCL acquire function found (clEnqueueAcquireVA_APIMediaSurfacesINTEL).
    [AVHWDeviceContext @ 0x5647c6f54fc0] 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'

    Unfortunately, playback still fails... 😭

    Here's the new pastebin: https://pastebin.com/ePdfHQ7G

    Code:
    [av1_vaapi @ 0x5640619dcb00] Failed to create encode pipeline context: 2 (resource allocation failed).
    [vost#0:0/av1_vaapi @ 0x5640619caf00] Error initializing output stream: Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height
    nyanmisaka
    Offline

    Team Member

    Posts: 247
    Threads: 0
    Joined: 2023 Jun
    Reputation: 10
    #7
    2024-08-27, 06:23 AM (This post was last modified: 2024-08-27, 06:24 AM by nyanmisaka. Edited 1 time in total.)
    https://wiki.debian.org/HardwareVideoAcc...stallation
    This doc is wrong for 12th Gen+ Intel iGPUs and Arc dGPUs. Either keep enable_guc unset, or set them to enable_guc=3.

    See also https://jellyfin.org/docs/general/admini...e-on-linux

    If the problem persists, please attach the output of sudo dmesg | grep i915.
    iif2fo
    Offline

    Junior Member

    Posts: 14
    Threads: 5
    Joined: 2024 Aug
    Reputation: 0
    #8
    2024-08-27, 07:21 AM
    I tried playback with i915.enable_guc=3 and without it in the kernel parameters. Both ways gave me "Playback failed due to a fatal player error".

    With i915.enable_guc=3
    Code:
    $ sudo dmesg | grep i915
    [    0.000000] Command line: BOOT_IMAGE=/boot/vmlinuz-6.9.7+bpo-amd64 root=UUID=d32981a3-b49d-424c-aa78-ea43b2daa336 ro quiet i915.enable_guc=3
    [    0.017292] Kernel command line: BOOT_IMAGE=/boot/vmlinuz-6.9.7+bpo-amd64 root=UUID=d32981a3-b49d-424c-aa78-ea43b2daa336 ro quiet i915.enable_guc=3
    [    2.896045] i915 0000:03:00.0: [drm] VT-d active for gfx access
    [    2.896222] i915 0000:03:00.0: vgaarb: deactivate vga console
    [    2.896230] i915 0000:03:00.0: [drm] Can't resize LMEM BAR - platform support is missing
    [    2.896240] i915 0000:03:00.0: [drm] Using a reduced BAR size of 256MiB. Consider enabling 'Resizable BAR' or similar, if available in the BIOS.
    [    2.912825] i915 0000:03:00.0: vgaarb: VGA decodes changed: olddecodes=io+mem,decodes=io+mem:owns=io+mem
    [    2.916213] i915 0000:03:00.0: [drm] Finished loading DMC firmware i915/dg2_dmc_ver2_08.bin (v2.8)
    [    3.170277] i915 0000:03:00.0: [drm] GT0: GuC firmware i915/dg2_guc_70.bin (70.12.1) is recommended, but only i915/dg2_guc_70.bin (70.5.1) was found
    [    3.170282] i915 0000:03:00.0: [drm] GT0: Consider updating your linux-firmware pkg or downloading from https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/tree/i915
    [    3.170677] i915 0000:03:00.0: firmware: failed to load i915/dg2_huc_gsc.bin (-2)
    [    3.170761] i915 0000:03:00.0: firmware: failed to load i915/dg2_huc_gsc.bin (-2)
    [    3.170763] i915 0000:03:00.0: [drm] *ERROR* GT0: HuC firmware i915/dg2_huc_gsc.bin: fetch failed -ENOENT
    [    3.170769] i915 0000:03:00.0: [drm] GT0: HuC firmware(s) can be downloaded from https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/tree/i915
    [    3.174841] i915 0000:03:00.0: [drm] GT0: GuC firmware i915/dg2_guc_70.bin version 70.5.1
    [    3.188274] i915 0000:03:00.0: [drm] GT0: GUC: submission enabled
    [    3.188279] i915 0000:03:00.0: [drm] GT0: GUC: SLPC enabled
    [    3.188533] i915 0000:03:00.0: [drm] GT0: GUC: RC enabled
    [    3.225835] [drm] Initialized i915 1.6.0 20230929 for 0000:03:00.0 on minor 0
    [    3.272471] i915 0000:03:00.0: [drm] Cannot find any crtc or sizes
    [    3.272588] snd_hda_intel 0000:04:00.0: bound 0000:03:00.0 (ops i915_audio_component_bind_ops [i915])
    [    3.288076] mei i915.mei-gscfi.768-46e0c1fb-a546-414f-9170-b7f46d57b4ad: Could not read FW version ret = -19
    [    3.288080] mei i915.mei-gscfi.768-46e0c1fb-a546-414f-9170-b7f46d57b4ad: FW version command failed -5
    [    3.296478] i915 0000:03:00.0: [drm] Cannot find any crtc or sizes

    Without guc.
    Code:
    $ sudo dmesg | grep i915
    [    2.609512] i915 0000:03:00.0: [drm] VT-d active for gfx access
    [    2.616628] i915 0000:03:00.0: vgaarb: deactivate vga console
    [    2.616927] i915 0000:03:00.0: [drm] Can't resize LMEM BAR - platform support is missing
    [    2.616939] i915 0000:03:00.0: [drm] Using a reduced BAR size of 256MiB. Consider enabling 'Resizable BAR' or similar, if available in the BIOS.
    [    2.632133] i915 0000:03:00.0: vgaarb: VGA decodes changed: olddecodes=io+mem,decodes=io+mem:owns=io+mem
    [    2.635220] i915 0000:03:00.0: [drm] Finished loading DMC firmware i915/dg2_dmc_ver2_08.bin (v2.8)
    [    2.890739] i915 0000:03:00.0: [drm] GT0: GuC firmware i915/dg2_guc_70.bin (70.12.1) is recommended, but only i915/dg2_guc_70.bin (70.5.1) was found
    [    2.890744] i915 0000:03:00.0: [drm] GT0: Consider updating your linux-firmware pkg or downloading from https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/tree/i915
    [    2.891139] i915 0000:03:00.0: firmware: failed to load i915/dg2_huc_gsc.bin (-2)
    [    2.891223] i915 0000:03:00.0: firmware: failed to load i915/dg2_huc_gsc.bin (-2)
    [    2.891225] i915 0000:03:00.0: [drm] *ERROR* GT0: HuC firmware i915/dg2_huc_gsc.bin: fetch failed -ENOENT
    [    2.891232] i915 0000:03:00.0: [drm] GT0: HuC firmware(s) can be downloaded from https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/tree/i915
    [    2.895164] i915 0000:03:00.0: [drm] GT0: GuC firmware i915/dg2_guc_70.bin version 70.5.1
    [    2.907766] i915 0000:03:00.0: [drm] GT0: GUC: submission enabled
    [    2.907769] i915 0000:03:00.0: [drm] GT0: GUC: SLPC enabled
    [    2.908008] i915 0000:03:00.0: [drm] GT0: GUC: RC enabled
    [    2.945846] [drm] Initialized i915 1.6.0 20230929 for 0000:03:00.0 on minor 0
    [    2.968522] i915 0000:03:00.0: [drm] Cannot find any crtc or sizes
    [    2.979634] mei_gsc i915.mei-gscfi.768: cl:host=01 me=33 fw disconnect request received
    [    2.979663] mei i915.mei-gscfi.768-e2c2afa2-3817-4d19-9d95-06b16b588a5d: Could not read FW version ret = -19
    [    2.979664] mei i915.mei-gscfi.768-e2c2afa2-3817-4d19-9d95-06b16b588a5d: FW version command failed -5
    [    2.982840] mei i915.mei-gscfi.768-46e0c1fb-a546-414f-9170-b7f46d57b4ad: Could not read FW version ret = -19
    [    2.982842] mei i915.mei-gscfi.768-46e0c1fb-a546-414f-9170-b7f46d57b4ad: FW version command failed -5
    [    2.992516] i915 0000:03:00.0: [drm] Cannot find any crtc or sizes
    [    3.016511] snd_hda_intel 0000:04:00.0: bound 0000:03:00.0 (ops i915_audio_component_bind_ops [i915])
    [    3.040456] i915 0000:03:00.0: [drm] Cannot find any crtc or sizes

    The transcode fails with:
    Code:
    [av1_vaapi @ 0x55be95d2ec80] Failed to map output buffers: 24 (internal encoding error).
    [av1_vaapi @ 0x55be95d2ec80] Output failed: -5.
    [vost#0:0/av1_vaapi @ 0x55be95d3bec0] Error submitting video frame to the encoder

    Pastebin: https://pastebin.com/a0Bc5y7M

    I figure maybe it's easier to try to configure hardware acceleration without i915.enable_guc=3 since I don't really need Low-Power Encoding... yet.
    nyanmisaka
    Offline

    Team Member

    Posts: 247
    Threads: 0
    Joined: 2023 Jun
    Reputation: 10
    #9
    2024-08-27, 09:10 AM (This post was last modified: 2024-08-27, 09:11 AM by nyanmisaka. Edited 1 time in total.)
    Apparently the linux firmware (i915/dg2*.bin) on Debian bookworm is outdated or missing. Please follow this tutorial to get them.

    https://jellyfin.org/docs/general/admini...e-on-linux

    Arc GPU only support low-power encoding. So these firmware is a must have.
    1
    iif2fo
    Offline

    Junior Member

    Posts: 14
    Threads: 5
    Joined: 2024 Aug
    Reputation: 0
    #10
    2024-08-27, 03:11 PM (This post was last modified: 2024-08-27, 05:10 PM by iif2fo. Edited 1 time in total.)
    Huh, I just noticed I installed "firmware-misc-nonfree" previously. I have not
    installed "firmware-linux-nonfree", as per the LE instructions.
    https://jellyfin.org/docs/general/admini...e-on-linux

    I tried that first.
    Code:
    sudo apt install firmware-linux-nonfree

    Then I added i915.enable_guc=3 back in my kernel parameters in /etc/default/grub.
    Code:
    GRUB_CMDLINE_LINUX_DEFAULT="quiet i915.enable_guc=3"
    and then sudo update-grub and rebooted.

    Still got the message about the old GuC firmware.

    I wasn't sure if firmware-misc-nonfree or firmware-linux-nonfree installed i915
    firmware. I didn't want to overwrite the files when I did the git clone later.
    This dpkg command gives me an empty result, so I think I'm ok on that front.

    Code:
    $ dpkg -L firmware-misc-nonfree | grep "/usr/lib/firmware"
    $ dpkg -L firmware-linux-nonfree | grep "/usr/lib/firmware"

    Next, I downloaded the firmware.

    Code:
    git clone --depth=1 git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git

    Since I already had a /usr/lib/firmware/i915 directory, I decided to back that
    up first because I noticed the new firmware files are different from my
    existing files.

    Code:
    # backup current
    sudo cp -r /usr/lib/firmware/i915/ ./i915-bak

    # delete current
    sudo rm -rf /usr/lib/firmware/i915/

    # install new
    sudo cp -r linux-firmware/i915/ /usr/lib/firmware/

    Next I ran
    Code:
    sudo update-initramfs -u
    sudo update-grub
    sudo reboot

    Cool, output looks good.
    Code:
    $ grep "i915" dmesg-07-47.txt
    [    0.000000] Command line: BOOT_IMAGE=/boot/vmlinuz-6.9.7+bpo-amd64 root=UUID=d32981a3-b49d-424c-aa78-ea43b2daa336 ro quiet i915.enable_guc=3
    [    0.017325] Kernel command line: BOOT_IMAGE=/boot/vmlinuz-6.9.7+bpo-amd64 root=UUID=d32981a3-b49d-424c-aa78-ea43b2daa336 ro quiet i915.enable_guc=3
    [    2.610689] i915 0000:03:00.0: [drm] VT-d active for gfx access
    [    2.610855] i915 0000:03:00.0: vgaarb: deactivate vga console
    [    2.610863] i915 0000:03:00.0: [drm] Can't resize LMEM BAR - platform support is missing
    [    2.610874] i915 0000:03:00.0: [drm] Using a reduced BAR size of 256MiB. Consider enabling 'Resizable BAR' or similar, if available in the BIOS.
    [    2.625674] i915 0000:03:00.0: vgaarb: VGA decodes changed: olddecodes=io+mem,decodes=io+mem:owns=io+mem
    [    2.628553] i915 0000:03:00.0: [drm] Finished loading DMC firmware i915/dg2_dmc_ver2_08.bin (v2.8)
    [    2.894668] i915 0000:03:00.0: [drm] GT0: GuC firmware i915/dg2_guc_70.bin version 70.29.2
    [    2.894672] i915 0000:03:00.0: [drm] GT0: HuC firmware i915/dg2_huc_gsc.bin version 7.10.16
    [    2.903743] i915 0000:03:00.0: [drm] GT0: GUC: submission enabled
    [    2.903757] i915 0000:03:00.0: [drm] GT0: GUC: SLPC enabled
    [    2.903963] i915 0000:03:00.0: [drm] GT0: GUC: RC enabled
    [    2.941522] [drm] Initialized i915 1.6.0 20230929 for 0000:03:00.0 on minor 0
    [    2.988526] i915 0000:03:00.0: [drm] Cannot find any crtc or sizes
    [    2.988570] snd_hda_intel 0000:04:00.0: bound 0000:03:00.0 (ops i915_audio_component_bind_ops [i915])
    [    3.004904] mei i915.mei-gscfi.768-46e0c1fb-a546-414f-9170-b7f46d57b4ad: Could not read FW version ret = -19
    [    3.004907] mei i915.mei-gscfi.768-46e0c1fb-a546-414f-9170-b7f46d57b4ad: FW version command failed -5
    [    3.016486] i915 0000:03:00.0: [drm] Cannot find any crtc or sizes
    [    3.684665] i915 0000:03:00.0: [drm] GT0: HuC: authenticated for all workloads
    [    3.684671] mei_pxp i915.mei-gsc.768-fbf6fcf1-96cf-4e2e-a6a6-1bab8cbe36b1: bound 0000:03:00.0 (ops i915_pxp_tee_component_ops [i915])

    I found the guc and huc info files!
    Code:
    sudo ls /sys/kernel/debug/dri/0000:03:00.0/gt0/uc/guc_info
    sudo ls /sys/kernel/debug/dri/0000:03:00.0/gt0/uc/huc_info

    I went to the dashboard transcoding page, /dashboard/playback/transcoding.

    And enabled these Hardware encoding options
    Code:
    Enable hardware encoding
    Enable Intel Low-Power H.264 hardware encoder
    Enable Intel Low-Power HEVC hardware encoder

    And now playback works! 🙌 Huzzah! Thanks, TheDreadPirate and nyanmisaka!
    1
    « Next Oldest | Next Newest »

    Users browsing this thread: 1 Guest(s)


    • View a Printable Version
    • Subscribe to this thread
    Forum Jump:

    Home · Team · Help · Contact
    © Designed by D&D - Powered by MyBB
    L


    Jellyfin

    The Free Software Media System

    Linear Mode
    Threaded Mode