2017 15" MacBook Pro (RP560) [7th,4C,H] + GTX 1080 [email protected] (AKiTiO Node) + Win10 [jzfgs]
First off, thank you Nando4 for the help figuring this out and for putting my messages+other instructions together for this post!
This is a script I wrote to disable/enable PCI E ports in the correct order on every boot to fix error 12 on my machine. Long story short, I got the script to work, but the .bat files need to be rewritten depending on which TB3 port you connect the eGPU to.
In my case, the computer will only recognize the 1080 Ti in device manager when the Node is plugged into the top left TB3 port but issues an eGPU error code 12 until I apply the script workaround below. On the lower left port, it doesn’t function and recognizes as a “generic display adapter,” and on the two right ports the card isn’t recognized at all.
When it is recognized on the lower left, it’s under a different upstream TB3 bridge than the upper left, so if that port did work for someone, they’d have to adjust the script code to disable and then enable different TB3 bridges.
eGPU error 12 fix for mid-2017 15″ Macbook Pro
With my TB3 enclosure plugged into the top left TB3 port, here’s how I used devcon to disable the eGPU's upstream TB3 bridges. They are then re-enabled to force Windows to reallocate them into the factory DSDT’s ‘large memory’ area:
Can just unzip this attachment to so can do straight to step2 and modify disable-pcie.bat & enable-pcie.bat according to the header instructions in each of those files.
1 – Install Windows 10 WDK. (From this several gigs file you only need a 82kb file called devcon.exe located on “C:\Program Files (x86)\Windows Kits\10\Tools\x64” – After you copy the file you can uninstall WDK)
2 – Create 3 text files that will be saved as .bat
:: The [device instances] are *unique* to your Windows installation so you cannot use this script as is. :: Disable TB3 bridges from nearest to furtherest from the eGPU using 'devcon disable [device instance]' :: Use Device Manager->View->Devices by connection to view upstream & downstream TB3 bridges from the eGPU :: Identify their [device instance] by right-click TB3 bridge->Properties->Details->Device instance path @echo off devcon disable "@PCI\VEN_8086&DEV_1576&SUBSYS_03081CF0&REV_00\4F418048F4E9070008" devcon disable "@PCI\VEN_8086&DEV_1576&SUBSYS_03081CF0&REV_00\U4F418048F4E9070000" devcon disable "@PCI\VEN_8086&DEV_15D3&SUBSYS_11112222&REV_02\78838078B223040020" devcon disable "@PCI\VEN_8086&DEV_15D3&SUBSYS_11112222&REV_02\78838078B223040010" devcon disable "@PCI\VEN_8086&DEV_15D3&SUBSYS_11112222&REV_02\78838078B223040008" devcon disable "@PCI\VEN_8086&DEV_15D3&SUBSYS_11112222&REV_02\78838078B223040000"
:: Take your disable-pcie.bat, reverse the order of TB bridges and change it to be a 'devcon enable'. @echo off devcon enable "@PCI\VEN_8086&DEV_15D3&SUBSYS_11112222&REV_02\78838078B223040000" devcon enable "@PCI\VEN_8086&DEV_15D3&SUBSYS_11112222&REV_02\78838078B223040008" devcon enable "@PCI\VEN_8086&DEV_15D3&SUBSYS_11112222&REV_02\78838078B223040010" devcon enable "@PCI\VEN_8086&DEV_15D3&SUBSYS_11112222&REV_02\78838078B223040020" devcon enable "@PCI\VEN_8086&DEV_1576&SUBSYS_03081CF0&REV_00\U4F418048F4E9070000" devcon enable "@PCI\VEN_8086&DEV_1576&SUBSYS_03081CF0&REV_00\4F418048F4E9070008"
:: disable, then enable eGPU TB3 upstream bridges to force their reallocation @echo off call disable-pcie.bat call enable-pcie.bat exit
3 – Run final.bat (as administrator) to confirm it resolves your error 12. Only then proceed to the next step.
4 – Copy those 4 files (;
5 – There is a trick to run it as administrator without that pop-up warning.
6 – Go to desktop, right-click, New->Shortcut
7 – Search for Run, type shell:startup and click OK.
8 – Copy the new shortcut from Desktop to this startup folder. This will ensure will open when you boot windows.
9 - Reboot system. Success!! No more eGPU error 12.
Note: In my experience, if this script is executed, the LG UltraFine 5K will not work on any ports aside from the one that the eGPU works on for that boot. To fix this, set it to not apply on next boot, reboot, and the 5K should be fine, but the eGPU won't work. This script has to be run every boot to fix the eGPU error 12 properly, but if the fix has ran, the 5K won't work (your mileage may very though).
Thanks you for reading!
I was getting the code 12 error and tried your ZIP file fix but it hasn’t seemed to work. Could somebody help me identify which are my upstream TB3 bridges? I’ve attached a screen shot via imgur of my device manager showing devices by connection.
Any suggestions would be much appreciated!
@mpnyc I'm not familiar with this "large memory" script but I have one quick suggestion if you'd like to try in the mean time.
Right click and disable the PCI Express Controller (x8) - 1905. Shut your MacBook Pro down. Unplug the eGPU from the left TB3 port and plug it into the right one. If you have other USB-C/Thunderbolt 3 devices on the right side ports, unplug them temporarily. Boot into Windows and see if this error 12 has resolved.
Then, I did your suggestion of disabling the PCI Express Controller (x8) - 1905, shutting down, swapping the eGPU to the port on the right side, then booting back up. it seems to have resolved the code 12 error and tells me the GTX1080 is working properly. thank you!
This works; however, the audio gets disable in my laptop.
Resources by type: Direct memory access (DMA), Input/output(IO), Interrupt request(IRQ), Memory
@lbeach, apply the audio fix by dsaul. Please ensure disabling/enabling audio manually using Device Manager fixes the problem prior to using this script as it just automates the process. If the problem persists, please ask for assistance in an audio-related thread.
I’ll add that your current use of jzfgs’ script without ‘large memory’ present is merely doing eGPU relocation in 32-bit PCIe space which may or may not solve your error 12. The jzfgs’ script was designed for use with a 'large memory' area which is a factory item on his 2017 15" MBP but requires a DSDT override covered in the following thread on your 2016 15″ MBP:
I'm troubleshooting a new problem that's popped up since a recent windows auto-update. I've got a 2017 15" MBP with a GTX 980 Ti in an Akitio Node. Everything was fine for months, then after the auto update, my card was no longer detected. After a thunderbolt driver update and reinstall of Nvidia drivers, the node and card are now detected, but the first time I saw it appear in device manager, I got an error 12. I tried integrated.bat, which worked in the past, but now does not. And when I try plugging the node into the left hand side, the card pops up in device manager, but quickly, I get a BSOD. It sounds like your strategy might work, but how can I implement it if I'm getting an immediate blue screen?
Any advice would be useful- thanks!
Glad I am not the only one who has issues with the LG 5K display working with these scripts that reallocate resource... oh well, my 1070 is still working fine and my 580 works fine in my Hack.