Jump to content
euqlaog

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

Recommended Posts

Update on my situation: I placed my Titan back inside my Akitio (the previously working 4k60 setup) and I still have 4k30 instead of 4k60. I tried plugging it in at the Apple logo as well as my old way of doing it (i.e. plugging it in before switching on my laptop). No luck, MST is still not working despite being enabled in the monitor.

Share this post


Link to post
Share on other sites
Update on my situation: I placed my Titan back inside my Akitio (the previously working 4k60 setup) and I still have 4k30 instead of 4k60. I tried plugging it in at the Apple logo as well as my old way of doing it (i.e. plugging it in before switching on my laptop). No luck, MST is still not working despite being enabled in the monitor.

I am typing this on my U28D590 monitor (DP 1.2), 3840x2160@60Hz

AKiTiO + GTX 980 + 2014 15” rMBP Iris Pro on OS X 10.10.3

This site gives some useful information:

https://support.apple.com/en-us/HT202856

If you will find out a way by googling 4K & MST, let me know!

post-28870-14495000377814_thumb.png

Share this post


Link to post
Share on other sites

Nope, still no luck.

However, I have noticed that the difference between your script and how I used to set up my eGPU was that I did not do anything about the AppleGraphicDevicePolicy kext. I modified your script so it doesn't do anything with that under 10.10.3 and it went back to kernel panics on both the Akitio and III-D. However, in the one occasion it did successfully boot, I had 4k60 back!

So what I did was try to do the same for 10.10.1, however, the it won't enable the external display at all when I plug in the eGPU at the Apple logo, and when I try to detect displays with the Display Menu app, it causes a kernel panic.

So, for now, I'm stuck with 10.10.3, using a 4k monitor in 1080p.

Share this post


Link to post
Share on other sites
Nope, still no luck.

However, I have noticed that the difference between your script and how I used to set up my eGPU was that I did not do anything about the AppleGraphicDevicePolicy kext. I modified your script so it doesn't do anything with that under 10.10.3 and it went back to kernel panics on both the Akitio and III-D. However, in the one occasion it did successfully boot, I had 4k60 back!

So what I did was try to do the same for 10.10.1, however, the it won't enable the external display at all when I plug in the eGPU at the Apple logo, and when I try to detect displays with the Display Menu app, it causes a kernel panic.

So, for now, I'm stuck with 10.10.3, using a 4k monitor in 1080p.

Your board-id Mac-2BD1B31983FE1663 doesn't exist in ConfigMap as default, but the script adds it there with “none” value enabling the screen output. AppleMuxController takes care of GPU switching, but the 60Hz issue may be more related to the monitor itself as Sgt. Pepper had the same problem with a iGPU only Mac (late 2013 13” rMBP), and the same monitor:

http://forum.techinferno.com/diy-e-gpu-projects/7910-diy-egpu-macbook-experiences-30.html#post120921

It’s one of the Mac models which doesn’t require AppleGraphicsDevicePolicy.kext change as the board-id is there ready.

The strange thing is, i was able to test this setup today with a 2011 MacbookAir and it worked exactly as it should, eGPU is detected, and works properly, giving me 4k@60hz AND resolutions up to 3200x1800 HiDPI.

If we could track down the 2011 MacbookAir’s ioreg tree and compare it with the late 2013 13” rMBP + the same monitor, that likely gives us the correct direction.

Share this post


Link to post
Share on other sites
@SimonSays: 4k@60Hz via GTX980 after running those additional terminal commands on nMP? If so, I will change the script in next version. Do you have a single or multi-slot enclosure?

Sorry I was referring directly to the D500's

Will test the new commands and report back

Share this post


Link to post
Share on other sites
No eEFI needed.

goalque doesn't really know why this hack worked.

so many wonderful things figured out

Does it work in windows on a nMP?

Share this post


Link to post
Share on other sites
Your board-id Mac-2BD1B31983FE1663 doesn't exist in ConfigMap as default, but the script adds it there with “none” value enabling the screen output. AppleMuxController takes care of GPU switching, but the 60Hz issue may be more related to the monitor itself as Sgt. Pepper had the same problem with a iGPU only Mac (late 2013 13” rMBP), and the same monitor:

http://forum.techinferno.com/diy-e-gpu-projects/7910-diy-egpu-macbook-experiences-30.html#post120921

It’s one of the Mac models which doesn’t require AppleGraphicsDevicePolicy.kext change as the board-id is there ready.

If we could track down the 2011 MacbookAir’s ioreg tree and compare it with the late 2013 13” rMBP + the same monitor, that likely gives us the correct direction.

Dear goalque,

I have both the MacBooks here, so if you can tell me how to read out the ioreg tree, i can upload both outputs so maybe we can really track this problem down

Unfortunately i have no clue myself what i have to type into terminal etc ;)

Share this post


Link to post
Share on other sites

I have one more observation too, but it may be irrelevant to this thread. I'm having the issue where the external display won't activate at all when I plug my eGPU at the Apple logo every time I boot up. I cannot open "About My Mac" at all and it won't shut down at all after I selected that. Also, when I try to select the "Detect Displays" option on the "Display Menu" app it causes a kernel panic.

I only manage to get it to work again by using an NVRAM reset and running the script again.

Anyway, I still have no luck with 4k60 at all.

Share this post


Link to post
Share on other sites

@Mark: Can't you boot with the eGPU turned on before the Apple logo? Guess that is already "too far" booted to work with GPUs.

Share this post


Link to post
Share on other sites

Well, with the Sonnet III-D + Titan, I cannot boot at all if I plug the TB cable in before I switch on the laptop. It won't even switch on the internal screen. This is the problem with Maxwell + 750M + multi-slot TB enclosures that has been happening already.

I have tried on a couple of occasions to plug in between the chime and the Apple logo, it didn't make a difference in terms of detection. Maybe I should try again next time.

Share this post


Link to post
Share on other sites
Dear goalque,

I have both the MacBooks here, so if you can tell me how to read out the ioreg tree, i can upload both outputs so maybe we can really track this problem down

Unfortunately i have no clue myself what i have to type into terminal etc ;)

1) Unplug all USB devices

2) Boot into OS X 10.10.3 with the eGPU + monitor plugged

3) Open OS X Terminal, and copy-paste the following command


ioreg -l | perl -pe 's/(\"serial-number\"|\"IOPlatformSerialNumber\"|\"fmm-computer-name\"|\"IOConsoleUsers\") = [\(\"<](.+)[\)\">]$/\1 = \"\"/g' > ~/Desktop/output.txt

This command should expunge your Mac serial number, computer name, and user data from the output. If you see other personal data that you don't want to show, delete it. And then send me PM with the link where I can download the ioreg output of 2013 13" rMBP and 2011 MacBook Air. Hopefully we will find out something.

Share this post


Link to post
Share on other sites

Yess, script work perfect in my MacBook proR 2012 (HD4000+GT650m+GTX970). But the use (GTX970) the laptop screen turn off, and work only the egpu in the external screen.

Share this post


Link to post
Share on other sites

I got confirmation that additional command here enable nMP's eGPU screen output. The bug fix will be included in the next version.

1) Booting with nothing plugged in nMP's HDMI interface and wait for a while even if monitor stays black, the external GPU has screen output via DVI interface. The result is the same for all the six Thunderbolt ports on nMP.

2) When the monitor is connected to the nMP's HDMI interface and eGPU connected to one of the TB ports, after booting, both monitors will be detected.

SimonSays told me to test this soon as well.

Furthermore, I had progress in detecting multiple eGPUs with the 2014 Mac mini. It won't freeze at booting stage anymore. I am also examining the ACPI specification and ways to programmatically emulate physical delay that is required with a 750M equipped 15" rMBP + multi-slot enclosure + Maxwell card.

  • Thumbs Up 4

Share this post


Link to post
Share on other sites

Thank you so much for the excellent script!

I am tearing my hair out trying to get a Titan to work with a Mac Pro 6,1 - not a lot of luck there, but at least I am able to post this from an old Mac Mini (2012, Intel graphics) via the eGPU. At least this verifies that the card and enclosure are fine. And your script made it a breeze. The HW required some fidgeting, but I was able to get it to work as such:

- Upgrade to Yosemite and install patches. I was getting kernel panics with the eGPU connected right after OS X started to load with Mavericks.

- Connect Mac & eGPU, connect monitor to internal HDMI. Do not connect a monitor to the eGPU. (Important!)

- Boot. Observe a vague Nvidia entry in System Report.

- Run script. Reboot. Vague entry turns into an actual display adapter with the correct name, etc.

- Connect monitor to eGPU. Enjoy. Leave integrated graphics hooked up to a screen (or another port on the same display) so you can access the UEFI interface if you have to.

- Seems rock solid, I just unhooked the external PSU (safety net) and the card is running on the Sonnet III's internal PSU only. Did a quick run of the Valley benchmark, no problems.

So anyway, I really liked the script. One minor suggestion: you could potentially separate the "housekeeping" and the driver download/installation functions into two scripts, or one script that allows you to call one or the other via parameters. I ran the housekeeping part (IOPCITunnel, kext-dev-mode, etc) several times but I only needed to install the drivers once.

  • Thumbs Up 1

Share this post


Link to post
Share on other sites
er... [FONT=Menlo]Totorias-MacBook-Pro:~ Totoria$ sudo ./automate-eGPU.sh[/FONT] [FONT=Menlo] [/FONT] [FONT=Menlo]Current OS X[/FONT] [FONT=Menlo] 10.10.4 14E36b[/FONT] [FONT=Menlo]Previous OS X[/FONT] [FONT=Menlo] 10.10.4 14E26a[/FONT] [FONT=Menlo]Previous non-beta OS X[/FONT] [FONT=Menlo] 10.10.4 14E26a[/FONT] [FONT=Menlo]Latest installed web driver[/FONT] [FONT=Menlo] [not found][/FONT] [FONT=Menlo]Print: Entry, ":IOKitPersonalities:NVDAStartup:NVDARequiredOS", Does Not Exist[/FONT] [FONT=Menlo]No web driver detected.[/FONT] [FONT=Menlo]Checking IOPCITunnelCompatible keys...[/FONT] [FONT=Menlo] [/FONT] [FONT=Menlo]Print: Entry, ":IOKitPersonalities:1:IOPCITunnelCompatible", Does Not Exist[/FONT] [FONT=Menlo]Print: Entry, ":IOKitPersonalities:2:IOPCITunnelCompatible", Does Not Exist[/FONT] [FONT=Menlo]Print: Entry, ":IOKitPersonalities:3:IOPCITunnelCompatible", Does Not Exist[/FONT] [FONT=Menlo]Print: Entry, ":IOKitPersonalities:NVDAStartup:IOPCITunnelCompatible", Does Not Exist[/FONT] [FONT=Menlo]Print: Entry, ":IOKitPersonalities:BuiltInHDA:IOPCITunnelCompatible", Does Not Exist[/FONT] [FONT=Menlo]IOPCITunnelCompatible mods are valid.[/FONT] [FONT=Menlo]Print: Entry, ":IOKitPersonalities:AppleGraphicsDevicePolicy:ConfigMap:Mac-3CBD00234E554E41", Does Not Exist[/FONT] [FONT=Menlo]Mac board-id not found.[/FONT] [FONT=Menlo]Searching for available drivers...[/FONT] [FONT=Menlo] [/FONT] [FONT=Menlo]No web driver found for OS X 10.10.4.[/FONT] [FONT=Menlo]There is no package on the desktop.[/FONT] [FONT=Menlo]Would you like search the latest available package for [10.10.4 14E26a] (y/n)?[/FONT] [FONT=Menlo]y[/FONT] [FONT=Menlo]Operating system id not found. Nvidia may have changed their web driver search service.[/FONT]

Share this post


Link to post
Share on other sites

@Totoria: Thanks for this bug report. The script supports public beta versions, not yet pre-release update seeds. I will release a new version in a few days.

Share this post


Link to post
Share on other sites

I should change the title of this thread, since the just released version 0.9.2 is targeting at fully plug-and-play eGPU system on OS X.

Now there is a parameter [-a] which launches two background processes, the other “automate-egpu-daemon” takes care of the following:

1) If you have a multi-slot enclosure (such as NA211TB, III-D, SE II) and you are using a Maxwell card with a dGPU equipped MBP (750M), the freezing issue at booting stage is completely eliminated. You can press option key to have boot screen without freezing or boot straight into the OS X. I discovered this by comparing 2014/2011 Mac mini’s differences. Big thanks to @Simurgh5 for testing my theory.

2) It’s likely that you can now run more than one Nvidia Kepler eGPUs externally out of the box with any TB2 Mac, without manual delay.

3) If you accidentally disabled the web driver, “automate-egpu-daemon” forces developer mode and web driver on each boot.

The other process, “automate-egpu-agent” detects in real-time if NVDAStartup.kext is changed. If you edit it or reinstall the web driver via Nvidia’s own UI, you will get a pop-up window that says:

“Nvidia driver change detected. In order to use eGPU, your system must be reconfigured. Click OK to execute automate-eGPU”.

- fixed nMP screen output bug

- quick regexp change to support pre-release seeds (not tested)

- [-skipdriver] parameter, which does what is says - executes only kext mods

- [-m] parameter, switches back to manual mode

The old manual mode, running the script without parameters is possible. And that must be the first terminal command, required before running with [-a].

Please note that these new features may include bugs and [-a] mode is currently experimental. A Time Machine backup is recommended. The script is under the MIT license, so you can do almost anything with it.

  • Thumbs Up 5

Share this post


Link to post
Share on other sites

Now there is a parameter [-a] which launches two background processes, the other “automate-egpu-daemon” takes care of the following:

1) If you have a multi-slot enclosure (such as NA211TB, III-D, SE II) and you are using a Maxwell card with a dGPU equipped MBP (750M), the freezing issue at booting stage is completely eliminated. You can press option key to have boot screen without freezing or boot straight into the OS X. I discovered this by comparing 2014/2011 Mac mini’s differences. Big thanks to @Simurgh5 for testing my theory.

[...]

3) If you accidentally disabled the web driver, “automate-egpu-daemon” forces developer mode and web driver on each boot.

The other process, “automate-egpu-agent” detects in real-time if NVDAStartup.kext is changed. If you edit it or reinstall the web driver via Nvidia’s own UI, you will get a pop-up window that says:

“Nvidia driver change detected. In order to use eGPU, your system must be reconfigured. Click OK to execute automate-eGPU”.

@goalque:

Great work! I gratefully confirm that the automatic mode is running smoothly for several hours now and that it does what it should: The Webdriver is enabled when disabled and the rMBP can be booted with the eGPU connected. This is more than I'd ever have expected when I started my eGPU project. :)

I have one (hopefully) small request for the next version: Could you make the Webdriver re-enabling optional? [For whatever reason, I am experiencing much lower battery life with the Webdriver enabled. I've always had this before so this is not due to the script.] Or if you think this feature might be confusing for other users: could you tell me what I'd have to change in the script? I am familiar with programming in general but not very much in the shell – so I'm afraid to change anything in your beautiful script without knowing all dependencies within it.

  • Thumbs Up 1

Share this post


Link to post
Share on other sites
@goalque:

Great work! I gratefully confirm that the automatic mode is running smoothly for several hours now and that it does what it should: The Webdriver is enabled when disabled and the rMBP can be booted with the eGPU connected. This is more than I'd ever have expected when I started my eGPU project. :)

I have one (hopefully) small request for the next version: Could you make the Webdriver re-enabling optional? [For whatever reason, I am experiencing much lower battery life with the Webdriver enabled. I've always had this before so this is not due to the script.] Or if you think this feature might be confusing for other users: could you tell me what I'd have to change in the script? I am familiar with programming in general but not very much in the shell – so I'm afraid to change anything in your beautiful script without knowing all dependencies within it.

Thanks! The script forces to use the web driver, since the OS X default driver doesn’t work with Maxwell architecture cards. Comment the line number 408.

Background service unloading with [-m] parameter doesn’t work well yet, since they are started with different privileges. If you want to get rid of them, delete plist files:

sudo rm /Library/LaunchDaemons/automate-eGPU-daemon.plist
sudo rm /Library/LaunchAgents/automate-eGPU-agent.plist

  • Thumbs Up 1

Share this post


Link to post
Share on other sites

Thank you @goalque for the driver update! I can now boot straight into OS X (10.10.3) on my Titan X + III-D + 2013 750m when plugged in to the eGPU! However, I am still having problems with 4k30 instead of 4k60.

I also tried booting into Windows 8.1 using this method. The eGPU isn't detected at all. I've installed the latest NVIDIA drivers both when unplugged and then when plugged. Also, after booting out of Windows, I cannot get back in to OS X when I switch on the computer (i.e. black screen freeze again), I solved this problem by booting into OS X without the eGPU plugged and running the script with the [-a] parameter.

Thank you and keep up the good work! I am willing to help you sort out this 4k issue as well!

Share this post


Link to post
Share on other sites

I also tried booting into Windows 8.1 using this method. The eGPU isn't detected at all. I've installed the latest NVIDIA drivers both when unplugged and then when plugged. Also, after booting out of Windows, I cannot get back in to OS X when I switch on the computer (i.e. black screen freeze again), I solved this problem by booting into OS X without the eGPU plugged and running the script with the [-a] parameter.

You are right, that's because the background process is re-doing the hack after each boot – which is necessary. Windows of course won't do that for us. I was trying the same as you. My intuition is that we won't solve this problem until we activate the Intel Iris Pro. (The same setup works on the MBA without any issues so I assume this is about the dGPU.) I tried the Iris Pro Guide which is provided here but it results in a black screen during Windows login for me. I know through several tries that the hack does what it should – the iGPU can be activated. I assume that it's the dGPU that is interfering. So one would need to kill the dGPU on the EFI level probably. But this goes far beyond my skills.

Another way to go might be figuring out what goalque's discovery is actually doing so that one could teach windows to do the same.

Interestingly, I observed that goalque's hack skips reFIND (I tried the reFIND + apple_set_os.efi hack – this could activate the iGPU but most of the time I observed these problems.)

Share this post


Link to post
Share on other sites

OS X 10.10.4 – running for both devices. :)

Just download the latest driver manually, put it on the Desktop and let the magic work. (;

Share this post


Link to post
Share on other sites
OS X 10.10.4 – running for both devices. :)

Just download the latest driver manually, put it on the Desktop and let the magic work. (;

Great! And if there exists previous driver on the desktop, the script can reinstall it. Previous system version detection and [-a] mode still need fine-tuning.

You are right, that's because the background process is re-doing the hack after each boot – which is necessary. Windows of course won't do that for us.

Yep, the purpose of the script is to solve all the eGPU issues on OS X, not on Windows. Generally NVRAM boot values should retain the state after system restart, but in this special case the value gets corrupted and therefore daemon background process is necessary.

Thank you and keep up the good work! I am willing to help you sort out this 4k issue as well!

I would like track down the 4K MST issue, but haven’t got message from Sgt. Pepper. We need another Mac with the same monitor against which to compare (4K working/4K not working).

Interesting 10.10.4 update comment from Apple: “Addresses an issue that prevented some external displays from functioning properly”.

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.