Proxmox iGPU Passthrough to VM (Intel Integrated Graphics)

Aus Laub-Home Wiki

There are two ways to use iGPU passthrough to VM. The first way is to use the Full iGPU Passthrough to VM. The second way is to use the iGPU GVT-g technology which allows as to split the iGPU into two parts.

We will be covering the Full iGPU Passthrough for an Intel integrated iGPU.


Warning:

You will loose the ability to use the onboard graphics card to access the Proxmox's console since Proxmox won't be able to use the Intel's gpu.


1. Edit the grub configuration file /etc/default/grub and find the line that starts with GRUB_CMDLINE_LINUX_DEFAULT by default they should look like this: GRUB_CMDLINE_LINUX_DEFAULT="quiet"

Add intel_iommu=on iommu=pt to this line.


2. Update grub configuration for next reboot update-grub


3. Add vfio modules to allow PCI passthrough in /etc/modules

# Modules required for PCI passthrough
vfio
vfio_iommu_type1
vfio_pci
vfio_virqfd

# Modules required for Intel GVT-g Split
kvmgt


4. Update configuration changes made in your /etc filesystem

update-initramfs -u -k all


5. Reboot Proxmox system


6. Verify that IOMMU is enabled: dmesg | grep -e DMAR -e IOMMU

There should be a line that looks like DMAR: IOMMU enabled. If there is no output, something is wrong.


7. Find the PCI address of the iGPU: lspci -nnv | grep VGA

This should result in output similar to this (If you have multiple VGA, look for the one that has the Intel in the name):

00:02.0 VGA compatible controller [0300]: Intel Corporation CometLake-S GT2 [UHD Graphics 630] [8086:3e92] (prog-if 00 [VGA controller])


8. Create/ edit VM; VM should be configured the Machine type to q35

The most consistent way to utilize the GPU acceleration is to disable Proxmox's Virtual Graphics card of the vm. The drawback of disabling the Virtual Graphics card is that it will not be able to access the vm via proxmox's vnc console. The workaround is to enable Remote Desktop (RDP) on the VM before disabling the Virtual Graphics card and accessing the VM via RDP or use any other remove desktop client. If you loose the ability to access the VM via RDP you can temporarily remove the GPU PCI Device and re-enable the virtual graphics card


9. Open the web gui and navigate to the Hardware tab of the VM you want to add a vGPU. Click Add above the device list and then choose PCI Device. Open the Device dropdown and select the iGPU, which you can find using it’s PCI address. This list uses a different format for the PCI addresses id, 00:02.0 is listed as 0000:00:02.0.

Select All Functions, ROM-Bar, PCI-Express and then click Add.


10. Connect to the VM via Remote Desktop (RDP) or any other remote access protocol you prefer. Install the latest version of Intel's Graphics Driver or use the Intel Driver & Support Assistant installer.

11. Linux VM: Boot the VM. To test the iGPU passthrough was successful, you can use the following command:

 sudo lspci -nnv | grep VGA

The output should include the Intel iGPU:

00:10.0 VGA compatible controller [0300]: Intel Corporation UHD Graphics 630 (Desktop) [8086:3e92] (prog-if 00 [VGA controller])

Now we need to check if the GPU's Driver initalization is working.

cd /dev/dri && ls -la

The output should include the renderD128