Jump to content
euqlaog

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

Recommended Posts

1. used automate-egpu script ..

after the process graphics option is showing "Nvidia chip model" not gtx 970

 

do we need to edit kext files for internal screen working??

 

any idea, looking for help especially from goalie &Dschijn

Screen Shot 2015-12-22 at 11.57.43 AM.jpg

Edited by athleteanil
incomplete

Share this post


Link to post
Share on other sites

Which OSX? There is no way to make games run with eGPU power on the internal screen in OSX, only rendering apps might work.

Share this post


Link to post
Share on other sites
4 hours ago, Dschijn said:

Which OSX? There is no way to make games run with eGPU power on the internal screen in OSX, only rendering apps might work.

.. osx 10.11.1

i just wanted to use fcpx/ apple motion etc .. i am ok if it works on external monitor too for OS X ...in windows the setup is working just additional info..

what do you think i am missing..?

 

really thank for your reply...

Screen Shot 2015-12-22 at 7.35.25 PM.jpg

Share this post


Link to post
Share on other sites

Are you booting from an external drive since the startup disk is not named "Macintosh HD"? To see what's wrong, type the following command:

 

syslog -B -F '$Time $(Sender): $Message' | grep NVDA

Share this post


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

Are you booting from an external drive since the startup disk is not named "Macintosh HD"? To see what's wrong, type the following command:

 

syslog -B -F '$Time $(Sender): $Message' | grep NVDA

actually i renamed that...thanx "goalque"

Share this post


Link to post
Share on other sites

A little Christmas gift, v0.9.8

 

- Support for OS X Mavericks 10.9.5 and Kepler cards
- Added board-ids for iMac15,1 and iMac17,1
- Fixed issue #8
- Fixed issue #9 (thanks keymone)
- Fixed issue #13

 

Thanks to our specialist @Tech Inferno Fan and all T|I members for fascinating posts over the past year.

 

@Oscar J, a digital art designer who told me that Indigo 4.0 is around the corner, and making the old HD 7970 shine in eGPU OpenCL computing with the AKiTiO.

 

And last but not least, I would like to express my gratitude to my friends at Netstor Technology, their quality assurance and delicious pineapple cakes.

  • Thumbs Up 3

Share this post


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

Does 0.9.8 work with dGPU MBP?

Should work the same way as 0.9.6. Uninstall the old.

  • Thumbs Up 1

Share this post


Link to post
Share on other sites

@athleteanil Not the expected output. There should be “NVDAStartup needs IOPCITunnelCompatible key in plist” rows as well. It seems that you have modified kexts manually at some point or installed Nvidia web driver separately. Reset NVRAM, reinstall OS X and run the script again.

Share this post


Link to post
Share on other sites

@goalqueOk, thanks,

all whatever you said is right,

I did changed kext manually earlier once,

installed nvidia web drivers separately earlier...

 

I will follow the instructions and come back to you

Share this post


Link to post
Share on other sites

@athleteanil You will only need to have a working OSX, with 10.11 csrutil disabled and run the cript, that's it. No need to do the old school stuff with changing stuff in kext files or installing driver.

Share this post


Link to post
Share on other sites

Just used the 0.98 (latest version link) script today for the first time on vanilla 10.11 AMAZING !!!!!!!!!!!!!!!!! @goalque you are ace ! what a milestone Apple should give you a dev certificate :)

Edited by w4vz
  • Thumbs Up 2

Share this post


Link to post
Share on other sites

Works perfectly on 10.10.5 with msi GTX 960!
Now let's see if I manage to make it work on my windows partition. TYVM!!!!

Share this post


Link to post
Share on other sites

Hello,

I installed the CUDA drivers and the web driver.  (using nMP, 10.11.2, Nvidia 980 TI.

 

 

Followed the terminal instruction and got this.  Any thoughts?

Password:

nvram: Error getting variable - 'csr-active-config': (iokit/common) data was not found

Boot into recovery partition and type: csrutil disable

Mac-Pro-2:Desktop nick$ csrutil disable

csrutil: failed to modify system integrity configuration. This tool needs to be executed from the Recovery OS.

Mac-Pro-2:Desktop nick$ 

 

 

 

 

Share this post


Link to post
Share on other sites
On 2 November 2015 at 10:47 PM, goalque said:

Generally GPU has to be EFI flashed in order to get a boot screen. Apple calls it a “Startup Manager”, which is built into the BootROM firmware. When you turn on the Mac, the BootROM initializes hardware and also checks if startup keys have been pressed. Boot.efi is not yet loaded at this first stage. Instead, the system is in the EFI runtime environment, and within this state, it’s possible to access hardware and run EFI programs. When you see the logo of Apple, it means that boot.efi is activated and OS X will be loaded.

The daemon process of the automate-eGPU.sh starts its job just before you see the login screen. You can’t do anything earlier by the script or any other app in the OS X. The choice that remains is an EFI program. Apple’s boot loader is a good example of EFI binary. EFI is a very rich environment and documented by Intel. However, the bad news is that EFI development kits are not easy to install on OS X platform, but it's possible to build programs on the Linux.

Would it be possible to have a screen output with a regular PC eGPU before the OS X has been loaded? Yes, but not an easy task. However, as Startup Manager is programmed into BootROM, I guess the only way to get that visible on the eGPU monitor is to flash the eGPU. This is not documented and requires reverse engineering approach. Since all the Thunderbolt Macs show up the boot screen through the iGPU/dGPU, there is no real need to flash eGPUs.

 

A word wizard who tried to fish my friends and called me a “Tech Charlatan” just before the Christmas Eve (I’m sure he recognizes himself from this), motivated me to do a bit more research on the EFI side of the playground and prove my hypothesis which was based on EFI demystified paragraphs from a book “Mac OS X and iOS Internals: To the Apple’s Core”. Before I could program anything EFI related, I had to know how the early boot process and graphics works at the lowest level, so I browsed through Intel’s white papers and found exactly what I wanted to see:

 

typedef struct _EFI_GRAPHICS_OUTPUT_PROTOCOL EFI_GRAPHICS_OUTPUT_PROTOCOL;

“Provides a basic abstraction to set video modes and copy pixels to and from the graphics controller's frame buffer. The linear address of the hardware frame buffer is also exposed so software can write directly to the video hardware.”

 

I wrote a GNU-EFI application that loops through GOP (Graphics Output Protocol) supported GPUs, and by selecting the index of the eGPU handle buffer, I was able to draw directly to that framebuffer with a R9 390 which supports UEFI GOP. It’s a couple of lines of C code, compiled under Ubuntu 15.10 and works like a charm in OS X EFI. Setting up the programming environment was easier with the GNU-EFI than EDK2. Have to keep in mind that interface calls must be passed on through uefi_call_wrapper() function.

 

The proof of concept is done - I can access and draw anything I like on eGPU monitor at Mac EFI stage with a regular PC GPU, which supports GOP. My Nvidia cards did not seem to support GOP, but after a bit of googling I found that some Nvidia Asus cards have a hybrid vBIOS, including UEFI as well. UEFI vBIOS also explains the squeezed resolution of Apple’s startup manager on MBP’s internal display. I’m investigating possibilities to swap internal and external framebuffers so that the eGPU monitor would become the main screen. Unfortunately there is no documented way to launch Apple’s startup manager programmatically in EFI environment, but if you have EFI programming skills, you can create something similar before the boot.efi & OS X will be loaded, or even replace the automate-eGPU script by an EFI app and menu-like UI, without installing rEFInd & EFI Shell.


If I wanted to create pure C language version of the automate-eGPU, I would probably use FAT formatted USB stick where to load the EFI app. EFI approach would give full access to pre-OS hardware operations that are currently only partially controllable by NVRAM variables from my script. Currently I see no big benefits to move development on the EFI side, but I definitely consider UI app from the user space.

  • Thumbs Up 2

Share this post


Link to post
Share on other sites

So I've been running my eGPU GTX 970 on my late 2013 iMac for about 2 months now, and it runs great in Windows, no issues there.  

 

Today, I decided to give OSX a shot again, as the install didn't recognize it last time I tried.  It installed properly, and was recognized.  In fact, the internal display was reporting that it was using the 970 which I thought was impossible on a machine with a dGPU (this might be a mistake on the reporting).

 

 It booted at a 1024x768 resolution, and when I changed it to the native, it was reporting the 780m as the main display and the graphics were choppy.  I don't mind using an external display as I've been doing, but I need to figure out how to get the acceleration working for the 780m along with the 970.  Any ideas on what I should check to get both of these working in conjunction?

Share this post


Link to post
Share on other sites

@pants_problems

Nvidia dGPU equipped Mac and Nvidia eGPU don’t work well together. Nvidia says it’s beta support for dGPU graphics. I did try eGPU device ID matching in v0.9.7 but users reported that it disabled the internal display acceleration. The web driver and OS X default graphics driver cannot work simultaneously. If someone finds a workaround, let me know.

 

When you install a new script version, remember to uninstall the previous (-uninstall option). AMD HD series or R9 series & electrically x8 enclosure may work with your 780M. Don’t trust to “Displays” tab information. Type “system_profiler SPDisplaysDataType” to see actual graphics/displays relation.

Share this post


Link to post
Share on other sites

I’m running OS X 10.11.2 on a late 2011 13” MacBook Pro and I have an Akitio Thunder2 and a GT 740. When I run automate-eGPU.sh, this is the result:

Detected eGPU
 GK107 [GeForce GT 740]
Current OS X
 10.11.2 15C50
Previous OS X
 [not found]
Latest installed Nvidia web driver
 [not found]
No Nvidia web driver detected.
Checking IOPCITunnelCompatible keys...

Missing IOPCITunnelCompatible keys.
Mac board-id not found.
Searching for matching driver...

Driver [346.03.04f02] found from:
http://us.download.nvidia.com/Mac/Quadro_Certified/346.03.04f02/WebDriver-346.03.04f02.pkg
Do you want to download this driver (y/n)?
n
Ok.

Why is it unable to find the the board-id and why is it telling me about missing IOPCITunnelCompatible keys? I thought this script modified the kext files to allow the use Thunderbolt eGPUs. I’d really appreciate some help!

Share this post


Link to post
Share on other sites

Why didn’t you answer “y”? No error rows there, those are normal info rows before the installation.

  • Thumbs Up 1

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.