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.
- Clone this repo : https://github.com/strongtz/i915-sriov-dkms
- Install build tools:
apt install build-* dkms
- 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). - Change into the root of the cloned repository and run
dkms add .
. - Execute the command
dkms install -m i915-sriov-dkms -v 2024.09.21 --force
ordkms install -m i915-sriov-dkms -v $(cat VERSION) --force
for a version-independent command. - Once finished, the kernel commandline needs to be adjusted:
nano /etc/default/grub
and changeGRUB_CMDLINE_LINUX_DEFAULT
tointel_iommu=on i915.enable_guc=3 i915.max_vfs=7
, or add to it if you have other arguments there already. - Optionally pin the kernel version and update the boot config via
proxmox-boot-tool
. - In order to enable the VFs, a
sysfs
attribute must be set. Installsysfsutils
, then doecho "devices/pci0000:00/0000:00:02.0/sriov_numvfs = 7" > /etc/sysfs.conf
, assuming your iGPU is on 00:02 bus. If not, uselspci | grep VGA
to find the PCIe bus your iGPU is on. - Update your grub:
update-grub
update-initramfs -u
- Reboot the system.
- 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.
Create a VM a attach any GPU (except number 0) to the VM, select Raw Device and tick Primary GPU
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
sudo apt install -y git dkms vainfo intel-media-va-driver
# 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
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:
already try three times, do you know where went wrong?