Issue enabling SR-IOV on Intel Alder Lake-P iGPU (Proxmox 6.8, xe Driver)

triks

Member
Oct 17, 2022
46
4
13
Australia
I’ve been trying to enable SR-IOV on my Proxmox server with an Intel Alder Lake-P integrated GPU for GPU passthrough purposes. I have 2 Plex servers in lxc containers, 1 Windows 11 23H2 VM and was hoping to setup Kali in a VM also.

I’ve installed the latest Proxmox version and switched to the new `xe` driver, which has better support for newer Intel GPUs, including the Alder Lake architecture.

On the Windows VM, I installed the Intel graphics suite, but keep seeing various errors depending on how I setup the VM hardware config (PCI Device (hostpci0).

Intel(R) Iris(R) Xe Graphics. Windows has stopped this device because it has reported problems. (Code 43)

After uninstall and clean of intel drivers, still seeing Windows has stopped this device because it has reported problems. (Code 43) for Microsoft Basic Display Driver.

Questions:
1. Is there current SR-IOV support for Intel Alder Lake-P iGPUs using the `xe` driver?
2. Has anyone successfully enabled SR-IOV with the `xe` driver on Proxmox 6.8?
3. Are there any patches or updates I can apply to make this work, or should I be using the `i915` driver instead?

Any help/guidance/recommendations would be greatly appreciated!

Proxmox VE Version-: 6.8.12-1, Kernel-: 6.8.12-1-pve
BIOS Settings-: Intel Virtualization, SR-IOV

Series: ‎BOSGAME-P2-12700H-32GB
Operating System: ‎Proxmox VE
Number of Processors: ‎14
Computer Memory Type: ‎SODIMM
Hard Drive Interface: ‎PCIE x 4
CPU: Intel Core I7 12700H CPU (up to 4.7GHz 14C/20T, 24 MB Intel Smart Cache)
GPU: Intel Iris Xe Graphics eligible(Graphics Max Dynamic Frequency 1400 MHz)
RAM: Dual Channel SO-DIMM DDR4 32GB (16GB x 2)
ROM: NVMe PCIe 3.0 x4 512GB
WIFI: WiFi 6E(2.4Ghz, 5Ghz, 6Ghz)
CON: USB3.2 Type A x4,USB Type-C(Full Function , Support PD3.0), Dual RJ45 1000Mbps x1,
VIDEO: HDMI 2.0 + DP 1.4 + USB-C
NIC: 2 x Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 15)
Ports: NUSB 2.0 Ports 1, USB 3.0 Ports 4
Network:
1: lo: mtu 65536 link/loopback 00:00:00:00:00:00 inet 127.0.0.1/8 scope host lo
2: enp1s0: link/ether 84:47:09:##:##:##
3: enp2s0: link/ether 84:47:09::##:##:##
4: wlo1: link/ether e4:c7:67::##:##:## altname wlp0s20f3
5: vmbr0: link/ether 84:47:09::##:##:## inet 10.0.#.#/24 scope global vmbr0
6: vmbr1: link/ether 84:47:09::##:##:##



-What I've Done So Far:-

1. -Enable IOMMU in Proxmox-:
- Added the following parameters in `/etc/default/grub`:
Code:
     GRUB_CMDLINE_LINUX_DEFAULT="quiet intel_iommu=on iommu=pt"
- Updated GRUB and rebooted:
Code:
     update-grub
     reboot

2. -Switch to `xe` Driver-:
- To support the Alder Lake-P iGPU, I added the `xe` driver and blacklisted `i915`:
Code:
     echo "blacklist i915" > /etc/modprobe.d/blacklist-i915.conf
     echo "options xe enable_guc=3" > /etc/modprobe.d/xe.conf
- Rebuilt initramfs and rebooted:
Code:
     update-initramfs -u
     reboot

3. -Verify Driver Loading-:
- After rebooting, I verified that the `xe` driver was loaded:
Code:
     lspci -v -s 0000:00:02.0
Output shows that the kernel driver in use is `xe`:
Code:
     Kernel driver in use: xe
     Kernel modules: xe, i915

4. -Attempt to Enable SR-IOV-:
- Tried to enable SR-IOV by setting the number of virtual functions (VFs):
Code:
     echo 7 > /sys/class/drm/card0/device/sriov_numvfs
- However, this resulted in the following error:
Code:
     bash: echo: write error: No such file or directory

-dmesg Logs:-
In `dmesg`, I see that the `xe` driver is successfully loaded, but there's no mention of SR-IOV initialization for the GPU:
Code:
xe 0000:00:02.0: [drm] Initialized xe 1.1.0 20201103 for 0000:00:02.0 on minor 0
I also get this message:
Code:
xe 0000:00:02.0: [drm] HDCP support not yet implemented

-Current Status:-
- IOMMU groups are visible and seem to be working fine.
- The `xe` driver loads properly, but attempting to create VFs fails.
- I’ve checked BIOS settings, and SR-IOV is enabled.
- Firmware for GuC and HuC is also loaded successfully.

I followed this and other guides to no avail: https://www.derekseaman.com/2024/07...u-vt-d-passthrough-with-intel-alder-lake.html
 
Last edited:
Was this moved? I have very similar questions but with Rocket Lake/UHD 750/11700k. Wondering if it's just better to run a Linux distro as a dedktop enviorment and run virt manager. I feel like I'm wasting my igpu if proxmox can't use it. And I'm worried about blacklisting both my discrete gpu and my igpu. And as I understand it, even if I do I wouldn't be able to get a dispaly out form the igpu. Anyway, thougth I'd ask. I didn't see a link to this having been moved to the PVE forums. Thank you.
 
Hey me again. About to revisit this as I got a minisforum ms-01 with a 13900h. I also have an a310 that should fit nicely. Is sriov now natively supported in Linux kernel? Do I have to go with kernel 6.9? Or use the dkm module workaround? Or go with virt-manager? Any insight would be appreciated before I stumble through this set up lol.
 
Hey me again. About to revisit this as I got a minisforum ms-01 with a 13900h. I also have an a310 that should fit nicely. Is sriov now natively supported in Linux kernel? Do I have to go with kernel 6.9? Or use the dkm module workaround? Or go with virt-manager? Any insight would be appreciated before I stumble through this set up lol.
Hello, there.

You'll still need to use the DKMS driver. The instructions on the repo have been updated, and there's now a .deb package in each release, so it's easier than ever.

As of kernel 6.14, official support in the kernel is still inbound. A lot of plumbing has been added, but the Intel devs still haven't flipped the feature switch that would turn it on automatically.

https://github.com/strongtz/i915-sriov-dkms
 
Hello, there.

You'll still need to use the DKMS driver. The instructions on the repo have been updated, and there's now a .deb package in each release, so it's easier than ever.

As of kernel 6.14, official support in the kernel is still inbound. A lot of plumbing has been added, but the Intel devs still haven't flipped the feature switch that would turn it on automatically.

https://github.com/strongtz/i915-sriov-dkms
Thank you very much for the info! I have another question, as mentioned before, This is a 13900h system (igpu) with an arc310 intel discrete gpu. Will I be sharing both gpus with all VMs? Will I be able to get a display out? I guess I was looking to share the igpu (iris Xe) with multiple VMs (no display necessary) while passing through the a310 to a single VM (display preferred).
 
I think I can answer my own question shortly now that I have my pve install up and running. If I'm not mistaken, my igpu/iris xe and my discrete gpu/a310 both use the i915 driver. I know as part of gpu passthrough, you must blacklist drivers. Therefore I can't passthrough the gpu while trying to use sriov-dkms on the igpu. Of course I installed proxmox already lol. Anyway, for those interested, I think my other 2 options are to forgo proxmox and use virt-manager or continue with proxmox and passthrough both the gpu and igpu and see what my results are like. It seems like it would work but I would have no display from the igpu and of course no gpus left for other vms.
 
Or...theoretically if I use sriov-dkms I would have many Vgpus to divy up between all my VMs from the ipu and gpu. Hmmm. Anyone know if it'll work with both gpus using i915 kernal driver?
 
For the A310:
This is just a PCIe graphics card, so you shouldn't have any issues passing it through to a VM and getting an output out of it. Yes, the iGPU needs the i915 DKMS driver, and that driver will likely try to grab the A310 on boot, as well, but there should absolutely be a way to tell the system not to do that--to just ignore the PCIe GPU entirely. I just don't know how. (One reason I'm so into SR-IOV with the iGPU is that I've yet to run Proxmox on a system with a dedicated GPU of any kind. :P )

For the iGPU:

You can create up to 7 VFs (virtual functions) with the i915 driver on the iGPU. The easiest way to understand these, for me, has been to think of them as discrete "units" of the iGPU that can be individually assigned to VMs or LXCs, and activated at the same time. So, you can have two VMs running at the same time, each with their own VF (which the VM treats as an entire real onboard iGPU…it's not aware of there being anything different about it). Two VMs each with a VF, running at the same time, will theoretically split the power of the iGPU between them. And when only one of those VMs is running, its single VF uses the entire iGPU, because it doesn't have to share.

The issue with this, form a practical standpoint, is that the iGPU is still an iGPU. Wendell over at Level1Techs did a video on all this and really hammered home that we're slicing up something that's already pretty small and weak to begin with. Not a problem if you just need to do Remote Desktop work, but trying to do a lot of heavy lifting in multiple VMs at the same time would probably be an issue.

My system is set up to create 4 VFs (with the vague assumption that, in the worst case, I might need to run two guests with Remote Desktop at some point, plus a Plex server, and … something else?) I haven't pushed things at all yet, so I'm not really sure where the limits are, but I did manage to run a Windows 11 VM and a Linux VM at the same time with no issues.

That said, if I were going to do anything heavy duty (e.g., gaming or software defined radio), I'd be running those VMs by themselves. Once I have a Plex server running, I'll have to test and see whether having the Plex VM up and running and trying to use a Remote Desktop system causes me issues.

I hope that helps. Let me know if it was confusing.
This guide is a bit outdated compared to the current docs, but it's a good place to start to get an idea of how this process is supposed to work and the potential pitfalls (do not use Secure Boot on the Proxmox host): https://www.derekseaman.com/2024/07...u-vt-d-passthrough-with-intel-alder-lake.html

I'd suggest reading through that, and then once you understand how things are supposed to go, following the instructions on the DKMS GitHub to get the Proxmox server configured to use the iGPU. The instructions on the GitHub have been updated now that there's a .deb package deployment for the driver. It's much easier than building it from scratch.

Then test it with a Windows 11 VM using Derek's guide to configure the VM. The DKMS instructions will help with getting a Linux VM set up, but it's been my experience that Windows 11 is much easier to set up on the client side, and so it's a faster way to make sure the install is actually working.