Virtual graphics card performance is too weak.we need to use real graphics card to improve display performance.
Before starting passthough gpu card.Make sure something right first.
1 your passthough card is AMD card.
Because NVDIA company made a check in their video card drivers.If it found that the system is VM system.The driver will stop working.Although there is a way to bypass the drive blockade, it is troublesome.AMD gpu cards don’t have this problem.
2 Your gpu card support UEFI bios.
Although traditional seabios can also be passthough successful.But there are always strange problems.
For example.My card RX560.Running score under real system can reach 70,000 points.It can work normal under UEFI mode and reach 68,000 points.But only get 7,000 points under seabios mode.And if I run GPU-Z. The guest system windows get blue screen crash and whole system crash completely.
Now we can start passthough work.
1 enable UEFI boot in your Physical machine bios.
If your machine do not suport UEFI mode.It doesn’t matter.We can dump gpu card bios and use it as a file in proxmox.
intel cpu: modify to
GRUB_CMDLINE_LINUX_DEFAULT="quiet intel_iommu=on iommu=pt video=efifb:off"
amd cpu: modify to
GRUB_CMDLINE_LINUX_DEFAULT="quiet amd_iommu=on iommu=pt video=efifb:off"
Then save the file and run
add following things.it can’t change the order
vfio vfio_iommu_type1 vfio_pci vfio_virqfd
Then save and run
update-initramfs -u -k all.
4 add gpu card ID.
how to get gpu card id.
lspci. we can get a list about pci devices.
We can found that the line which start with “02:00” is my gpu card.
02:00.0 is gpu device.
02:00.1 is hdmi audio device that on gpu card.
02:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Baffin [Polaris11] (rev cf) 02:00.1 Audio device: Advanced Micro Devices, Inc. [AMD/ATI] Device aae0
Then we run
lspci -n -s 02:00 to get card ID.
root@pve:~# lspci -n -s 02:00 02:00.0 0300: 1002:67ff (rev cf) 02:00.1 0403: 1002:aae0 root@pve:~#
Run commands. echo "options vfio-pci ids=1002:67ff,1002:aae0" > /etc/modprobe.d/vfio.conf echo "options vfio_iommu_type1 allow_unsafe_interrupts=1" > /etc/modprobe.d/vfio_iommu_type1.conf modprobe kvm ignore_msrs=y modprobe kvm_intel nested=y ept=y
add content to blacklist drivers
blacklist nvidiafb blacklist nouveau blacklist nvidia blacklist radeon blacklist amdgpu
update-initramfs -u -k all
After thest.Reboot your proxmox system.
6 Configure your guest system configuration
copy your UEFI bios which dump from gpu card(Use gpu-z to dump it or it can download from other web site) to
/usr/share/kvm dir with
add pci device in hardware list.
The rom-file parameter can’t set by web mode.
You can modify VM config file directly after add pci device.
All VM guest config files are in
Modify conf file with guest system id.
After these.Your can find your gpu-card in your guest system.Install driver and works.