Skip to content

Instantly share code, notes, and snippets.

@azsde
Last active March 6, 2025 03:50
How to share N100 vGPU in Proxmox

Intel N100 vGPU Sharing on Proxmox

1 - Install & Update Proxmox 8.2

1.1 - Update the kernel

Proxmox will need to run between version : proxmox-kernel-6.5.13-3-pve ~ 6.8.12-1-pve

Things are currently working using proxmox-kernel-6.8.12-1-pve.

1.2 Install strongtz i915 sriov dkms driver

  1. Clone this repo : https://github.com/strongtz/i915-sriov-dkms
  2. Install build tools: apt install build-* dkms
  3. Install the kernel and headers for desired version: apt install proxmox-headers-6.8.12-1-pve proxmox-kernel-6.8.12-1-pve (for unsigned kernel).
  4. Change into the root of the cloned repository and run dkms add ..
  5. Execute the command dkms install -m i915-sriov-dkms -v 2024.09.21 --force or dkms install -m i915-sriov-dkms -v $(cat VERSION) --force for a version-independent command.
  6. 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, or add to it if you have other arguments there already.
  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. Update your grub: update-grub update-initramfs -u
  10. Reboot the system.
  11. 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.
  12. You can passthrough the VFs to LXCs or VMs. However, never touch the PF which is 02:00.0 under any circumstances.

2 - Set up your Debian 12 VM

Create a VM a attach any GPU (except number 0) to the VM, select Raw Device and tick Primary GPU

2.1 - Update the Kernel

Update the VM to use a kernel version >= 6.5.0 ( version 6.10.11+bpo-amd64 )was tested successfully).

Add the following to /etc/apt/sources.list

deb http://deb.debian.org/debian bookworm-backports main contrib non-free

Then

sudo apt update
# You can change the version to another one
sudo apt install -y linux-image-6.10.11+bpo-amd64 linux-headers-6.10.11+bpo-amd64 firmware-linux

2.2 - Install required packages

sudo apt install -y git dkms vainfo intel-media-va-driver

2.3 - Compile & Install i915 dkms module

# Replace your kernel version here
kernel=6.10.11+bpo-amd64

# Install i915-sriov-dkms module
git clone https://github.com/strongtz/i915-sriov-dkms.git /root/i915-sriov-dkms
cd /root/i915-sriov-dkms
rm -rf /usr/src/i915-sriov-dkms-* /var/lib/dkms/i915-sriov-dkms
dkms add .
dkms install -m i915-sriov-dkms -v $(cat VERSION) -k $kernel --force

# Set i915-sriov-dkms module parameters and enable grub kernel selection
echo 'GRUB_TIMEOUT=3' > /etc/default/grub.d/15_timeout.cfg
echo 'GRUB_CMDLINE_LINUX_DEFAULT="i915.enable_guc=3"' > /etc/default/grub.d/i915.cfg

# Update grub and initramfs
update-grub
update-initramfs -u -k all

# Optionally install the dkms MOK if you are using OVMF (UEFI) BIOS with SecureBoot (will ask you to set a password)
mokutil --import /var/lib/dkms/mok.pub

# Reboot

Upon reboot, you should be able to see in the logs:

dmesg | grep i915

[    0.000000] Command line: BOOT_IMAGE=/vmlinuz-6.10.11+bpo-amd64 root=/dev/mapper/deathstar--vg-root ro i915.enable_guc=3
[    0.016200] Kernel command line: BOOT_IMAGE=/vmlinuz-6.10.11+bpo-amd64 root=/dev/mapper/deathstar--vg-root ro i915.enable_guc=3
[    4.769149] i915: loading out-of-tree module taints kernel.
[    4.773569] i915: module verification failed: signature and/or required key missing - tainting kernel
[    5.138058] i915 0000:00:10.0: Running in SR-IOV VF mode
[    5.139949] i915 0000:00:10.0: [drm] *ERROR* GT0: IOV: Unable to confirm version 1.13 (0000000000000000)
[    5.142362] i915 0000:00:10.0: [drm] *ERROR* GT0: IOV: Found interface version 0.1.13.4
[    5.145191] i915 0000:00:10.0: vgaarb: deactivate vga console
[    5.151782] i915 0000:00:10.0: [drm] Using Transparent Hugepages
[    5.153781] i915 0000:00:10.0: [drm] *ERROR* GT0: IOV: Unable to confirm version 1.13 (0000000000000000)
[    5.153827] i915 0000:00:10.0: [drm] *ERROR* GT0: IOV: Found interface version 0.1.13.4
[    5.154237] i915 0000:00:10.0: GuC firmware PRELOADED version 0.0 submission:SR-IOV VF
[    5.154243] i915 0000:00:10.0: HuC firmware PRELOADED
[    5.154855] i915 0000:00:10.0: [drm] *ERROR* GT0: GUC: mmio request 0x4100: failure 201/0
[    5.154863] i915 0000:00:10.0: [drm] *ERROR* GT0: Failed to retrieve hwconfig table: -ENOENT
[    5.161465] i915 0000:00:10.0: [drm] Protected Xe Path (PXP) protected content support initialized
[    5.161495] i915 0000:00:10.0: [drm] PMU not supported for this GPU.
[    5.161599] [drm] Initialized i915 1.6.0 20201103 for 0000:00:10.0 on minor 0

And the following command should return something like this:

# Might require root if your user doesn't have required rights for renderD128 device
vainfo --display drm --device /dev/dri/renderD128

libva info: VA-API version 1.17.0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_17
libva info: va_openDriver() returns 0
vainfo: VA-API version: 1.17 (libva 2.12.0)
vainfo: Driver version: Intel iHD driver for Intel(R) Gen Graphics - 23.1.1 ()
vainfo: Supported profile and entrypoints
      VAProfileNone                   : VAEntrypointVideoProc
      VAProfileNone                   : VAEntrypointStats
      VAProfileMPEG2Simple            : VAEntrypointVLD
      VAProfileMPEG2Main              : VAEntrypointVLD
      VAProfileH264Main               : VAEntrypointVLD
      VAProfileH264Main               : VAEntrypointEncSliceLP
      VAProfileH264High               : VAEntrypointVLD
      VAProfileH264High               : VAEntrypointEncSliceLP
      VAProfileJPEGBaseline           : VAEntrypointVLD
      VAProfileJPEGBaseline           : VAEntrypointEncPicture
      VAProfileH264ConstrainedBaseline: VAEntrypointVLD
      VAProfileH264ConstrainedBaseline: VAEntrypointEncSliceLP
      VAProfileHEVCMain               : VAEntrypointVLD
      VAProfileHEVCMain               : VAEntrypointEncSliceLP
      VAProfileHEVCMain10             : VAEntrypointVLD
      VAProfileHEVCMain10             : VAEntrypointEncSliceLP
      VAProfileVP9Profile0            : VAEntrypointVLD
      VAProfileVP9Profile0            : VAEntrypointEncSliceLP
      VAProfileVP9Profile1            : VAEntrypointVLD
      VAProfileVP9Profile1            : VAEntrypointEncSliceLP
      VAProfileVP9Profile2            : VAEntrypointVLD
      VAProfileVP9Profile2            : VAEntrypointEncSliceLP
      VAProfileVP9Profile3            : VAEntrypointVLD
      VAProfileVP9Profile3            : VAEntrypointEncSliceLP
      VAProfileHEVCMain12             : VAEntrypointVLD
      VAProfileHEVCMain422_10         : VAEntrypointVLD
      VAProfileHEVCMain422_12         : VAEntrypointVLD
      VAProfileHEVCMain444            : VAEntrypointVLD
      VAProfileHEVCMain444            : VAEntrypointEncSliceLP
      VAProfileHEVCMain444_10         : VAEntrypointVLD
      VAProfileHEVCMain444_10         : VAEntrypointEncSliceLP
      VAProfileHEVCMain444_12         : VAEntrypointVLD
      VAProfileHEVCSccMain            : VAEntrypointVLD
      VAProfileHEVCSccMain            : VAEntrypointEncSliceLP
      VAProfileHEVCSccMain10          : VAEntrypointVLD
      VAProfileHEVCSccMain10          : VAEntrypointEncSliceLP
      VAProfileHEVCSccMain444         : VAEntrypointVLD
      VAProfileHEVCSccMain444         : VAEntrypointEncSliceLP
      VAProfileAV1Profile0            : VAEntrypointVLD
      VAProfileHEVCSccMain444_10      : VAEntrypointVLD
      VAProfileHEVCSccMain444_10      : VAEntrypointEncSliceLP
@lin0kin
Copy link

lin0kin commented Dec 5, 2024

hi, i using pve 8.2, using systemd-boot, and open sriov on pve.
when i following this page to open sriov on debian12 vm (kernel 6.1), i get this:

# dmesg |grep i915
[    0.000000] Command line: BOOT_IMAGE=/boot/vmlinuz-6.10.11+bpo-amd64 root=UUID=3c3b3284-3a84-4364-b4ba-56db18c6983c ro i915.enable_guc=3
[    0.000000] Kernel command line: BOOT_IMAGE=/boot/vmlinuz-6.10.11+bpo-amd64 root=UUID=3c3b3284-3a84-4364-b4ba-56db18c6983c ro i915.enable_guc=3

already try three times, do you know where went wrong?

@azsde
Copy link
Author

azsde commented Dec 6, 2024

Hi

I'm sorry I have absolutely no clue, it's weird that there is no other mention whatsoever to i915.

@lin0kin
Copy link

lin0kin commented Dec 7, 2024

Hi

I'm sorry I have absolutely no clue, it's weird that there is no other mention whatsoever to i915.

it's weird, i delete the vm, and i followed exactly the same steps to recreate a Debian 12 vm, and everything is working fine.

@sacredx72
Copy link

sacredx72 commented Jan 7, 2025

@azsde
Dear evening, I noticed errors in your instructions
"[ 5.154855] i915 0000:00:10.0: [drm] ERROR GT0: GUC: mmio request 0x4100: failure 201/0
[ 5.154863] i915 0000:00:10.0: [drm] ERROR GT0: Failed to retrieve hwconfig table: -ENOENT"
In the case of installation with Intel 1280P, after successful installation, such errors also occur, and it seems to me that these errors affect the operation of the Windows VM when installing the driver, error 43. I would like to clarify if you get errors "GT0: GUC: mmio request 0x4100: failure 201 /0" and "ERROR GT0: Failed to retrieve hwconfig table: -ENOENT" everything works stably on your system on N100?

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