Skip to content

Instantly share code, notes, and snippets.

@ccoles146
Last active November 18, 2024 08:36
Show Gist options
  • Save ccoles146/58e3ab3e53c156fe380b40ed00f1a482 to your computer and use it in GitHub Desktop.
Save ccoles146/58e3ab3e53c156fe380b40ed00f1a482 to your computer and use it in GitHub Desktop.
Intel Meteor Lake Ultra 5 vGPU iGPU SR-IOV VFs Support

How to get SR-IOV working for Intel Meteor Lake Ultra 5 iGPU

This is largely copied from

Statement of where we're at

Intel Arc driver support is available for Ubuntu 22.04 and 23.04 but not 24.04 or later Additional (more recent) drivers from Intel can be found here Hardware Support table is available here The above table suggests that the Ultra 5 which includes the 7dd5 PCI ID, is supported since kernel 6.8 but may need enabling by including the Kernel parameter force_probe=7dd5

In kernel 6.11 it seems that even with the latest Intel DRM driver installed it does not support SR-IOV This can be seen from the DMESG line: i915: unknown parameter 'max_vfs' ignored

This is confirmed by what Intel writes here

The following features are only available in the out-of-tree i915 kernel module: -GPU debugging -Single Root I/O Virtualization (SR-IOV) -Virtual Memory Binding (VM_BIND) and Ultra Low Latency Submission (ULLS)

Prior to Step one

  • Ensure SR-IOV is enabled in the BIOS
  • Also check that VT-d is enabled
  • Turn secure boot *OFF

Step one: Install the dkms driver

Clone this repo: git clone https://github.com/strongtz/i915-sriov-dkms

Install build tools: apt install build-* dkms

Optional but may help

Install the kernel and headers for desired version: apt install linux-headers-6.11.0-1002-intel linux-kernel-6.11.0-1002-intel (for unsigned kernel).

Proceed with dkms driver installation

cd ~
git clone https://github.com/strongtz/i915-sriov-dkms.git
cd ~/i915-sriov-dkms
cp -a ~/i915-sriov-dkms/dkms.conf{,.bak}
sed -i 's/ -j$(nproc)//g' ~/i915-sriov-dkms/dkms.conf
dkms_ver=$(grep 'PACKAGE_VERSION=' dkms.conf | awk -F '=' '{print $2}' | tr -d '"')
cat ~/i915-sriov-dkms/dkms.conf

Adjust kernel parameters

sudo nano /etc/default/grub

Change the following line:

GRUB_CMDLINE_LINUX_DEFAULT="intel_iommu=on i915.enable_guc=3 i915.max_vfs=7"

Or add those parameters as appropriate

Enable the VFs

In order to enable the VFs, a sysfs attribute must be set.

Install sysfsutils sudo apt install sysfsutils

Then do sudo -s 'echo "devices/pci0000:00/0000:00:02.0/sriov_numvfs = 7" > /etc/sysfs.conf', assuming your iGPU is on 00:02 bus. If not, use lspci | grep VGA to find the PCIe bus your iGPU is on.

Reboot

After updating Grub you need to run sudo update-grub

Reboot the system.

After updating drivers you need to run sudo update-initramfs -u

Ubuntu Host Installation Steps

Although the driver says it supports and is tested on Linux Kernel 6.8, I was getting error messages in DMESG about the GPU which cleared up when I installed Ubuntu 24.10. I later had issues installing this driver with the correct dependencies possibly because I'd installed other i915 drivers prior.

When the system is back up again, you should see the number of VFs under 02:00.1 - 02:00.7. Again, assuming your iGPU is on 00:02 bus. You can passthrough the VFs to LXCs or VMs. However, never touch the PF which is 02:00.0 under any circumstances.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment