NVIDIA GPU is not getting recognized in windows - code 12 driver error

I had installed Windows 10 as an additional OS using bootcamp on my MacBook Pro, later I connected an eGPU to my macbook pro’s thunderbolt port. I am able to see the display adapter for my NVIDIA GPU, the drivers are also installed in Windows OS , but the device has a warning and is not working properly because of the below error message

“This device cannot find enough free resources that it can use. (Code 12) If you want to use this device, you will need to disable one of the other devices on this system.”

Below are the driver events

Driver Management has concluded the process to add Service nvlddmkm for Device Instance ID PCI\VEN_10DE&DEV_2208&SUBSYS_153510DE&REV_A1\8&36C1BE61&0&0008000800E4 with the following status: 0.

Driver Management has concluded the process to add Service NVDisplay.ContainerLocalSystem for Device Instance ID PCI\VEN_10DE&DEV_2208&SUBSYS_153510DE&REV_A1\8&36C1BE61&0&0008000800E4 with the following status: 0.

when I tried to execute the NVIDIA-SMI utility, I get the below error message . Failed to initialize NVML - Not Found

Can someone please check and let me know what steps needs to be taken to resolve this issue.

Hi @rajathithan,

Welcome to the NVIDIA Developer forums. You posted in the Networking Drivers section of the forums; this topic should be posted in the General Drivers category.

I will move it over for you.

Hello rajathithan,

as the error states, your PCIe resources are not sufficient to run the external GPU. If I recall correctly, most eGPU enclosures use PCIe 4x. Which means that your Mac is not able to offer 4 PCIe lanes through Thunderbolt.

This is not related to the NVIDIA drivers.

A quick search finds suggestions on how to circumvent this “Code12” issue for example here:

(Disclaimer: This is an external link which does not reflect NVIDIA information and I cannot guarantee any of those suggestions will actually work.)

I hope this helps.

Thank you Markus for the information, I followed the given steps was able to resolve the display adapter driver issue, but still when I run the nvidia-smi command I get “Failed to initialize NVML: Not Found”

Even though the display adapter is recognized, I am still unable to fix it completely.

NVML is an essential part of the driver and would only be missing or inaccessible if the driver installation was incomplete or unsuccessful.

My suggestion would be to make a clean re-install of the driver possibly using GeForce Experience. If that fails, trying to disable the GPU and re-enable after a reboot. Either or both of these should clean up the drivers correctly.

I finally made it work on my 2017 Macbook Pro laptop.

Here is what I did.

Wiped all my windows programs and settings and started from a fresh slate.
Used automated-eGPU-EFI to boot into windows

automate-eGPU EFI – eGPU boot manager for macOS and Windows – Thunderbolt macOS eGPU

Used DDU ( Display Driver uninstaller software to uninstall the nvidia drivers and prevented windows from automatic driver identification and installation )
Downloaded the latest nvidia software and waited for 15 mins ( to ensure that windows is not auto installing some other driver), then installed the new drivers.
Code 12 issue was no more , but encountered Code 43 issue, device is not working properly.
I disabled and enabled the driver , now the device manager was showing that my device is working properly.
But still the OS didn’t detect the laptop and I was getting"failed to initialize NVML : not found" error when i executed nvidia-smi command line tool.
So instead of using the apple-automate-eGPU-EFI boot , I tried to login to windows using bootcamp, as expected windows boot up sequence crashed and screen is blurred out.
Then I logged into windows again using automate-eGPU-EFI boot, this time I didn’t get the code 43 error and my windows OS recognized the eGPU.

1 Like

Congratulations! I am happy you could resolve this.

And thank you very much for sharing your solution!

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.