Jump to content
Review: E-Win Champion Series Gaming Chair Read more... ×
EwinRacing Flash Series Gaming Chairs
euqlaog

[SCRIPT] Automating the installation of eGPU on OS X (inc display output)

Recommended Posts

Hi goalque

I recently sold my GTX770 because of persisting stability issues (when gaming, after a random period of time, the screen starts to stutter and crash), and I stepped up to an EVGA GTX960 hoping to get rid of the stability issues. So I went from Kepler to Maxwell and I started to see the "black screen on boot without startup chime" problem. I have a 15" MBPr mid 2014 with nvidia 750 dGPU, and reading through the threads, I seem to be not alone with this problem. However, reading your documentation on the first post, you seemed to get rid of this startup problem.

I understand that it needs to be applied in OS X, but does it affect the boot process for Windows as well? In other words, will it also allow me to boot into windows without problems?

I only run Windows on this machine, no OS X, so that's why I'm asking, if I apply it in OS X, remove it afterwards, will it still run?

Thanks in advance.

The experimental [-a] mode only applies to OS X. It utilizes a NVRAM parameter along with OS X's Daemon background process. As far as I know, no one has implemented this before.

I have been told that this wouldn't have an effect on Windows. I don't own the 750M model, so cannot verify. I guess that Windows driver doesn't know what to do with Apple GMUX device at booting stage when an external GPU is connected via Thunderbolt. NVRAM parameters can be globally defined regardless of the operating system, but in this case, I think that it's Apple's proprietary feature.

My script aims to solve issues on OS X only. For Windows 8.1 boot parameters, the following might be interesting:

https://msdn.microsoft.com/en-us/library/windows/hardware/ff542205(v=vs.85).aspx

Share this post


Link to post
Share on other sites

Alright, thanks!

I'm gonna try it anyways and see if it resolves anything. If it saves some settings in the NVRAM, I think it might have an effect on the boot process regardless of OS used. I'll report my findings when I have something to tell.

Share this post


Link to post
Share on other sites

Thanks @juniordiscart.

Even though we have seen a couple of unsuccessful attempts with a 2015 13” MBP, my script does support 2015 15” rMBP (MacbookPro 11,4) on OS X Yosemite. And I do everything to get it working on 10.11. I have been also reported that the base 2015 15" Iris Pro only model is plug-and-play on Windows as well. Boot into Win8.1 Boot Camp, plug in the TB cable, the eGPU shows up as a general device, install Nvidia drivers and reboot. That’s all.

I was able to execute the script commands and modify kexts by booting into 10.11 Beta recovery partition. Seems to be official way, there you can also disable the SIP from drop down menu. But I would like to make this more automatic without an additional recovery partition boot.

Share this post


Link to post
Share on other sites

Okay first of THANK YOU FOR THIS AMAZING TOOL :D

I tried it on a Akitio tb2 + EVGA GTX750Ti all in box setup on a MBPr15 mid 14 with the 2,2 GHz i7 iris pro and everything worked perfectly.

I got some "errors" about files not existing, but i kinda just ignored it since it was working.

I had my eGPU connected doing the install. (Dont know if that matters at all).

post-36449-1449500052943_thumb.png

post-36449-14495000528705_thumb.png

  • Thumbs Up 1

Share this post


Link to post
Share on other sites

@goalque:

I finally tried the new version:

-m works great now – I am able to flexibly switch between mobile mode and eGPU mode. With significantly prolonged battery life using the default OS X driver. :-)

I have maybe one suggestion but this is more a matter of comfortableness: could one add a "mobile" mode as I called it so that you run the script, let's say "-mobileMode", and then the script reboots with the default OS X driver?

Just a suggestion – I can understand that there are more important things that you want to solve. (Thinking of El Capitan...)

Share this post


Link to post
Share on other sites

Well, although your script activated my eGPU flawlessly in OS X (so props to that! :) ), it didn't have any effect on booting into Windows. So I'll just stick with putting it in right after the startup chime. :)

Share this post


Link to post
Share on other sites

An update about the 4k30 issue that I've been having:

- I went back to the AppleGraphicsDevicePolicy kext and changed the "none" string under my board ID to Config1 (I noticed that the dual-GPU 2013 Mac Pro has this) and it restored 4k60 again! However, I was having the same crashes as last time. When I looked at the crash report, I noticed that the last loaded kext was AppleHWSensor.

- I decided to have a fresh reinstall of 10.10.4. Other than leaving the "none" string on the kext, I cannot get the external screen running at all. It would detect the eGPU under the System Profiler, but only for GPGPU only. I tried reinstalling, disabling the -a mode, everything. I cannot get the external display to show anything at all!

- I'm back to setting the "none" string on the kext, and back to 4k30. What does this "none" string do? I have a feeling that there is somewhere in this setting that disables MST in 4k.

- Also, annoyingly, I cannot get the eGPU to work again unless I run the script.

Share this post


Link to post
Share on other sites

@Simurgh5: Great to hear that switching between modes works finally!

1) The manual -m mode does only the minimum initialization in order to use the eGPU. You can call it "mobile" mode if you like :)

2) The advanced -a mode aims to configure everything automatically in the background, so that user can continue working after OS X updates immediately. This mode is not ready, but currently it resolves the freezing issue with multi-slot enclosures and is beneficial with the nMP, allowing to use any TB port for booting without issues.

I try to keep the script very simple. For the default OS X driver, it requires detecting or asking whether the GPU is Maxwell or Kepler. I will put that on the development list.

The future development of [-a] mode may include automatic resolving of other hardware specific issues such as @Mark's MST in 4K@60Hz problem with the Late 2013 15" rMBP 750M. We know from the previous posts that a 2011 MacBook Air allows 4K@60Hz with the same monitor. Neither MacBookAir4,1 or MacBookAir4,2 on the list of AppleGraphicsDevicePolicy.kext. Some older Macs such as those 2011 MBAs use ACPI for device configuration instead of X86Platform. That may explain it, since paths are completely different.

Share this post


Link to post
Share on other sites

After doing the same things over and over again to get 4k60 working on my laptop (2013 15" GT 750M) I decided to buy a 2014 13" rMBP from Apple's refurbished store. I would've purchased a 2015 version if it didn't have its own problems too! I missed the 13" form factor as well, if I knew of eGPUs back then I probably wouldn't have bought this laptop.

Share this post


Link to post
Share on other sites
After doing the same things over and over again to get 4k60 working on my laptop (2013 15" GT 750M) I decided to buy a 2014 13" rMBP from Apple's refurbished store. I would've purchased a 2015 version if it didn't have its own problems too! I missed the 13" form factor as well, if I knew of eGPUs back then I probably wouldn't have bought this laptop.

Isn’t there the same 4K@60Hz MST problem with the 2014 13” rMBP as well? 4K monitors using SST protocol don’t have this problem.

I would probably buy a 2015 15” rMBP Iris Pro if I didn’t have the 2014 model, since it seemed to support Thunderbolt hot-plugging like the 2014 Mac mini on Win8.1, and didn’t notice issues on OS X during a short testing period.

Hot-plugging for external graphics is one of the supported features which Intel also mentions when Thunderbolt 3 enclosures start shipping.

Share this post


Link to post
Share on other sites
Isn’t there the same 4K@60Hz MST problem with the 2014 13” rMBP as well? 4K monitors using SST protocol don’t have this problem.

I would probably buy a 2015 15” rMBP Iris Pro if I didn’t have the 2014 model, since it seemed to support Thunderbolt hot-plugging like the 2014 Mac mini on Win8.1, and didn’t notice issues on OS X during a short testing period.

Hot-plugging for external graphics is one of the supported features which Intel also mentions when Thunderbolt 3 enclosures start shipping.

My assumptions with this came from the fact that @SgtPepper had 4k60 output with a 2011 MBA (and the same monitor), you had 4k60 with your MBP and that I have the one with the dGPU. I assumed that it's my dGPU that's causing this problem. Not to mention not being able to use it in Windows at all with the III-D enclosure!

Besides, I can easily return it to Apple within 14 days if it doesn't work for me either!

On a side note, I am not really expecting to buy a new TB3 MBP+eGPU setup until Pascal GPUs and a fairly affordable eGPU enclosure get released.

Share this post


Link to post
Share on other sites
My assumptions with this came from the fact that @SgtPepper had 4k60 output with a 2011 MBA (and the same monitor), you had 4k60 with your MBP and that I have the one with the dGPU. I assumed that it's my dGPU that's causing this problem. Not to mention not being able to use it in Windows at all with the III-D enclosure!

Besides, I can easily return it to Apple within 14 days if it doesn't work for me either!

On a side note, I am not really expecting to buy a new TB3 MBP+eGPU setup until Pascal GPUs and a fairly affordable eGPU enclosure get released.

Regarding 2013 13” rMBP Sgt. Pepper said:

1. When the egpu is connected, i have all the beautiful pixels and even all the scaled HiDPI resolutions up to 3200x1800 HiDPI, so no problem.

BUT I did not manage to get this display working at 60HZ.

2011 MBA is different, it uses ACPI_SMC, 2013 MBP uses X86Platform. Not sure if this is the reason yet.

Yes, a Mac without dGPU is recommended for eGPU purposes. 13" is more portable, but the CPU bottlenecks eGPU graphics performance a bit. My quick test with a NA211TB + GTX 980 + 2015 15" rMBP (Iris Pro only) showed that the [-a] mode seemed to allow straight boot into Win8.1 Boot Camp as well, but I had to boot into OS X first. Multi-slot enclosures often disable the iGPU with Maxwell cards. The combination of single slot enclosure (such as AKiTiO) + iGPU only Mac is the way to go. Let me know how it works :)

Hot-plugging already works on Win8.1, it gave a straight eGPU acceleration with the current TB2 enclosures (but unplugging caused BSOD).

Share this post


Link to post
Share on other sites

Just ran the script on a mid 2014 rMPB OS10.10.4 with a gtx970 and it worked like a charm! Cheers!

post-32885-1449500055613_thumb.png

  • Thumbs Up 1

Share this post


Link to post
Share on other sites

I have a question.. After I run the script, the displays tab in "about this mac" shows my gtx960 for both the internal display and external. How come it's different from yours? Running 10.10.4 as well.

Also, is there any way to disable the internal display so that only the external display is working? If I mess with any display settings, I think it switches back to the iGPU.

edit. i have a 2014 rMBP 13". And the egpu is currently working.

Share this post


Link to post
Share on other sites

@<u><a href="http://forum.techinferno.com/member.php?u=28870" target="_blank">goalque</a></u>, looks like netstor are using your automate-eGPU.sh script and do make reference to it's download at https://github.com/goalque/automate-eGPU in the final few secs of the video.

http://www.youtube.com/watch?v=W1FoEYRk4Tk

I do not see any reference to the sample eGPU hardware your script could be used with. That omission can favor hardware distributors like Netstor since alternative eGPU enclosures that may be more financially viable. eg: AKiTiO Thunder2, aren't presented to the potential customer.

Maybe consider referencing back to say the DIY eGPU implementations for a sample of the broad range of TB eGPU hardware that may be used with your script? eg: http://forum.techinferno.com/diy-e-gpu-projects/6578-implementations-hub-tb-ec-mpcie.html#Thunderbolt

Share this post


Link to post
Share on other sites
I have a question.. After I run the script, the displays tab in "about this mac" shows my gtx960 for both the internal display and external. How come it's different from yours? Running 10.10.4 as well.

Also, is there any way to disable the internal display so that only the external display is working? If I mess with any display settings, I think it switches back to the iGPU.

edit. i have a 2014 rMBP 13". And the egpu is currently working.

For me I just assumed that was supposed to happen? Your internal screen would be running using Intel Iris Pro and then the external monitor would be entirely by the eGPU so as to not be losing performance due to what is going on, on your internal screen.

At least, that I assumed to be happening and what happens when I am on Windows 8.1. I didn't do any benchmarks yesterday so I couldn't say for sure if running anything will it to revert to the iGPU.

Share this post


Link to post
Share on other sites

hi,

i have a problem - whenever i boot while akitio is connected and powered up - i get black screen.

it could be because i'm powering akitio with it's own psu and gpu with dell da-2 (still waiting for second 6pin splitter). it could be because something got messed up in the process of running the script - i had gnu sed in my PATH which is incompatible with mac os sed (use /usr/bin/sed to avoid this) and few runs were erroring out in different parts of the script.

any ideas how do i debug why i'm getting black screen?

Share this post


Link to post
Share on other sites
@goalque, looks like netstor are using your automate-eGPU.sh script and do make reference to it's download at https://github.com/goalque/automate-eGPU in the final few secs of the video.

I do not see any reference to the sample eGPU hardware your script could be used with. That omission can favor hardware distributors like Netstor since alternative eGPU enclosures that may be more financially viable. eg: AKiTiO Thunder2, aren't presented to the potential customer.

Maybe consider referencing back to say the DIY eGPU implementations for a sample of the broad range of TB eGPU hardware that may be used with your script? eg: http://forum.techinferno.com/diy-e-gpu-projects/6578-implementations-hub-tb-ec-mpcie.html#Thunderbolt

Yes, Netstor emailed me that they wanted to produce a video about my script for setting up the eGPU and express thanks. I told that a link to GitHub repository at the end of the video would be ok. They have kindly helped me a lot in testing, especially with the Late 2013 Mac Pro.

The script is meant to work with any TB enclosure, and the purpose of the [-a] mode is to solve possible hardware specific issues. I have observed that Maxwell cards & dGPU equipped Macs give black screen more likely with a multi-slot enclosure (such Netstor NA211TB, Sonnet Echo Express III-D, Sonnet Echo Express SE II) than a single slot enclosure (e.g. AKiTiO).

Anyone who likes to manually try the -a mode, can do the following:

1) Boot into OS X without eGPU connected

2) sudo nvram tbt-options=\<00\>

3) Reboot with eGPU connected + option key down

And the EFI menu freezing problem should be eliminated on next restart. You must repeat steps 1-3 in order to have the same effect for next restarts.

I will put a reference to http://forum.techinferno.com/diy-e-gpu-projects/6578-implementations-hub-tb-ec-mpcie.html#Thunderbolt from GitHub.

EDIT: README updated:

https://github.com/goalque/automate-eGPU/blob/master/README.md

  • Thumbs Up 1

Share this post


Link to post
Share on other sites
hi,

i have a problem - whenever i boot while akitio is connected and powered up - i get black screen.

it could be because i'm powering akitio with it's own psu and gpu with dell da-2 (still waiting for second 6pin splitter). it could be because something got messed up in the process of running the script - i had gnu sed in my PATH which is incompatible with mac os sed (use /usr/bin/sed to avoid this) and few runs were erroring out in different parts of the script.

any ideas how do i debug why i'm getting black screen?

True, I should use absolute paths. I will fix it in next version. You can send PM or post here the script output and tell about your system configuration. I would try first what “sudo ./automate-eGPU.sh -skipdriver” says.

Share this post


Link to post
Share on other sites
True, I should use absolute paths. I will fix it in next version. You can send PM or post here the script output and tell about your system configuration. I would try first what “sudo ./automate-eGPU.sh -skipdriver” says.

current output looks normal, no errors, finds the driver, IOPCITunnelCompatible mods are valid. my problem is probably the power or i'm missing something about how it all works.

should this gpu take over Iris in rendering main macbook screen?

Share this post


Link to post
Share on other sites
current output looks normal, no errors, finds the driver, IOPCITunnelCompatible mods are valid. my problem is probably the power or i'm missing something about how it all works.

should this gpu take over Iris in rendering main macbook screen?

The script doesn’t detect yet if the eGPU hardware is properly configured and I don’t know your setup, but it’s likely hardware issue if you don’t see your eGPU under System Report -> Hardware -> Graphics/Displays or AKiTiO under Thunderbolt. The thread below is helpful:

http://forum.techinferno.com/diy-e-gpu-projects/10061-basic-egpu-hardware-guide-macs.html

The internal screen is accelerated by Iris, but if you set the external display as main, windowed OpenGL apps started from there can be moved to internal screen. It depends on how the application is programmed.

  • Thumbs Up 1

Share this post


Link to post
Share on other sites

Hey, @goalque!

I have received my 2014 13" rMBP and I am still getting the 4k60 issue! I'm guessing that you are right! To add salt to the financial injury, I removed the modifications from the AppleGraphicsDevicePolicy kext and the external screen won't work at all. I think that the main culprits of this 4k30 issue are that the kext mod somehow disables MST in displays and that my particular monitor (UP2414Q) doesn't support 4k60 SST.

My game plan now is that I'm going to keep my 13" for about a week or so, and then return it to Apple. Next week, I'm going to buy a P2415Q monitor which supports 4k60 SST, and try it out with both devices.

Also, I'm having an issue with my 15" as well. Unlike my 13" which detects the eGPU every time I boot, I have to reset NVRAM, delete the AGPD kext modifications and reinstall the script to get it to boot with the eGPU, because your script won't let me reinstall unless there's something missing. If the GPU is detected the first time the loading bar under the Apple logo on boot is usually stops briefly around 1/3 of the way through. On subsequent boots the bar on the Apple logo would briefly stop around 10%, and then finish loading without detecting the screen. About my Mac won't load and I can't shut it down after. A stopgap solution really is to let us reinstall the script regardless of whether everything is installed or not!

  • Thumbs Up 1

Share this post


Link to post
Share on other sites

Any more thoughts on how to get HDMI audio working under OS X? It's the only way to get 5.1 audio on a Mac Mini without buying new hardware and I'd love to ditch Boot Camp to go total OS X but the lack of 5.1 audio is holding me back.

Share this post


Link to post
Share on other sites

@Mark, I appreciate your feedback! I remember something like a year ago when your 750M model allowed screen output without board-id modification with the Kepler card, but required restart and didn’t work always. Now we have new architecture cards and as seen, dGPU models are not recommended, neither on OS X or Windows. But I have found a workaround for OS X that Simurgh5 proved. @Simurgh5, would you tell what is your success rate when booting into OS X with the [-a] mode and is the option key necessary?

@Mark, I am not sure what you mean by “AGPD”, guess you mean AGDPClientControl which is under the AppleGraphicsDevicePolicy. You asked earlier what “none” means - it means that AppleGraphicsDevicePolicy class won’t be loaded. The count will stay zero, and allows stable eGPU display output which you didn’t have before. When you sometimes had 4k60Hz MST, two policies were loaded, one for GT 750M and and one for Titan X. I have found new keywords for controlling IOPCIDevice, but that likely requires kernel level mods and Objective-C application.

If everything is okay, and script’s tests passed, I see no reason for reinstalling Nvidia driver. Once installed, Nvidia’s installation stays valid. You can uninstall Nvidia web driver from the manager preferences or run the script with -skipdriver parameter if you like to reconfigure kexts. Time Machine back up to SSD drive is always recommended, especially if you modify kexts manually. It takes only a few minutes and you have working environment.

I will make uninstalling possible in the future, so that modified kexts will be replaced by original kexts, meaning that the script has to back up kexts after each OS X update. My first priority is to get this all working in OS X El Capitan.

Share this post


Link to post
Share on other sites
I have a question.. After I run the script, the displays tab in "about this mac" shows my gtx960 for both the internal display and external. How come it's different from yours? Running 10.10.4 as well.

Also, is there any way to disable the internal display so that only the external display is working? If I mess with any display settings, I think it switches back to the iGPU.

edit. i have a 2014 rMBP 13". And the egpu is currently working.

So I took a look running a few games on the OSX side and found that unless I make my external monitor my "main monitor" it will be opening them on the internal screen running with the Intel Iris Pro. As soon as I set my external monitor to the main monitor in the displays tab "about this mac" it now has both monitors coming up as my gtx970. Unfortunately, mine does not revert back to the iGPU when I adjust settings, so I can't really comment on that :/. If you are simply trying to "turn off" the internal screen all you have to do is turn your brightness to 0 and your internal screen is off.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×

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.