WorkingTipsOnNvidiaPassthrough3050
Feb 26, 2024
Technology
Edit the grub items:
# vim /etc/default/grub
......
GRUB_CMDLINE_LINUX_DEFAULT="amd_iommu=on iommu=pt kvm.ignore_msrs=1 video=efifb:off"
......
# update-grub2 && reboot
update the initramfs:
# vim /etc/initramfs-tools/modules
vfio
vfio_iommu_type1
vfio_pci
vfio_virqfd
# update-initramfs -u -k all
Download the nvflash, and them dump the vbios:
$ sudo ./nvflash --save vbios.rom
patch the vbios.rom:
Using an hex editor to open the vbios.rom
(via bless vbios.rom
):
Search the text VIDEO
, place your cursor before the first U before the VIDEO we just searched, and select everything before it, delete all.
Select the pci vfio equipments:
romfile should be specified:
<rom file="/usr/share/OVMF/nvidia_vbios.rom"/>
Now remove all of the virtual gpu(qxl, virtio-gpu, etc), use nvidia card for boot up. You will get the nvidia card once you installed the nvidia device drivers.