automate-eGPU EFI - eGPU boot manager for macOS and Windows
 
Notifications
Clear all

[Solved] automate-eGPU EFI - eGPU boot manager for macOS and Windows  

 of  108
  RSS

DanHC
(@danhc)
Eminent Member
Joined: 2 years ago
 

Is this script compatible with Windows 10 installed on external SSD (Windows to go UEFI install).

when I selected boot Windows, it just stuck there forever.

Thanks

2013 15" MacBook Pro (GT750M) [4th,4C,H] + RX Vega FE @ 16Gbps-TB2>TB3 (Sonnet Breakaway 650) + Win10 [build link]  

ReplyQuote
dalroi
(@dalroi)
Active Member
Joined: 2 years ago
 

Here's an attempt to a step-by-step for my 2012 Mini with AMD eGPU.

Initial setup:

  1. Open a Terminal.
  2. If your shell is bash, the default Terminal shell, go to the next step - otherwise type bash. Apparently, mac_editors command line is not valid in (at least) tcsh, which happens to be my favourite shell.
  3. Plug in an USB stick that you don't mind getting overwritten. Note its name on the desktop. Make sure it's name does not contain EFI.
    Note: I had to repartition the stick with exFAT (it's a 16GB stick and DOS/FAT is ancient enough to have trouble with that size) because information on it got damaged somehow in an earlier attempt.
  4. Optional: Eject and unplug all other writable USB media to prevent accidentally overwriting the wrong device (your backups, for example).
  5. Copy-paste mac_editors command in Terminal and follow the steps there (that's where the name of your USB stick comes in): 
    bash <(curl -s   https://egpu.io/wp-content/uploads/2018/11/automate-eGPU-EFI-install.txt) 
  6. Remove the file apple_set_os.efi from EFI/CLOVER/drivers64UEFI/ on your USB stick. The 2012 Mini is one of those Mac's that don't need it. My eGPU hasn't activated once with this file  in the EFI stick, so it matters.
  7. Eject the USB stick.
  8. Shut down the Mac.
  9. Unplug the thunderbolt cable; I also powered off the eGPU and let everything settle for a few minutes.
  10. Plug in the USB stick.  The stick doesn't need to be plugged directly in an USB port on your Mac, BTW, an USB hub should work just fine.

Steps for every boot of your Mac:

  1. Turn on the eGPU enclosure (if you turned it off), but don't connect the Thunderbolt cable to the Mac yet.
  2. Turn on the Mac with the Option-key (Alt on a PC keyboard) pressed until you see a list of disks to choose from. If you see the Apple logo instead, something went wrong; perhaps the keyboard didn't get detected, or Option is the wrong key after all (I don't use Apple keyboards).
  3. Choose your USB stick to boot from.
  4. Press q
  5. Start Mac OS from the menu.
  6. Log in.
  7. Plug in the Thunderbolt cable.
  8. Log out (Cmd-Shft-Q).
  9. At this point, the eGPU should activate.

If you noticed that there are no pmset commands in those steps, that's correct. I don't seem to need them on my Mini.

At step 7, I usually see the eGPU symbol in the menu bar for a moment. Is it normal that it disappears?
At step 8, it seems that if I let MacOS churn through the entire session starting back up, that too much time passes before logging out and the eGPU doesn't come up. Does that make sense in any way?

For the record, my 2012 Mini detects as having Thunderbolt 2. Throughput in System Information shows the expected 10 Gb/s though.

Mac Mini 2012 + Sonnet Breakaway Box (up to 300W) + Asus Arez Radeon RX560 2GB


ReplyQuote
jya
 jya
(@jya)
Trusted Member
Joined: 2 years ago
 
Posted by: goalque

"under the System Information utility -> Graphic/Displays , both the internal display and the external display (an Apple TB display) are showing under the Radeon Pro 560X"

so I expected it was connected to the Apple TB display. I meant you shouldn't connect any display directly to the MBP, no matter whether you are on macOS or Windows. As to Windows, maybe you haven't installed Intel drivers?

 

Testing with an external display is something that I did in my quest to find a way, any way, to make it work. It didn't. I didn't continue further with the external display.

I have the intel drivers installed, as shown on my earlier post with screen captures: the intel adapter is working, no error of any kind. However is is *not* the default adapter in use...
Under Windows, the intel is *never* used as primary display adapter.

I'm not sure how I can describe the issue better, I have provided all the information at hand including screen captures. So your question about if the intel drivers are installed or not, or if the MuxSetting is set to 1 makes no sense to me.

MuxSetting is set to 1, when booting windows with automate-egpu.efi two things can happen:
1- System boots fine, both the Intel adapter and the AMD can be seen. However while the Intel is working properly it is *not* the primary graphic adapter
2- The system doesn't boot and instead display a screen with a white moving pattern.

About 80% of the time, it boots as described in 2)

To do: Create my signature with system and expected eGPU configuration information to give context to my posts. I have no builds.

.

ReplyQuote
mac_editor
(@mac_editor)
Famed Member Moderator
Joined: 3 years ago
 

@jya In the older automate-eGPU EFI thread I discussed the functionality of the MuxSetting variable with @goalque. IIRC it doesn't really work as intended. The issue I believe is that it's already too late to set that variable using the EFI app - the mux variable likely needs to be set prior to a reboot. You can do so (lasts only 1 boot if booting into macOS) as follows:

sudo nvram fa4ce28d-b62f-4c99-9cc3-6815686e30f9:gpu-power-prefs=%01%00%00%00

purge-wranglertbt-flashpurge-nvdaset-eGPU
Insights Into macOS Video Editing Performance

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

 
2019 13" MacBook Pro [8th,4C,U] + RX Vega 64 @ 32Gbps-TB3 (Mantiz Venus) + macOS 10.14.6 & Win10 [build link]  


ReplyQuote
mac_editor
(@mac_editor)
Famed Member Moderator
Joined: 3 years ago
 

@dalroi If you chose AMD in the script, ideally the eGPU icon should remain in the menu bar. Odd. Unfortunately I cannot test as I do not have a TB1/2 Mac. Also, yes, I forgot to mention that the command was meant for bash shell. Thanks for pointing that out.

@nu_ninja If it isn't too much trouble could you test the script and see if you encounter the same symptom?

purge-wranglertbt-flashpurge-nvdaset-eGPU
Insights Into macOS Video Editing Performance

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

 
2019 13" MacBook Pro [8th,4C,U] + RX Vega 64 @ 32Gbps-TB3 (Mantiz Venus) + macOS 10.14.6 & Win10 [build link]  


ReplyQuote
goalque
(@goalque)
Noble Member Admin
Joined: 4 years ago
 
Posted by: jya
Posted by: goalque

"under the System Information utility -> Graphic/Displays , both the internal display and the external display (an Apple TB display) are showing under the Radeon Pro 560X"

so I expected it was connected to the Apple TB display. I meant you shouldn't connect any display directly to the MBP, no matter whether you are on macOS or Windows. As to Windows, maybe you haven't installed Intel drivers?

 

Testing with an external display is something that I did in my quest to find a way, any way, to make it work. It didn't. I didn't continue further with the external display.

I have the intel drivers installed, as shown on my earlier post with screen captures: the intel adapter is working, no error of any kind. However is is *not* the default adapter in use...
Under Windows, the intel is *never* used as primary display adapter.

I'm not sure how I can describe the issue better, I have provided all the information at hand including screen captures. So your question about if the intel drivers are installed or not, or if the MuxSetting is set to 1 makes no sense to me.

MuxSetting is set to 1, when booting windows with automate-egpu.efi two things can happen:
1- System boots fine, both the Intel adapter and the AMD can be seen. However while the Intel is working properly it is *not* the primary graphic adapter
2- The system doesn't boot and instead display a screen with a white moving pattern.

About 80% of the time, it boots as described in 2)

Let's not mix two issues:

[1] First, you were not able to get iGPU working on macOS because your MBP was connected to an Apple TB display.

In order to resolve the issue [1], you must not use any external displays and follow the steps on the first post:

<key>MuxSetting</key>
<integer>1</integer>

1) Boot from the external USB drive (hold down the Option key and select "EFI Boot"), eGPU disconnected.

2) Hot plug the eGPU after logged in.

Then execute the following commands:

3) sudo pmset -a gpuswitch 2
4) sudo pmset -a gpuswitch 0

And the iGPU is driving your internal display.

[2] The second issue occurs on Windows. I don't know what you mean by "primary graphic adapter". Why didn't you disable the dGPU in device manager? It is the "basic display adapter" because you uninstalled the AMD driver. There is no need to uninstall AMD drivers. I never had to do so. White patterns are normal as the firmware switches to iGPU. It may take a while. What Win10 version are you running? Where did you download Boot Camp display drivers from? The normal procedure is to use Boot Camp Assistant > Download Windows Support Software.

Future versions can power off the dGPU in preboot environment if disabling the dGPU does not do the job.

If you have to force shut down, you need one normal boot into macOS/Windows before retrying EFI boot.

automate-eGPU EFIapple_set_os.efi

Mid 2015 15-inch MacBook Pro eGPU Master Thread

 
2018 13" MacBook Pro [8th,4C,U] + Radeon VII @ 32Gbps-TB3 (ASUS XG Station Pro) + Win10 1809 [build link]  


ReplyQuote
goalque
(@goalque)
Noble Member Admin
Joined: 4 years ago
 
Posted by: mac_editor

@jya In the older automate-eGPU EFI thread I discussed the functionality of the MuxSetting variable with @goalque. IIRC it doesn't really work as intended. The issue I believe is that it's already too late to set that variable using the EFI app - the mux variable likely needs to be set prior to a reboot. You can do so (lasts only 1 boot if booting into macOS) as follows:

sudo nvram fa4ce28d-b62f-4c99-9cc3-6815686e30f9:gpu-power-prefs=%01%00%00%00

Good point. The firmware reads this EFI variable after POST. Setting it prior to EFI boot may be more effective. The GPU that is driving the internal display is displayed first in the UEFI Shell devtree as "Primary Console Output Device".

The gmux state can be also determined in the following way:

mm -io 7D0 10 -n

mm -io 7C2 -n

The default output is often 0x03, meaning that dGPU is active. If the value is 0x02, the iGPU has taken over to push pixels on the internal screen.

automate-eGPU EFIapple_set_os.efi

Mid 2015 15-inch MacBook Pro eGPU Master Thread

 
2018 13" MacBook Pro [8th,4C,U] + Radeon VII @ 32Gbps-TB3 (ASUS XG Station Pro) + Win10 1809 [build link]  


ReplyQuote
jya
 jya
(@jya)
Trusted Member
Joined: 2 years ago
 
Posted by: goalque

Let's not mix two issues:

[1] First, you were not able to get iGPU working on macOS because your MBP was connected to an Apple TB display.

no that was never the case.. I only enquired if it was expected that an external display would go through the AMD dGPU even with MuxSetting to 1.

In order to resolve the issue [1], you must not use any external displays and follow the steps on the first post:

I don't have issue [1] to resolve, because it was never an issue to start with. As I haven't managed to get the iGPU to work in Windows *ever*, I tried with an external display *just in case*. It didn't change a thing.

<key>MuxSetting</key>
<integer>1</integer>

1) Boot from the external USB drive (hold down the Option key and select "EFI Boot"), eGPU disconnected.

2) Hot plug the eGPU after logged in.

Then execute the following commands:

3) sudo pmset -a gpuswitch 2
4) sudo pmset -a gpuswitch 0

And the iGPU is driving your internal display.

I have stated about a dozen times that:
1) I do not have an eGPU
2) I am attempting to active the iGPU in Windows So I'm not sure why you keep giving me instructions on how to setup a eGPU, or what to do to get the eGPU going. And then you give instructions in macOS, irrelevant to Windows.

[2] The second issue occurs on Windows. I don't know what you mean by "primary graphic adapter". Why didn't you disable the dGPU in device manager? It is the "basic display adapter" because you uninstalled the AMD driver. There is no need to uninstall AMD drivers. I never had to do so. White patterns are normal as the firmware switches to iGPU. It may take a while. What Win10 version are you running? Where did you download Boot Camp display drivers from? The normal procedure is to use Boot Camp Assistant > Download Windows Support Software.

Future versions can power off the dGPU in preboot environment if disabling the dGPU does not do the job.

If you have to force shut down, you need one normal boot into macOS/Windows before retrying EFI boot.

as I mentioned many times, if I disable the dGPU in the device manager, then Windows will boot into a black screen. Even if I get the white pattern at first, it ends up into a black screen after. I use the latest version of Windows (1809) As far as making the display adapter the primary device, as the screen capture I attached earlier shows

Capture2

That's with the Intel being operational: it is *not* actually in use.

If I install the AMD drivers, then the AMD 560X will show with an exclamation mark in the device manager and won't be running, and I will still see:

Capture2

I'm very thankful that you're taking the time to answer my posts so quickly, I really am. But I think we're going in circle because you seem to have pressed reply a tad too quickly and missed most of the data I provided Smile

To do: Create my signature with system and expected eGPU configuration information to give context to my posts. I have no builds.

.

ReplyQuote
jya
 jya
(@jya)
Trusted Member
Joined: 2 years ago
 
Posted by: mac_editor

@jya In the older automate-eGPU EFI thread I discussed the functionality of the MuxSetting variable with @goalque. IIRC it doesn't really work as intended. The issue I believe is that it's already too late to set that variable using the EFI app - the mux variable likely needs to be set prior to a reboot. You can do so (lasts only 1 boot if booting into macOS) as follows:

sudo nvram fa4ce28d-b62f-4c99-9cc3-6815686e30f9:gpu-power-prefs=%01%00%00%00

Would that work doing so in macOS and then rebooting in Windows?

To do: Create my signature with system and expected eGPU configuration information to give context to my posts. I have no builds.

.

ReplyQuote
goalque
(@goalque)
Noble Member Admin
Joined: 4 years ago
 
Posted by: jya

<key>MuxSetting</key>
<integer>1</integer>

1) Boot from the external USB drive (hold down the Option key and select "EFI Boot"), eGPU disconnected.

2) Hot plug the eGPU after logged in.

Then execute the following commands:

3) sudo pmset -a gpuswitch 2
4) sudo pmset -a gpuswitch 0

And the iGPU is driving your internal display.

I have stated about a dozen times that:
1) I do not have an eGPU
2) I am attempting to active the iGPU in Windows So I'm not sure why you keep giving me instructions on how to setup a eGPU, or what to do to get the eGPU going. And then you give instructions in macOS, irrelevant to Windows.

1) I know. That's why I bolded only the lines 3 and 4.

They are important, they may have an effect on Windows as well because the gmux state is changed to integrated. The gmux is OS independent. However, seems that you didn't run those commands as instructed in the first post so wanted to confirm if you did so.

automate-eGPU EFIapple_set_os.efi

Mid 2015 15-inch MacBook Pro eGPU Master Thread

 
2018 13" MacBook Pro [8th,4C,U] + Radeon VII @ 32Gbps-TB3 (ASUS XG Station Pro) + Win10 1809 [build link]  


ReplyQuote
 of  108