Intel Arc support


Go to solution Solved by TheIlluminate,

Recommended Posts

On 2/6/2023 at 11:59 AM, nyanmisaka said:

@jsrk The dmesg log has already noticed you where to download the firmware.

 

https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/tree/i915

 

Find the dg2*.bin and download them with "plain" button to `/usr/lib/firmware`.

 

Update the initramfs and then reboot.

 

Finally got it to work, thanks so much nyanmisaka, if there is a way to support you individually please let me know.

Screenshot 2023-02-07 115238.png

 

Edit:

If anybody else wants to try this:

Quote

github.com/DatPat/unraid_arc_g2/releases/tag/first

 

you will also need a build of jellyfin build recent enough(i used jellyfin/jellyfin:unstable from dockerhub).

 

p.s.

This specific RC of the linux kernel broke my dhcp so I had to set a static IP, this is probably also what DeadDevil6210 describes in his tutorial.

Edited by jsrk
added links for people to try
Link to comment
2 hours ago, FlyingTexan said:

Anyone able to test with this? See how many 4k transcodes it can handle? Or use tdarr and see going from 4k HDR HEVC to 1080p x264 how many fps?  Trying to gauge the strength of the ARC card vs 13th gen intel quicksync.

I don't have tdarr but I can tell you this: I can transcode 4 times dune (36GB HEVC HDR) to h264 1080p with tone mapping. I don't know what becomes the limitting factor past that point, either my HDDs or the VRAM (6GB) of my A380. 

 

Also perhaps this is of help:

reddit.com/r/jellyfin/comments/y64yie/comment/isrndyd/?utm_source=reddit&utm_medium=web2x&context=3

Edited by jsrk
Link to comment
11 hours ago, jsrk said:

I don't have tdarr but I can tell you this: I can transcode 4 times dune (36GB HEVC HDR) to h264 1080p with tone mapping. I don't know what becomes the limitting factor past that point, either my HDDs or the VRAM (6GB) of my A380. 

 

Also perhaps this is of help:

reddit.com/r/jellyfin/comments/y64yie/comment/isrndyd/?utm_source=reddit&utm_medium=web2x&context=3

That has to be a driver limitation and things not working properly then.  On my 11600k I can currently transcode 10 4k streams. I didn't test scrubbing a timeline with them but I had 10 running without issue and this was using a John Wick 2 that was close to 80mbit/s.  The 11600k is the uhd 750 and the 13th gen is the uhd 770 which is already much better but then the upper skews have two gpus (I know it's not two gpus but i'm getting brain blocked). I watched a video where the uhd 770 can do 18 4k stream transcodes. So the ARC a380 had better be a whole lot better than the 13th gen or I might as well leave it in the drawer and just upgrade my server from the 11th to the 13th gen for more cores. 

Link to comment
1 hour ago, FlyingTexan said:

That has to be a driver limitation and things not working properly then.  On my 11600k I can currently transcode 10 4k streams. I didn't test scrubbing a timeline with them but I had 10 running without issue and this was using a John Wick 2 that was close to 80mbit/s.  The 11600k is the uhd 750 and the 13th gen is the uhd 770 which is already much better but then the upper skews have two gpus (I know it's not two gpus but i'm getting brain blocked). I watched a video where the uhd 770 can do 18 4k stream transcodes. So the ARC a380 had better be a whole lot better than the 13th gen or I might as well leave it in the drawer and just upgrade my server from the 11th to the 13th gen for more cores. 

 

i am really not sure, when I use the igpu of that system performance is definitely worse. Specs are as follows:

8700k

16 gb ddr4 

7200rpm hdd 

it is entirely possible that this is a software issue as I am running a nightly jf build on an rc kernel.

Link to comment

@FlyingTexan

@jsrk

The main difference between iGPU and dGPU is the VRAM capacity and iGPU uses your RAM as VRAM, which means dGPU may run out of VRAM but iGPU won't. So you can't compare an entry level card ARC A380 6GB and iGPU directly when is comes to the maximum transcoding capacity. Just buy an ARC A770 LE with 16GB VRAM if you really need that capacity.

 

In short, the advantages of ARC GPU are encoding quality, peak performance, as well as the QSV AV1 HW encoder that Jellyfin has planned to enable in the future.

 

As for the quality, ARC / DG2 GPU can match the x265 SW encoder medium preset in many aspects but it's predecessor DG1 / Xe / UHD7xx series can't. Otherwise there's a huge performance penalty you will get on DG1 / Xe / UHD7xx. See https://github.com/intel/media-delivery/blob/master/doc/benchmarks/intel-data-center-gpu-flex-series/intel-data-center-gpu-flex-series.rst

 

I used many recent Intel GPU such as Xe 96EU, DG1 MAX, ARC A380. Only the A380 can get such a decent performance without sacrificing the quality. I was thinking of buying the Quadro A2000 low profile card for my server but I find it is less efficiency and over priced than ARC in terms of video transcoding.

 

Jellyfin 10.8.9 transcoding:

 

4k HEVC SDR -> 1080p HEVC SDR: up to 450fps

4k HEVC DOVI P5 -> 1080p HEVC SDR: up to 360fps

4k HEVC DOVI P5 -> 4k HEVC SDR: up to 230fps

 

4k_sdr_1080p.jpg.f0d3eb05583cb1b3dceb26b602fb56f5.jpg4k_dv_1080p.jpg.68d943bf124541d5704ec5c022ad91e8.jpg4k_dv_4k.jpg.a6f484a0eb5a0046051753e3d74ef247.jpg

Edited by nyanmisaka
  • Like 2
Link to comment

Are you not able to use the system memory as the /tmp for transcoding and use the card for the power? If I recall, plex defaulted to using the SSD for transcoding and I made it switch to using my system memory since I have 64GB of it. Can you not allocate that memory to still be used for the transcoding process? Isn't that was resizable BAR is for to share those resources?  That's impressive for HEVC-HEVC.  I wish plex would move past x264 for it's codec and start enabling this. 

Edited by FlyingTexan
Link to comment
13 hours ago, nyanmisaka said:

@FlyingTexan

@jsrk

The main difference between iGPU and dGPU is the VRAM capacity and iGPU uses your RAM as VRAM, which means dGPU may run out of VRAM but iGPU won't. So you can't compare an entry level card ARC A380 6GB and iGPU directly when is comes to the maximum transcoding capacity. Just buy an ARC A770 LE with 16GB VRAM if you really need that capacity.

 

In short, the advantages of ARC GPU are encoding quality, peak performance, as well as the QSV AV1 HW encoder that Jellyfin has planned to enable in the future.

 

As for the quality, ARC / DG2 GPU can match the x265 SW encoder medium preset in many aspects but it's predecessor DG1 / Xe / UHD7xx series can't. Otherwise there's a huge performance penalty you will get on DG1 / Xe / UHD7xx. See https://github.com/intel/media-delivery/blob/master/doc/benchmarks/intel-data-center-gpu-flex-series/intel-data-center-gpu-flex-series.rst

 

I used many recent Intel GPU such as Xe 96EU, DG1 MAX, ARC A380. Only the A380 can get such a decent performance without sacrificing the quality. I was thinking of buying the Quadro A2000 low profile card for my server but I find it is less efficiency and over priced than ARC in terms of video transcoding.

 

4k HEVC SDR -> 1080p HEVC SDR: up to 450fps

4k HEVC DOVI P5 -> 1080p HEVC SDR: up to 360fps

4k HEVC DOVI P5 -> 4k HEVC SDR: up to 230fps

 

4k_sdr_1080p.jpg.f0d3eb05583cb1b3dceb26b602fb56f5.jpg4k_dv_1080p.jpg.68d943bf124541d5704ec5c022ad91e8.jpg4k_dv_4k.jpg.a6f484a0eb5a0046051753e3d74ef247.jpg

Thank you for the explanation. Do you think we are going to see a transcode to AV1 option in jellyfin in the future? As almost all browsers have excellent AV1 support this could come in quite handy, especially if the bitrate is too high for the connection.

Edited by jsrk
Link to comment
14 hours ago, FlyingTexan said:

Are you not able to use the system memory as the /tmp for transcoding and use the card for the power? If I recall, plex defaulted to using the SSD for transcoding and I made it switch to using my system memory since I have 64GB of it. Can you not allocate that memory to still be used for the transcoding process? Isn't that was resizable BAR is for to share those resources?  That's impressive for HEVC-HEVC.  I wish plex would move past x264 for it's codec and start enabling this. 

 

It seems you don't understand how hardware transcoding works.

 

Here's the main steps:

Read Video.mkv => Demux => Raw HEVC bitstream => HW decoder => Decode frames to VRAM

=> Apply HW scaling/deinterlace/tonemapping filters in VRAM => HW encoder => Encode frames from VRAM => Raw H264 bitstream

=> HLS/DASH muxer => Write to your transcode temp folder => Play in your browsers and clients

 

For high res content such as 4k the "Decode frames to VRAM" step costs VRAM a lot (800MB~1GB per video).

So I was not talking about the capacity of your /tmp folder or RAM. It doesn't help the VRAM that used by HW decoder.

 

Use RAM as the backup of VRAM at driver level is feasible but it is extremely slow, which involves too much memory copy-back between your VRAM and RAM through PCIe. Resizable BAR doesn't help too in this use case. That's why VRAM on high-end dGPUs is getting bigger and bigger.

 

It seems Plex don't have plan to transcode to HEVC any time soon from their last reply in r/plex.

I write code for Jellyfin so I added the HEVC encode back in 2020 and I use it for myself to save bandwidth.

Edited by nyanmisaka
  • Thanks 1
Link to comment
9 hours ago, jsrk said:

Thank you for the explanation. Do you think we are going to see a transcode to AV1 option in jellyfin in the future? As almost all browsers have excellent AV1 support this could come in quite handy, especially if the bitrate is too high for the connection.

Sure. But I don't have an ETA on it.

  • Thanks 1
Link to comment
5 hours ago, nyanmisaka said:

 

It seems you don't understand how hardware transcoding works.

 

Here's the main steps:

Read Video.mkv => Demux => Raw HEVC bitstream => HW decoder => Decode frames to VRAM

=> Apply HW scaling/deinterlace/tonemapping filters in VRAM => HW encoder => Encode frames from VRAM => Raw H264 bitstream

=> HLS/DASH muxer => Write to your transcode temp folder => Play in your browsers and clients

 

For high res content such as 4k the "Decode frames to VRAM" step costs VRAM a lot (800MB~1GB per video).

So I was not talking about the capacity of your /tmp folder or RAM. It doesn't help the VRAM that used by HW decoder.

 

Use RAM as the backup of VRAM at driver level is feasible but it is extremely slow, which involves too much memory copy-back between your VRAM and RAM through PCIe. Resizable BAR doesn't help too in this use case. That's why VRAM on high-end dGPUs is getting bigger and bigger.

 

It seems Plex don't have plan to transcode to HEVC any time soon from their last reply in r/plex.

I write code for Jellyfin so I added the HEVC encode back in 2020 and I use it for myself to save bandwidth.

I know system ram is slower than VRAM but the igpus are still able to encode many more streams at once so was under the assumption it’s still fast enough. 
 

What is your take on the a380? Are you glad you have it? The one thing you stated that really has me perked up is the hw transcode having the same quality as software.  Does that translate to x264 for Plex or not really matter yet because it’s not using the appropriate libraries?  I’m not a coder at all so it’s very over my head and thank you for engaging.  Are you saying that Jellyfin supports HEVC->HEVC transcoding out of the box? 
 

I’ve personally never used jellyfin but was always told it was more difficult to setup for other users so stayed away for simplicity sake. 

Link to comment
Quote

I know system ram is slower than VRAM but the igpus are still able to encode many more streams at once so was under the assumption it’s still fast enough. 

14th Gen Core seems to be the best choice for you. But without the VRAM cap the ARC A770 LE 16GB can do even more than iGPU.

I use AMD APU on my server because it is energy efficient. This prompted me to choose ARC and enable ASPM in BIOS to avoid high power consumption at idle state.

 

Quote

What is your take on the a380? Are you glad you have it? The one thing you stated that really has me perked up is the hw transcode having the same quality as software.

130 bucks, MSI low profile A380. I don't gaming on it so it fits my use case perfectly. What I said is DG2 can match x265 software encoder at "medium preset" as per the slide from Intel. With slower presets I think x265 encoder is still the best but the FPS can be very slow even on modern processors.

 

Quote

Does that translate to x264 for Plex or not really matter yet because it’s not using the appropriate libraries?

Yes but not quite, I also made some tweaks to Jellyfin's FFmpeg to unleash its fullest potential on both Linux and Windows.

 

Quote

Are you saying that Jellyfin supports HEVC->HEVC transcoding out of the box? 

Yes, on supported clients such as Android App and Safari the HEVC->HEVC transcoding is supported out of the box. I used MS Edge with our web client preview for the FPS demonstration.

Edited by nyanmisaka
Link to comment
2 hours ago, nyanmisaka said:

14th Gen Core seems to be the best choice for you. But without the VRAM cap the ARC A770 LE 16GB can do even more than iGPU.

I use AMD APU on my server because it is energy efficient. This prompted me to choose ARC and enable ASPM in BIOS to avoid high power consumption at idle state.

 

130 bucks, MSI low profile A380. I don't gaming on it so it fits my use case perfectly. What I said is DG2 can match x265 software encoder at "medium preset" as per the slide from Intel. With slower presets I think x265 encoder is still the best but the FPS can be very slow even on modern processors.

 

Yes but not quite, I also made some tweaks to Jellyfin's FFmpeg to unleash its fullest potential on both Linux and Windows.

 

Yes, on supported clients such as Android App and Safari the HEVC->HEVC transcoding is supported out of the box. I used MS Edge with our web client preview for the FPS demonstration.

You mentioned enabling ASPM in the bios.  Is that something all bios have?  Have you measured what it changes? I'm seeing people mention that intel came out with a recent update to address this for windows but it wasn't exactly successful. People saying it's still pulling 20w at idle. Not that that's the biggest issue in the world.

Link to comment
56 minutes ago, FlyingTexan said:

You mentioned enabling ASPM in the bios.  Is that something all bios have?  Have you measured what it changes? I'm seeing people mention that intel came out with a recent update to address this for windows but it wasn't exactly successful. People saying it's still pulling 20w at idle. Not that that's the biggest issue in the world.

 

Please refer to the motherboard manual. Most of the Intel boards have this option.

And here's the guidance of enabling ASPM on MSI Z690 motherboard with ARC A380.

Link to comment

I'm running the intel arc card on thor2002 unraid build with linux kernel 6.2 rc8 and in docker I'm still having issues in combination with the intel alder lake igpu it has to be turned off in bios to let de arc gpu take over. 

But in W11 vm it's now completly good working. with both the gpu and audio part passed through to a vm. Unraid OS doesn't freeze/completly crash anymore and releases gpu correctly I can also then start it up.

The problem I now experience is that I can't get resizable bar enabled in the vm. Has anyone got any luck with that? the performance of the arc gpu is even worse than IGPU in docker (unmanic/tdarr)

My vm XML (Everything underlined is added by me):
 

<?xml version='1.0' encoding='UTF-8'?>
<domain type='kvm' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'>

  <name>Windows 11</name>
  <uuid>d1c530e9-4a0e-61ee-23f8-1fe867967361</uuid>
  <description>ARC TEST</description>
  <metadata>
    <vmtemplate xmlns="unraid" name="Windows 11" icon="windows11.png" os="windowstpm"/>
  </metadata>
  <memory unit='KiB'>16777216</memory>
  <currentMemory unit='KiB'>16777216</currentMemory>
  <memoryBacking>
    <nosharepages/>
  </memoryBacking>
  <vcpu placement='static'>8</vcpu>
  <cputune>
    <vcpupin vcpu='0' cpuset='4'/>
    <vcpupin vcpu='1' cpuset='5'/>
    <vcpupin vcpu='2' cpuset='6'/>
    <vcpupin vcpu='3' cpuset='7'/>
    <vcpupin vcpu='4' cpuset='8'/>
    <vcpupin vcpu='5' cpuset='9'/>
    <vcpupin vcpu='6' cpuset='10'/>
    <vcpupin vcpu='7' cpuset='11'/>
  </cputune>
  <os>
    <type arch='x86_64' machine='pc-i440fx-7.1'>hvm</type>
    <loader readonly='yes' type='pflash'>/usr/share/qemu/ovmf-x64/OVMF_CODE-pure-efi-tpm.fd</loader>
    <nvram>/etc/libvirt/qemu/nvram/d1c530e9-4a0e-61ee-23f8-1fe867967361_VARS-pure-efi-tpm.fd</nvram>
  </os>
  <features>
    <acpi/>
    <apic/>
    <hyperv mode='custom'>
      <relaxed state='on'/>
      <vapic state='on'/>
      <spinlocks state='on' retries='8191'/>
      <vendor_id state='on' value='none'/>
    </hyperv>
  </features>
  <cpu mode='host-passthrough' check='none' migratable='on'>
    <topology sockets='1' dies='1' cores='4' threads='2'/>
    <cache mode='passthrough'/>
  </cpu>
  <clock offset='localtime'>
    <timer name='hypervclock' present='yes'/>
    <timer name='hpet' present='no'/>
  </clock>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>restart</on_reboot>
  <on_crash>restart</on_crash>
  <devices>
    <emulator>/usr/local/sbin/qemu</emulator>
    <disk type='file' device='disk'>
      <driver name='qemu' type='raw' cache='writeback'/>
      <source file='/mnt/user/domains/Windows 11/vdisk1.img'/>
      <target dev='hdc' bus='virtio'/>
      <boot order='1'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
    </disk>
    <controller type='usb' index='0' model='ich9-ehci1'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x7'/>
    </controller>
    <controller type='usb' index='0' model='ich9-uhci1'>
      <master startport='0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0' multifunction='on'/>
    </controller>
    <controller type='usb' index='0' model='ich9-uhci2'>
      <master startport='2'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x1'/>
    </controller>
    <controller type='usb' index='0' model='ich9-uhci3'>
      <master startport='4'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x2'/>
    </controller>
    <controller type='pci' index='0' model='pci-root'/>
    <controller type='virtio-serial' index='0'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
    </controller>
    <interface type='bridge'>
      <mac address='52:54:00:43:48:33'/>
      <source bridge='br0'/>
      <model type='virtio-net'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
    </interface>
    <serial type='pty'>
      <target type='isa-serial' port='0'>
        <model name='isa-serial'/>
      </target>
    </serial>
    <console type='pty'>
      <target type='serial' port='0'/>
    </console>
    <channel type='unix'>
      <target type='virtio' name='org.qemu.guest_agent.0'/>
      <address type='virtio-serial' controller='0' bus='0' port='1'/>
    </channel>
    <input type='tablet' bus='usb'>
      <address type='usb' bus='0' port='1'/>
    </input>
    <input type='mouse' bus='ps2'/>
    <input type='keyboard' bus='ps2'/>
    <tpm model='tpm-tis'>
      <backend type='emulator' version='2.0' persistent_state='yes'/>
    </tpm>
    <audio id='1' type='none'/>
    <hostdev mode='subsystem' type='pci' managed='yes'>
      <driver name='vfio'/>
      <source>
        <address domain='0x0000' bus='0x03' slot='0x00' function='0x0'/>
      </source>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
    </hostdev>
    <hostdev mode='subsystem' type='pci' managed='yes'>
      <driver name='vfio'/>
      <source>
        <address domain='0x0000' bus='0x04' slot='0x00' function='0x0'/>
      </source>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>
    </hostdev>
    <hostdev mode='subsystem' type='usb' managed='no'>
      <source>
        <vendor id='0x1532'/>
        <product id='0x0043'/>
      </source>
      <address type='usb' bus='0' port='2'/>
    </hostdev>
    <hostdev mode='subsystem' type='usb' managed='no'>
      <source>
        <vendor id='0x1532'/>
        <product id='0x022a'/>
      </source>
      <address type='usb' bus='0' port='3'/>
    </hostdev>
    <memballoon model='none'/>
  </devices>

  <qemu:commandline>
    <qemu:arg value='-fw_cfg'/>
    <qemu:arg value='opt/ovmf/X-PciMmio64Mb,string=65536'/>
  </qemu:commandline>

</domain>

 

Edit: Fixed bios to Q35-7.1 stil no resizable bar according to ARC control but gpu-z in the vm says Resizable Bar is Enabled but if you click on that for detailed view it says Unsupported GPU 

 

arc gpu-z.png

Edited by DeadDevil6210
Link to comment
On 12/31/2022 at 10:00 AM, SimonF said:

FYI it works without the Virtual and igp also.

image.thumb.png.c35c2baa801487e0cd6fb2deda26ee23.png

image.thumb.png.fa68db97309beef87f8af268a66d8cdd.png

 

 

 

ALRIGHT, I just so happened to keep messing around with this config. I set up a VM with the exact specifications listed above (only with the audio passed through as well), installed the ARC drivers from a VNC terminal. The card showed as good to go, but after a reboot the card showed as code 43. I then went into the VM settings, turned off Hyper-V, and booted it up. It works! 

I've now rebooted the machine 3+ times and the card is still functioning. Even rebooted unraid and everything works. Hope this works out for others...

  • Upvote 1
Link to comment
On 2/21/2023 at 10:02 PM, nucleargtz said:

 

 

ALRIGHT, I just so happened to keep messing around with this config. I set up a VM with the exact specifications listed above (only with the audio passed through as well), installed the ARC drivers from a VNC terminal. The card showed as good to go, but after a reboot the card showed as code 43. I then went into the VM settings, turned off Hyper-V, and booted it up. It works! 

I've now rebooted the machine 3+ times and the card is still functioning. Even rebooted unraid and everything works. Hope this works out for others...

Ok so what’s the current status? Are we able to put the card in our machines yet for unraid use or is this only for VM?

Link to comment
On 1/25/2023 at 3:04 PM, DeadDevil6210 said:

Hi Guys,

 

I don't know if this can help us but thor2002 has some unraid kernels ready on variouse 6.x.x linux kernels, My problem is that my servers RTL8125 (Realtek 2.5GBe nic) stops working, I also will receive my A380 tomorrow and was looking in to the arc support. Hope some have succes with the 6.x.x kernels from thor. I will also start testing again tomorrow with a different machine that has the RTL8125 and an intel nic for backup (not the machine that will get the A380)

 

Do you know if all PCI network cards unsupported with Thor's kernel versions? I'm running a 10GB NIC by TP-Link (TX401).

Link to comment
11 hours ago, Isorikk said:

 

Do you know if all PCI network cards unsupported with Thor's kernel versions? I'm running a 10GB NIC by TP-Link (TX401).

It's not a support issue, Thor2002 didn't remove anything, It was just my network.cfg file on the flash drive that got messed up (removing it and setting up new one with fresh static ip solvbed the issue). (So if it works with official 6.11.5 build it wil work with his kernel)

DHCP was broken on 6.2 RC5/6 don't know if you now start using the final build if that's the same. And be sure to backup the files you are going to overwrite, If something els messes up you can just put back the original files and your back to where you left before. 

  • Thanks 1
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.