[GUIDE] Fix Nvidia Code 43 Issue on Nvidia GPU


Recommended Posts

1 hour ago, bastl said:

@Sleepyme What you can try, use another slot for the card and also have a display plugged in while setting it up. For BIOS updates AMD released the newest AGESA version couple days ago, which should fix a couple things. Not all motherboard vendors released a newer version based on this yet. You might have to check again.

I haven't tried a different slot yet. Will do that right after work. Thanks! Fingers crossed!

Link to comment
14 hours ago, bastl said:

@Sleepyme What you can try, use another slot for the card and also have a display plugged in while setting it up. For BIOS updates AMD released the newest AGESA version couple days ago, which should fix a couple things. Not all motherboard vendors released a newer version based on this yet. You might have to check again.

Switched to pcie slot 2. Booted up vm in safe mode and used driver clean up to remove all traces of old drivers. Restarted and reinstalled drivers. Still getting error 43 :(

Also updated bios to newest ABBA bios.


I guess new video card....not sure if I want to try another nvidia card or switch to amd...

Link to comment
  • 3 months later...
  • 2 weeks later...
On 1/5/2020 at 7:33 PM, obliverationizer said:

awe man, you can't just say it works without telling us what you did.. what did you do to fix it?!

UEFI / BIOS Settings:

Tweaker -> Advanced CPU Settings -> SVM Mode -> Enable

Settings -> Miscellaneous -> IOMMU -> Enable

Settings -> AMD CBS -> ACS Enable -> Enable

Settings -> AMD CBS -> Enable AER Cap -> Enable


Boot Mode: UEFI




Machine Type: Q35-4.1


Hyper-V: Yes


Used my own dumped vbios.


First time installing the gpu drivers take 10-15 minutes. Not sure why that is. Once it's installed. Restart Windows VM and it worked for me. I was battling this Error 43 for a month!


Also, very happy this gigabyte x570 Aorus Pro Wifi! With the F10 BIOS I can passthrough a USB controller! Didn't even need to turn on ACS override.

Edited by phat_cow
  • Like 2
Link to comment
  • 1 month later...

As far as drivers during my setup a year ago I did notice that the newest Nvidia drivers resulted in code 43 even with some common workarounds. I run 4 Nvidia cards on 4 VM's and each have been stable for over a year, I'm very happy and impressed at the stability. 


The config that worked best for me was booting UnRaid in Legacy mode using the dumped vbios' for each VM and using an "older" Nvidia driver, the newest that I can confirm works stable for me is 399.24 but 388.13 or 368.81 also worked. Its fairly easy to dump the vbios using TechPowerUp GPU-Z but you may need to find an older version if it doesn't dump with the new version, also maybe try booting a standard machine with the card in windows, I remember it initially gave me errors when I tried to dump vbios from the VM. You will need to use a hex editor to remove the header in the vbios that is added by GPU-z via this method. 


Hex Editor (HxD)


video for Hex modification (go to ~4min)


Nvidia Driver 399.24 (shouldn't be necessary)


This is what I have added in the xml for my VM regarding Hyper-V (for me lines 33-41)
      <relaxed state='on'/>
      <vapic state='on'/>
      <spinlocks state='on' retries='8191'/>
      <vendor_id state='on' value='none'/>
      <hidden state='on'/>



##Helpful side note: If you want to passthrough a Hard Drive 'directly' instead of a vdisk...


UPDATE: I just found out that SpaceInvader uploaded a new video for this issue 2 months ago


If you specify the slot and multifunction mode in the XML like he did, with the other things mentioned; I can confirm driver 442.50 works with my GTX1060


Edited by MajorArchitect
Link to comment
  • 3 weeks later...

I just wanted to chime in to let people know that I recently encountered code 43 in a Windows 10 VM on my GTX 1060, in my multi nvidia GPU AMD Ryzen 3900X rig, and it seems to have gone away after disabling SR-IOV in the BIOS, and enabling "VFIO allow unsafe interrupts" in the advanced VM Manager settings of Unraid. I'm running the Unraid 6.9 beta 1 release.

Update on this -, while I'm not getting the code 43 issue in my VM, my GTX 1060 GPU is still hanging from time to time, and isn't operable again until the next reboot of Unraid.


Second update - I solved this by putting a fourth GPU in my motherboard. I used a PCI-e x1 slot Zotac GT 710 card, and turned off VFIO allow unsafe interrupts, and that was enough to allow unraid to run the  three main GPUs without problems.

Edited by Doomicle
Link to comment
  • 3 weeks later...

Hey Everyone,


Currently trying to setup a W10 gaming VM on my Unraid but I'm receiving the dreaded "Code 43" error. Hoping anyone might have another suggestion or tip.


Running with a single GTX 1070 as primary.


Things I've tried:

- Fresh W10 install following S.I.One's videos

- Hyper-v disabled

- Passing through GPU + Audio

- XML edit to merge GPU + Audio as multifunction device

- Dumped vbios and passed through to VM

- Latest bios installed on Asus Z170-k

- Installing latest nVidia drivers as well as a few older ones


One thing I still need to try is booting with Legacy, however when I attempt to change my flash to Legacy (Permit UEFI boot mode checkbox), my system no longer recognizes it as a boot device. I've double checked in the BIOS CSM is forcing Legacy as well and the USB shows up as a boot option. Am I missing anything in attempting to change the boot mode from UEFI -> Legacy?


Any help would be appreciated, thanks!


Update: Managed to get this working!

- Recreated my USB in Legacy mode and copied over my config / syslinux.cfg

- In addition same steps as listed above


Edited by Crispy517
Link to comment
  • 4 weeks later...
On 8/1/2019 at 11:51 PM, isaacery said:

i was having this problem even after following ALL of the vidoes and advice above - from SpaceInvader through to UEFI boot and techpowerup bios edits. I found a solution by upgrading the GPU BIOS to the latest version, by flashing the newest ROM from tech powerup. then i edited that same ROM using the HEX editor and added it to the VM config. I then installed the latest Nvidia drivers. now its working like a charm. I was trying to get a GTX 770 working on a single PCI-e slot motherboard. 

The only way i can get the VM to boot without a black screen is if i add a second VNC graphics display, but the GPU still is the primary display. what a mission...

To confirm, you're booting into UEFI mode and do not have the Code 43 error?  I'm also in UEFI mode and cannot reboot as parity check only has 4h left and has already been running 18h :(

Link to comment

While my TV is flickering on/off and I have to figure this piece out, I was finally able to get rid of the Code 43 error!!

Tools > System Devices

IOMMU group 14:	
[10de:2187] 06:00.0 VGA compatible controller: NVIDIA Corporation TU116 [GeForce GTX 1650 SUPER] (rev a1)
[10de:1aeb] 06:00.1 Audio device: NVIDIA Corporation TU116 High Definition Audio Controller (rev a1)
[10de:1aec] 06:00.2 USB controller: NVIDIA Corporation Device 1aec (rev a1)
[10de:1aed] 06:00.3 Serial bus controller [0c80]: NVIDIA Corporation TU116 [GeForce GTX 1650 SUPER] (rev a1)

IOMMU group 15:	[8086:150e] 07:00.0 Ethernet controller: Intel Corporation 82580 Gigabit Network Connection (rev 01)
IOMMU group 16:	[8086:150e] 07:00.1 Ethernet controller: Intel Corporation 82580 Gigabit Network Connection (rev 01)
IOMMU group 17:	[8086:150e] 07:00.2 Ethernet controller: Intel Corporation 82580 Gigabit Network Connection (rev 01)
IOMMU group 18:	[8086:150e] 07:00.3 Ethernet controller: Intel Corporation 82580 Gigabit Network Connection (rev 01)


Flash > Syslinux Configuration:

kernel /bzimage
append vfio-pci.ids=8086:150e,10de:2187,10de:1aeb,10de:1aec,10de:1aed initrd=/bzroot


Flash > Server boot mode: Legacy

Flash > Permit UEFI boot mode: Unchecked


Settings > VM Manager

  • PCIe ACS override: DIsabled
  • VFIO allow unsafe interupts: No

Windows VM

      <relaxed state='on'/>
      <vapic state='on'/>
      <spinlocks state='on' retries='8191'/>
      <vendor_id state='on' value='none '/>
      <hidden state='on'/>
<hostdev mode='subsystem' type='pci' managed='yes'>
      <driver name='vfio'/>
        <address domain='0x0000' bus='0x06' slot='0x00' function='0x0'/>
      <alias name='hostdev0'/>
      <rom file='/mnt/user/documents/unRAID/TU116.rom'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x08' function='0x0' multifunction='on'/>
    <hostdev mode='subsystem' type='pci' managed='yes'>
      <driver name='vfio'/>
        <address domain='0x0000' bus='0x06' slot='0x00' function='0x1'/>
      <alias name='hostdev1'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x08' function='0x1'/>
    <hostdev mode='subsystem' type='pci' managed='yes'>
      <driver name='vfio'/>
        <address domain='0x0000' bus='0x06' slot='0x00' function='0x2'/>
      <alias name='hostdev2'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x08' function='0x2'/>
    <hostdev mode='subsystem' type='pci' managed='yes'>
      <driver name='vfio'/>
        <address domain='0x0000' bus='0x06' slot='0x00' function='0x3'/>
      <alias name='hostdev3'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x08' function='0x3'/>
    <memballoon model='none'/>


Link to comment
  • 2 weeks later...

Hello friends,


I was looking for a storage NAS solution as well as the possibility of hosting gaming VMs with the same machine. have followed spaceinvader one's series on setting up UNRAID and creating daily driver/gaming VM. I have been able to launch a windows 10 vm and setup NAS which works beautifully --- however--- I have spent hours on hours of troubleshooting GPU passthrough and I am unfortunately still getting this dreaded error code #43. 


FX8320 with 990FXA UD3 mobo FB bios

Asus gtx1080 turbo

HBA pcie card with 4x WD 2tb drives

1TB m.2 on PCIE for cache

16gb ddr3 ram


I've essentially done all of the aforementioned troubleshooting in this thread.

1. IOMMU groups are natively separated

2. disabled hyper-v through both unraid gui (does not seem to change xml) and via xml script

3. assigned multifunction to GPU and assigned sound to appropriate slot - ive also tried just starting the VM with just the GPU and no sound

4. have trailed alternative machine types

5. I've attempted to perform Siwat's "advanced" workaround however even with cuda 9.1.85 there is an error with attempting to sign the file in powershell

6. I've attempted to apply drivers directly with nvidia dch installer

7. I've attempted to run my GPU concurrently with vnc to update drivers/install nvidia control panel for which VNC interface becomes dead (probably because of splashtop in the background)

8. I've attempted to uninstall/reinstall GPU drivers via splashtop 

9. hardware was rechecked -gpu works flawlessly on primary win10 computer

10. software updated - windows updates up to date, bios is latest installment (FB) 

11. legacy only boot settings in bios

12. I have attempted to install drivers via geforce experience however i am only able to do so while running vnc and GPU concurrently as windows basic drivers limit my resolution to 680 and does not support many native system viewer windows much less geforce experience ui. 


When I have attempted to place graphics ram BIOS with a modified techpowerup .dump file - the VM will start but does not boot and curiously pegs an assigned CPU core to 100%. Ive attempted varying the VM cpu assignments with the same thing happening regardless. 




As a final note - I have had some of this hardware for quite some time - my motherboard and CPU are are 8 years old but still capable- it would seem that this shouldn't necessarily be the issue but if it is then I can settle with no GPU passthrough for this particular UNRAID machine (although gpu passthrough is specifically why I chose UNRAID). My ultimate goal was to run this as a test machine and ultimately run a gaming vm/backup storage NAS UNRAID system with a ryzen r9 chipset. 


Would newer hardware pose just as much difficulty with GPU passthrough??? It seems like generally people dont seem to have much problem except those of us in here. 


Any help would be sincerely appreciated. Please let me know of any further information I can provide that could help. 


Link to comment

Wow. As I was on the verge of scrapping the whole project, I did what Linus did and put a an old potato graphics card in PCIe1 and moved my GTX1080 to the second PCIex16 slot...... checked the GTX in the VM gui and it works.... 


This seems like a ghetto solution... but I guess I will take it unless there is a better fix.





Link to comment
  • 3 weeks later...

tower-diagnostics-20200529-0104.ziphi every one.


i tried everything with no luck. it was working before. but not anymore. below is my vm xml



<?xml version='1.0' encoding='UTF-8'?>
<domain type='kvm'>
  <name>Windows 10</name>
    <vmtemplate xmlns="unraid" name="Windows 10" icon="windows.png" os="windows10"/>
  <memory unit='KiB'>13107200</memory>
  <currentMemory unit='KiB'>13107200</currentMemory>
  <vcpu placement='static'>4</vcpu>
    <vcpupin vcpu='0' cpuset='2'/>
    <vcpupin vcpu='1' cpuset='16'/>
    <vcpupin vcpu='2' cpuset='3'/>
    <vcpupin vcpu='3' cpuset='17'/>
    <type arch='x86_64' machine='pc-i440fx-4.2'>hvm</type>
      <relaxed state='off'/>
      <vapic state='off'/>
      <spinlocks state='off'/>
  <cpu mode='host-passthrough' check='none'>
    <topology sockets='1' cores='2' threads='2'/>
    <cache mode='passthrough'/>
  <clock offset='localtime'>
    <timer name='hypervclock' present='yes'/>
    <timer name='hpet' present='no'/>
    <disk type='file' device='cdrom'>
      <driver name='qemu' type='raw'/>
      <source file='/mnt/user/isos/iso-os/W10X64.PRO.MULTi7v1.Sep2016.iso'/>
      <target dev='hda' bus='ide'/>
      <boot order='2'/>
      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
    <disk type='file' device='cdrom'>
      <driver name='qemu' type='raw'/>
      <source file='/mnt/user/isos/virtio-win-0.1.141-1.iso'/>
      <target dev='hdb' bus='ide'/>
      <address type='drive' controller='0' bus='0' target='0' unit='1'/>
    <disk type='file' device='disk'>
      <driver name='qemu' type='raw' cache='writeback'/>
      <source file='/mnt/disk3/domains/win10/vdisk1.img'/>
      <target dev='hdc' bus='ide'/>
      <boot order='1'/>
      <address type='drive' controller='0' bus='1' target='0' unit='0'/>
    <disk type='file' device='disk'>
      <driver name='qemu' type='raw' cache='writeback'/>
      <source file='/mnt/disks/Samsung_SSD_970_EVO_1TB_S467NF0K520688J/domains/win10/vdisk2.img'/>
      <target dev='hdd' bus='sata'/>
      <address type='drive' controller='0' bus='0' target='0' unit='3'/>
    <controller type='usb' index='0' model='qemu-xhci' ports='15'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/>
    <controller type='ide' index='0'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
    <controller type='pci' index='0' model='pci-root'/>
    <controller type='sata' index='0'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
    <controller type='virtio-serial' index='0'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
    <interface type='bridge'>
      <mac address='52:54:00:8d:77:3e'/>
      <source bridge='br0'/>
      <model type='virtio'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
    <serial type='pty'>
      <target type='isa-serial' port='0'>
        <model name='isa-serial'/>
    <console type='pty'>
      <target type='serial' port='0'/>
    <channel type='unix'>
      <target type='virtio' name='org.qemu.guest_agent.0'/>
      <address type='virtio-serial' controller='0' bus='0' port='1'/>
    <input type='tablet' bus='usb'>
      <address type='usb' bus='0' port='1'/>
    <input type='mouse' bus='ps2'/>
    <input type='keyboard' bus='ps2'/>
    <hostdev mode='subsystem' type='pci' managed='yes' xvga='yes'>
      <driver name='vfio'/>
        <address domain='0x0000' bus='0x65' slot='0x00' function='0x0'/>
      <rom file='/mnt/user/Home/1080ti-finalupdate.rom'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0' multifunction='on'/>
    <hostdev mode='subsystem' type='pci' managed='yes'>
      <driver name='vfio'/>
        <address domain='0x0000' bus='0x65' slot='0x00' function='0x1'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x1'/>
    <hostdev mode='subsystem' type='pci' managed='yes'>
      <driver name='vfio'/>
        <address domain='0x0000' bus='0x05' slot='0x00' function='0x0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x08' function='0x0'/>
    <hostdev mode='subsystem' type='pci' managed='yes'>
      <driver name='vfio'/>
        <address domain='0x0000' bus='0x17' slot='0x00' function='0x1'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x09' function='0x0'/>
    <memballoon model='none'/>
  <seclabel type='dynamic' model='dac' relabel='yes'/>




also i am attaching my server dignostics files.



Edited by m975261
Link to comment

Hi all, first post but felt compelled given the amount of great community info out there that has helped me. I spent many, many hours trying to solve this issue and finally did.


My setup: Ryzen 3950X, RTX 2080 Super.


Tried and didn't work: 

* Clean install using UEFI boot, vanilla setup without editing XML or adding any parameters

* With UEFI boot, adding "vfio-pci.ids=10de:1e81,10de:10f8,10de:1ad8,10de:1ad9" to the syslinux configuration (Main -> Syslinux, device IDs are the x4 nvidia device IDs derived from Tools -> System Devices), editing the xml to add multifunction='on' and aligning the bus/slot/function parameters for all four devices, re-install nvidia drivers in Win10


Eventually I got it to work by:


* Doing all of the above, but changing to legacy bios boot, then in Windows remove the nvidia display adapter from device manager (having previously updated the driver from the web), then re-scan hardware -> hey presto, no error 43.


Conclusion: Don't give up in Windows just because you get error 43, there is almost certainly mileage in updating the nvidia driver from the web and then removing/re-adding in device manager. However, this only worked for me once I'd configured all the passthrough in xml and set boot mode to legacy. It would not work without all of those actions completed.


I hope this helps someone, and I'd like to thank all of the posters above and Space Invader 1 for his great videos that helped me to have some basic understanding of what needed to be done here.

Edited by DANgerous25
Minor typo corrections
  • Like 1
Link to comment

Well was just about to post my cure to the deadful nvidia code 43 error but Dangerous above posted it. I too have an 3800x AMD system and Nvidia card, I had switched to CSM to fix unraid gui getting a blank screen but when I ran the VM win10 it came up with code 43 and a giant screen.


Luckerly I recalled I changed that bios setting since it was working last week fine so knew switching CSM in my bios to OFF was perhaps going to fix it and it did.


Something to note however is not all bios of mainboards call it UEFI mode or Legacy mode anymore, my motherboard calls it CSM which I believe is legacy mode.


Looking back on the last 4 pages id bet the whole UEFI, Legacy, CSM mode is causing the code 43 error so give it a try I believe its due to Windows 10 and gpus being installed via UEFI mode and not legacy/CSM.

  • Like 1
Link to comment

Works fine up until this point:


PS C:\> ./patcher.ps1 C:\NVIDIA\Display.Driver
[!] Failure: Unable to find nvlddmkm.sy_ in C:\NVIDIA\Display.Driver


Any ideas?  Many thanks!



It appears that Display.Driver is now in a folder called 'universal'


This is what I get now after moving the Display.Driver folder into the NVIDIA folder:



After a few minutes, it does this:


It does the same thing if I try using the patch with it in the universal folder as well.


Any way we could get an updated version of these instructions?  Any help would be greatly appreciated.  


Edited by danktankk
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.