Hello,
I got same kind of issue after upgrade from proxmox 6.4 to 7.2 with intel i7 8700 ( intel uhd 630 ) and solved it with following steps :
1- Edit grub config ( nano /etc/default/grub ) with following content :
Bash:
# If you change this file, run 'update-grub' afterwards to update
# /boot/grub/grub.cfg.
# For full documentation of the options in this file, see:
# info -f grub -n 'Simple configuration'
GRUB_DEFAULT=0
GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="quiet intel_iommu=on i915.enable_gvt=1 iommu=pt video=efifb:off video=vesafb:off"
GRUB_CMDLINE_LINUX="consoleblank=10 loglevel=3"
# Uncomment to enable BadRAM filtering, modify to suit your needs
# This works with Linux (no patch required) and with any kernel that obtains
# the memory map information from GRUB (GNU Mach, kernel of FreeBSD ...)
#GRUB_BADRAM="0x01234567,0xfefefefe,0x89abcdef,0xefefefef"
# Uncomment to disable graphical terminal (grub-pc only)
#GRUB_TERMINAL=console
# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command `vbeinfo'
#GRUB_GFXMODE=640x480
# Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux
#GRUB_DISABLE_LINUX_UUID=true
# Uncomment to disable generation of recovery mode menu entries
#GRUB_DISABLE_RECOVERY="true"
# Uncomment to get a beep at grub start
#GRUB_INIT_TUNE="480 440 1"
2- Run command :
update-grub
3- Load modules ( nano /etc/modules )
Bash:
# /etc/modules: kernel modules to load at boot time.
#
# This file contains the names of kernel modules that should be loaded
# at boot time, one per line. Lines beginning with "#" are ignored.
# Modules required for PCI passthrough
vfio
vfio_iommu_type1
vfio_pci
vfio_virqfd
# Modules required for Intel GVT-g Split
kvmgt
4-Blacklist module ( nano /etc/modprobe.d/blacklist.conf )
Bash:
blacklist snd_hda_intel
blacklist snd_hda_codec_hdmi
blacklist i915
5-Edit file /etc/modprobe.d/vfio.conf ( nano /etc/modprobe.d/vfio.conf ) and add your pci address
Code:
options vfio-pci ids=XXXX:YYYY
Replace XXXX:YYYY by your pci device address retrieved using
lspci -n -s 00:02
Value 00:02 is retrieve by looking outpoot of
lspci
and taking value corresponding to device ( in my case :
VGA compatible controller: Intel Corporation UHD Graphics 630 (Desktop) )
If you have 2 devices to passthrough ( like IGD + audio ), simply specify
Code:
options vfio-pci ids=XXXX:YYYY,AAAA:BBBB
6-Edit file /etc/modprobe.d/kvm.conf ( nano /etc/modprobe.d/kvm.conf ) and add following :
Bash:
options kvm ignore_msrs=1
7-Create folder /var/lib/vz/snippets :
mkdir /var/lib/vz/snippets
8-Create hookup script and add following (
nano /var/lib/vz/snippets/gpu-hookscript.sh
) :
Bash:
#!/bin/bash
if [ $2 == "pre-start" ]
then
echo "gpu-hookscript: unloading GPU driver for Virtual Machine $1"
modprobe -r i915
fi
9-Make script executable :
chmod +x /var/lib/vz/snippets/gpu-hookscript.sh
10-Supposing you already have your VM configured, add ( do not replace ) following to your VM config file (
nano /etc/pve/qemu-server/<id>.conf
) :
Bash:
hookscript: local:snippets/gpu-hookscript.sh
vga: none
hostpci1: 0000:00:XX,x-vga=1
Replace 0000:00:XX by your device address from lspci ( in my case : 0000:00:02,x-vga=1 )
11- Install kernel version 5.13.19-5 (
apt install pve-kernel-5.13.19-5-pve
)
12- Configure boot on kernel 5.13.19-5 : (
proxmox-boot-tool kernel pin 5.13.19-5-pve
)
13- Reboot :
reboot
If you want to upgrade kernel to newest version later, here are the commands :
Bash:
proxmox-boot-tool kernel unpin
reboot
Credits goes to several support threads :
https://pve.proxmox.com/wiki/PCI(e)_Passthrough
https://forum.proxmox.com/threads/gpu-passthrough-issues-after-upgrade-to-7-2.109051/
https://forum.proxmox.com/threads/gpu-passthrough-on-7-2-stopped-working-since-upgrade.109514/
https://forum.proxmox.com/threads/problem-with-gpu-passthrough.55918/page-2
https://forum.proxmox.com/threads/proxmox-7-1-gpu-passthrough.100601/
https://forum.proxmox.com/threads/gpu-passthrough-not-working-bar-3.60996/#post-290145
On my installation, method of device reset indicated on other threads was causing host to crash ( code below ) :
Bash:
echo 1 > /sys/bus/pci/devices/0000\:09\:00.0/remove
echo 1 > /sys/bus/pci/rescan
For an unknown reason, module i915 was loaded despite blacklist which was preventing VM from displaying pictures. ( Visible with
lsmod | grep i915
). This is the reason for the adapted gpu-hookscript.sh
I was not able to make passthrough working with default kernel but there is a known issue with simplefb indicated on the documentation :
https://pve.proxmox.com/wiki/Roadmap
Maybe kernel downgrade could be removed in the future.