Jump to content

unRAID plugin for iGPU SR-IOV support


Recommended Posts

34 minutes ago, domrockt said:

 

不据我所知

 

该用户脚本需要在启动时以 unraid 启动

 

3) 创建一个用户脚本(echo 4 表示 4 个虚拟 GPU)

#!/bin/bash
echo 4 > /sys/devices/pci0000\:00/0000\:00\:02.0/sriov_numvfs

 

 

只需将 VM 自动启动延迟到 60 秒,您的 VM 就会以 VF 启动

Biggie I haven't done this before, can you give me the detailed steps?

Link to comment
On 10/22/2023 at 6:43 PM, domrockt said:

1) Mainboard Bios, enable sriov there

2) install the sriov plugin

iov1.thumb.png.6e6bb15602a152e8cb3eb10dc3fa0344.png

3) make a user script with (echo 4 means 4 Virtual GPUs)

#!/bin/bash
echo 4 > /sys/devices/pci0000\:00/0000\:00\:02.0/sriov_numvfs

iov2.thumb.png.2ac1e7f335b2c097b69fb2b97bd0a47d.png

4)make it run on array start 

iov3.thumb.png.4b47ec94fae06b116e2082942502a24b.png

5) set 4 VFs in the Plugin

iov4.thumb.png.3f95395e564b2177219620b82a21d208.png

6)reboot

 

7) bind as many as you wish in the system devices Tab

iov5.thumb.png.76ac88f6bfa720335ce4f31e95e743d0.png

8)reboot

 

undo everything you did before and just follow this guide. 

 

add another userscript to delay your VM autostart

 

#!/bin/bash
sleep 45
virsh start "Your VM Name Here"

 

1.thumb.png.5873c51a3b81d127bd29f3b8d8eb193c.png

 

 

Link to comment
1 hour ago, dimes007 said:

Thanks!   Displaylink is the magic sauce needed.  I ordered one.  I thought Displaylink wasn't GPU accelerated but I hope I'm wrong.   

 

I used that with GPU-P a while ago 

 

the Main HDMI was in use by the Main GPU

and i have passed trough that usb hdmi dongle to my HyperV VM

 

as Long i stayed within the specs of that dongle it was fine.

Link to comment
47 minutes ago, dimes007 said:

Moreover, if it isn't GPU accelerated why do I need to pass a vGPU anyway? 

 That sentence is giving me a Mixed bag of informations.

 

i mean you could use parsec, RDP, Moonlight and so on for Desktop Streaming.

 

you will always have the igpu power even when using just VNC when you have passed it to an VM

 

an HDMI cable is not mandatory to use vGPU power.

 

 

Link to comment
On 10/31/2023 at 4:10 PM, domrockt said:

 

nope it is not like you imagine!!

 

You have a real IGPU that is device 00.02.00 

sriov1.thumb.png.ba26592e5f559dedc24db903287df47b.png

 

this is automaticly used by Unraid as a docker IGPU

you need the Intel TOP plugin to work with Plex.

 

your two VF's igpus can be passed trough to VM's and need to be stubbed like you have.

I understand, you mean that in addition to the virtualized GPUs 00:02.1 and 00:02.2, I also have a real GPU, 00.02.00, which is used on the host machine. The virtualized GPUs, 00:02.1 and 00:02.2, are for the virtual machines to perform GPU passthrough. Thank you for your explanation.

Edited by coderZoe
  • Like 1
Link to comment
5 minutes ago, coderZoe said:
On 10/31/2023 at 1:10 AM, domrockt said:

 

I understand, you mean that in addition to the virtualized GPUs 00:02.1 and 00:02.2, I also have a real GPU, 00.02.00, which is used on the host machine.

Technically they're all virtualized :P

When SR-IOV is enabled, all three are virtual functions. There's nothing different about virtual function 0 other than the fact that the driver on the host uses it as its display by default. The physical card no longer appears as a PCIe device when SR-IOV is enabled since all access to it is now via the virtual functions.

Link to comment
3 hours ago, Daniel15 said:

The physical card no longer appears as a PCIe device when SR-IOV is enabled since all access to it is now via the virtual functions.

the "no longer appears" Part is not true, its confusing enough but all cars are visible 00:02.0 <-- is the real IGPU when i bind it to VFIO the VFs disapear.

 

i did not bind it

 

1.thumb.png.4d51f409c2789e5917ec37da6be78c3b.png

 

1296359637_Screenshot2023-11-02171323.thumb.png.171238cb81ada81beb0b3dfbbed6bce6.png

 

1.thumb.png.013ef96a35c1b96b2e29ce77ee7c22ff.png

 

 

 

 

Edited by domrockt
Link to comment
On 9/24/2023 at 8:43 AM, m0eak said:

Make sure that you are on Unraid 6.12.3 and that you have the SR-IOV plugin from @zhtengw installed

But i couldn't install SR-IOV plugin from @zhtengw, because it say Can't download i915-sriov module Package for kernel v6.1.49, how to force install this plugin?

 

Should these two files be copied as is, or extracted first?

Link to comment
On 9/19/2023 at 3:37 PM, ich777 said:

If you are already on Unraid 6.12.4 try this:

 

  1. Execute this from a Unraid Terminal:
    mkdir -p /boot/config/plugins/i915-sriov/packages/6.1.49/
  2. Copy the two files from the above post in the folder: /boot/config/plugins/i915-sriov/packages/6.1.49/
  3. Install the SR-IOV plugin
  4. Execute this from a Unraid Terminal:
    sed -i '/  modprobe i915 enable_guc=7/ s/.*/  modprobe i915 enable_guc=3 max_vfs=7/' /boot/config/plugins/i915-sriov.plg
    echo "# disable autoload old i915 module on boot
      blacklist i915" > /boot/config/modprobe.d/i915-sriov.conf
  5. Reboot

 

 

I followed these steps, but couldn´t get it going. 

 

I copied the directories:

 

"install" and "lib", as well as just the files

"slack-desc"

"i915.ko.xz"

 

I got this error message installing the plugin:

 

861109869_Screenshot2023-11-09at22_06_33.thumb.png.ed6544d40622002f50fd3fb3dfd31928.png

 

 

I guess a make some stupid mistake with the files to be copied. (Yes, I have started Linux beginners crash course. I shout when finished......)

 

// Frode 

 

 

 

 

Link to comment
On 9/19/2023 at 9:37 AM, ich777 said:

If you are already on Unraid 6.12.4 try this:

 

  1. Execute this from a Unraid Terminal:
    mkdir -p /boot/config/plugins/i915-sriov/packages/6.1.49/
  2. Copy the two files from the above post in the folder: /boot/config/plugins/i915-sriov/packages/6.1.49/
  3. Install the SR-IOV plugin
  4. Execute this from a Unraid Terminal:
    sed -i '/  modprobe i915 enable_guc=7/ s/.*/  modprobe i915 enable_guc=3 max_vfs=7/' /boot/config/plugins/i915-sriov.plg
    echo "# disable autoload old i915 module on boot
      blacklist i915" > /boot/config/modprobe.d/i915-sriov.conf
  5. Reboot

 

I ran this on my Unraid 6.12.4 with my i5 13500 and I get a bunch of jittery lines across the picture when transcoding HDR. If I disable hardware transcoding, it's fine. It's also fine if I remove the plug-in.

 

Any ideas?

 

Link to comment
On 11/10/2023 at 2:02 PM, frodr said:

 

 

I followed these steps, but couldn´t get it going. 

 

I copied the directories:

 

"install" and "lib", as well as just the files

"slack-desc"

"i915.ko.xz"

 

I got this error message installing the plugin:

 

861109869_Screenshot2023-11-09at22_06_33.thumb.png.ed6544d40622002f50fd3fb3dfd31928.png

 

 

I guess a make some stupid mistake with the files to be copied. (Yes, I have started Linux beginners crash course. I shout when finished......)

 

// Frode 

 

 

 

 

 

I followed the steps and could install the plugin successfully. 

378297399_Screenshot2023-11-13at13_17_18.thumb.png.2634a86cdd111cf3ed726dd74c9fc5cd.png

 

 

After re-booting I could not set anything in the plugin 

564102724_Screenshot2023-11-13at16_48_21.png.97433555a9a241d6ee524e97b17fe5f6.png

 

 

Setting up number of VF´s, etc. before rebooting just resulted in the same plugin as above. 

 

A hint what I did wrong would be great.

 

 

// Frode

 

 

 

 

 

 

Edited by frodr
  • Upvote 1
Link to comment

There is one Thing you all could do before, ithink you all try to install it direkt from Version 6.14 .

 

i thought you all woul at least read few Pages 😄

 

To install them do the following:

Make sure that you are on Unraid 6.12.3 and that you have the SR-IOV plugin from @zhtengwinstalled

Execute these commands from a terminal (just copy/past them in one go) :

mkdir -p /boot/config/plugins/i915-sriov/packages/6.1.49/ sed -i '/ modprobe i915 enable_guc=7/ s/.*/ modprobe i915 enable_guc=3 max_vfs=7/' /boot/config/plugins/i915-sriov.plg echo "# disable autoload old i915 module on boot blacklist i915" > /boot/config/modprobe.d/i915-sriov.conf

 

Copy the two files from above in the folder: /boot/config/plugins/i915-sriov/packages/6.1.49/

Trigger the upgrade process to 6.12.4 from the Update OS page

Reboot

 

 

 

  • Thanks 1
Link to comment

I have now adapted the plugin so that users are able to install it on Unraid 6.12.4 without any workarounds and to make sure that packages for upcoming Unraid versions are available.

The new plugin also is a bit more verbose, made a few changes under the hood which makes installation a bit more easy and reliable -> this means you don't need to have a Userscript anymore that runs on startup.

 

The plugin is now also part of the Plugin-Update-Helper, this will basically ensure when you update Unraid to a newer version that it will download the new plugin package version even before you reboot to the new Unraid version (keep an eye on your Unraid Notifications since the Plugin-Update-Helper will inform you there when the download is finished or failed).

 

You can install the new plugin with this link (currently it's not on the CA App):

https://raw.githubusercontent.com/ich777/unraid-i915-sriov/master/i915-sriov.plg

 

 

Thanks to @domrockt for helping me test the plugin if everything is working properly since I have no compatible hardware on hand!

 

(This plugin requires Unraid 6.12.4+)

  • Like 7
  • Thanks 5
Link to comment
2 hours ago, ich777 said:

I have now adapted the plugin so that users are able to install it on Unraid 6.12.4 without any workarounds and to make sure that packages for upcoming Unraid versions are available.

The new plugin also is a bit more verbose, made a few changes under the hood which makes installation a bit more easy and reliable -> this means you don't need to have a Userscript anymore that runs on startup.

 

The plugin is now also part of the Plugin-Update-Helper, this will basically ensure when you update Unraid to a newer version that it will download the new plugin package version even before you reboot to the new Unraid version (keep an eye on your Unraid Notifications since the Plugin-Update-Helper will inform you there when the download is finished or failed).

 

You can install the new plugin with this link (currently it's not on the CA App):

https://raw.githubusercontent.com/ich777/unraid-i915-sriov/master/i915-sriov.plg

 

 

Thanks to @domrockt for helping me test the plugin if everything is working properly since I have no compatible hardware on hand!

 

(This plugin requires Unraid 6.12.4+)

 

I am running a Proxmox Hypervisor (Intel 12600) and passing a virtual iGPU to a virtualized Unraid (6.12.4) installation. With your recently posted plugin i was able to enable HW Transcoding with Plex inside a Docker container running on the virtualized unraid installation with the virtualized iGPU.

 

Thank you! :)

  • Like 2
Link to comment
24 minutes ago, da_stingo said:

With your recently posted plugin i was able to enable HW Transcoding with Plex inside a Docker container running on the virtualized unraid installation with the virtualized iGPU.

 

You Sir, you  are an madman, its beautiful dont let anyone take that from you.  👍

  • Haha 1
Link to comment

after some small tests here i have no success, gpu recognized, driver installed, but looks like its not starting in the VM.

 

also no Parsec, no hw video decode, etc ...

 

may anyone an idea, card is bound to vfio

 

image.png.81c165ed88135f678b3f1ef88633b7b3.png

 

passed to a win 11 pro VM (installed gpu drivers, tested with win update defaults and latest 31.0.101.4972)

 

image.png.397fea4bde95e9e508ccebe874f33895.png

 

but looking deeper, device not started

 

image.png.d79c349d99e1dce7563b92ae551d6acc.png

 

Hardware is a ASRock N100m Board

 

for a Tipp, thanks ahead ;)

  • Like 1
Link to comment
Guest
This topic is now closed to further replies.
×
×
  • Create New...