[SOLVED] Nvidia GTX 1050ti Error 43 (Code 43)

r.jochum

Renowned Member
Mar 26, 2018
289
47
68
38
Austria
rene.jochum.dev
After some hours of digging around i managed to fix the nvidia error 43 (display driver won't work because of KVM detected).

It seems to work with the latest nvidia drivers.

This is my /etc/pve/qemu-server/104.conf
Code:
args: -cpu 'host,+kvm_pv_unhalt,+kvm_pv_eoi,hv_vendor_id=proxmox,hv_spinlocks=0x1fff,hv_vapic,hv_time,hv_reset,hv_vpindex,hv_runtime,hv_relaxed,hv_synic,hv_stimer,hv_tlbflush,hv_ipi,kvm=off'
bios: ovmf
boot: cdn
bootdisk: scsi0
cores: 8
cpu: host,hidden=1,flags=+pcid
hostpci0: 01:00,pcie=1,x-vga=1,romfile=Zotac.GTX1050Ti.4096.161220-patched.rom
machine: pc-q35-3.1
memory: 8192
name: win10
net0: virtio=<mac>,bridge=vmbr0
numa: 1
ostype: win10
scsi0: local-zfs:vm-104-disk-1,discard=on,size=100G,ssd=1
scsihw: virtio-scsi-pci
smbios1: uuid=<some-uuid>
sockets: 1
usb0: host=046d:c52b,usb3=1
vga: none
vmgenid: <some-id>


I used the ROM Patcher from here

Zotac BIOS that works after patching

With another BIOS i had a lot of screen flickering

Please don't hestitate to ask if you need more infos.
 
/proc/cmdline
Code:
root@pve01:~# cat /proc/cmdline
BOOT_IMAGE=/ROOT/pve-1@/boot/vmlinuz-5.4.60-1-pve root=ZFS=rpool/ROOT/pve-1 ro root=ZFS=rpool/ROOT/pve-1 boot=zfs intel_iommu=on iommu=pt quiet
 
Last edited:
@sirkope

I can't tell/gurantee It seems it has support for it but i realy can't tell.

For me the process was easy, did everything I learned didn't work, did that config above without ROM didn't work, did with Zotac ROM, didn't work, did with Patched ROM worked.

But as said, its best to be sure to have the right ROM, get the original from GPU-Z if you can.
 
@r.jochum - Thanks! This worked for me.

  1. For anyone else, this is the steps I went through... I RDP'd to the windows VM and then downloaded GPU-Z from here: https://www.techpowerup.com/gpuz/
  2. I ran that and created a backup of my video driver.
  3. Copied the backup video driver to my local machine and from there
  4. I used the python patch program linked above to create a patched ROM.
  5. I copied the patched ROM to /usr/share/kvm on the proxmox box and made the config edits posted above.
 
Finally I've patched my vga card with nvidiaflash program and I use this rom : https://www.techpowerup.com/vgabios/202493/202493. Also I've updated my motherboard's BIOS and after this two changes, in my BIOS video card settings I can choose intel vga to primary vga, so VM can catch nvidia as a primary and with a plugged monitor I can see my virtual machines with GPU passtrough :)
 
can someone send a guide on how to do the process. I downloaded GPU-z but i'm a noob to this.
 
My hardware I’m using is a Lenovo thinkcentre on board it has:
Intel i7-2600 cpu 4 core (currently using 3 for my vm)
28gb RAM (currently using 8gb for vm)
Nvidia 1050ti 4gb GPU
128gb ssd (currently using 64gb for vm)
I also have windows 11 installed on the vm.
I have enabled pci passthrough using this guide:

https://matthewdeporter.com/proxmox/proxmox-pci-passthrough/

I know at the moment the amount of hard drive space is low but this is currently a test vm so I can get gpu passthrough working properly.
I have the gpu showing in device manager but currently getting error code: 43
 
My hardware I’m using is a Lenovo thinkcentre on board it has:
Intel i7-2600 cpu 4 core (currently using 3 for my vm)
28gb RAM (currently using 8gb for vm)
Nvidia 1050ti 4gb GPU
128gb ssd (currently using 64gb for vm)
I also have windows 11 installed on the vm.
I have enabled pci passthrough using this guide:

https://matthewdeporter.com/proxmox/proxmox-pci-passthrough/

I know at the moment the amount of hard drive space is low but this is currently a test vm so I can get gpu passthrough working properly.
I have the gpu showing in device manager but currently getting error code: 43
Please tell me your PVE version.
 
  • Make sure that you have enabled iommu in cmdline ( intel_iommu=on iommu=pt )
  • Make sure that your GPU is disabled in cmdline ( video=vesafb:off video=efifb:off )
  • (cat /proc/cmdline) after reboot
  • Make sure vfio modules are loaded
  • Make sure you disabled the GPU in /etc/modprobe.d/vfio.conf
(Use your vendor ids! lspci -nn | grep NVIDIA)
Code:
options vfio-pci ids=10de:1f82,10de:10fa disable_vga=1
  • create a VM with UEFI and pc-q35
  • pass the GPU with "All functions", "PCI Express", when needed custom ROM (please try first without)

When rom is needed:
Get your right BIOS: (Make sure you have the right BIOS!)
https://www.techpowerup.com/vgabios...X+1050+Ti&interface=&memType=&memSize=&since=

Patch the BIOS:
https://github.com/Marvo2011/NVIDIA-vBIOS-VFIO-Patcher
- Move the file to: /usr/share/kvm/GTX1050TiPatched.rom

nano /etc/pve/qemu-server/<VM-ID>.conf
Pass the BIOS to the VM config / append the romfile:
Code:
hostpci0: 0000:0f:00,pcie=1,romfile=GTX1050TiPatched.rom

Please ask when you break / stop at some step.
 
  • Make sure that you have enabled iommu in cmdline ( intel_iommu=on iommu=pt )
  • Make sure that your GPU is disabled in cmdline ( video=vesafb:off video=efifb:off )
  • (cat /proc/cmdline) after reboot
  • Make sure vfio modules are loaded
  • Make sure you disabled the GPU in /etc/modprobe.d/vfio.conf
(Use your vendor ids! lspci -nn | grep NVIDIA)
Code:
options vfio-pci ids=10de:1f82,10de:10fa disable_vga=1
  • create a VM with UEFI and pc-q35
  • pass the GPU with "All functions", "PCI Express", when needed custom ROM (please try first without)

When rom is needed:
Get your right BIOS: (Make sure you have the right BIOS!)
https://www.techpowerup.com/vgabios...X+1050+Ti&interface=&memType=&memSize=&since=

Patch the BIOS:
https://github.com/Marvo2011/NVIDIA-vBIOS-VFIO-Patcher
- Move the file to: /usr/share/kvm/GTX1050TiPatched.rom

nano /etc/pve/qemu-server/<VM-ID>.conf
Pass the BIOS to the VM config / append the romfile:
Code:
hostpci0: 0000:0f:00,pcie=1,romfile=GTX1050TiPatched.rom

Please ask when you break / stop at some step.
my cmdline won’t show up
I have tried cmdline command before and a blank page has showed
 
That is strange...

Can you post the output from following files:
cat /boot/grub/grub.cfg | grep linux
cat /etc/default/grub | grep CMDLINE
cat /etc/kernel/cmdline
 
That is strange...

Can you post the output from following files:
cat /boot/grub/grub.cfg | grep linux
cat /etc/default/grub | grep CMDLINE
cat /etc/kernel/cmdline
All commands have been ran in the following screenshot:
 

Attachments

  • 3BF7E3DE-FCC2-4225-843A-9A3AF618A1CE.png
    3BF7E3DE-FCC2-4225-843A-9A3AF618A1CE.png
    696.7 KB · Views: 30
I think you should remove textonly and video=astdrmfb from your GRUB_CMDLINE_LINUX_DEFAULT and replace it with iommu=pt and video=vesafb:off
(nano /etc/default/grub)

Don't forget to recreate boot config with update-grub than reboot.
Than please post the output from cat /proc/cmdline and check all steps above.
 
I think you should remove textonly and video=astdrmfb from your GRUB_CMDLINE_LINUX_DEFAULT and replace it with iommu=pt and video=vesafb:off
(nano /etc/default/grub)

Don't forget to recreate boot config with update-grub than reboot.
Than please post the output from cat /proc/cmdline and check all steps above.
Please see the below screenshots:
 

Attachments

  • DE954F78-2BEA-4A9B-9667-1720B3DC96B3.jpeg
    DE954F78-2BEA-4A9B-9667-1720B3DC96B3.jpeg
    213.3 KB · Views: 27
  • 32425FFC-13CD-42A4-8F3C-A84398F29656.jpeg
    32425FFC-13CD-42A4-8F3C-A84398F29656.jpeg
    167.6 KB · Views: 25

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!