GPU passthrough code 43 (unable to resolve)

jishnuj

New Member
Apr 12, 2022
7
1
3
I'm running an AMD laptop (ASUS ROG Strix G513QC with integrated AMD graphics and a dedicated NVIDIA GPU (RTX 3050). I had fixed the code 43 for a moment by disabling and re-enabling the driver but now that no longer works.

Followed https://www.reddit.com/r/homelab/comments/b5xpua/the_ultimate_beginners_guide_to_gpu_passthrough/

GRUB_CMDLINE_LINUX_DEFAULT="quiet amd_iommu=on textonly video=efifb:eek:ff video=vesafb:eek:ff"

root@vpj:/etc/default# cat /etc/modules
# /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.

vfio
vfio_iommu_type1
vfio_pci
vfio_virqfd

root@vpj:/etc/modprobe.d# cat blacklist.conf
blacklist radeon
blacklist nouveau
blacklist nvidia

root@vpj:/etc/modprobe.d# cat iommu_unsafe_interrupts.conf
options vfio_iommu_type1 allow_unsafe_interrupts=1

root@vpj:/etc/modprobe.d# cat pve-blacklist.conf
# This file contains a list of modules which are not supported by Proxmox VE

# nidiafb see bugreport https://bugzilla.proxmox.com/show_bug.cgi?id=701
blacklist nvidiafb

root@vpj:/etc/modprobe.d# cat vfio.conf
options vfio-pci ids=10de:25a5,10de:2291 disable_vga=1

root@vpj:/etc/pve/qemu-server# cat /etc/pve/qemu-server/100.conf
agent: 1
args: -cpu 'host,+kvm_pv_unhalt,+kvm_pv_eoi,hv_vendor_id=NV43FIX,kvm=off'
balloon: 0
bios: ovmf
boot: order=sata0
cores: 6
cpu: host,hidden=1,flags=+pcid,hv-vendor-id=proxmox
hostpci0: 01:00.0,pcie=1,romfile=Asus.RTX3050Mobile.4096.210519.rom
hostpci1: 01:00.1,pcie=1
ide2: local:iso/virtio-win-0.1.215.iso,media=cdrom,size=528322K
machine: q35
memory: 10000
name: windows
net0: virtio=42:18:EF:5E:C1:4E,bridge=vmbr0,firewall=1
numa: 0
ostype: win10
sata0: local-lvm:vm-100-disk-0,size=300G
scsihw: virtio-scsi-pci
smbios1: uuid=2e5a76dc-cba9-4761-bd5e-4c0702892ef5
sockets: 1
vga: none
vmgenid: e40e446e-28c9-4699-93e1-59a7ae425a62

01:00.0 VGA compatible controller: NVIDIA Corporation Device 25a5 (rev a1)
Subsystem: ASUSTeK Computer Inc. Device 10ec
Kernel driver in use: vfio-pci
Kernel modules: nvidiafb, nouveau
01:00.1 Audio device: NVIDIA Corporation Device 2291 (rev a1)
Subsystem: ASUSTeK Computer Inc. Device 10ec
Kernel driver in use: vfio-pci
Kernel modules: snd_hda_intel

Have Windows 10 Pro installed with the latest NVIDIA graphics drivers (there are no beta drivers available). I have virtio-win drivers installed as well. Any ideas on what might be causing a code 43? I was told that it's because the VM knows it's a VM and the host has to trick it or something like that.
 
Last edited:
Try removing the args: -cpu 'host,+kvm_pv_unhalt,+kvm_pv_eoi,hv_vendor_id=NV43FIX,kvm=off', change cpu: host,hidden=1,flags=+pcid,hv-vendor-id=proxmox to cpu: host and change hostpci0: 01:00.0,pcie=1,romfile=Asus.RTX3050Mobile.4096.210519.rom hostpci1: 01:00.1,pcie=1 to one line for all functions and with primary GPU enabled: hostpci0: 01:00,pcie=1,romfile=Asus.RTX3050Mobile.4096.210519.rom,x-vga=1.
 
Try removing the args: -cpu 'host,+kvm_pv_unhalt,+kvm_pv_eoi,hv_vendor_id=NV43FIX,kvm=off', change cpu: host,hidden=1,flags=+pcid,hv-vendor-id=proxmox to cpu: host and change hostpci0: 01:00.0,pcie=1,romfile=Asus.RTX3050Mobile.4096.210519.rom hostpci1: 01:00.1,pcie=1 to one line for all functions and with primary GPU enabled: hostpci0: 01:00,pcie=1,romfile=Asus.RTX3050Mobile.4096.210519.rom,x-vga=1.
leesteken thanks for your reply , i made changes according to yours

agent: 1
balloon: 0
bios: ovmf
boot: order=sata0
cores: 6
cpu: host
efidisk0: local-lvm:vm-100-disk-1,size=4M
hostpci0: 01:00.0,pcie=1,romfile=Asus.RTX3050Mobile.4096.210519.rom,x-vga=1
hostpci1: 01:00.1,pcie=1
ide2: local:iso/virtio-win-0.1.215.iso,media=cdrom,size=528322K
machine: q35
memory: 10000
name: windows
net0: virtio=42:18:EF:5E:C1:4E,bridge=vmbr0,firewall=1
numa: 0
ostype: win10
sata0: local-lvm:vm-100-disk-0,size=300G
scsihw: virtio-scsi-pci
smbios1: uuid=2e5a76dc-cba9-4761-bd5e-4c0702892ef5



After completing the following steps, I was able to update the driver without encountering any errors; however, I want to update the driver after each restart, else code 43 will reappearance.
 
Please also change these two lines:
hostpci0: 01:00.0,pcie=1,romfile=Asus.RTX3050Mobile.4096.210519.rom,x-vga=1 hostpci1: 01:00.1,pcie=1
to this one line:
hostpci0: 01:00,pcie=1,romfile=Asus.RTX3050Mobile.4096.210519.rom,x-vga=1
without hostpci1 because 01:00 will include all functions.

Sorry, I have no experience with NVidia GPUs or software for Windows. Maybe someone else knows how to fix the driver reinstall?
 
  • Like
Reactions: jishnuj
Please also change these two lines:
hostpci0: 01:00.0,pcie=1,romfile=Asus.RTX3050Mobile.4096.210519.rom,x-vga=1 hostpci1: 01:00.1,pcie=1
to this one line:
hostpci0: 01:00,pcie=1,romfile=Asus.RTX3050Mobile.4096.210519.rom,x-vga=1
without hostpci1 because 01:00 will include all functions.

Sorry, I have no experience with NVidia GPUs or software for Windows. Maybe someone else knows how to fix the driver reinstall?
i made some chane in configuration file , and now its working fine , thank you for your valuable support
 
  • Like
Reactions: leesteken
It's been three months but glad you got it working. Did you need to change anything else to get it working?
(Please mark this thread as solved by editing it.)
i made changes in proxmox configuration file .I will post all changes i made after that i will mark solved
 
Last edited:
I currently have this working with a 1050Ti
Here is everything I needed.

PCI Devices (lspci output):
Code:
~# lspci
00:00.0 Host bridge: Intel Corporation Xeon E3-1200 v6/7th Gen Core Processor Host Bridge/DRAM Registers (rev 05)
00:01.0 PCI bridge: Intel Corporation 6th-10th Gen Core Processor PCIe Controller (x16) (rev 05)
00:02.0 VGA compatible controller: Intel Corporation HD Graphics 630 (rev 04)
00:14.0 USB controller: Intel Corporation 200 Series/Z370 Chipset Family USB 3.0 xHCI Controller
00:14.2 Signal processing controller: Intel Corporation 200 Series PCH Thermal Subsystem
00:15.0 Signal processing controller: Intel Corporation 200 Series PCH Serial IO I2C Controller #0
00:16.0 Communication controller: Intel Corporation 200 Series PCH CSME HECI #1
00:16.3 Serial controller: Intel Corporation Device a2bd
00:17.0 RAID bus controller: Intel Corporation SATA Controller [RAID mode]
00:1c.0 PCI bridge: Intel Corporation 200 Series PCH PCI Express Root Port #4 (rev f0)
00:1f.0 ISA bridge: Intel Corporation 200 Series PCH LPC Controller (Q270)
00:1f.2 Memory controller: Intel Corporation 200 Series/Z370 Chipset Family Power Management Controller
00:1f.3 Audio device: Intel Corporation 200 Series PCH HD Audio
00:1f.4 SMBus: Intel Corporation 200 Series/Z370 Chipset Family SMBus Controller
00:1f.6 Ethernet controller: Intel Corporation Ethernet Connection (5) I219-LM
01:00.0 VGA compatible controller: NVIDIA Corporation GP107 [GeForce GTX 1050 Ti] (rev a1)
01:00.1 Audio device: NVIDIA Corporation GP107GL High Definition Audio Controller (rev a1)
02:00.0 PCI bridge: Texas Instruments XIO2001 PCI Express-to-PCI Bridge

Output of IOMMU Enumeration Script:
The Script:
Code:
for g in $(find /sys/kernel/iommu_groups/* -maxdepth 0 -type d | sort -V); do     echo "IOMMU Group ${g##*/}:";     for d in $g/devices/*; do         echo -e "\t$(lspci -nns ${d##*/})";     done; done;
The Output:
Code:
IOMMU Group 0:
    00:00.0 Host bridge [0600]: Intel Corporation Xeon E3-1200 v6/7th Gen Core Processor Host Bridge/DRAM Registers [8086:591f] (rev 05)
IOMMU Group 1:
    00:01.0 PCI bridge [0604]: Intel Corporation 6th-10th Gen Core Processor PCIe Controller (x16) [8086:1901] (rev 05)
IOMMU Group 2:
    00:02.0 VGA compatible controller [0300]: Intel Corporation HD Graphics 630 [8086:5912] (rev 04)
IOMMU Group 3:
    00:14.0 USB controller [0c03]: Intel Corporation 200 Series/Z370 Chipset Family USB 3.0 xHCI Controller [8086:a2af]
    00:14.2 Signal processing controller [1180]: Intel Corporation 200 Series PCH Thermal Subsystem [8086:a2b1]
IOMMU Group 4:
    00:15.0 Signal processing controller [1180]: Intel Corporation 200 Series PCH Serial IO I2C Controller #0 [8086:a2e0]
IOMMU Group 5:
    00:16.0 Communication controller [0780]: Intel Corporation 200 Series PCH CSME HECI #1 [8086:a2ba]
    00:16.3 Serial controller [0700]: Intel Corporation Device [8086:a2bd]
IOMMU Group 6:
    00:17.0 RAID bus controller [0104]: Intel Corporation SATA Controller [RAID mode] [8086:2822]
IOMMU Group 7:
    00:1c.0 PCI bridge [0604]: Intel Corporation 200 Series PCH PCI Express Root Port #4 [8086:a293] (rev f0)
IOMMU Group 8:
    00:1f.0 ISA bridge [0601]: Intel Corporation 200 Series PCH LPC Controller (Q270) [8086:a2c6]
    00:1f.2 Memory controller [0580]: Intel Corporation 200 Series/Z370 Chipset Family Power Management Controller [8086:a2a1]
    00:1f.3 Audio device [0403]: Intel Corporation 200 Series PCH HD Audio [8086:a2f0]
    00:1f.4 SMBus [0c05]: Intel Corporation 200 Series/Z370 Chipset Family SMBus Controller [8086:a2a3]
    00:1f.6 Ethernet controller [0200]: Intel Corporation Ethernet Connection (5) I219-LM [8086:15e3]
IOMMU Group 9:
    01:00.0 VGA compatible controller [0300]: NVIDIA Corporation GP107 [GeForce GTX 1050 Ti] [10de:1c82] (rev a1)
IOMMU Group 10:
    01:00.1 Audio device [0403]: NVIDIA Corporation GP107GL High Definition Audio Controller [10de:0fb9] (rev a1)
IOMMU Group 11:
    02:00.0 PCI bridge [0604]: Texas Instruments XIO2001 PCI Express-to-PCI Bridge [104c:8240]

Contents of /etc/modprobe.d:
Code:
$ cat /etc/modprobe.d/kvm.conf:
options kvm ignore_msrs=1
$ cat /etc/modprobe.d/iommu_unsafe_interrupts.conf
options vfio_iommu_type1 allow_unsafe_interrupts=1

$ cat /etc/modprobe.d/vfio.conf
options vfio-pci ids=10de:1c82,10de:0fb9 disable_vga=1

$ cat /etc/modprobe.d/pve-blacklist.conf
# This file contains a list of modules which are not supported by Proxmox VE
# nidiafb see bugreport https://bugzilla.proxmox.com/show_bug.cgi?id=701
blacklist nvidiafb
blacklist nvidia
blacklist nouveau
blacklist radeon

# And also /etc/modules
$ cat /etc/modules
# /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.
vfio
vfio_iommu_type1
vfio_pci
vfio_virqfd

I needed to pin the PVE kernel version to 5.13.19-6-pve
Code:
proxmox-boot-tool kernel pin 5.13.19-6-pve

GRUB_CMDLINE_LINUX_DEFAULT in /etc/default/grub (run grub-update after)
Code:
GRUB_CMDLINE_LINUX_DEFAULT="quiet intel_iommu=on iommu=pt pcie_acs_override=downstream,multifunction nofb nomodeset video=vesafb:off,efifb:off"
With all the above and the machine set up like this, GPU passthrough works nicely and my monitor connected to the GFX card shows the VM (and HDMI Audio output also works)

1666788637389.png
 
Last edited:
  • Like
Reactions: fbsis
i found a solution for my case.
TDRD; you have to provider a batery/ACPI chip to work nvidia on laptop Proxmox setup

Long explanation:

I´m using a laptop as a server, so, my video card was looking for any information of APCI chip/Batery. But proxmox is not provider for him, so it was not start the video board.

i had do follow this step here: https://wiki.archlinux.org/title/PCI_passthrough_via_OVMF#"Error_43:_Driver_failed_to_load"_with_mobile_(Optimus/max-q)_nvidia_GPUs
- create a fake ACPI
- tell the KVM that i have a ACPI/Batery

so it starting working very well

My video board: RTX 350


my configuration:
Bash:
args: -acpitable file=/home/fbsis/SSDT1.dat
balloon: 4000
bios: ovmf
boot: order=scsi0;ide2;net0;sata0
cores: 8
cpu: host,hidden=1,flags=+pcid
cpuunits: 2048
efidisk0: nvme-part7-restante:109/vm-109-disk-0.qcow2,efitype=4m,pre-enrolled-keys=1,size=528K
hostpci0: 01:00.0,pcie=1,romfile=GA107.rom,x-vga=1
hostpci1: 01:00.1
ide2: local:iso/Win10_21H2_BrazilianPortuguese_x64.iso,media=cdrom,size=5449662K
machine: q35
memory: 16000
meta: creation-qemu=7.0.0,ctime=1666489825
name: win-gamming
net0: e1000=B2:35:F6:6B:4F:B5,bridge=vmbr0,firewall=1
numa: 0
ostype: win11
sata0: local:iso/virtio-win.iso,media=cdrom,size=519030K
scsi0: local:109/vm-109-disk-0.qcow2,discard=on,size=256G,ssd=1
scsi1: usb_hdd:109/vm-109-disk-0.raw,backup=0,size=400G
scsihw: virtio-scsi-single
smbios1: uuid=97b6e78d-d97c-4946-98f1-7cd360060a8e
sockets: 1
tpmstate0: nvme-part7-restante:109/vm-109-disk-1.raw,size=4M,version=v2.0
vga: none
vmgenid: 8acac8ce-b14a-4993-9899-854f13a53224

the /home/fbsis/SSDT1.dat is important to set.

1666812152676.png
 
Last edited:

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!