Skip to content

Instantly share code, notes, and snippets.

@roylez
Last active March 13, 2024 11:53
Show Gist options
  • Save roylez/83abb5fb457d775211d16af762fc7edb to your computer and use it in GitHub Desktop.
Save roylez/83abb5fb457d775211d16af762fc7edb to your computer and use it in GitHub Desktop.

The following works for pve 8 with 6.5 kernel.

The driver is still experimental, use with your own discretion.

  • prepare env
git clone https://github.com/strongtz/i915-sriov-dkms
apt install dkms build-essential proxmox--headers-6.5 
  • modify dkms.conf
PACKAGE_NAME="i915-sriov-dkms"
PACKAGE_VERSION="6.1"
  • build dkms deb package
# add module
dkms add /root/i915-sriov-dkms

# check module status
dkms status

# build
dkms build i915-sriov-dkms/6.1

# install
dkms install i915-sriov-dkms/6.1

# if messed up
dkms uninstall i915-sriov-dkms/6.1
dkms remove i915-sriov-dkms/6.1 --all
  • update grub command line, and add intel_iommu=on i915.enable_guc=3 i915.max_vfs=7 to GRUB_CMDLINE_LINUX_DEFAULT, and run update-grub

  • reboot and check dmesg to see if it is working. If some i915 firmware file is missing, and there are errors like this

i915 0000:00:02.0: GuC firmware i915/tgl_guc_70.bin: fetch failed with error -2
i915 0000:00:02.0: [drm] GuC firmware(s) can be downloaded from https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/tree/i915
i915 0000:00:02.0: [drm] GuC firmware i915/tgl_guc_70.bin version 0.0.0
i915 0000:00:02.0: GuC initialization failed -2

so download the missing firmware file and place it in /usr/lib/firmware/i915, here it is tgl_guc_70.bin for gen 11 CPU. Firmware can be downloaded from here

If you see the following, it is successful.

[  +0.000121] i915 0000:00:02.0: 7 VFs could be associated with this PF
  • now it is possible to specify the number of VFs needed with the following.
echo 2 > /sys/devices/pci0000:00/0000:00:02.0/sriov_numvfs
@ovizii
Copy link

ovizii commented Mar 13, 2024

It is confirmed (not officially from intel) there is some issue with i915 driver on Windows with gen 11 CPU. Considering gen11 is no more a shiny new generation, I would not be surprised that Intel does not hurry to have it fixed.

Also I hear people have some success with latest Debian, though I could not recall if it was bookworm or sid. Anyway it could work with a Linux VM provided that it comes with up-to-date driver.

Damn. I really need to give some sort of GPU to a Win 11 VM. I failed with a Ryzen based mini PC and when I needed a second mini PC I went with an Intel based one in order to swap them around. One of the few that fit my criteria was a 12th gen but had an overheating problem and the replacement I found is (unfortunately) an I5 1135G7 Intel® 11th Gen CoreTM Processor ( Tiger Lake UP3) so it looks like I failed again.
I was hopeful when I read about the new code regarding i915 in the 6.8 kernel but after reading your reply I realize it's the Windows driver part which fails :-(

Thanks for your guide, at least I have managed to give GPU access to a few docker containers although that was not my main objective :-)

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