[SCRIPT] Better eGPUs on Macs with Discrete NVIDIA GPUs
That's a great resource I will surely look into. Thanks @itsage.
Also I just checked my inbox for your message and didn't find anything, although I did see your username. I tried sending you a PM and got a notification on the top right saying cannot send notification. It seems to have gone through however.
First of all, I am so excited when I see this post. But when I give it a try, I have encounter one problem, after downloaded the script and move it to the desktop. I use terminal to enter the command, all I get is this error message (sudo: ./purge-nvda.sh: command not found), did I do something wrong ? Can you help me ? Thanks.
Also I have already disable SIP.
- Ensure you are in the Desktop on the command line: cd ~/Desktop
- sudo chmod +x purge-nvda.sh > then run that command.
Yes, it works!! Thank you very much!!
Does not work on High Sierra Beta 5 possibly due to changes associated with /S/L/E/ handling on boot. Future builds may change this, however.
Updated the original post - NVIDIA discrete graphics can be disabled on macOS with purge-nvda.sh 1.1 or later.
After tons of haggling, the most I could do so far was to force High Sierra B5 to boot using the integrated GPU without touching system extensions (script nvram-only mode). This behavior is like 0xbb's gpu-switch, which gives you one boot on iGPU only. However, I'm not sure if gpu-switch forces an iGPU-only boot since it only modifies one NVRAM variable. It could be that the single modification affects other variables as well, but for the sake of consistency, my script modifies all necessary variables to ensure an iGPU-only boot (this version is not on GitHub yet, 1.1.1 also changes one variable like gpu-switch). Additionally, gpu-switch does not work on 10.12.4+. This script does. The tricky part is next.
On macOS Sierra and even High Sierra B4, to make this iGPU-only boot persistent, removing the discrete GPU's drivers works spectacularly. Additionally, without kext removal, the NVIDIA kexts are still loaded even in the iGPU-only configuration. This rules out gpu-switch as a potential solution because the loaded kexts interfere with external graphics, and, for the moment, makes kext removal essential - as evident on previous macOS builds. The same solution does not seem to work on Beta 5, which simply refuses to boot. The questions to answer are why moving around kexts that won't be used at boot interfere with the boot and why it only happens on HS B5?
The questions to answer are why moving around kexts that won't be used at boot interfere with the boot and why it only happens on HS B5?
After some tinkering and posting on macrumors regarding this:
- The problem could be with the WindowServer process on boot. It seems to die each time on B5 while booting without NVDA kexts. Given that WindowServer is a prominent update in High Sierra (since it now runs on Metal) - future betas are highly likely to make changes to it (fingers crossed though).
- Technically, moving around the kexts isn't the problem then. However, apparently manually executing kextcache commands is completely discouraged on the High Sierra beta - can potentially render disk unbootable. Letting the system automatically execute this seems to work fine though.
Tested the script more extensively and it works on Mavericks (10.9), Yosemite (10.10), El Capitan (10.11), and Sierra (10.12). Can't wait to the test High Sierra Beta 6.
Beta 6 does some interesting stuff. Starting off with the bad news: script still doesn't work - same issue.
The potentially good news:
Unlike the previous beta, this build actually switches to discrete graphics before enabling the external GPU. This has eliminated the glitch on the external screen seen on logging out. The internal display also shows a scaled resolution of the screen for a moment - a good sign - but quickly gets stuck. Since I had verbose boot enabled - I noticed that the Mac had trouble detecting the external display - its value set to 0 on logout. What this means is -> the issue with NVIDIA - AMD driver collision MIGHT have been resolved and further builds may improve eGPU support (example: my eGPU on some betas did not work on Mid-14 13" MBP, B5 worked, B6 yet to test) and therefore result in working configs without the use of the script (which ain't working atm anyway). For those on a previous beta (with dGPU NVDA Mac), please disable Automatic Graphics Switching and try connecting the eGPU. For those on Beta 6, you will probably face the same issue as myself.
Beta 7 behaves similar to Beta 6 with regards to external graphics - no changes. It seems to have trouble detecting an external display via my eGPU - as mentioned in the previous post. The AMD kexts seem to load correctly as well, so the problem most likely lies in how external displays are being managed, perhaps? Looking into this.
any news on this topic?