[EFI Loader] Error 12 Fix in Boot Camp for Apple T2 Security Chip Macs (apple_se...
 
Notifications

[EFI Loader] Error 12 Fix in Boot Camp for Apple T2 Security Chip Macs (apple_set_os loader v0.5)  

 of  3
  RSS

aa15032261
(@aa15032261)
Eminent Member
Joined: 2 months ago
 

Hello guys, I modified 0xbb's apple_set_os.efi to make it easier to use eGPU on the new MacBook Pro 16". I noticed the old efi doesn't always load successfully so I made this version. In this version, if apple_set_os isn't loaded, it will restart the computer automatically so it will save you some time. Once apple_set_os is loaded, it will start the boot loader of your choice.

 

GitHub & Changelog
https://github.com/aa15032261/apple_set_os-loader

Spoiler
Changelog

v0.5
Add hotkey Z to temporarily disable apple_set_os

v0.4
Fix broken GUI

v0.3
Fix blank screen on some computers
Add Connected Graphics Cards section to menu

v0.2
Fix apple_set_os cannot be loaded sometimes.

v0.1
Initial release

 

Installation

1. Download bootx64.efi (v0.5)

2. Boot to macOS recovery mode (Tutorial)

3. Set Security Boot to "No Security" (Tutorial)

4. Boot to macOS

5. Set the startup disk to macOS (Tutorial)

6. Mount EFI partition using Clover Configurator (Mount EFI -> Mount Partition) (Download)

7. Open EFI disk from desktop then go to /EFI/Boot

8. Rename /EFI/Boot/bootx64.efi to /EFI/Boot/bootx64_original.efi

9. Copy bootx64.efi from step 1 to /EFI/Boot

10. Restart

 

Boot to Windows with eGPU

1. Set the startup disk to Windows

2. Restart

3. Wait until apple_set_os loaded (It is totally normal if the computer restarts several times)

4. Connect in your eGPU to a thunderbolt port on the left side then press any key

5. Once Windows is booted, disconnect your eGPU then connect it to a thunderbolt port on the right side

6. Connect your eGPU again to the port you chose at step 4

7. Error 12 should disappeared. Enjoy! 😊 

 

Uninstall

1. Boot to macOS

2. Set the startup disk to macOS

3. Mount EFI partition using Clover Configurator

4. Open EFI disk from desktop then go to /EFI/Boot

5. Delete /EFI/Boot/bootx64

6. Rename /EFI/Boot/bootx64_original.efi.efi to /EFI/Boot/bootx64

7. Restart

This topic was modified 2 months ago

MacBook Pro 16" / i9-9880H / 16GB / 5500M 4GB
Razer Core X / AMD Radeon VII


mac_editor, mowglibook, Wildgoose and 3 people liked
ReplyQuote
(@akash4393)
Eminent Member
Joined: 3 years ago
 

@aa15032261

Works!! On the first attempt it took three restarts, but second time it worked with one. One thing that I noticed was that my internal display was not starting up. It was showing the windows logo and loading animation and then it would go completely black. It might be because in windows display settings I have disconnected this display (use laptop in clam-shell mode). But this is not an issue for me because I don't have a password, so when I see the controls appear on the touchbar, I do the tb3 port swap thing (left -> right -> left) and everything works! 

Enjoying Forza Horizon 4 (4k - High) thanks to you. 

Cheers!

This post was modified 2 months ago

2019 16-inch MacBook Pro (i9/1TB/64GB/5500 - 8GB). Akitio Node (Corsair SF600) - Vega 64


ReplyQuote
Bloodstainer
(@bloodstainer)
Eminent Member
Joined: 3 months ago
 

Could it work on iMac 21,5' 2017 too?

Because I never succeeded to load previous EFI boot with this iMac (when I select the OS, it freezes).

This post was modified 2 months ago

Config: iMac (Retina 4K, 21.5-inch, 2017). eGPU : NVIDIA GeForce RTX 2060 (with a Razer Core X enclosure)


ReplyQuote
aa15032261
(@aa15032261)
Eminent Member
Joined: 2 months ago
 
Posted by: @bloodstainer

Could it work on iMac 21,5' 2017 too?

Because I never succeeded to load previous EFI boot with this iMac (when I select the OS, it freezes).

You can try it , it might fix the issue.

MacBook Pro 16" / i9-9880H / 16GB / 5500M 4GB
Razer Core X / AMD Radeon VII


ReplyQuote
Bloodstainer
(@bloodstainer)
Eminent Member
Joined: 3 months ago
 

@aa15032261

Thanks. Which partition should I choose here?

clover

(My iMac use Fusion Drive).

Thanks.

Config: iMac (Retina 4K, 21.5-inch, 2017). eGPU : NVIDIA GeForce RTX 2060 (with a Razer Core X enclosure)


ReplyQuote
aa15032261
(@aa15032261)
Eminent Member
Joined: 2 months ago
 

@bloodstainer

It should be installed on the bootcamp partition, so install it to the first EFI partition.

MacBook Pro 16" / i9-9880H / 16GB / 5500M 4GB
Razer Core X / AMD Radeon VII


ReplyQuote
itsage
(@itsage)
Illustrious Member Admin
Joined: 3 years ago
 

@aa15032261 Thank you for sharing this nice solution! Do you see the Intel iGPU in Windows using this solution? 

 

external graphics card builds
best laptops for external GPU
eGPU enclosure buyer's guide


ReplyQuote
aa15032261
(@aa15032261)
Eminent Member
Joined: 2 months ago
 

@itsage

Yes, iGPU, dGPU and eGPU all works

MacBook Pro 16" / i9-9880H / 16GB / 5500M 4GB
Razer Core X / AMD Radeon VII


itsage liked
ReplyQuote
itsage
(@itsage)
Illustrious Member Admin
Joined: 3 years ago
 

@aa15032261 That’s good to hear. The Intel iGPU actually doesn’t work on 2018-2019 15″ & 16″ MacBook Pro but can be force-enabled through apple_set_os.efi and rEFInd. When you attach it to the internal display, the screen would show tiny circle dots and go dark. As long as the dGPU works, Windows Hybrid graphics can use eGPU for internal display acceleration if needed.

I am curious about these recent developments and apple_set_os.efi behaviors with Boot Camp eGPU use. Some early releases of Catalina contain firmware updates (Apple T2 chip Macs only) that completely ignore iGPU force-activation by apple_set_os.efi and rEFInd. I have observed the latest 10.15.2 and 10.15.3 beta to somewhat work with apple_set_os.efi and rEFInd again. However the latest firmware updates mess with Thunderbolt connection state in Windows.

I typically test Thunderbolt 3 connection during Windows boot up process using a TB3 enclosure with RGB, not for the lighting effects but for Thunderbolt connection state monitoring. Take the Razer Core V2 for example, at cold boot the RBG turns on with the connected laptop. During pre-boot, boot loader, and initial OS loading the RBG remains on. The second half of OS loading is when the RBG turns off. If the RGB turns back on when OS loading completes, Thunderbolt connection is active. Otherwise Thunderbolt connection is not active and would require hot-unplug then hot-plug to make the Thunderbolt connection active.

My guess is you may be able to boot into Windows without the eGPU connected using this solution. Try hot-plug your Radeon VII eGPU once Windows fully loads and see whether the system can resolve error 12.

external graphics card builds
best laptops for external GPU
eGPU enclosure buyer's guide


ReplyQuote
Bloodstainer
(@bloodstainer)
Eminent Member
Joined: 3 months ago
 

@aa15032261

Thanks! I did all the steps, unfortunately, I still have error code 12 at the end.

Config: iMac (Retina 4K, 21.5-inch, 2017). eGPU : NVIDIA GeForce RTX 2060 (with a Razer Core X enclosure)


ReplyQuote
aa15032261
(@aa15032261)
Eminent Member
Joined: 2 months ago
 

@itsage

I have tried every combination on my 16”, with and without apple_set_os, cold and hot plug. Only cold plug with apple_set_os and port swapping works. I don’t even know how it works. I used automate_egpu initially and thought it did some magical patches to make the egpu to work, then I realised it was just injected apple_set_os to the system and nothing else. Then I compared the dsdt between with and without apple_set_os boot, they were identical.

I am really confused why I have to enable iGPU to make eGPU to work. I also noticed when I use apple_set_os, windows takes longer to boot, about 30 seconds. Without apple_set_os, it takes just few seconds. 

When I cold plug the eGPU and use apple_set_os, Windows cannot recognise the eGPU, it is like nothing has plugged in. If I reconnect the eGPU to the ports on the left side, nothing will happen. I have to connect it to the right side, there will be a disconnect sound and error 12 appears. After that, swap it back to the left side, it will be recognised and start working.

My guess is, maybe Windows allocates enough resource at startup for my eGPU but somehow cannot complete the connection/handshake. So it will work after swapping since the resource is already allocated.

@bloodstainer

Sorry to hear that but we can create a new post to discuss this issue.

This post was modified 2 months ago

MacBook Pro 16" / i9-9880H / 16GB / 5500M 4GB
Razer Core X / AMD Radeon VII


itsage liked
ReplyQuote
mac_editor
(@mac_editor)
Famed Member Moderator
Joined: 3 years ago
 
Posted by: @aa15032261

I am really confused why I have to enable iGPU to make eGPU to work. I also noticed when I use apple_set_os, windows takes longer to boot, about 30 seconds. Without apple_set_os, it takes just few seconds. 

Technically, booting with set os is also likely to have more effects than just keeping the iGPU enabled for non-macOS boots. This is conjecture at best but setting the OS in firmware can affect OS PCIe device allocation - hence you see influence while cold plug, not hot plug, in which case the firmware does not play a role. Notably once booted cold plugged with eGPU initialized, you may find that unplugging and hot-plugging might still work. So it may seem that setting the OS also affects how PCIe devices are handed off to the booting OS. Where we can exactly see these differences is beyond my knowledge. 

purge-wranglertbt-flashpurge-nvdaset-eGPU
Insights Into macOS Video Editing Performance
2018 MacBook Pro 15" RP560X + RX 5700 XT (Mantiz Venus)

Master Threads:
2014 15-inch MacBook Pro 750M
2018 15-inch MacBook Pro


aa15032261 and itsage liked
ReplyQuote
(@akash4393)
Eminent Member
Joined: 3 years ago
 

@aa15032261

This is the exact behavior I have observed. 

2019 16-inch MacBook Pro (i9/1TB/64GB/5500 - 8GB). Akitio Node (Corsair SF600) - Vega 64


ReplyQuote
TheMegaTB
(@themegatb)
Active Member
Joined: 7 months ago
 

@aa15032261 Thanks for the modified script! I can confirm it fixing Code 12 with the 16“, Core X, 5700XT and will be posting a build log once everything is fully tested after Christmas. 

Could you please publish your changes to the source code somewhere (maybe link a fork of the original repository or open a PR)? I’d like to make some further adjustments to the EFI script. 

This post was modified 2 months ago

Pending: Add my system information and expected eGPU configuration to my signature to give context to my posts


ReplyQuote
(@jacob_see)
New Member
Joined: 2 months ago
 

@aa15032261 Thanks very much! I am in exactly the same situation as @TheMegaTB. This resolved Error 12 for me with a MBP16, Core X, and 5700 XT.

And +1 on publishing the changes when you have a chance.

Thanks again!

16" MacBook Pro | 2.3GHz Intel Core i9 | 5500M 8GB | 64GB RAM | 2TB SSD | Razer Core X | Sapphire RX 5700 XT Nitro+


ReplyQuote
aa15032261
(@aa15032261)
Eminent Member
Joined: 2 months ago
 

@themegatb

Thats a good idea, I will make it open source in few days.

MacBook Pro 16" / i9-9880H / 16GB / 5500M 4GB
Razer Core X / AMD Radeon VII


ReplyQuote
aa15032261
(@aa15032261)
Eminent Member
Joined: 2 months ago
 

@mac_editor

That's a good point but I think I need to learn a bit more to debug this 😂😂.

MacBook Pro 16" / i9-9880H / 16GB / 5500M 4GB
Razer Core X / AMD Radeon VII


ReplyQuote
Eightarmedpet
(@eightarmedpet)
Noble Member
Joined: 3 years ago
 

I remember apple_set_os had an effect on my TB3 bandwidth (limiting it) so another thing that might be worth keeping an eye on?

2017 13" MacBook Pro Touch Bar
GTX1060 + AKiTiO Thunder3 + Win10
GTX1070 + Sonnet Breakaway Box + Win10
GTX1070 + Razer Core V1 + Win10
Vega 56 + Razer Core V1 + macOS + Win10
Vega 56 + Mantiz Venus + macOS + W10

---

LG 5K Ultrafine flickering issue fix


ReplyQuote
TheMegaTB
(@themegatb)
Active Member
Joined: 7 months ago
 

Thank you for publishing the sources! I made some further investigations in the behaviour of Windows when doing the port switching from left to right to left. First off I attempted to disable the x8 PCIe bridge (left hand ports) and/or subsequent switches which didn't yield anything usable. Then I noticed that when plugging the eGPU into the right-hand ports and back to the left the port into which you plug the eGPU doesn't matter as long as it is on the x8 bridge.

It seems like the eGPU won't work on the x8 bridge until you plug it somewhere into the x4 bridge (right-hand ports on the 16") and then back somewhere into the x8 bridge. Makes me wonder what kind of allocation magic is going on there and whether or not there is a way to do this either in software or by attaching some other device to the x4 bridge. I'm currently building a DIY dock for the 16" and having to switch the eGPU from one side to the other makes that somewhat impossible (esp. with the short TB3 cable) so some kind of software solution would be favourable. I'll further investigate with my limited eGPU/PCIe allocation knowledge and time in the following days ^^

Pending: Add my system information and expected eGPU configuration to my signature to give context to my posts


ReplyQuote
bluexyzz
(@bluexyzz)
New Member
Joined: 2 months ago
 

@aa15032261

First off thanks for your efforts on this!

On my 2019 16" 64GB w/ 5500M 8GB, the latest version of bootx64.efi just gives me a blank screen when attempting to boot into Windows. Any thoughts on why/ what to do?

Also, I made a mistake and overwrote the previous version with the new one so now I can't boot into windows at all with the egpu - can you post the previous version?

Macbook Pro 2019 16" 64GB/5500M 8GB
PowerColor RX 5700 XT + Razer Core X Chroma


ReplyQuote
aa15032261
(@aa15032261)
Eminent Member
Joined: 2 months ago
 

@bluexyzz

I have fixed the issue, thanks for the feedback!

MacBook Pro 16" / i9-9880H / 16GB / 5500M 4GB
Razer Core X / AMD Radeon VII


ReplyQuote
aa15032261
(@aa15032261)
Eminent Member
Joined: 2 months ago
 

@eightarmedpet

I will try but I am not sure if I can fix it because I don't have a Nvidia gpu.

MacBook Pro 16" / i9-9880H / 16GB / 5500M 4GB
Razer Core X / AMD Radeon VII


ReplyQuote
aa15032261
(@aa15032261)
Eminent Member
Joined: 2 months ago
 

@themegatb

Great! I appreciate it! I'm still reading the UEFI Specification (it's looooong) and hope I will find a solution to the issue soon.

MacBook Pro 16" / i9-9880H / 16GB / 5500M 4GB
Razer Core X / AMD Radeon VII


ReplyQuote
KernelPan1c
(@kernelpan1c)
New Member
Joined: 6 months ago
 

I tried a lot lot other work arounds to try to get rid of error 12 on my 16" w/ 5500m and rx580 eGPU, but this is the only thing that has worked so far. It wouldn't work at all at first, perhaps due to other workaround attempts, but after a reinstall of windows I managed to get it working. It was a bit finicky and caused some freezes the first few run throughs, but now it's working consistently. I do have to do the left-right-left dance.

Macbook Pro 16'' | I9-9880H 2.3 GHz | 5500M 8GB
Sonnet 350 + rx580


ReplyQuote
(@pepe_sapiens)
Active Member
Joined: 2 months ago
 

Hey folks, long time lurker first time poster. I have a similar setup to y’all: MBP 16” 5500M, 5700XT, Razer Core X

I’ve had some variety of success with this setup and tool but ultimately ran into a bit of a brick wall.

My “success” was with the newest version of Windows 10, swapped the pci.sys as per https://egpu.io/forums/pc-setup/egpu-fail-after-update-to-windows-19-03/paged/12/, installed the latest drivers from bootcampdrivers, did the left-right-left dance at which point the card started working and my external displays came alive (with the built in intel graphics and 5500M erroring out in device manager). This disabled the option to adjust the built in brightness or turn off the screen when in clamshell mode.

My issue started when I actually started trying to use the card for gaming on my external displays. Multiple games ran at very low (but stable) FPS, regardless of their graphic settings.

Am I missing something obvious? Appreciate you guys infinitely, hoping to get this resolved at some point.

Pending: Add my system information and expected eGPU configuration to my signature to give context to my posts


ReplyQuote
Mini i5
(@mini-i5)
Estimable Member
Joined: 6 months ago
 

@pepe_sapiens

Sounds familiar ...

https://egpu.io/forums/bootcamp/bootcamp-egpu-frame-capping/

2018 Mac Mini i5 / 6-core 3.0-4.1 Ghz / 32GB / 256GB / Intel UHD 630 / PowerColor Gaming Station / PowerColor dual-fan RX5700 XT / Mac OS 10.15.3 Catalina / LG 27" 4K display


ReplyQuote
(@pepe_sapiens)
Active Member
Joined: 2 months ago
 

@mini-i5

That’s what I was thinking too but my setup is two monitors both running off DP. Anytime the eGPU is connected and running my laptop’s fans ramp up like crazy, even on idle. Only thing I haven’t tried yet is to run one monitor at a time but can definitely give it a go. Right now I’m in the process of doing a fresh install of Windows to try to isolate away from software issues.

On a more related note, is it expected behavior for the rest of the thunderbolt ports on the MBP to stop working? I’m using a Caldigit T3 dock for my peripherals and they don’t work at all for a few minutes after the eGPU is running, have to keep unplugging and plugging back in multiple times until it’s recognized.

This post was modified 2 months ago

Pending: Add my system information and expected eGPU configuration to my signature to give context to my posts


ReplyQuote
Mini i5
(@mini-i5)
Estimable Member
Joined: 6 months ago
 

@pepe_sapiens

Do these problems happen only in Windows, or also in Catalina?

This post was modified 2 months ago

2018 Mac Mini i5 / 6-core 3.0-4.1 Ghz / 32GB / 256GB / Intel UHD 630 / PowerColor Gaming Station / PowerColor dual-fan RX5700 XT / Mac OS 10.15.3 Catalina / LG 27" 4K display


ReplyQuote
(@pepe_sapiens)
Active Member
Joined: 2 months ago
 

@mini-i5

Windows only. All works normally under Catalina. I can also confirm the Core X is working normally in Windows with a GTX 1660 ti.

The reason I’m reinstalling Windows currently is because I had been using the Nvidia card up until now, wondering if its drivers or software is introducing some unforeseen issue.

Pending: Add my system information and expected eGPU configuration to my signature to give context to my posts


ReplyQuote
aa15032261
(@aa15032261)
Eminent Member
Joined: 2 months ago
 

@pepe_sapiens

I think the enclosure matters for AMD graphics cards, at least on MacBook Pro 16". I used Core X previously with Radeon VII and I had to do the port swapping. Recently, I purchased Core X Chroma because it uses JHL6540 controller (Core X uses DSL 6540) and the problem is gone! 

MacBook Pro 16" / i9-9880H / 16GB / 5500M 4GB
Razer Core X / AMD Radeon VII


ReplyQuote
(@pepe_sapiens)
Active Member
Joined: 2 months ago
 

@aa15032261

Dang, good to know. I just bought the Core X last month so... might be a little bit till another investment, haha.

Either way, just wanted to report back that after the reinstall > pci.sys swap > EFI trick > 5700XT drivers install, the performance of the card is back to normal and my MBP's fans are not ramping up on idle anymore.

am still experiencing the issue of my other T3 ports not picking up my CalDigit T3 dock for a while (I'd say around 5 minutes) and I have to unplug and replug it in before it'll start to work. Leaving it plugged in while booting does not work.

Lastly, my internal display won't turn off or adjust its brightness... this seems to be related to the official drivers since the 5700xt ones break (error 43) the 5500M ones. I may experiment with the bootcampdrivers ones once they get an update as the current version is pretty unstable. In the meantime, I am using "Multimonitor Tool" to disable the built in monitor (this does not turn off the backlight).

Thanks again for all of your hard work and help getting this to run. I might start a build thread sometime so I can continue to report back~!

This post was modified 2 months ago

Pending: Add my system information and expected eGPU configuration to my signature to give context to my posts


ReplyQuote
acantril
(@acantril)
Eminent Member
Joined: 3 years ago
 
Posted by: @aa15032261

@pepe_sapiens

I think the enclosure matters for AMD graphics cards, at least on MacBook Pro 16". I used Core X previously with Radeon VII and I had to do the port swapping. Recently, I purchased Core X Chroma because it uses JHL6540 controller (Core X uses DSL 6540) and the problem is gone! 

mmm this is interesting - i'm having issues with the standard Core X - i would buy the Chroma for sure if it fixed this, but i'm a bit hesitant to make any more purchases without some certainty. 

2019 MacBook Pro 16" / i9-9880HK / 32GB / 5500M 8GB
Razer Core X Chroma / AMD Radeon RX 5700 XT


ReplyQuote
slindshady
(@slindshady)
New Member
Joined: 2 months ago
 

That's what I thought. Couldn't get the 5700 XT on Bootcamp working no matter what. So I bought the Chroma version that just arrived today and it didn't make any difference. Even updated to the 1904 slow preview ring because several people over on reddit said Error 12 was gone with the new pre-release.

Long story short: Neither Core X nor Chroma work with my 16" and 5700 XT. The 2080 Ti was a breeze to install. Worked after three minutes.

Pending: Add my system information and expected eGPU configuration to my signature to give context to my posts


ReplyQuote
aa15032261
(@aa15032261)
Eminent Member
Joined: 2 months ago
 

@slindshady

Yeah, Nvidia cards have better eGPU support under Windows. If you still want to try using an AMD card, try the following, it should work using Chroma enclosure.

1. Go back to build 295, uninstall any third party patches, apple_set_os, automate-eGPU, etc.

2. Uninstall graphics driver using DDU

3. Download graphics driver from bootcampdrivers.com

4. Unplug eGPU before booting to Windows, then plug it in to the thunderbolt on the left side after login. It should recognise immediately.

5. Install graphics driver

This post was modified 2 months ago

MacBook Pro 16" / i9-9880H / 16GB / 5500M 4GB
Razer Core X / AMD Radeon VII


ReplyQuote
acantril
(@acantril)
Eminent Member
Joined: 3 years ago
 
Posted by: @aa15032261

@slindshady

Yeah, Nvidia cards have better eGPU support under Windows. If you still want to try using an AMD card, try the following, it should work using Chroma enclosure.

1. Go back to build 295, uninstall any third party patches, apple_set_os, automate-eGPU, etc.

2. Uninstall graphics driver using DDU

3. Download graphics driver from bootcampdrivers.com

4. Unplug eGPU before booting to Windows, then plug it in to the thunderbolt on the left side after login. It should recognise immediately.

5. Install graphics driver

The thing is - it looks like there are more people for who this DOESN'T work, than for who it works. The forums are full of people with a code 12 result to these steps.

2019 MacBook Pro 16" / i9-9880HK / 32GB / 5500M 8GB
Razer Core X Chroma / AMD Radeon RX 5700 XT


jehartzog liked
ReplyQuote
slindshady
(@slindshady)
New Member
Joined: 2 months ago
 

I appreciate the help, but for me this is kind of a shit-show at this point.

Tried the 1904 slow ring build today - that fucked up the bootcamp install completely - wouldn't work with both enclosures and not even the nVidia card.

Clean 1909 stock install. Bluetooth gets instantly disabled after plugging in the Core X or Chroma X.
Might try a last time tomorrow with the AMD card - but at this point I'm pretty sure both enclosures are going back and the AMD card will go into a second desktop.
I'd be using the Windows Bootcamp partition for work as well, so I'm a little hesistant to not be on the lastest windows updates due to security reasons. Managing about 1000+ client logins to Google Accounts, websites etc. and can't afford any security issues ever.

Pending: Add my system information and expected eGPU configuration to my signature to give context to my posts


ReplyQuote
 of  3