Jump to content
EwinRacing Flash Series Gaming Chairs
euqlaog

automate-eGPU EFI - Mac bootscreen on eGPU

Recommended Posts

It’s a common belief that Macs need a “Mac EFI” in order to show the boot screen or Apple logo. As to new TB Macs, I had a theory that this is not true. There is always a protocol how the computer talks with the GPU. Macs are not an exception to this rule. After browsing of several hundred pages of specification white papers how EFI works, I got an idea that finally took a form of EFI application.


The development version, which is not available for public, is nearly a full-fledged eGPU boot manager. Push the power button of your 2014 Mac mini or nMP, and the custom welcome screen appears on your eGPU monitor, without having to go through Apple's startup manager by holding down the Option key. If the internal HDMI interface is in use, select “Switch screen”, and the screen output is switched between integrated and external graphics in real time. My EFI app makes also Maxwell cards (such as GTX 980 / GTX 980Ti) Mac friendly with the Nvidia’s original PC UEFI rom. R9 AMDs are compatible out of the box.

 

The demo application has the following restrictions:

  • Doesn’t include “Launch on Startup” option
  • The UEFI driver is downloaded into memory from the USB stick when you power on your Mac whereas the development version reads the driver from the eGPU on the fly
  • “Load Windows”, “Load OS X” and “Disable dGPU” and “Warm restart” are restricted for a MBP11,5.
  • You still need to use automate-eGPU.sh script in OS X

 

The application detects your Mac hardware: Model Identifier, CPU, integrated/dedicated GPUs, and eGPU.

 

I explain the menu options briefly,

 

  1. Load OS X. Loads OS X immediately if "Warm restart" is turned off. If once selected, the app remembers the selection on next boot and [*] is shown at the end of the row.
  2. Load Windows. Loads Windows immediately if "Warm restart" is turned off. If once selected, the app remembers the selection on next boot and [*] is shown at the end of the row.
  3. Switch screen. Values [iGPU or eGPU]. If the value [eGPU] is activated output on startup and "Load GOP drivers" is turned on, automate-eGPU EFI welcome screen appears on the monitor which is connected to an external GPU.
  4. Warm restart ON/OFF. When booting from cold power state, the app waits for 5 seconds, then restarts the Mac before chain loading to Windows/OS X. If menu option (1) or (2) is selected after this is turned on, additional restart is not carried out but 5 seconds delay is still valid before booting to the default OS of this application (different than Apple's default).
  5. Disable dGPU ON/OFF. Disables dGPU completely on next boot when turned on and activates iGPU.
  6. Load GOP drivers ON/OFF. Loads eGPU.rom and creates eGPU.efi which is loaded on next boot.
  7. Launch on startup. Value [ON] will force Mac to boot automatically from the USB. Remember to turn this off or choose "Reset system" to have normal boot behaviour.
     

F1 = Cold restart
F2 = Shut Down

 

The UI is programmed from the scratch by calling Simple Text Output Protocol methods, no dependencies on GRUB or rEFInd. I like to keep things simple.

Install procedure is straightforward:

 

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

2) Create a folder structure in Finder as follows:

           EFI/Boot/bootx64.efi
           EFI/Boot/eGPU.rom

 

where eGPU.rom is your VBIOS file. The app detects if the ROM contains UEFI section. If not, “Switch screen” doesn’t work.

3) Power on Mac with eGPU connected, hold down Option key and choose "EFI Boot" disk.

 

I don’t see much practical advantage in implementing Apple’s startup manager via eGPU, since all the Thunderbolt Macs have integrated or dedicated graphics for this purpose. Well, I was curious, so I did it anyway.

 

I noticed byte flipping when I compared the PCI binary path in closed clam-shell mode vs lid open. This observation led me to reconstruct the PCI path to point to eGPU, restarted the Mac by holding Option key down, and Apple’s native boot screen was mirrored to the eGPU monitor with a PC UEFI card. No Mac EFI. If the path is not correct byte by byte till the end, there is a high risk that your Mac may remain into black screen loop. So this feature is not included in demo.

 

That’s enough about boot screens. I promised Optimus automation for a MBP11,5, and it is provided as “Disable dGPU ON/OFF” option. You will see black screen about 10 seconds, but the internal display is activated as soon as Windows has loaded.

 

Remember that you use this demo app at your own risk, it’s not optimized and there are likely bugs. I don’t have time to provide support. I’m not responsible if your Mac won’t boot. This proof-of-concept app is free and for personal use only.

 

https://github.com/goalque/automate-eGPU/releases/download/v0.0.1-demo/bootx64.efi

 

automate-eGPU-EFI-welcome.jpg automate-eGPU-EFI-menu.jpg automate-eGPU-EFI-warm-restart.jpg

 

Edited by goalque
automate-eGPU v0.0.1-demo released
  • Thumbs Up 7

Share this post


Link to post
Share on other sites

Couldn't have come at a better time!! I was thinking about coming up with a way to just delay the initial boot up of the graphics card once the case senses power, but I much prefer your approach! 

 

I have the Sonnet Echo Express III with an Nvidia GTX970. Works with my 2014 5k iMac with OS X & Windows 10. Cant turn the system on with it plugged in though just have to wait a few seconds into boot up.

 

Also I am struggling to get my setup to work with a 2015 13" Retina MacbookOSX works fine (external output),  but Windows 8.1 & 10 are proving to be a real struggle. And once again I  have to plug the eGPU in after the apple/windows images.

 

Your OSX script has been awesome! Thank you for that!

 

If you need beta testers I'd be more than happy to help out, none of my machines are critical work devices. I am a software engineer so when troubleshooting I can speak your language. :-)

 

 

IMG_2187-1.JPG

Edited by t00h0t

Share this post


Link to post
Share on other sites

Thanks for the feedback! This app could be a base for full Mac eGPU automation in the future, without needing to disable the SIP in recovery mode. Maybe I will focus on AMDs since they don’t need web drivers. It’s very likely that future Macs have Polaris GPUs. I already got R9 Nano working on 10.12, surprisingly also the acceleration part with the “Baffin” personality.

 

@t00h0t
I appreciate your interest in beta testing. Your Macs are actually the ones in which the EFI app has not been tested. I already have a partner, but I will think about it. I’m a busy software engineer as well, so the progress of this project has been slow.

 

I assume that the demo will be ready for release this weekend.

  • Thumbs Up 1

Share this post


Link to post
Share on other sites

I like the look of this!! Is it possible to select different OS X versions and Windows versions using the boot screen manager? I normally have a few different versions of each running.

Also, would a boot screen like this work on a Mac Pro desktop to give an internal PC video card boot options (not just a black screen)? That would be pretty cool. I've been using BootChamp to load Windows but that requires loading into OS X first. 

Share this post


Link to post
Share on other sites
2 hours ago, pixxelpusher said:

I like the look of this!! Is it possible to select different OS X versions and Windows versions using the boot screen manager? I normally have a few different versions of each running.

Also, would a boot screen like this work on a Mac Pro desktop to give an internal PC video card boot options (not just a black screen)? That would be pretty cool. I've been using BootChamp to load Windows but that requires loading into OS X first. 

For now, the application assumes that you have solely OS X or Windows Boot Camp partition, or both of them. Maybe in the future.

 

I have designed this for Thunderbolt Macs only, and in order to show the eGPU boot screen, you likely need a TB2 Mac. Majority of the PC UEFI cards should work. I’ve tried Gigabyte and EVGA. 2011 Mac mini supports GOP, but its firmware wasn’t able to output text through the eGPU. 2014 Mac mini is supported.

Share this post


Link to post
Share on other sites

Hey Goalque,

 

as always I cannot appreciate your work enough.

 

I'm gonna try it and I think I got the basic procedure but can you please elaborate a little bit on what exactly this ROM is and where I can get it.

Edited by Simurgh5

Share this post


Link to post
Share on other sites

I was able to boot to the eGPU EFI but when I select GOP the screen flashes but doesn't switch output to the external  monitor

 

I wasn't able to extract the VBOIS from my card and GPU-Z says it's not UEFI compatible (does that matter?) When I select lookup it takes me to an incorrect card that says it is UEFI compatible. I tried that ROM version since it's closer to what my card says.

 

I will put the card in a PC and get the real ROM and try again. 

Share this post


Link to post
Share on other sites

The eGPU ROM must be UEFI compatible, otherwise screen switching doesn’t work. Incorrect ROM might work, but better to use the original. One restart (F1) is required after "Load GOP drivers" is set to ON. Thanks for testing!

Edited by goalque

Share this post


Link to post
Share on other sites

@goalque

 

Problem is - I can't even start my nMP up with the eGPU already connected. I'm just stuck in a black screen when starting up, no chime.

 

I tried plugging it in after the chime, during the chime, etc. It won't boot up. 

 

I tried connecting the eGPU when in the boot menu but the app didn't detect the eGPU.

 

Any ideas? 

Share this post


Link to post
Share on other sites

The development version is confirmed to work with the nMP. May require "warm restart" option which is not supported in demo version, and you have to use the HDMI interface of the nMP in the beginning.

Share this post


Link to post
Share on other sites

I tried using only the HDMI connection. Plugged the PSU ; Started up the nMP. Sometimes it chimes and takes me to the boot screen, sometimes no chime. Either way, the eGPU  is not recognized in the app.

Edited by razvani

Share this post


Link to post
Share on other sites
On 17 June 2016 at 3:05 AM, goalque said:

I promised Optimus automation for a MBP11,5, and it is provided as “Disable dGPU ON/OFF” option. You will see black screen about 10 seconds, but the internal display is activated as soon as Windows has loaded.

 

Basically if this works, then if you disable the iGPU from the begining and only boot with eGPU, then with the nMP it's supposed to work in Windows. 

Edited by razvani

Share this post


Link to post
Share on other sites

This quote from my GitHub repository might help with the demo version:

 

"When the [-a] mode is turned on, Nvidia eGPU connected to nMP Bus 0 (port 5 or 6) works, but Thunderbolt Bus 1 or 2 (ports 1-4) require one additional restart and shut down without eGPU."

Share this post


Link to post
Share on other sites

Thanks, @goalque 

 

I had to uninstall then reinstall your script.

 

Connecting it to Bus 0 works nicely!

Now I can see the eGPU in OSX.

 

But if I restart from OSX with the eGPU connected and boot the app, it says no eGPU detected.

If I shut down then start up, it's the same.

 

I have to turn it off from the power button then start it up for the app to see the eGPU.

 

Switch screen doesn't work btw.

 

Now it would be nice to be able to disable the dGPU and load windows.

 

Share this post


Link to post
Share on other sites

For some reason, after fiddling with all this - reinstalling automate eGPU and trying out the DP on the eGPU, OSX won't display 5k anymore, not even 4k.

 

I have a Dell UP2715K and it has a dual displayport configuration to get the 5k resolution. 

 

Usually 4k works with only one displayport connected but now it only displays 2560x1440.

 

If I connect the mdp to mdp cable, it displays 4k.

 

I have also tried to boot into windows and it displays 5k properly.

 

Then I have uninstalled the script and now it displays 5k properly.

 

Something is weird with the screens. Here's a screenshot.

Screenshot 2016-06-20 04.27.39.png

Edited by razvani

Share this post


Link to post
Share on other sites
9 hours ago, razvani said:

Thanks, @goalque 

 

I had to uninstall then reinstall your script.

 

Connecting it to Bus 0 works nicely!

Now I can see the eGPU in OSX.

 

But if I restart from OSX with the eGPU connected and boot the app, it says no eGPU detected.

If I shut down then start up, it's the same.

 

I have to turn it off from the power button then start it up for the app to see the eGPU.

 

Switch screen doesn't work btw.

 

Now it would be nice to be able to disable the dGPU and load windows.

 

You can shut down the Mac with the F2 key and restart with F1 after welcome screen is closed with ESC. No need to force shut down from the power button.

 

My partner verified today that script's [-a] mode is not necessary with the development version. Demo version is not tested with the nMP. So please don't enable [-a] mode, you can turn it off by typing:

 

sudo ./automate-eGPU.sh -m

 

Restart the nMP by holding option key down, the EFI app should detect the eGPU if it's connected to Bus 0.

Share this post


Link to post
Share on other sites

razvani, the same thing happens with my 5k mac... I found that if I just tell the Mac to sleep and wake it back up, it returns to the full resolution. I believe it has something to do with how Apple runs the 5k monitor, I think they basically split the display into two screens and only one gets turned on. But when waking up from sleep it turns them both on, giving you a full screen again. 

 

Actually upon checking again it actually doesn't go back to 5k, its 4k, but it at least brings it back to full screen instead of half. Also I am on the 10.12 beta 1 so that might be causing some different issues.

 

I had to tweak the script by goalque to work with 10.12 and it does work, but I can't get any CUDA optimized apps to recognize the eGPU including CUDA-Z. Also things run a bit slow and choppy when both GPUs are running.

Screenshot 2016-06-18 20.41.00.png

 

Screenshot 2016-06-18 20.41.12.png

Edited by t00h0t

Share this post


Link to post
Share on other sites

Then it must be a script thing.

Edited by razvani

Share this post


Link to post
Share on other sites
9 minutes ago, razvani said:

Then it must be a script thing.

 

Which iMac do you have? My late 2014 will let me keep the eGPU plugged in (for OS X only) from a cold boot and a warm restart. But my early 2015 Macbook 13" won't boot if I keep the eGPU plugged in during any bootup. I have to plug it in right after I see the Apple logo. 

Share this post


Link to post
Share on other sites
1 minute ago, t00h0t said:

 

Which iMac do you have? My late 2014 will let me keep the eGPU plugged in (for OS X only) from a cold boot and a warm restart. But my early 2015 Macbook 13" won't boot if I keep the eGPU plugged in during any bootup. I have to plug it in right after I see the Apple logo. 

I have a 2013 nMP. It only boots if I connect the eGPU to a bus0 thunderbolt. I wish this wasn't a demo, so I could try the disable dGPU function.

Share this post


Link to post
Share on other sites
Just now, razvani said:

I have a 2013 nMP. It only boots if I connect the eGPU to a bus0 thunderbolt. I wish this wasn't a demo, so I could try the disable dGPU function.

 

Ohhh, you are running an external 5k display! My mistake... the sleep trick may not work for you then.

 

I have a late 2013 Mac Pro for work and briefly tried playing with the eGPU but ran into the same issues you are having.  

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.