[GUIDE] Fix Nvidia Code 43 Issue on Nvidia GPU


Siwat2545

Recommended Posts

Hello to everyone.

 

I'm trying to fix the error 43 given by the nvidia driver when I install it on a Windows 10 virtualized OS. I'm interested to use the nvidia driver of my graphic card (RTX 2080ti) on a esxi client and on a xen client. I've got this patch,that can help me :

 

https://github.com/sk1080/nvidia-kvm-patcher

 

This is what the patch does :

 

$pattern = '\xBB\x00\x00\x00\x40\x48\x8D\x44\x24\x50' # + 0x30

$patch = [Byte[]]@(0x31, 0xC0, 0x90, 0x90, 0x90, 0x90, 0x90, 0x85, 0xC0)

 

it detect the hex value of BB00000040488D442450 and replace it with "31C0909090909085C0". This is the value called "Cpu ID" that's located inside the file "nvlddmkm.sys" of each nvidia driver and it is used to detect if the driver is running inside a KVM vm. Good. This is not what I want to do. I don't need to patch the nvidia driver to hide the KVM hypervisor. I want to hide the ESXI and the XEN hypervisor from the nvidia driver. I gave a look inside the nvlddmkm.sys file and I found something that's really interesting (attached pic called before)

 

is this the hex value associated with the vmware hypervisor ? It's enough to change it with this,for example,to fool the nvidia driver ? (attached picture called after)

 

In addition to this,looking inside the nvidia kvm patcher,I see that it used an offset,like this :

 

$offset = $matches[0].Index + 0x40

 

I would like to know in my case what's the offset ? Maybe 0x40 ? C40 is 0x40 ? thanks.

before.png

after.png

Link to comment
  • 3 weeks later...

Has anyone successfully built the custom drivers?

I tried twice in two different environments, but got the same script error in both cases.

 

I don't currently have any of the test environments running, so I am unable to provide the exact error -- for now, I'm just curious if anyone's actually managed to build the drivers using the provided scripts?

Link to comment
  • 4 weeks later...
2 hours ago, testdasi said:

There isn't a more recent one because this whole guide is outdated.

SpaceInvader One Youtube channel is probably a better starting point.

Well that was my though after reading so thats why i made this walktrough how i got it working as best as i could.

Link to comment
13 minutes ago, twiikker said:

Well that was my though after reading so thats why i made this walktrough how i got it working as best as i could.

You should start a new topic with the details instead of adding to this topic, which is based on some outdated tweaks (e.g. turning off Hyper-V).

Adding more to this would create the impression (particularly to new users) that it's the way to go with error code 43 when in fact it's the equivalent of bulldozing a wall, based on the outdated assumption that the wall needs to be demolished, when there are a set of known gates to get in and may not require such drastic actions.

Link to comment
  • 2 weeks later...

Just throwing this here;

 

I had to make a new Unraid boot drive which used UEFI boot mode (the old one did not). That however resulted in all my linux VMs not booting up and Windows VM throwing the error code 43 error.

 

Going back to legacy boot mode, fixed it all again.

 

Hope this helps someone.

Link to comment
  • 1 month later...
  • 1 year later...

For anyone coming across this in the future, twiikker's "Preferred Alternative for recent libvirt + qemu" XML edit in the link above worked for me. My setup is a Dell R720XD with multiple GPUS running Unraid 6.9.2 stable in Legacy Mode. For some reason, GPUs populated in certain PCIe slots would always throw error code 43 once the NVIDIA driver was loaded. They also would not work with Linux VMs once the NVIDIA Linux drivers were loaded. I figured it was the driver detecting the virtual environment because before loading NVIDIA drivers, the GPUs would indeed output video using either default Linux display drivers, or the Microsoft Basic Display Driver. However, once the NVIDIA driver loads, bam, no more video output on Linux and code 43 in Windows! Using twiikker's suggestion, all I had to do for those GPUs with error, was add the following to my XMLs for those VMs:

 

<domain>
    ...
        <features>
            ...
            <kvm>
                <hidden state='on'/>
            </kvm>
            ...
            <hyperv>
                ...
                <vendor_id state='on' value='whatever1234'/>
            </hyperv>
            ...
        </features>
    ...
</domain>

 

That's literally all I did and it's been fixed ever since. This has worked for both an EVGA GT 1030 and Zotac GT 710 (PCIe x1) cards. Both had VBIOS's dumped by myself on the same system using Spaceinvader's CLI technique. This seems to be an issue that can still occur, perhaps especially on these lower end cards, and depending on specific hardware configurations. Hopefully this helps someone in the future and saves some blood, sweat, and tears!

Edited by Victicious
Added BIOS mode Unraid is running in.
  • Thanks 1
Link to comment
  • 9 months later...
On 1/11/2022 at 2:05 AM, Victicious said:

That's literally all I did and it's been fixed ever since. This has worked for both an EVGA GT 1030 and Zotac GT 710 (PCIe x1) cards. Both had VBIOS's dumped by myself on the same system using Spaceinvader's CLI technique. This seems to be an issue that can still occur, perhaps especially on these lower end cards, and depending on specific hardware configurations. Hopefully this helps someone in the future and saves some blood, sweat, and tears!

 

Sorry for the Necro, but this is still relevant in late 2022.

I have a GTX 770 and nothing else worked, I was getting Code 43. My brother even tried to help me as he has a double gpu passthrough with a 1060 and a 3050 similar to my setup.

 

Once I edited the XML and booted the VM, I no longer receive error 43 and it immediately picked up the Nvidia Driver I had already installed. Thanks!

  • Thanks 1
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.

Guest
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.