Passthrough iGPU Alder Lake (Intel 12th) via Proxmox, what's next?

Fazio8

New Member
Jan 9, 2023
17
1
3
Hello,

I'm able to passthrough the iGPU of my Intel i5-1240p (NUC 12 Pro) to a Windows 11 VM:
Af8sJCG.png


I built and installed the i915-srvio module (I'm on kernel 6.1) from here: https://github.com/strongtz/i915-sriov-dkms
Then did the following configurations:

Code:
root@pve:~# cat /etc/kernel/cmdline
root=ZFS=rpool/ROOT/pve-1 boot=zfs quiet intel_iommu=on i915.enable_guc=7 i915.force_probe=46a6

Rebuild the UEFI with
Code:
update-initramfs -u -k all
pve-efiboot-tool refresh

Rebooted the host and:

Code:
root@pve:~# echo 7 > /sys/devices/pci0000\:00/0000\:00\:02.0/sriov_numvfs

After these config, I set my VM to use the PCI device as follows:

Code:
hostpci0: 0000:00:02.7,pcie=1,x-vga=1

Booted Windows and installed updated drivers with Intel tool.

Now, I'm looking to do a full passthrough to obtain physical output for video/audio over HDMI.
Do you know how to proceed forward? I followed the tutorials on https://3os.org/infrastructure/proxmox/gpu-passthrough/igpu-passthrough-to-vm/#introduction and the official Proxmox PCI passthrough documentation but all cause crash/BSOD the guest at the boot.

Thank you!
 
  • Like
Reactions: scyto
If I set:

Code:
root@pve:~# cat /etc/modprobe.d/vfio.conf
options vfio-pci ids=8086:46a6 disable_vga=1
root@pve:~# cat /etc/modprobe.d/pve-blacklist.conf
# This file contains a list of modules which are not supported by Proxmox VE

# nidiafb see bugreport https://bugzilla.proxmox.com/show_bug.cgi?id=701
blacklist nvidiafb

blacklist i915
blacklist igb
root@pve:~# cat /etc/kernel/cmdline
root=ZFS=rpool/ROOT/pve-1 boot=zfs quiet intel_iommu=on i915.enable_guc=7 i915.force_probe=46a6 iommu=pt video=vesafb:off video=efifb:off initcall_blacklist=sysfb_init

I'm able to boot the Windows VM with hostpci0: 0000:00:02.0,pcie=1 but I got error 43 in device manager.
 
Hello,

I'm able to passthrough the iGPU of my Intel i5-1240p (NUC 12 Pro) to a Windows 11 VM:
Af8sJCG.png


I built and installed the i915-srvio module (I'm on kernel 6.1) from here: https://github.com/strongtz/i915-sriov-dkms
Then did the following configurations:

Code:
root@pve:~# cat /etc/kernel/cmdline
root=ZFS=rpool/ROOT/pve-1 boot=zfs quiet intel_iommu=on i915.enable_guc=7 i915.force_probe=46a6

Rebuild the UEFI with
Code:
update-initramfs -u -k all
pve-efiboot-tool refresh

Rebooted the host and:

Code:
root@pve:~# echo 7 > /sys/devices/pci0000\:00/0000\:00\:02.0/sriov_numvfs

After these config, I set my VM to use the PCI device as follows:

Code:
hostpci0: 0000:00:02.7,pcie=1,x-vga=1

Booted Windows and installed updated drivers with Intel tool.

Now, I'm looking to do a full passthrough to obtain physical output for video/audio over HDMI.
Do you know how to proceed forward? I followed the tutorials on https://3os.org/infrastructure/proxmox/gpu-passthrough/igpu-passthrough-to-vm/#introduction and the official Proxmox PCI passthrough documentation but all cause crash/BSOD the guest at the boot.

Thank you!
I have same NUC12 and processor as you have but currently unable to passthrough the GPU without error codes. I have upgraded the kernel to 6.1 and succesfully installed i915-srvio module. After this I was able to execute the same steps in root and assigning the same PCI device and configurations to the Windows 11 host. From here I installed the same driver version as you did (31.0.101.4032). It detects the Intel(R) Iris(R) Xe Graphics adapter but I get the error 43 in device manager. If you manually reinstall the driver it is complaining that the device can not be started (igfxn). I have installed the latest virtual drivers for windows. Any suggestions how I can make it work?
 
I was able to perform the passthrough only passing the virtual functions of the PCIe device:

Code:
root@pve:~# echo 7 > /sys/devices/pci0000\:00/0000\:00\:02.0/sriov_numvfs

At this point I was able to clean and reinstall the driver on the Windows guest
 
Great to know you got that far, may I know if you eventually got video and audio passed through to physical HDMI output?
 
I have tried the most steps before root@pve:~# echo 7 > /sys/devices/pci0000\:00/0000\:00\:02.0/sriov_numvfs,

but this echo gives me the error of no such file, even add \ before : or not. And by doing cat sriov_numvfs file, it always 0. Any idea, please?

Cheers
 
I have tried the most steps before root@pve:~# echo 7 > /sys/devices/pci0000\:00/0000\:00\:02.0/sriov_numvfs,

but this echo gives me the error of no such file, even add \ before : or not. And by doing cat sriov_numvfs file, it always 0. Any idea, please?

Cheers
Did you get anywhere with this, I also have the same issue.

which gives also me the error
-bash: echo: write error: No such file or directory

ls /sys/devices/pci0000\:00/0000\:00\:02.0/sriov_numvfs
works and tells me the file is there

if I try nano /sys/devices/pci0000\:00/0000\:00\:02.0/sriov_numvfs
that tells me
[ Error writing lock file /sys/devices/pci0000:00/0000:00:02.0/.sriov_numvfs.swp: Permission denied ]
 
Ok sorted it, although I am not entirely sure how.
1st need to remember that sriov_numvfs is not a real file, it is an attribute in a device driver, in this case the video card.
1st I thought it was because I was using a newer driver, but trying older ones had the same results.
In the end I think it was more related to changing parameters in

/etc/modprobe.d/vfio.conf
(now) options vfio-pci ids=8086:46a6 disable_vga=1
I had added some others from other conversations on gpu passthrough,

I had also added this to my modules file... so removed those
vfio
vfio_iommu_type1
vfio_pci
vfio_virqfd

also blacklisting seemed to do stuff... anyway..

1) I am now using the driver that comes with kernel 6.2.16-5-pve
which seems to be i915 1.6.0 20201103

2) grub command line in grub file is
GRUB_CMDLINE_LINUX_DEFAULT="intel_iommu=on i915.enable_guc=3 i915.max_vfs=7 i915.force_probe=46a6"

3) /etc/modprobe.d/vfio.conf
options vfio-pci ids=8086:46a6 disable_vga=1

4) sysutils is installed and
/etc/sysfs.conf
devices/pci0000:00/0000:00:02.0/sriov_numvfs = 7

which sets numvfs on boot.


I then had the issue that when I used the gui to set the windows pci grafics settings I kept getting an error that it couldn't find the pci details and the VF mode got turned off.. so had to hand edit the machines config file in
/etc/pve/nodes/gooseberry/qemu-server
and add the line
hostpci0: 0000:00:02.7,pcie=1,x-vga=1
it could be the x-vga=1 that isnt being added by the gui.

anyway after wrestling with this for hours, it works.


btw this is what
dmesg | grep i915
gives me
Code:
[    0.000000] Command line: BOOT_IMAGE=/boot/vmlinuz-6.2.16-5-pve root=/dev/mapper/pve-root ro intel_iommu=on i915.enable_guc=3 i915.max_vfs=7 i915.force_probe=46a6
[    0.082863] Kernel command line: BOOT_IMAGE=/boot/vmlinuz-6.2.16-5-pve root=/dev/mapper/pve-root ro intel_iommu=on i915.enable_guc=3 i915.max_vfs=7 i915.force_probe=46a6
[    4.948718] i915 0000:00:02.0: Running in SR-IOV PF mode
[    4.950261] i915 0000:00:02.0: [drm] VT-d active for gfx access
[    4.950716] i915 0000:00:02.0: vgaarb: deactivate vga console
[    4.950751] i915 0000:00:02.0: [drm] Using Transparent Hugepages
[    4.951148] i915 0000:00:02.0: vgaarb: changed VGA decodes: olddecodes=io+mem,decodes=io+mem:owns=io+mem
[    4.953914] i915 0000:00:02.0: [drm] Finished loading DMC firmware i915/adlp_dmc.bin (v2.16)
[    4.966776] i915 0000:00:02.0: [drm] GT0: GuC firmware i915/adlp_guc_70.bin version 70.5.1
[    4.966782] i915 0000:00:02.0: [drm] GT0: HuC firmware i915/tgl_huc.bin version 7.9.3
[    4.981209] i915 0000:00:02.0: [drm] GT0: HuC: authenticated for all workloads!
[    4.982049] i915 0000:00:02.0: [drm] GT0: GUC: submission enabled
[    4.982052] i915 0000:00:02.0: [drm] GT0: GUC: SLPC enabled
[    4.982533] i915 0000:00:02.0: [drm] GuC RC: enabled
[    4.983559] i915 0000:00:02.0: [drm] Protected Xe Path (PXP) protected content support initialized
[    5.010784] [drm] Initialized i915 1.6.0 20201103 for 0000:00:02.0 on minor 0
[    5.012426] snd_hda_intel 0000:00:1f.3: bound 0000:00:02.0 (ops i915_audio_component_bind_ops [i915])
[    5.012823] i915 0000:00:02.0: 7 VFs could be associated with this PF
[    5.049437] fbcon: i915drmfb (fb0) is primary device
[    5.127842] i915 0000:00:02.0: [drm] fb0: i915drmfb frame buffer device
[    5.660352] i915 0000:00:02.0: vgaarb: changed VGA decodes: olddecodes=io+mem,decodes=none:owns=io+mem
[    5.661211] i915 0000:00:02.1: enabling device (0000 -> 0002)
[    5.662031] i915 0000:00:02.1: Running in SR-IOV VF mode
[    5.663298] i915 0000:00:02.1: [drm] GT0: GUC: interface version 0.1.0.0
[    5.666569] i915 0000:00:02.1: [drm] VT-d active for gfx access
[    5.667334] i915 0000:00:02.1: [drm] Using Transparent Hugepages
[    5.668676] i915 0000:00:02.1: [drm] GT0: GUC: interface version 0.1.0.0
[    5.670154] i915 0000:00:02.1: GuC firmware PRELOADED version 1.0 submission:SR-IOV VF
[    5.670896] i915 0000:00:02.1: HuC firmware PRELOADED
[    5.674461] i915 0000:00:02.1: [drm] Protected Xe Path (PXP) protected content support initialized
[    5.675198] i915 0000:00:02.1: [drm] PMU not supported for this GPU.
[    5.676273] [drm] Initialized i915 1.6.0 20201103 for 0000:00:02.1 on minor 1
[    5.681567] i915 0000:00:02.0: vgaarb: changed VGA decodes: olddecodes=none,decodes=none:owns=io+mem
[    5.682315] i915 0000:00:02.1: vgaarb: changed VGA decodes: olddecodes=io+mem,decodes=none:owns=none
[    5.683087] i915 0000:00:02.2: enabling device (0000 -> 0002)
[    5.683845] i915 0000:00:02.2: Running in SR-IOV VF mode
[    5.685240] i915 0000:00:02.2: [drm] GT0: GUC: interface version 0.1.0.0
[    5.687300] i915 0000:00:02.2: [drm] VT-d active for gfx access
[    5.688030] i915 0000:00:02.2: [drm] Using Transparent Hugepages
[    5.689267] i915 0000:00:02.2: [drm] GT0: GUC: interface version 0.1.0.0
[    5.690429] i915 0000:00:02.2: GuC firmware PRELOADED version 1.0 submission:SR-IOV VF
[    5.691134] i915 0000:00:02.2: HuC firmware PRELOADED
[    5.694379] i915 0000:00:02.2: [drm] Protected Xe Path (PXP) protected content support initialized
[    5.695379] i915 0000:00:02.2: [drm] PMU not supported for this GPU.
[    5.696356] [drm] Initialized i915 1.6.0 20201103 for 0000:00:02.2 on minor 2
[    5.701214] i915 0000:00:02.0: vgaarb: changed VGA decodes: olddecodes=none,decodes=none:owns=io+mem
[    5.701954] i915 0000:00:02.1: vgaarb: changed VGA decodes: olddecodes=none,decodes=none:owns=none
[    5.702692] i915 0000:00:02.2: vgaarb: changed VGA decodes: olddecodes=io+mem,decodes=none:owns=none
[    5.703511] i915 0000:00:02.3: enabling device (0000 -> 0002)
[    5.704278] i915 0000:00:02.3: Running in SR-IOV VF mode
[    5.705383] i915 0000:00:02.3: [drm] GT0: GUC: interface version 0.1.0.0
[    5.706901] i915 0000:00:02.3: [drm] VT-d active for gfx access
[    5.707631] i915 0000:00:02.3: [drm] Using Transparent Hugepages
[    5.708787] i915 0000:00:02.3: [drm] GT0: GUC: interface version 0.1.0.0
[    5.710099] i915 0000:00:02.3: GuC firmware PRELOADED version 1.0 submission:SR-IOV VF
[    5.710813] i915 0000:00:02.3: HuC firmware PRELOADED
[    5.714677] i915 0000:00:02.3: [drm] Protected Xe Path (PXP) protected content support initialized
[    5.715411] i915 0000:00:02.3: [drm] PMU not supported for this GPU.
[    5.716369] [drm] Initialized i915 1.6.0 20201103 for 0000:00:02.3 on minor 3
[    5.721037] i915 0000:00:02.0: vgaarb: changed VGA decodes: olddecodes=none,decodes=none:owns=io+mem
[    5.721758] i915 0000:00:02.1: vgaarb: changed VGA decodes: olddecodes=none,decodes=none:owns=none
[    5.722456] i915 0000:00:02.2: vgaarb: changed VGA decodes: olddecodes=none,decodes=none:owns=none
[    5.723150] i915 0000:00:02.3: vgaarb: changed VGA decodes: olddecodes=io+mem,decodes=none:owns=none
[    5.723897] i915 0000:00:02.4: enabling device (0000 -> 0002)
[    5.724651] i915 0000:00:02.4: Running in SR-IOV VF mode
[    5.725717] i915 0000:00:02.4: [drm] GT0: GUC: interface version 0.1.0.0
[    5.727289] i915 0000:00:02.4: [drm] VT-d active for gfx access
[    5.727993] i915 0000:00:02.4: [drm] Using Transparent Hugepages
[    5.729145] i915 0000:00:02.4: [drm] GT0: GUC: interface version 0.1.0.0
[    5.730357] i915 0000:00:02.4: GuC firmware PRELOADED version 1.0 submission:SR-IOV VF
[    5.731078] i915 0000:00:02.4: HuC firmware PRELOADED
[    5.735063] i915 0000:00:02.4: [drm] Protected Xe Path (PXP) protected content support initialized
[    5.735770] i915 0000:00:02.4: [drm] PMU not supported for this GPU.
[    5.736766] [drm] Initialized i915 1.6.0 20201103 for 0000:00:02.4 on minor 4
[    5.741299] i915 0000:00:02.0: vgaarb: changed VGA decodes: olddecodes=none,decodes=none:owns=io+mem
[    5.741994] i915 0000:00:02.1: vgaarb: changed VGA decodes: olddecodes=none,decodes=none:owns=none
[    5.742702] i915 0000:00:02.2: vgaarb: changed VGA decodes: olddecodes=none,decodes=none:owns=none
[    5.743381] i915 0000:00:02.3: vgaarb: changed VGA decodes: olddecodes=none,decodes=none:owns=none
[    5.744055] i915 0000:00:02.4: vgaarb: changed VGA decodes: olddecodes=io+mem,decodes=none:owns=none
[    5.744842] i915 0000:00:02.5: enabling device (0000 -> 0002)
[    5.745540] i915 0000:00:02.5: Running in SR-IOV VF mode
[    5.746411] i915 0000:00:02.5: [drm] GT0: GUC: interface version 0.1.0.0
[    5.747746] i915 0000:00:02.5: [drm] VT-d active for gfx access
[    5.748453] i915 0000:00:02.5: [drm] Using Transparent Hugepages
[    5.749463] i915 0000:00:02.5: [drm] GT0: GUC: interface version 0.1.0.0
[    5.750469] i915 0000:00:02.5: GuC firmware PRELOADED version 1.0 submission:SR-IOV VF
[    5.751126] i915 0000:00:02.5: HuC firmware PRELOADED
[    5.754094] i915 0000:00:02.5: [drm] Protected Xe Path (PXP) protected content support initialized
[    5.754771] i915 0000:00:02.5: [drm] PMU not supported for this GPU.
[    5.755689] [drm] Initialized i915 1.6.0 20201103 for 0000:00:02.5 on minor 5
[    5.760145] i915 0000:00:02.0: vgaarb: changed VGA decodes: olddecodes=none,decodes=none:owns=io+mem
[    5.760838] i915 0000:00:02.1: vgaarb: changed VGA decodes: olddecodes=none,decodes=none:owns=none
[    5.761525] i915 0000:00:02.2: vgaarb: changed VGA decodes: olddecodes=none,decodes=none:owns=none
[    5.762206] i915 0000:00:02.3: vgaarb: changed VGA decodes: olddecodes=none,decodes=none:owns=none
[    5.762879] i915 0000:00:02.4: vgaarb: changed VGA decodes: olddecodes=none,decodes=none:owns=none
[    5.763550] i915 0000:00:02.5: vgaarb: changed VGA decodes: olddecodes=io+mem,decodes=none:owns=none
[    5.764306] i915 0000:00:02.6: enabling device (0000 -> 0002)
[    5.764986] i915 0000:00:02.6: Running in SR-IOV VF mode
[    5.765838] i915 0000:00:02.6: [drm] GT0: GUC: interface version 0.1.0.0
[    5.767263] i915 0000:00:02.6: [drm] VT-d active for gfx access
[    5.767904] i915 0000:00:02.6: [drm] Using Transparent Hugepages
[    5.768926] i915 0000:00:02.6: [drm] GT0: GUC: interface version 0.1.0.0
[    5.769903] i915 0000:00:02.6: GuC firmware PRELOADED version 1.0 submission:SR-IOV VF
[    5.770538] i915 0000:00:02.6: HuC firmware PRELOADED
[    5.773268] i915 0000:00:02.6: [drm] Protected Xe Path (PXP) protected content support initialized
[    5.773913] i915 0000:00:02.6: [drm] PMU not supported for this GPU.
[    5.774750] [drm] Initialized i915 1.6.0 20201103 for 0000:00:02.6 on minor 6
[    5.778965] i915 0000:00:02.0: vgaarb: changed VGA decodes: olddecodes=none,decodes=none:owns=io+mem
[    5.779627] i915 0000:00:02.1: vgaarb: changed VGA decodes: olddecodes=none,decodes=none:owns=none
[    5.780280] i915 0000:00:02.2: vgaarb: changed VGA decodes: olddecodes=none,decodes=none:owns=none
[    5.780951] i915 0000:00:02.3: vgaarb: changed VGA decodes: olddecodes=none,decodes=none:owns=none
[    5.781604] i915 0000:00:02.4: vgaarb: changed VGA decodes: olddecodes=none,decodes=none:owns=none
[    5.782254] i915 0000:00:02.5: vgaarb: changed VGA decodes: olddecodes=none,decodes=none:owns=none
[    5.782892] i915 0000:00:02.6: vgaarb: changed VGA decodes: olddecodes=io+mem,decodes=none:owns=none
[    5.783588] i915 0000:00:02.7: enabling device (0000 -> 0002)
[    5.784235] i915 0000:00:02.7: Running in SR-IOV VF mode
[    5.785219] i915 0000:00:02.7: [drm] GT0: GUC: interface version 0.1.0.0
[    5.786781] i915 0000:00:02.7: [drm] VT-d active for gfx access
[    5.787415] i915 0000:00:02.7: [drm] Using Transparent Hugepages
[    5.788442] i915 0000:00:02.7: [drm] GT0: GUC: interface version 0.1.0.0
[    5.789676] i915 0000:00:02.7: GuC firmware PRELOADED version 1.0 submission:SR-IOV VF
[    5.790300] i915 0000:00:02.7: HuC firmware PRELOADED
[    5.794191] i915 0000:00:02.7: [drm] Protected Xe Path (PXP) protected content support initialized
[    5.794818] i915 0000:00:02.7: [drm] PMU not supported for this GPU.
[    5.795530] [drm] Initialized i915 1.6.0 20201103 for 0000:00:02.7 on minor 7
[    5.796304] i915 0000:00:02.0: Enabled 7 VFs
[   70.284030] i915 0000:00:02.0: VF7 FLR
[   71.969392] i915 0000:00:02.0: VF7 FLR
[   72.088539] i915 0000:00:02.0: VF7 FLR
[   99.057475] i915 0000:00:02.0: VF7 FLR
 
Also trying to get it to output via HDMI...
no Joy, only thing of interest is that if hostpci0 is set to 0000:00:02.0, then it kills the hdmi output, but also kills gpu passthrough.
with hostpci0 set to 0000:00:02.7 proxmox seems to continue to display something on the output (although not sure if it still updates) but gpu passthrough still works...

I thought there ought to be able to link a VF (Virtual Function) to a HDMI output, but I still don't really know what I am doing, and I haunt been able to find anything yet.
 
  • Like
Reactions: scyto
Ok, i am an idiot, i missed the step about changing the VM to host CPU type. That fixed my code 43 on the video adapter.
Working just fine.
Screenshot 2023-08-24 172901.jpg
 
  • Like
Reactions: stevedh
BTW anyone trying to get a HDMI output... I don't think you can when using VFs. (although I would really like someone to prove me wrong, but after lots of searching that was the conclusion I came to).
HOWEVER if all you want is output for a Media player then use a USB to HDMI adapter... I got a one of these
https://www.amazon.co.uk/dp/B076SX73LY
worked 1st time (just passed through the USB port) on a windows VM... and comments say someone managed to get it to work on linux.

note though in order to see the actual displayed screen remotely I had to use google remote desktop as the windows remote desktop connection sort of creates its own screen.

So basically VFs are great for giving multiple remote VMs hardware acceleration, although to get it to work through windows remote desktop connection some settings need to be changed. Not sure if there is a better remote client that works with VFs.
 
  • Like
Reactions: blebo and isthevao
Not sure if there is a better remote client that works with VFs.
What do you mean by better? What is RDP or VNC not giving you?
(BTW despite instructions around the web saying you have to set display to none in the VM config, that's not actually needed, set to VirtIO GPU once the VirtIO tools are installed)
 
Last edited:
just to show off a little?
RDP, VNC webui console and Spice all connected to the same VM...

Screenshot 2023-08-25 085137.jpg
 
Last edited:
  • Like
Reactions: zooky
So basically VFs are great for giving multiple remote VMs hardware acceleration,
I agree with you conclusion. And your assertion about HDMI.

Cool pragmatic workaround about USB display - did you manage to prove the iGPU acceleration was being used for anything composited on that display screen?
 
@scyto Can you outline the exact steps you took to enable this to work? I have a Intel NUC with a Core i5 1340p and Iris Xe graphics and I cannot get any type of passthrough to work. I always get Error 43...
 
@scyto Can you outline the exact steps you took to enable this to work? I have a Intel NUC with a Core i5 1340p and Iris Xe graphics and I cannot get any type of passthrough to work. I always get Error 43...
I was able to get this working by removing all CPU flags I previously had to enable Nested Virtualization and setting it only to host.
 
  • Like
Reactions: scyto

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!