[SCRIPT] NVIDIA-Based Mac + High Sierra AMD eGPU Acceleration  

Page 1 / 3 Next
 

mac_editor
Honorable Member
Joined:8 months  ago
Posts: 438
August 6, 2017 11:18 pm  

Native AMD eGPU acceleration on macOS High Sierra does not work alongside discrete NVIDIA graphics. After much toil and investigation here and on macrumors, we discovered that NVIDIA drivers  are to blame for this. Disabling them, and forcing iGPU-only behavior could potentially solve the issue. In any case, disabling discrete GPU is of interest regardless of external graphics (such as failing chips), so the script does have a small demographic.

 


purge-nvda

This script disables discrete NVIDIA graphics persistently across boots. I can confirm that it works on 10.12.6 and 10.13.1 on the Mid-2014 750M MacBook Pro. External graphics is still a no-go, but I’m actively searching for workarounds. The script setup is simple enough:

  • Disable system integrity protection.
  • Download the latest version of purge-nvda.sh to your desktop.

 

Open terminal and type in the following commands:

  1. cd Desktop
  2. chmod +x purge-nvda.sh
  3. sudo ./purge-nvda.sh

 

Your system will automatically reboot into iGPU-only mode with the discrete GPU visible but unusable.

 

To restore your system and use discrete graphics, simply run:

sudo ./purge-nvda.sh uninstall. Your system will automatically reboot. Also note that resetting PRAM/NVRAM on boot will dissolve changes but not restore drivers. Uninstall the script first before doing so.

 

In case purge-nvda.sh auto-reboot fails and you are unable to boot, you can restore your system as follows:

  1. Boot into recovery instead and open Terminal.
  2. Switch to your boot disk: cd /Volumes/<name_of_boot_disk>
  3. Move drivers/kexts back: mv Library/Application\ Support/Purge-NVDA/* System/Library/Extensions/
  4. Reboot: reboot
  5. On boot, uninstall the script: sudo ./purge-nvda.sh uninstall

 

Once rebooted again, you will be in your default configuration.

 


Results on macOS Sierra

The setup was simple:

After the reboot:

Now, to restore discrete graphics:

After the reboot:

Quick note that the screenshots do not show the auto-reboot log. Testing on one machine is hardly sufficient. I would appreciate it if others could test this on their Macs as well (after taking a backup of course ;p).

 


Results on High Sierra Beta 4

This result is based on purge-nvda.sh 1.0.1 which does not play with NVRAM values. After running the script and booting with the eGPU plugged in:

The internal display did not work – it was like a ghost display:

 


References

Many thanks to @theitsage for referencing some awesome solutions on macrumors, as well as @goalque and @tbl777 for looking deeply into this. Together they make this script possible. Please let me know, here, via PM, or via GitHub issues if things don’t work out for you, and remember to test on a backed up system or, as I recommend, an extra installation.

I found valuable information at:

 

 

Edited: 3 weeks  ago

Mid-2014 15" MacBook Pro GT750M + RX480@16Gbps-TB2 (AKiTiO Node via TB3->TB2 adapter) + macOS & Win10


adjust80, ljtzeng, goalque and 4 people liked
ReplyQuote
theitsage
Noble Member Admin
Joined:12 months  ago
Posts: 1693
August 7, 2017 12:54 am  

Thank you for your determination to come up with this workaround. This will be very helpful for those Macs with stubborn dGPU that interferes with eGPU.

Numerous implementation guides


ReplyQuote
Flint Ironstag
Trusted Member
Joined:9 months  ago
Posts: 74
August 7, 2017 4:49 am  

Thanks for sharing this with the community!


ReplyQuote
mac_editor
Honorable Member
Joined:8 months  ago
Posts: 438
August 7, 2017 8:03 am  
Posted by: theitsage

Thank you for your determination to come up with this workaround. This will be very helpful for those Macs with stubborn dGPU that interferes with eGPU.

Posted by: Flint Ironstag

Thanks for sharing this with the community!

I hope it works for the others, as well as other NVIDIA GPU based Macs having problems haha ;p

Mid-2014 15" MacBook Pro GT750M + RX480@16Gbps-TB2 (AKiTiO Node via TB3->TB2 adapter) + macOS & Win10


ReplyQuote
ljtzeng
New Member
Joined:7 months  ago
Posts: 4
August 7, 2017 3:03 pm  

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.

I am using Late-2013 15″ MacBook Pro GT750M+RX580@16Gbps-TB2(Akitio Node via TB3 to TB2 adapter)+MacOS High Sierra B4 (17A315i) 

Also I have already disable SIP.

Edited: 4 months  ago

ReplyQuote
ariksaja
Active Member
Joined:4 months  ago
Posts: 15
August 7, 2017 3:08 pm  

 i wonder if the sierra beta also work with this method? can you work with nvidia audio on mac? thanks.

late-2012 Mac Mini + GTX1050Ti@10Gbps-TB1 (AKiTiO Node via TB3->TB2 adapter) + macOS & Win10


ReplyQuote
mac_editor
Honorable Member
Joined:8 months  ago
Posts: 438
August 7, 2017 3:12 pm  
Posted by: ljtzeng

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.

I am using Late-2013 15″ MacBook Pro GT750M+RX580@16Gbps-TB2(Akitio Node via TB3 to TB2 adapter)+MacOS High Sierra B4 (17A315i) 

Also I have already disable SIP.

Try this:

  • Ensure you are in the Desktop on the command line: cd ~/Desktop
  • sudo chmod +x purge-nvda.sh > then run that command.
Edited: 4 months  ago

Mid-2014 15" MacBook Pro GT750M + RX480@16Gbps-TB2 (AKiTiO Node via TB3->TB2 adapter) + macOS & Win10


ljtzeng liked
ReplyQuote
theitsage
Noble Member Admin
Joined:12 months  ago
Posts: 1693
August 7, 2017 3:14 pm  

Please read the post carefully and don’t get confused of the purpose for this script. @mac_editor has had a heck of a time getting his 750M MacBook Pro to work in macOS High Sierra 10.13b with an AMD RX 480 eGPU. This workaround is to prevent the Nvidia dGPU from loading in macOS so that RX 480 eGPU can function.

There’s no workaround for Nvidia eGPU in 10.13b yet.

Numerous implementation guides


ReplyQuote
mac_editor
Honorable Member
Joined:8 months  ago
Posts: 438
August 7, 2017 3:15 pm  
Posted by: theitsage

Please read the post carefully and don’t get confused of the purpose for this script. @mac_editor has had a heck of a time getting his 750M MacBook Pro to work in macOS High Sierra 10.13b with an AMD RX 480 eGPU. This workaround is to prevent the Nvidia dGPU from loading in macOS so that RX 480 eGPU can function.

There’s no workaround for Nvidia eGPU in 10.13b yet.

Precisely – I have been brainstorming a better title for the post for a while haha… this is ONLY FOR EXTERNAL AMD ACCELERATION ON HIGH SIERRA ON MACS WITH NVIDIA GRAPHICS INSIDE THEM.

Mid-2014 15" MacBook Pro GT750M + RX480@16Gbps-TB2 (AKiTiO Node via TB3->TB2 adapter) + macOS & Win10


ReplyQuote
theitsage
Noble Member Admin
Joined:12 months  ago
Posts: 1693
August 7, 2017 3:16 pm  
Posted by: mac_editor

…..

Perhaps more research into the kext behaviors associated with graphics and displays on macOS High Sierra might allow for a script that makes a discrete Mac emulate an integrated-only Mac – with the script providing options to switch between these modes. Nonetheless, I think this workaround is a sufficient stopgap if anything until we “legacy” NVIDIA Mac users upgrade to newer models.

This project is on GitHub:  https://github.com/mayankk2308/purge-nvda

I sent you a PM but not sure it got through. Can you take a look at this workaround to disable dGPU in MacBook Pro and give it a try?

If it turns out universal and easily replicable, it would be great for users of MacBook Pro with a dGPU to soft-convert them into iGPU-only Macs.

Edited: 4 months  ago

Numerous implementation guides


ReplyQuote
mac_editor
Honorable Member
Joined:8 months  ago
Posts: 438
August 7, 2017 3:23 pm  
Posted by: theitsage
 
I sent you a PM but not sure it got through. Can you take a look at this workaround to disable dGPU in MacBook Pro and give it a try?
 
If it turns out universal and easily replicable, it would be great for users of MacBook Pro with a dGPU to soft-convert them into iGPU-only Macs.

That’s a great resource I will surely look into. Thanks @theitsage.

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.

Mid-2014 15" MacBook Pro GT750M + RX480@16Gbps-TB2 (AKiTiO Node via TB3->TB2 adapter) + macOS & Win10


theitsage liked
ReplyQuote
ljtzeng
New Member
Joined:7 months  ago
Posts: 4
August 7, 2017 3:43 pm  
Posted by: mac_editor
Posted by: ljtzeng

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.

I am using Late-2013 15″ MacBook Pro GT750M+RX580@16Gbps-TB2(Akitio Node via TB3 to TB2 adapter)+MacOS High Sierra B4 (17A315i) 

Also I have already disable SIP.

Try this:

  • 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!!


mac_editor liked
ReplyQuote
mac_editor
Honorable Member
Joined:8 months  ago
Posts: 438
August 7, 2017 9:29 pm  

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.

Mid-2014 15" MacBook Pro GT750M + RX480@16Gbps-TB2 (AKiTiO Node via TB3->TB2 adapter) + macOS & Win10


ReplyQuote
mac_editor
Honorable Member
Joined:8 months  ago
Posts: 438
August 8, 2017 1:33 pm  

Updated the original post – NVIDIA discrete graphics can be disabled on macOS with purge-nvda.sh 1.1 or later.

Edited: 4 months  ago

Mid-2014 15" MacBook Pro GT750M + RX480@16Gbps-TB2 (AKiTiO Node via TB3->TB2 adapter) + macOS & Win10


theitsage liked
ReplyQuote
mac_editor
Honorable Member
Joined:8 months  ago
Posts: 438
August 8, 2017 9:47 pm  

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?

Edited: 4 months  ago

Mid-2014 15" MacBook Pro GT750M + RX480@16Gbps-TB2 (AKiTiO Node via TB3->TB2 adapter) + macOS & Win10


ReplyQuote
mac_editor
Honorable Member
Joined:8 months  ago
Posts: 438
August 10, 2017 6:44 pm  
Posted by: mac_editor

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.
Edited: 3 months  ago

Mid-2014 15" MacBook Pro GT750M + RX480@16Gbps-TB2 (AKiTiO Node via TB3->TB2 adapter) + macOS & Win10


theitsage liked
ReplyQuote
mac_editor
Honorable Member
Joined:8 months  ago
Posts: 438
August 12, 2017 4:39 pm  

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.

Mid-2014 15" MacBook Pro GT750M + RX480@16Gbps-TB2 (AKiTiO Node via TB3->TB2 adapter) + macOS & Win10


ReplyQuote
mac_editor
Honorable Member
Joined:8 months  ago
Posts: 438
August 15, 2017 12:01 pm  

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.

Edited: 3 months  ago

Mid-2014 15" MacBook Pro GT750M + RX480@16Gbps-TB2 (AKiTiO Node via TB3->TB2 adapter) + macOS & Win10


theitsage liked
ReplyQuote
mac_editor
Honorable Member
Joined:8 months  ago
Posts: 438
August 22, 2017 2:27 pm  

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. 

Mid-2014 15" MacBook Pro GT750M + RX480@16Gbps-TB2 (AKiTiO Node via TB3->TB2 adapter) + macOS & Win10


Daelin and theitsage liked
ReplyQuote
Daelin
Eminent Member
Joined:10 months  ago
Posts: 47
September 13, 2017 9:14 pm  

any news on this topic?

MacBook Pro 15" Late 2013, GT 750M
Devil Box + MSI RX 480 Gaming X 8GB


ReplyQuote
mac_editor
Honorable Member
Joined:8 months  ago
Posts: 438
September 13, 2017 9:51 pm  
Posted by: Daelin

any news on this topic?

Work in progress. Waiting on gold master. No changes observed on latest available builds. 

Mid-2014 15" MacBook Pro GT750M + RX480@16Gbps-TB2 (AKiTiO Node via TB3->TB2 adapter) + macOS & Win10


Daelin liked
ReplyQuote
Rycco
Estimable Member
Joined:10 months  ago
Posts: 170
September 14, 2017 3:46 am  

But wait, there are macs that officially have Nvidia dGPUs right? So Apple will support those, which means that there will be a Nvidia drivers. Am I right?

mid-2017 15" Macbook Pro RP555 + GTX1080i@32Gbps-TB3 (Mantiz Venus) + macOS & Win10


ReplyQuote
mac_editor
Honorable Member
Joined:8 months  ago
Posts: 438
September 14, 2017 5:20 am  
Posted by: Rycco

But wait, there are macs that officially have Nvidia dGPUs right? So Apple will support those, which means that there will be a Nvidia drivers. Am I right?

Official Apple NVIDIA drivers only support up to 7xx cards. Also, external graphics are officially only supported on TB3 macs – none of which have NVIDIA graphics. It is quite evident however, that external graphics (AMD) do work on TB2 on macOS High Sierra. It doesn’t on macs with NVIDIA dGPUs because it wasn’t developed to work alongside them in the first place (since target is TB3) – as luck would have it these official NVIDIA drivers are the culprit – preventing the unsupported TB2 config from working correctly. 

Mid-2014 15" MacBook Pro GT750M + RX480@16Gbps-TB2 (AKiTiO Node via TB3->TB2 adapter) + macOS & Win10


Rycco liked
ReplyQuote
code1337
New Member
Joined:2 months  ago
Posts: 2
September 19, 2017 12:28 pm  

I naively downloaded High Sierra GM (17A362a) with a Sonnet Breakaway 350 and AMD RX 580 and can only get a black screen when trying to activate (direct with booting or being logged out, though at least no crash here). I have the Mid-2014 15″ MacBook Pro GT750M and as far as i understand there is currently not a working solution to get the egpu running on this machine (because of the GT750M just being built-in there), right?

Thanks for all the effort so far!

 

P.S.:  I tried the same egpu on a Mid-2014 15″ MacBook Pro GT750M Iris Only on a High-Sierra beta and there it worked out-of-the-box

Edited: 2 months  ago

ReplyQuote
mac_editor
Honorable Member
Joined:8 months  ago
Posts: 438
September 19, 2017 2:09 pm  
Posted by: code1337

I naively downloaded High Sierra GM (17A362a) with a Sonnet Breakaway 350 and AMD RX 580 and can only get a black screen when trying to activate (direct with booting or being logged out, though at least no crash here). I have the Mid-2014 15″ MacBook Pro GT750M and as far as i understand there is currently not a working solution to get the egpu running on this machine (because of the GT750M just being built-in there), right?

Thanks for all the effort so far!

 

P.S.:  I tried the same egpu on a Mid-2014 15″ MacBook Pro GT750M Iris Only on a High-Sierra beta and there it worked out-of-the-box

Experiencing the same thing without use of the script. The recent High Sierra builds don’t boot without NVIDIA drivers (while forcing boot on iGPU too) – thus the script still isn’t functional. Quite ironically, removing drivers for AMD discrete graphics does not cause a boot issue. Quite odd I must say. 

Edited: 2 months  ago

Mid-2014 15" MacBook Pro GT750M + RX480@16Gbps-TB2 (AKiTiO Node via TB3->TB2 adapter) + macOS & Win10


ReplyQuote
mac_editor
Honorable Member
Joined:8 months  ago
Posts: 438
September 20, 2017 1:28 am  

A positive response on Apple’s part – lets see what the next builds of High Sierra bring.

Mid-2014 15" MacBook Pro GT750M + RX480@16Gbps-TB2 (AKiTiO Node via TB3->TB2 adapter) + macOS & Win10


Flint Ironstag, barret, Daelin and 1 people liked
ReplyQuote
theitsage
Noble Member Admin
Joined:12 months  ago
Posts: 1693
September 20, 2017 1:46 am  

Thank you for the update @mac_editor! This is definitely a positive response.

Numerous implementation guides


ReplyQuote
senatorpops
New Member
Joined:2 months  ago
Posts: 1
September 28, 2017 5:53 pm  

any update on this? or are we waiting for apple to configure a way to disable discrete graphics themselves?


ReplyQuote
Koopa
Active Member
Joined:3 months  ago
Posts: 11
September 29, 2017 2:02 am  

I tried this yesterday with a RX580 and a MBP Mid 2014 750M. The eGPU is detected by High Sierra, however when logging out and back in you only get a black screen until you unplug it again 🙁


ReplyQuote
mac_editor
Honorable Member
Joined:8 months  ago
Posts: 438
September 29, 2017 2:05 am  

The script is still not functional on macOS 10.13.1 B1. I am unable to simulate an iGPU-only boot after removing the NVIDIA drivers. The new system seems to boot differently than before (characteristic animation – the screen blinks on normal boot before completing). It is recommended that you avoid using this until I can work on this. My eGPU is currently out of commission anyway.

Mid-2014 15" MacBook Pro GT750M + RX480@16Gbps-TB2 (AKiTiO Node via TB3->TB2 adapter) + macOS & Win10


Koopa and adjust80 liked
ReplyQuote
Page 1 / 3 Next
  
Working

Please Login or Register