Setup & Software Discussions
automate-eGPU EFI - eGPU boot manager for macOS and Windows
 

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

 of  27
  RSS

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

 

The internal ports of the MBP are hardwired to dGPU (RP 560X) - the gmux has no other choice than dGPU in this situation when an external monitor is connected.

If you are going to use eGPU + apple_set_os.efi + MuxSetting=1, disconnect all displays from the internal ports of the MBP.

Ok...

I get that... so how can I activate the iGPU in Windows and make it the primary adapter then? Is there a way with the MBP 2018?

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


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

Ok...

I get that... so how can I activate the iGPU in Windows and make it the primary adapter then? Is there a way with the MBP 2018?

If you're using internal display ports of the MBP, you can't. The only way is to disconnect, and then iGPU is available (apple_set_os.efi + MuxSetting=1).

automate-eGPU EFIapple_set_os.efi
--
2018 13" MacBook Pro + Radeon [email protected] + Win10 1809


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

If you're using internal display ports of the MBP, you can't. The only way is to disconnect, and then iGPU is available (apple_set_os.efi + MuxSetting=1).

What do you mean by internal display ports?
This MBP isn't connected to anything. The only screen is the internal display. While the iGPU is indeed appearing as available once apple_set_os.efi is loaded with MuxSetting=1, it is non-functional. It appears in the Device Manager as working, but it isn't. See my earlier post with screen captures attached.

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


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

Automate eGPU EFI 1.0.5 Installer

Seeing people make some errors while creating the USB disk, and also the different patch for AMD eGPUs that allows for safe eject, I thought it would be best to have a simple installer that:

  • Formats an existing external partition for you.
  • Installs automate-eGPU-EFI onto that partition.
  • Updates the configuration for NVIDIA or AMD, the latter based on system thunderbolt version.

 

The created disk seems to work and boot fine on my end but would love to hear if it works for others. Before using this, please physically eject any external drives you do not want to format just in case. Internal disks are not supported for safety reasons.

 

To Use:

bash <(curl -s  https://egpu.io/wp-content/uploads/2018/11/automate-eGPU-EFI-install.txt) 

Copy-paste into Terminal (default shell only: bash), and follow instructions from there.

@goalque GPT seems to work fine. I have a pen drive with the High Sierra Installer, Mojave Installer, and your EFI system on-board. All partitions work and boot ok.

purge-wranglerpurge-nvdaset-eGPU
2018 MacBook Pro 15" RP560X + RX 5700 XT (Mantiz Venus)


slhdsnet, itsage, goalque and 1 people liked
ReplyQuote
Eightarmedpet
(@eightarmedpet)
Noble Member
Joined: 3 years ago

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

@eightarmedpet Please re-run. Was a little mistake.

Also, I haven't added the Ti82 patch to this. I'll do later on as well so people can have unlocked Ti82 enclosures by default.

purge-wranglerpurge-nvdaset-eGPU
2018 MacBook Pro 15" RP560X + RX 5700 XT (Mantiz Venus)


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

That worked, but has killed my LG 5K... I was booting just fine with the previous version - any ideas?

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
mac_editor
(@mac_editor)
Famed Member Moderator
Joined: 3 years ago
 

@eightarmedpet The installer is basically just downloading and unzipping the file to the pen drive, just as anyone would do manually. If you made some other adjustments to the config.plist, you will have to add them manually still.

The installer also checks file integrity using a SHASUM so the installation is exactly the same as the file hosted on the forum.

purge-wranglerpurge-nvdaset-eGPU
2018 MacBook Pro 15" RP560X + RX 5700 XT (Mantiz Venus)


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

That's the thing - I didn't? Could it be something to do with

  • Updates the configuration for NVIDIA or AMD, the latter based on system thunderbolt version.

 

?

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
mac_editor
(@mac_editor)
Famed Member Moderator
Joined: 3 years ago
 

@eightarmedpet If you chose NVIDIA no changes were made.

A good idea could be to retry doing it manually like you first did to re-check if the Ultrafine works then.

purge-wranglerpurge-nvdaset-eGPU
2018 MacBook Pro 15" RP560X + RX 5700 XT (Mantiz Venus)


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

I chose AMD, this bootloader has finally got me past error 12 and I am running a 570 while I wait for my Vega to arrive! Massive thanks for this btw... best part fo a year trying to get AMD working in Bootcamp with the pesky 5K compounding the issue!

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
mac_editor
(@mac_editor)
Famed Member Moderator
Joined: 3 years ago
 

@eightarmedpet I saw your guide! Happy to hear things finally go your way. Enjoy the Vega 56. I have a 64 on the way too.

So when choosing AMD, essentially it does nothing on Thunderbolt 3 Macs, because on macOS AMD is supported natively (so the patch finds some set of characters and replaces it with the same set of characters = no changes at all). To verify this, you can remove items in the config.plist KextsToPatch section. The 5K issue is rooted somewhere else likely (maybe apple_set_os.efi IDK).

Also, thank you for testing even though you had a working setup before. Really appreciate it.

purge-wranglerpurge-nvdaset-eGPU
2018 MacBook Pro 15" RP560X + RX 5700 XT (Mantiz Venus)


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

It's the least I could do.. without you guys I wouldn't have my AMD card working!
apple_set_os.efi could be the issue, it was before, but I never got passed error 12 previously.

Best I keep the previous version safe. I'll try a manual instal tomo or next week sometime and see what happens...

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
goalque
(@goalque)
Noble Member Admin
Joined: 3 years ago
 
Posted by: jya
Posted by: goalque

If you're using internal display ports of the MBP, you can't. The only way is to disconnect, and then iGPU is available (apple_set_os.efi + MuxSetting=1).

What do you mean by internal display ports?
This MBP isn't connected to anything. The only screen is the internal display. While the iGPU is indeed appearing as available once apple_set_os.efi is loaded with MuxSetting=1, it is non-functional. It appears in the Device Manager as working, but it isn't. See my earlier post with screen captures attached.

"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?

automate-eGPU EFIapple_set_os.efi
--
2018 13" MacBook Pro + Radeon [email protected] + Win10 1809


ReplyQuote
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

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


ReplyQuote
dalroi
(@dalroi)
Active Member
Joined: 1 year 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)

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


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-wranglerpurge-nvdaset-eGPU
2018 MacBook Pro 15" RP560X + RX 5700 XT (Mantiz Venus)


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-wranglerpurge-nvdaset-eGPU
2018 MacBook Pro 15" RP560X + RX 5700 XT (Mantiz Venus)


ReplyQuote
goalque
(@goalque)
Noble Member Admin
Joined: 3 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
--
2018 13" MacBook Pro + Radeon [email protected] + Win10 1809


ReplyQuote
goalque
(@goalque)
Noble Member Admin
Joined: 3 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
--
2018 13" MacBook Pro + Radeon [email protected] + Win10 1809


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 🙂

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


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?

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


ReplyQuote
goalque
(@goalque)
Noble Member Admin
Joined: 3 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
--
2018 13" MacBook Pro + Radeon [email protected] + Win10 1809


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

So so far, it hasn't worked much better than with the egpu-switch windows utility + apple_set_os.efi , I get exactly the same behaviour (either spinner or flashing white screen when booting). But it's much easier to recover, having the ability to simply boot the USB stick and reset things is a massive progress.

Now if only I could make that damn iGPU work under Windows 🙁

egpu-switch or https://github.com/0xbb/gpu-switch ?

This may explain it, it would be unfortunate if your MBP doesn't behave the same way as the old ones.

automate-eGPU EFIapple_set_os.efi
--
2018 13" MacBook Pro + Radeon [email protected] + Win10 1809


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

@goalque Another important observation when booting with the nvram variable set to iGPU is that during the POST sound on older macs, there will be a noticeable delay for the display to turn on (from off -> LCD black). When this variable is absent, the display will power on immediately after pressing the power button along with the sound.

So to summarize:

Without variable: POST sound + display turns on alongside

With variable: Almost like POST sound first, then display turns on

Hypothesis: Obviously, MuxSetting=1 cannot and doesn't replicate this behavior as it is set later. What it does I am presuming is that it sets the mux to the iGPU, and this setting holds into the OS if and only if the other (non-mux selected) GPU is disabled (which can't be done on macOS completely as it can be with Windows). Evidence is @itsage's recent update on the 2016 MBP build with 1.0.5 where he mentions "internal display attachment to iGPU" - he had dGPU disabled in Windows. If the other GPU (i.e, the one wired to display) is usable, the mux switches back to it as the OS boots. The last symptom should not occur if the nvram variable is used.

@jya Running if from macOS then booting into Windows should preserve the mux change.

purge-wranglerpurge-nvdaset-eGPU
2018 MacBook Pro 15" RP560X + RX 5700 XT (Mantiz Venus)


ReplyQuote
goalque
(@goalque)
Noble Member Admin
Joined: 3 years ago
 

The difference is that @itsage is using the older 2016 15" MBP whereas @jya has the new 2018 15" MBP.

@jya said "if I disable the dGPU in the device manager, then Windows will boot into a black screen".

So it has something to do with the firmware. If gpu-switch or gpu-power-prefs has no effect either, I would look at what the UEFI Shell says.

@mac_editor do you have Windows?

automate-eGPU EFIapple_set_os.efi
--
2018 13" MacBook Pro + Radeon [email protected] + Win10 1809


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

@goalque Right, @itsage is on the 2016 model. I was under the assumption that the EFI muxing (power-prefs variable) is functional on the 2018 MBPs without testing this myself. My bad.

Yes, I do have Windows. Doesn't need any mods to get eGPUs working though.

Update: I can confirm that the NVRAM command does disable switching to the dGPU completely for one boot and works as expected on the 2018 MBP on macOS. In such a configuration, external monitors connected directly to the likely won't work (cannot test this myself on 2018 MBP).

Update 2: Some interesting observations:

With NVRAM
Without NVRAM

First image: Booted with NVRAM arg. in place. I was expecting to see the iGPU interestingly the eGPU shows up.

As expected, disabling automatic graphics switching did not switch GPU to the 560X while booted as such.

purge-wranglerpurge-nvdaset-eGPU
2018 MacBook Pro 15" RP560X + RX 5700 XT (Mantiz Venus)


goalque liked
ReplyQuote
goalque
(@goalque)
Noble Member Admin
Joined: 3 years ago
 

Yes, 2018 doesn't need any mods but now the problem is that IF you really want to activate the iGPU of the 2018 15" on Windows. That does not seem to be possible. @jya has a good reason to do so: "For the work I do, using the Intel UHD 630 or a nvidia 10xx eGPU would achieve the same goal (have access to the 10 bits HW video decoders that the AMD lacks".

automate-eGPU EFIapple_set_os.efi
--
2018 13" MacBook Pro + Radeon [email protected] + Win10 1809


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

So so far, it hasn't worked much better than with the egpu-switch windows utility + apple_set_os.efi

, I get exactly the same behaviour (either spinner or flashing white screen when booting). But it's much easier to recover, having the ability to simply boot the USB stick and reset things is a massive progress.

Now if only I could make that damn iGPU work under Windows 🙁

egpu-switch or https://github.com/0xbb/gpu-switch ?

This may explain it, it would be unfortunate if your MBP doesn't behave the same way as the old ones.

I've played with egpu-switch many times.. I only end up with the rotating white pattern on the screen. It never moves from there.. Problem is recovering from that one is an absolute pain. Gotta boot on mac, start the bootcamp partition in VMWare and play with the command again (and that doesn't always work)

gonna try all the options provided earlier now.

thanks again.

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


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

@goalque Right, @itsage is on the 2016 model. I was under the assumption that the EFI muxing (power-prefs variable) is functional on the 2018 MBPs without testing this myself. My bad.

Yes, I do have Windows. Doesn't need any mods to get eGPUs working though.

Update: I can confirm that the NVRAM command does disable switching to the dGPU completely for one boot and works as expected on the 2018 MBP on macOS. In such a configuration, external monitors connected directly to the likely won't work (cannot test this myself on 2018 MBP).

Update 2: Some interesting observations:

With NVRAM
Without NVRAM

First image: Booted with NVRAM arg. in place. I was expecting to see the iGPU interestingly the eGPU shows up.

As expected, disabling automatic graphics switching did not switch GPU to the 560X while booted as such.

You have the 15" version of the MBP 2018?
Did you ever managed to get the iGPU working under windows and driving the internal screen? (with our without eGPU)

With automate-egpu.efi installed, and MuxSetting set to 1, after running the gmset gpuswitch command I see:
 

Capture

which is identical to just running the apple_set_os.efi bit. So while the intel shows up just fine in the device manager, and the 560X has the yellow bit, it's still the Microsoft Basic Display Driver that is in use..

gonna try the nvram option now and edit this post once done

Edit: So in the device manager, I disabled the 560X device. Rebooted -> white rotating pattern, after about a minute or so: blank screen. You can tell Windows has booted properly otherwise. Holding the fn key you can see the touch bar changing content etc.. I can change the backlight of the keyboard etc..

So then I attempted this:
1- Hold option key to boot via automate-egpu.efi
2- Press q, select mac
3- Open a terminal
4- Type

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

then:

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

5- Reboot
6- Hold option, press [q] select windows
7- Enjoy either the blank screen, the rotating white pattern, or the windows boot spinner.

So I always go back to the same behaviour:
1- iGPU is apparently running, driver loaded, I can even query its DXVA and D3D11 capabilities with tools such as DXVA Checker, yet it's not used as display controller, the Microsoft Basic one is
2- Blank or funny screen.

There's something messy about it...
I was bitching about this whole thing a couple of weeks ago to some Apple engineers that happened to be at the same conference I was, and they told me at the time that they hadn't written intel drivers for the MBP yet and it couldn't be switched, and was asked to open a bug about it (at Apple, if a bug isn't opened, the problem doesn't exist really). So I did, and it was closed the following day with

Thank you for your feedback, it is noted. Engineering has determined that there are currently no plans to address this issue.

Unfortunately, Boot Camp currently does not support graphics muxing. It is something we will investigate for the future.

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


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

A while back, when I was attempting to use a Mac Pro 2013 with a nvidia eGPU under bootcamp (for the exact same reasons I'm trying to get the iGPU to work on this MBP 2018), while the eGPU worked fine under macOS, under Windows I always got the error 12 issue. At the time I had been given some mm -io commands to play with in an EFI shell, trying to deactivate one of the AMD D500 GPU. I never got anywhere with this. (Instead I bought a PC and made my first hackintosh)

I realise that I've hijacked this thread for a different topic... I'll open a new thread next. My apologies for this.

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


ReplyQuote
nu_ninja
(@nu_ninja)
Estimable Member
Joined: 2 years ago
 

@mac_editor

Yes, the script installed EFI causes a frozen login screen if I startup with egpu connected and my manual installation works normally. Hot-plug and log-out doesn't get egpu recognized but unload and reload the thunderbolt kext and egpu is recognized and the icon stays in the menubar

Mid-2012 13" Macbook Pro (MacBookPro9,2) TB1 -> RX 460/560 (AKiTiO Node/Thunder2)
+ macOS 10.15+Win10 + Linux Mint 19.1


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

@goalque @jya It's all starting to make sense after I did some few tests. This is exactly the same issue @itsage came across when he was testing eGPUs on the 2018 models.

Crux: If multiple GPUs are present in preboot environment, Windows boots into a black internal display on the 2018 model(s). AMD eGPUs have further complications with drivers, but that is unrelated here. The same issue is occurring with iGPU. But there are many variables - such as GPU enabled/disabled in Windows. It's hard to summarize.

@jya Seeing that screenshot seems like you got into Windows fine with both GPUs present. The best I could do using the EFI stick was boot with the iGPU enabled but use an eGPU's external display as the internal display would be disabled anyway. Unable to reproduce that result at this time. So I guess the best way of getting things going for your workflow would be to boot with the eGPU plugged in, load Windows using the EFI stick, and have the UHD available as a compute unit while using the accelerated external display (if you are using one). Maybe mention your config. in your signature.

Before today, I never tried getting the iGPU to work in Windows so I don't have much experience with this. While I was running on the eGPU-display, the UHD 630 was available for compute as in your case.

purge-wranglerpurge-nvdaset-eGPU
2018 MacBook Pro 15" RP560X + RX 5700 XT (Mantiz Venus)


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

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

then:

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

5- Reboot
6- Hold option, press [q] select windows
7- Enjoy either the blank screen, the rotating white pattern, or the windows boot spinner.

So I always go back to the same behaviour:
1- iGPU is apparently running, driver loaded, I can even query its DXVA and D3D11 capabilities with tools such as DXVA Checker, yet it's not used as display controller, the Microsoft Basic one is
2- Blank or funny screen.

There's something messy about it...
I was bitching about this whole thing a couple of weeks ago to some Apple engineers that happened to be at the same conference I was, and they told me at the time that they hadn't written intel drivers for the MBP yet and it couldn't be switched, and was asked to open a bug about it (at Apple, if a bug isn't opened, the problem doesn't exist really). So I did, and it was closed the following day with

Thank you for your feedback, it is noted. Engineering has determined that there are currently no plans to address this issue.

Unfortunately, Boot Camp currently does not support graphics muxing. It is something we will investigate for the future.

Thank you for the comprehensive testing. It confirms what I was afraid of: the firmware of the new 2018 15" rejects attempts to activate the iGPU by known methods.

Please download UEFI Shell:

https://sourceforge.net/projects/efidevkit/files/latest/download

- Format an USB stick in OS X Disk Utility (Choose Erase, Format: MS-DOS (FAT), Scheme: Master Boot Record)

- Create a folder structure in Finder as follows: EFI/Boot/bootx64.efi

where bootx64.efi is the renamed Shell_Full.efi file from /Edk/Other/Maintained/Application/UefiShell/bin/x64/folder

Then hold down the Option key and select "EFI Boot".

Type "devtree -b" to see which GPU is driving the internal display.

Our last chance is to access the gmux through IO address space:

mm -io 7D0 10 -n

mm -io 7C2 -n

What's the output?

automate-eGPU EFIapple_set_os.efi
--
2018 13" MacBook Pro + Radeon [email protected] + Win10 1809


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

This post serves as a summary of what happened in my tests:

  • Control Case #1: Standard Windows 10 boot using AMD drivers from bootcampdrivers.com: no issues. GPUs in Device Manager: RP560X. Internal display active.
  • Control Case #2: Boot with AMD RX 480 plugged in from the start: no internal display, but external worked fine. GPUs: RX 480, RP560X.
  • Control Case #3: Boot with GTX 1070 plugged in from the start: no internal display, but external worked fine. GPUs: GTX 1070, RP560X.
  • EFI Boot #1: Windows boot using the EFI stick -> yellow banged MSFT Basic Adapter + RP560X. Unaccelerated internal display.
  • EFI Boot #2: RP560X was disabled prior. Working MSFT Basic Adapter and RP560X disabled. No mux changes made yet. Installed the UHD 630 drivers manually: blacked the unaccelerated internal display.
  • EFI Boot #3: Rebooted after the drivers were installed, same configuration as above. Result was a black screen. No mux changes made yet.
  • EFI Boot #4Boot with eGPU + external monitor, rest same as above. External monitors came to life with UHD 630 available and ready to go in device manager.
  • EFI Boot #5: MuxSetting=1 and boot as above. Spinning circles with keyboard lighting up. No dice.
  • EFI Boot #6: NVRAM setting instead and boot as above. Spinning circles with keyboard lighting up. No dice.
  • EFI Boot #7Re-attempt #4 after clearing NVRAM and MuxSetting after effects (verified in macOS). Cannot reproduce.

 

Every EFI boot was followed by 1-2 clean non-EFI stick boots.

purge-wranglerpurge-nvdaset-eGPU
2018 MacBook Pro 15" RP560X + RX 5700 XT (Mantiz Venus)


jya and goalque liked
ReplyQuote
 of  27