Jellyfin Forum
SOLVED: Can't get intel a380 working properly - 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: Can't get intel a380 working properly (/t-solved-can-t-get-intel-a380-working-properly)



Can't get intel a380 working properly - mrrichardcranium - 2024-05-20

I bought and installed the intel Arc A380 on some old rig I had lying around but I cannot seem to get hardware transcoding working correctly. When selecting QSV it defaults to using the integrated graphics on the intel chip, and when set to VAAPI specifying the A380 device it still doesn't appear to be using the graphics card. A few indicators being all 4 CPU cores at 100%, and the "intel_gpu_top" command showing no activity. Ive looked through the docs and forum and everything Ive seen suggests that my setup should work, but I am barely seeing playable frame rates for one 4k stream on the local network. 

Im hoping to get some suggestions as to what could be wrong with the configuration. 

Software details:

Jellyfin version: 10.9.2 
OS: Ubuntu Server 24.04 LTS (6.8.0-31-generic kernel)
Jellyfin FFmpeg6 version: 6.0.1-6-noble
intel-opencl-icd: 23.43.27642.40-1ubuntu3

System hardware:

CPU: Intel Core i5-6600K
GPU: Intel Arc A380
RAM: 16gb
Storage: 240GB ssd

Clients:
Web client on macOS. Both Firefox and Safari

vainfo output:

Trying display: drm
libva info: VA-API version 1.21.0
libva info: Trying to open /usr/lib/jellyfin-ffmpeg/lib/dri/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_21
libva info: va_openDriver() returns 0
vainfo: VA-API version: 1.21 (libva 2.21.0)
vainfo: Driver version: Intel iHD driver for Intel® Gen Graphics - 24.2.1 (0593864)
vainfo: Supported profile and entrypoints...

Checking OpenCL runtime status from docs:

[AVHWDeviceContext @ 0x59be1a617300] libva: VA-API version 1.21.0
[AVHWDeviceContext @ 0x59be1a617300] libva: Trying to open /usr/lib/jellyfin-ffmpeg/lib/dri/iHD_drv_video.so
[AVHWDeviceContext @ 0x59be1a617300] libva: Found init function __vaDriverInit_1_21
[AVHWDeviceContext @ 0x59be1a617300] libva: va_openDriver() returns 0
[AVHWDeviceContext @ 0x59be1a617300] Initialised VAAPI connection: version 1.21
[AVHWDeviceContext @ 0x59be1a617300] VAAPI driver: Intel iHD driver for Intel® Gen Graphics - 24.2.1 (0593864).
[AVHWDeviceContext @ 0x59be1a617300] Driver not found in known nonstandard list, using standard behaviour.
[AVHWDeviceContext @ 0x59be1a6177c0] 0.0: Intel® OpenCL Graphics / Intel® Arc™ A380 Graphics
[AVHWDeviceContext @ 0x59be1a6177c0] Intel QSV to OpenCL mapping function found (clCreateFromVA_APIMediaSurfaceINTEL).
[AVHWDeviceContext @ 0x59be1a6177c0] Intel QSV in OpenCL acquire function found (clEnqueueAcquireVA_APIMediaSurfacesINTEL).
[AVHWDeviceContext @ 0x59be1a6177c0] Intel QSV in OpenCL release function found (clEnqueueReleaseVA_APIMediaSurfacesINTEL).



After attempting to play a video with VAAPI targeting the A380 this is the jellyfin logs:

[2024-05-20 19:35:01.043 +00:00] [INF] WS "192.168.10.97" request
[2024-05-20 19:35:11.274 +00:00] [INF] User policy for "username". EnablePlaybackRemuxing: True EnableVideoPlaybackTranscoding: True EnableAudioPlaybackTranscoding: True
[2024-05-20 19:35:11.590 +00:00] [INF] Current HLS implementation doesn't support non-keyframe breaks but one is requested, ignoring that request
[2024-05-20 19:35:11.593 +00:00] [INF] "/usr/lib/jellyfin-ffmpeg/ffmpeg" "-dump_attachment:t \"\" -y  -i file:\"/mount/media/Movies/Pearl (2022)/Pearl (2022) Remux-2160p.mkv\" -t 0 -f null null"
[2024-05-20 19:35:12.044 +00:00] [INF] ffmpeg attachment extraction completed for "file:\"/mount/media/Movies/Pearl (2022)/Pearl (2022) Remux-2160p.mkv\"" to "/var/cache/jellyfin/attachments/50f4498daf5a729e20ee7af0502d1dc4"
[2024-05-20 19:35:12.044 +00:00] [INF] "/usr/lib/jellyfin-ffmpeg/ffmpeg" "-analyzeduration 200M -probesize 1G -init_hw_device vaapi=vaConfused-facedev/dri/renderD129,driver=iHD -noautorotate -i file:\"/mount/media/Movies/Pearl (2022)/Pearl (2022) Remux-2160p.mkv\" -map_metadata -1 -map_chapters -1 -threads 0 -map 0:0 -map 0:1 -map -0:0 -codec:v:0 h264_vaapi -rc_mode VBR -b:v 120016060 -maxrate 120016060 -bufsize 240032120 -sei -a53_cc -force_key_frames:0 \"expr:gte(t,n_forced*3)\" -filter_complex \"[0:3]scale=-1:2160:fast_bilinear,scale,crop,pad=max(3840\,iw):max(2160\,ih)Slightly-frowning-faceow-iw)/2Slightly-frowning-faceoh-ih)/2:black@0,crop=3840:2160[sub];[0:0]setparams=color_primaries=bt709:color_trc=bt709:colorspace=bt709,scale=trunc(min(max(iw\,ih*a)\,min(3840\,2160*a))/2)*2:trunc(min(max(iw/a\,ih)\,min(3840/a\,2160))/2)*2,format=nv12[main];[main][sub]overlay=eof_action=pass:repeatlast=0,hwupload_vaapi\" -start_at_zero -codec:a:0 libfdk_aac -ac 2 -ab 256000 -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 \"47b5461cedf691bd94b2218a226ed896-1.mp4\" -start_number 0 -hls_segment_filename \"/var/cache/jellyfin/transcodes/47b5461cedf691bd94b2218a226ed896%d.mp4\" -hls_playlist_type vod -hls_list_size 0 -y \"/var/cache/jellyfin/transcodes/47b5461cedf691bd94b2218a226ed896.m3u8\""


RE: Can't get intel a380 working properly - bitmap - 2024-05-20

You need what's after the part of the log you provided to get any real info. That's just the ffmpeg command, not the result of it. Also, the ffmpeg log will provide better details.

First things I would check are whether the user running JF has access to the device (requires sudo privileges):

Code:
usermod -aG render jellyfin

Also, this info from the HWA guide:

Quote:The LTS kernel 6.6.26+ and the stable kernel 6.8.5+ have unresolved i915 driver bugs, which break HDR/DV tone-mapping on Intel Gen 12.5 DG2 / ARC A-series GPUs. If you are affected, please refrain from upgrading to those kernel versions.

But before you go log diving and kernel swapping, make sure the user running Jellyfin has been added to the render group and try this: go to VA-API in the JF HWA menu and enter "/dev/dri/renderD129" and save. Now go back up, swap to QuickSync and try again. There isn't a way to select the target once you've selected QSV, but it appears to respect the VA-API setting...


RE: Can't get intel a380 working properly - TheDreadPirate - 2024-05-20

I had to disable the iGPU in the BIOS to get Jellyfin/ffmpeg to select my Arc GPU.

Also, Ubuntu 24.04's kernel is unaffected by the i915 driver issues. Ubuntu 24.04's 6.8 kernel is based on 6.8.4 (as per gnattu, one of our devs).


RE: Can't get intel a380 working properly - mrrichardcranium - 2024-05-20

I can confirm that I the jellyfin user is in the render group. As for the tone mapping bug, I don't have any tone mapping enabled. Is it possible that it could still be causing problems being on the newer kernel? 

Same issues after selecting VAAPI, designating the correct render device, and swapping to QSV. 

Here is the full FFmpeg log file with QSV enabled after setting VAAPI as suggested https://pastebin.com/tkCVwF3x


RE: Can't get intel a380 working properly - mrrichardcranium - 2024-05-20

(2024-05-20, 08:19 PM)TheDreadPirate Wrote: I had to disable the iGPU in the BIOS to get Jellyfin/ffmpeg to select my Arc GPU.

Also, Ubuntu 24.04's kernel is unaffected by the i915 driver issues.  Ubuntu 24.04's 6.8 kernel is based on 6.8.4 (as per gnattu, one of our devs).

Disabling integrated graphics in bios did seem to help. Im now seeing activity from the intel_gpu_top command. Though it is still seriously struggling with a single stream. Transcoding framerate ranging from 10-20 fps. 

GPU usage is barely reaching 15%, CPU usage is still maxed out on all 4 cores. While it's definitely an old CPU it shouldn't be the problem here right? 

Here are updated FFmpeg logs: https://pastebin.mozilla.org/CVRxnyDv


RE: Can't get intel a380 working properly - TheDreadPirate - 2024-05-20

Enable low power encoding. Also, HDR is a bit weird. Mine tops out at about 60 FPS, but having multiple HDR transcodes doesn't slow it down much.


RE: Can't get intel a380 working properly - bitmap - 2024-05-20

Tonemapping might be the issue here. What tonemapping do you have enabled? It might be throwing the entire load of that at the CPU, which might present issues with an older chip. Not 100% certain, but if you swap to VPP tonemapping you may have better luck funneling that workload to the right spot. I'm honestly not sure whether VPP tonemapping uses the GPU exclusively or will still relay work to the CPU. Worth a try...

(2024-05-20, 09:39 PM)TheDreadPirate Wrote: Enable low power encoding.  Also, HDR is a bit weird.  Mine tops out at about 60 FPS, but having multiple HDR transcodes doesn't slow it down much.

Do you use OpenCL or VPP for tonemapping? Have you tried both and, if so, have you noticed a difference in quality or performance?


RE: Can't get intel a380 working properly - mrrichardcranium - 2024-05-20

(2024-05-20, 09:39 PM)TheDreadPirate Wrote: Enable low power encoding.  Also, HDR is a bit weird.  Mine tops out at about 60 FPS, but having multiple HDR transcodes doesn't slow it down much.

No measurable change after enabling low power encoding unfortunately.

(2024-05-20, 09:44 PM)bitmap Wrote: Tonemapping might be the issue here. What tonemapping do you have enabled? It might be throwing the entire load of that at the CPU, which might present issues with an older chip. Not 100% certain, but if you swap to VPP tonemapping you may have better luck funneling that workload to the right spot. I'm honestly not sure whether VPP tonemapping uses the GPU exclusively or will still relay work to the CPU. Worth a try...

(2024-05-20, 09:39 PM)TheDreadPirate Wrote: Enable low power encoding.  Also, HDR is a bit weird.  Mine tops out at about 60 FPS, but having multiple HDR transcodes doesn't slow it down much.

Do you use OpenCL or VPP for tonemapping? Have you tried both and, if so, have you noticed a difference in quality or performance?

Ive haven't enabled tone mapping myself. So far I've been operating under the assumption that the fewer settings I touch until I get basic transcoding down, the better.


RE: Can't get intel a380 working properly - bitmap - 2024-05-20

I was asking TDP -- but your source file is an HDR remux and Jellyfin is trying to play it in SDR colorspace...so it's being tonemapped. Maybe this plays into things a little?


RE: Can't get intel a380 working properly - mrrichardcranium - 2024-05-20

Turns out the final bit of it was a PEBKAC issue. I started trying other content from my library and comparing. The particular video that was still struggling was HEVC 10-bit and when toggling the settings around I forgot to re-enable it.

I think the main issue turned out to be that I needed to disable iGPU in bios and now that Ive got the correct codecs selected it seems to be running wonderfully. That same video for test is now averaging ~80FPS transcoding.


Thank you both for the replies!