unRAID plugin for iGPU SR-IOV support


Recommended Posts

On 2023/10/22 at PM9点34分, ich777 said:

您能否分享更多信息(屏幕截图,...)。

什么不起作用?

 

抱歉,但我在这里帮不了什么忙,因为我手头没有硬件可以测试,我只编译软件包并为用户提供一种暂时使用此插件的方法,因为此插件的开发人员似乎已经消失了。

这个方法肯定有效,因为它也对其他人有效。

 

也许其他人可以帮助你,也许@domrockt

Why would I, after installing it under 6.12.4 the way you did, get this error when starting unraid.

4ac1d3d90f328ac474376ec1bbc0038.jpg

Link to comment
25 minutes ago, wbgwwd said:

Why would I, after installing it under 6.12.4 the way you did, get this error when starting unraid.

I would recommend that you post the contents of the file /boot/config/modprobe.d/i915-sriov.conf to get furhter help.

 

Can you also please post your Diagnostics (this will include the file that give you trouble too) so that people can help better?

Link to comment
21 hours ago, ich777 said:

我建议您发布文件 /boot/config/modprobe.d/i915-sriov.conf 的内容以获得进一步的帮助。

 

您还可以发布您的诊断信息(这将包括也给您带来麻烦的文件)以便人们可以更好地提供帮助吗?

Now there is a new problem, in the system when I start the bind reboot unraid, he gives this error

9fc17cccde9e7591b177d837030404e.jpg

Link to comment
7 hours ago, Speedy905 said:

Hey guys, I'm trying to understand the purpose of this driver/plugin.

 

Will this basically allow me to pass through my IGPU to my VM and docker at the same time, kinda like the Intel GVT-g plugin?

i asked the same question a few pages earlier... here. Check the reply a few posts later.

 

  • Like 1
Link to comment
8 hours ago, Speedy905 said:

Hey guys, I'm trying to understand the purpose of this driver/plugin.

 

Will this basically allow me to pass through my IGPU to my VM and docker at the same time, kinda like the Intel GVT-g plugin?


in Short, yes exactly like GVT-g

 

The main IGPU is unassigned for VFIO and is in use by docker

00:02.0 VGA compatible controller: Intel Corporation Raptor Lake-S GT1 [UHD Graphics 770] (rev 04)

 

1484761893_Screenshot2023-11-02171323.thumb.png.26e686b60949c2734f464ce4e2b4234f.png

 

 

the VF's are bound to VFIO and can be used in VM's 

 

233957000_Screenshot2023-11-02171323.thumb.png.6fa0991bd5870ca7d8e9738ae21e3c04.png

 

1952939020_Screenshot2023-11-02171323.thumb.png.c12d178f1b46fdb2b2baca3e65e6b8b5.png

Edited by domrockt
Link to comment
1 hour ago, dimes007 said:

can't use the HDMI/DP outputs on the iGPU correct?  


yes but you could pass trough an usb to hdmi dongle and use that as Display Output.

wavlink USB 3.0 zu HDMI Adapter... https://www.amazon.de/dp/B076SX73LY?ref=ppx_pop_mob_ap_share

Like an Laptop per se 

 

 

had this Running with my windows paravirtualizing Adventures.

 

i splittet my old 3090 in two and used that dongle in the hyperV VM

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


yes but you could pass trough an usb to hdmi dongle and use that as Display Output.

wavlink USB 3.0 zu HDMI Adapter... https://www.amazon.de/dp/B076SX73LY?ref=ppx_pop_mob_ap_share

Like an Laptop per se 

 

 

had this Running with my windows paravirtualizing Adventures.

 

i splittet my old 3090 in two and used that dongle in the hyperV VM

I tried a usbc to hdmi adapter.   Without an hdmi cable plugged in I didn't see anything to pass though via usb.   As soon as I plugged it in unraid picked it up and the unraid login console showed up.   Its a mini pc so I can't add a usb controller to pass through.  I didn't see it listed to pass through a usb device the way that keyboard and mice show up.   I looked in bios as well to see if I could maybe fiddle with the on board USB controller to see if I can pass through half of the ports but it seems there's only one controller.  

 

Is there anyway to pass this usb c device to the vm?

Edited by dimes007
Link to comment
On 11/5/2023 at 3:42 PM, Speedy905 said:

Hey guys, I'm trying to understand the purpose of this driver/plugin.

 

Will this basically allow me to pass through my IGPU to my VM and docker at the same time, kinda like the Intel GVT-g plugin?

 

Yeah it's pretty much the same as GVT-g.

 

SR-IOV is a replacement for GVT-g. GVT-g was specifically for iGPUs, was mostly implemented in software, and had slower performance. SR-IOV can be implemented by any PCIe device, is partially hardware-based and partially software-based, and has near-native performance.

 

It splits one physical device (a "physical function") into multiple "virtual functions" that appear as if they were individual PCIe devices. Instead of seeing just one iGPU, you see many of them (I think up to 7 with the UHD 770) that each provide the same functionality. Each one can be used for hardware-accelerated video encoding and decoding.

 

As another example, it's common for higher-end network cards to support SR-IOV so that multiple VMs can use the same network card directly rather than having to use a virtio one, for improved performance. This can be done even if the network card only has one physical port. This was the most common use case for SR-IOV before Intel added support to their GPUs.

 

RedHat have a decent overview in their virtualization documentation: https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/6/html/virtualization_host_configuration_and_guest_installation_guide/chap-virtualization_host_configuration_and_guest_installation_guide-sr_iov

 

Hope that helps :)

Edited by Daniel15
Link to comment
14 minutes ago, wbgwwd said:

I think you should not bind the vGPUs to the VMs itself via VFIO:

Loading config from /boot/config/vfio-pci.cfg
BIND=0000:00:02.1|8086:4690 0000:00:02.2|8086:4690 0000:00:02.3|8086:4690 0000:00:02.4|8086:4690---
Processing 0000:00:02.1 8086:4690
---
Processing 0000:00:02.2 8086:4690
---
Processing 0000:00:02.3 8086:4690
---
Processing 0000:00:02.4 8086:4690
---
Devices listed in /sys/bus/pci/drivers/vfio-pci:
vfio-pci binding complete

 

Instead you should use the plugin to bind them to the VM, at least I think that's how you should do it, because as said I can't test this because I don't have compatible SRIOV hardware.

 

@domrockt can you help here please?

 

Please also change the file /boot/config/modprobe.d/i915-sriov.conf to:

# disable autoload old i915 module on boot
blacklist i915

(there are two empty spaces in-front of the second line which are maybe my fault)

 

You have to wait for @domrockt so that he can explain to you how this is working, maybe he can go through your Diagnostics and see what's wrong.

Link to comment
57 minutes ago, wbgwwd said:

Now there is a new problem, in the system when I start the bind reboot unraid, he gives this error

 

yea that error is normal have that too but its still working. as far as i understand the error comes because the VFIO command comes from the userscript the binding happens AFTER starting the array.

 

 

  • Like 1
Link to comment
12 minutes ago, wbgwwd said:

Can this problem be solved?

 

not with my knowledge

 

this userscript would need to start with unraid at boot

 

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

 

 

just delay your VM autostart to 60 Seconds and your VM will start with the VFs

Edited by domrockt
Link to comment
  • ich777 locked this topic
Guest
This topic is now closed to further replies.