Source: hiepchau.net
nano /etc/default/grub
# GRUB_CMDLINE_LINUX_DEFAULT="quiet" <- replace this line
GRUB_CMDLINE_LINUX_DEFAULT="quiet intel_iommu=on i915.enable_gvt=1 iommu=pt pcie_acs_override=downstream,multifunction video=efifb:off video=vesa:off vfio_iommu_type1.allow_unsafe_interrupts=1 kvm.ignore_msrs=1 modprobe.blacklist=radeon,nouveau,nvidia,nvidiafb,nvidia-gpu"
update-grub
nano /etc/modules
# Modules required for PCI passthrough
vfio
vfio_iommu_type1
vfio_pci
vfio_virqfd
update-initramfs -u -k all
lspci -nnv | grep VGA
ls -l /dev/dri
- major: 226
- minor: 0
- major: 226
- minor: 128
nano /etc/pve/lxc/<ID>.conf
lxc.cgroup2.devices.allow: c 226:0 rwm
lxc.cgroup2.devices.allow: c 226:128 rwm
lxc.mount.entry: /dev/dri/renderD128 dev/dri/renderD128 none bind,optional,create=file 0, 0
lxc.mount.entry: /dev/dri dev/dri none bind,optional,create=dir
Restart the container. Once it reboots login and check to see if it is working. I like to do this by installing intel-gpu-tools
and running intel_gpu_top