一、前提摘要

大家好,我是玖玖,最近入手了N100 EQ12零刻的小主机

安装了PVE,子系统如下:

  • 飞牛OS

  • 群晖NAS

  • Ubuntu

  • iKuai

  • OpenWRT

发现N100可以SR-IOV分身直通

二、直通介绍

This package is highly experimental, you should only use it when you know what you are doing.

You need to install this dkms module in both host and guest!

Tested kernel versions: 6.12.10-zen1/6.11.9-arch1/6.10.9-arch1/6.9.10-arch1/6.8.9-arch1 with ArchLinux

Required Kernel Parameters

intel_iommu=on i915.enable_guc=3 i915.max_vfs=7 module_blacklist=xe

Besides intel_iommu=on, the other 3 parameters could be applied by modprobe by putting following content to /etc/modprobe.d/i915-sriov-dkms.conf

blacklist xe
options i915 enable_guc=3
options i915 max_vfs=7

Creating Virtual Functions (VF)

echo 1 > /sys/devices/pci0000:00/0000:00:02.0/sriov_numvfs

You can create up to 7 VFs on Intel UHD Graphics

三、直通PVE宿主机端配置

  1. Install build tools: apt install build-* dkms

  2. Install the kernel and headers for desired version: apt install proxmox-headers-6.8 proxmox-kernel-6.8 (for unsigned kernel).

  3. Download deb package from the releases page

    wget -O /tmp/i915-sriov-dkms_2025.07.22_amd64.deb "https://github.com/strongtz/i915-sriov-dkms/releases/download/2025.07.22/i915-sriov-dkms_2025.07.22_amd64.deb"
  4. Install the deb package with dpkg: dpkg -i /tmp/i915-sriov-dkms_2025.07.22_amd64.deb

  5. Once finished, the kernel commandline needs to be adjusted: nano /etc/default/grub and change GRUB_CMDLINE_LINUX_DEFAULT to intel_iommu=on i915.enable_guc=3 i915.max_vfs=7 module_blacklist=xe, or add to it if you have other arguments there already.

  6. Update grub and initramfs by executing update-grub and update-initramfs -u

  7. Optionally pin the kernel version and update the boot config via proxmox-boot-tool.

  8. In order to enable the VFs, a sysfs attribute must be set. Install sysfsutils, then do 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.

  9. Reboot the system.

  10. 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.

  11. You can passthrough the VFs to LXCs or VMs. However, never pass the PF (02:00.0) to VM which would crash all other VFs.

四、飞牛OS配置

打开应用商店,安装dkms-i915这个包,重启即可

五、群晖/Ubuntu端配置

  1. Install build tools

    apt install build-* dkms linux-headers-$(uname -r) linux-modules-extra-$(uname -r)
    
  2. Download and install the .deb

    wget -O /tmp/i915-sriov-dkms_2025.07.22_amd64.deb "https://github.com/strongtz/i915-sriov-dkms/releases/download/2025.07.22/i915-sriov-dkms_2025.07.22_amd64.deb"
    dpkg -i /tmp/i915-sriov-dkms_2025.07.22_amd64.deb
    
  3. Update kernel parameters nano /etc/default/grub and change GRUB_CMDLINE_LINUX_DEFAULT to i915.enable_guc=3 module_blacklist=xe, or add to it if you have other arguments there already.

    Example:

    GRUB_CMDLINE_LINUX_DEFAULT="intel_iommu=on i915.enable_guc=3 module_blacklist=xe"
    
  4. Once that's done, update grub and initramfs, then reboot.

    update-grub
    update-initramfs -u
    
  5. Once the VM is back up again, do dmesg | grep i915 to see if your VF is recognized by the kernel. You should also check if xe is blacklisted correctly by running lspci -nnk to see which driver is in use by the VF.

  6. Optionally, install vainfo by running apt install vainfo, then do vainfo to see if the iGPU has been picked up by the VAAPI.

  7. If OpenCL is desired:

    apt install intel-opencl-icd
    apt install clinfo
    clinfo