Setup & Software Discussions
[SCRIPT] Better eGPUs on Macs with Discrete NVIDIA GPUs
 

[SCRIPT] Better eGPUs on Macs with Discrete NVIDIA GPUs  

 of  9
  RSS

mac_editor
(@mac_editor)
Famed Member Moderator
Joined: 3 years ago
 

Page shortcut https://egpu.io/purge-nvda.sh


https://camo.githubusercontent.com/5ba3f1336d080f693fc533cda9708adb1a251b10/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f6d6179616e6b6b323330382f70757267652d6e7664612e7376673f7374796c653d666f722d7468652d6261646765  macOS Support Github All Releases

Contents

A quick run-through of what's included in this document:

Pre-Requisites

macOS requirements, pre-system configuration specifics, and more.

Installation

Installing and running the script.

Script Options

Available capabilities and options in the script.

Recovery

Easy way to recover from an unbootable system using the script.

Post-Install

System configuration after script installation and some other things of note.

Known Issues

A table of known issues and side effects of using the script.

Troubleshooting

Additional resources and guides for eGPUs.

Disclaimer

Please read the disclaimer before using this script.

License

By using this script, you consent to the license that the script comes bundled with.

Support

Support the developer if you'd like to.

 


Get purge-nvda.sh

If you loved purge-nvda.sh, consider starring the repository or if you would like to, donate via PayPal:

paypal

Thank you for using purge-nvda.sh. This project is currently maintained for any discovered bugs/errors.

 

This topic was modified 10 months ago

purge-wranglerpurge-nvdaset-eGPU
2018 MacBook Pro 15" RP560X + RX 5700 XT (Mantiz Venus)


dgrand, avj, devild and 11 people liked
ReplyQuote
itsage
(@itsage)
Famed Member Admin
Joined: 3 years ago
 

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.

Best ultrabooks for eGPU use | eGPU enclosure buying guide


ReplyQuote
Flint Ironstag
(@flint-ironstag)
Estimable Member
Joined: 3 years ago
 

Thanks for sharing this with the community!

MP 6,1 | 4c | d700
MP 6,1 | 6c | d500


ReplyQuote
mac_editor
(@mac_editor)
Famed Member Moderator
Joined: 3 years ago
 
Posted by: itsage

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

purge-wranglerpurge-nvdaset-eGPU
2018 MacBook Pro 15" RP560X + RX 5700 XT (Mantiz Venus)


ReplyQuote
ljtzeng
(@ljtzeng)
New Member
Joined: 3 years ago
 

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.

Pending: Add my system information and expected eGPU configuration to my signature to give context to my posts


ReplyQuote
ariksaja
(@ariksaja)
Active Member
Joined: 2 years ago
 

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

late-2012 Mac Mini + [email protected] (AKiTiO Node via TB3->TB2 adapter) + macOS & Win10


ReplyQuote
mac_editor
(@mac_editor)
Famed Member Moderator
Joined: 3 years ago
 
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.

purge-wranglerpurge-nvdaset-eGPU
2018 MacBook Pro 15" RP560X + RX 5700 XT (Mantiz Venus)


ljtzeng liked
ReplyQuote
itsage
(@itsage)
Famed Member Admin
Joined: 3 years ago
 

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.

Best ultrabooks for eGPU use | eGPU enclosure buying guide


ReplyQuote
mac_editor
(@mac_editor)
Famed Member Moderator
Joined: 3 years ago
 
Posted by: itsage

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.

purge-wranglerpurge-nvdaset-eGPU
2018 MacBook Pro 15" RP560X + RX 5700 XT (Mantiz Venus)


ReplyQuote
itsage
(@itsage)
Famed Member Admin
Joined: 3 years ago
 
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.

Best ultrabooks for eGPU use | eGPU enclosure buying guide


ReplyQuote
mac_editor
(@mac_editor)
Famed Member Moderator
Joined: 3 years ago
 
Posted by: itsage
 
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 @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.

purge-wranglerpurge-nvdaset-eGPU
2018 MacBook Pro 15" RP560X + RX 5700 XT (Mantiz Venus)


itsage liked
ReplyQuote
ljtzeng
(@ljtzeng)
New Member
Joined: 3 years ago
 
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!!

Pending: Add my system information and expected eGPU configuration to my signature to give context to my posts


ReplyQuote
mac_editor
(@mac_editor)
Famed Member Moderator
Joined: 3 years ago
 

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.

purge-wranglerpurge-nvdaset-eGPU
2018 MacBook Pro 15" RP560X + RX 5700 XT (Mantiz Venus)


ReplyQuote
mac_editor
(@mac_editor)
Famed Member Moderator
Joined: 3 years ago
 

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

purge-wranglerpurge-nvdaset-eGPU
2018 MacBook Pro 15" RP560X + RX 5700 XT (Mantiz Venus)


itsage liked
ReplyQuote
mac_editor
(@mac_editor)
Famed Member Moderator
Joined: 3 years ago
 

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?

purge-wranglerpurge-nvdaset-eGPU
2018 MacBook Pro 15" RP560X + RX 5700 XT (Mantiz Venus)


ReplyQuote
mac_editor
(@mac_editor)
Famed Member Moderator
Joined: 3 years ago
 
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.

purge-wranglerpurge-nvdaset-eGPU
2018 MacBook Pro 15" RP560X + RX 5700 XT (Mantiz Venus)


itsage liked
ReplyQuote
mac_editor
(@mac_editor)
Famed Member Moderator
Joined: 3 years ago
 

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.

purge-wranglerpurge-nvdaset-eGPU
2018 MacBook Pro 15" RP560X + RX 5700 XT (Mantiz Venus)


ReplyQuote
mac_editor
(@mac_editor)
Famed Member Moderator
Joined: 3 years ago
 

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.

purge-wranglerpurge-nvdaset-eGPU
2018 MacBook Pro 15" RP560X + RX 5700 XT (Mantiz Venus)


itsage liked
ReplyQuote
mac_editor
(@mac_editor)
Famed Member Moderator
Joined: 3 years ago
 

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. 

purge-wranglerpurge-nvdaset-eGPU
2018 MacBook Pro 15" RP560X + RX 5700 XT (Mantiz Venus)


Daelin and itsage liked
ReplyQuote
Daelin
(@daelin)
Trusted Member
Joined: 3 years ago
 

any news on this topic?

MacBook Pro 15" 2017, AMD RP560
Devil Box + MSI GTX 1080Ti Gaming X

Bricked thanks to rEFInd:
MacBook Pro 15" Late 2013, GT 750M


ReplyQuote
mac_editor
(@mac_editor)
Famed Member Moderator
Joined: 3 years ago
 
Posted by: Daelin

any news on this topic?

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

purge-wranglerpurge-nvdaset-eGPU
2018 MacBook Pro 15" RP560X + RX 5700 XT (Mantiz Venus)


Daelin liked
ReplyQuote
Rycco
(@rycco)
Reputable Member
Joined: 3 years ago
 

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 + [email protected] (Mantiz Venus) + macOS & Win10


ReplyQuote
mac_editor
(@mac_editor)
Famed Member Moderator
Joined: 3 years ago
 
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. 

purge-wranglerpurge-nvdaset-eGPU
2018 MacBook Pro 15" RP560X + RX 5700 XT (Mantiz Venus)


Rycco liked
ReplyQuote
code1337
(@code1337)
New Member
Joined: 2 years ago
 

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

Pending: Add my system information and expected eGPU configuration to my signature to give context to my posts


ReplyQuote
mac_editor
(@mac_editor)
Famed Member Moderator
Joined: 3 years ago
 
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. 

purge-wranglerpurge-nvdaset-eGPU
2018 MacBook Pro 15" RP560X + RX 5700 XT (Mantiz Venus)


ReplyQuote
mac_editor
(@mac_editor)
Famed Member Moderator
Joined: 3 years ago
 

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

Cool Response

purge-wranglerpurge-nvdaset-eGPU
2018 MacBook Pro 15" RP560X + RX 5700 XT (Mantiz Venus)


Flint Ironstag, barret, Daelin and 1 people liked
ReplyQuote
itsage
(@itsage)
Famed Member Admin
Joined: 3 years ago
 

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

Best ultrabooks for eGPU use | eGPU enclosure buying guide


ReplyQuote
senatorpops
(@senatorpops)
New Member
Joined: 2 years ago
 

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

Pending: Add my system information and expected eGPU configuration to my signature to give context to my posts


ReplyQuote
Koopa
(@koopa)
Active Member
Joined: 2 years ago
 

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 🙁

Pending: Add my system information and expected eGPU configuration to my signature to give context to my posts


ReplyQuote
mac_editor
(@mac_editor)
Famed Member Moderator
Joined: 3 years ago
 

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.

purge-wranglerpurge-nvdaset-eGPU
2018 MacBook Pro 15" RP560X + RX 5700 XT (Mantiz Venus)


Koopa and adjust80 liked
ReplyQuote
adjust80
(@adjust80)
Active Member
Joined: 3 years ago
 
Posted by: Koopa

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 🙁

i have the same problem here, even get rid off my nvida gtx 1070 for rx580, and now my egpu setup is sitting in the box ...........

Pending: Add my system information and expected eGPU configuration to my signature to give context to my posts


ReplyQuote
tbl777
(@tbl777)
Trusted Member
Joined: 2 years ago
 

I concur the same situation using akitio tb2 enclosure, what's wrong with this?

late-2013 15" MacBook Pro GT750M + RX580@16Gbps-TB2 (AKiTiO thunder 2) + macOS 10.13


ReplyQuote
tbl777
(@tbl777)
Trusted Member
Joined: 2 years ago
 

Thanks for your script! It worked good in the 10.13beta3.

Only one problem: exe script and reboot, the lightness adjustment of the internal screen is out of function....

late-2013 15" MacBook Pro GT750M + RX580@16Gbps-TB2 (AKiTiO thunder 2) + macOS 10.13


ReplyQuote
tbl777
(@tbl777)
Trusted Member
Joined: 2 years ago
 

mac_editor

Another glitch, after installed script, the power consumption of the Macbook(10.13beta4) always increased 10-watt than no-script, I tested with Istat(software) and plug power meter(hardware).

When I uninstalled the script, it backed normal instantly.

It over and over again with install and uninstall.

late-2013 15" MacBook Pro GT750M + RX580@16Gbps-TB2 (AKiTiO thunder 2) + macOS 10.13


ReplyQuote
mac_editor
(@mac_editor)
Famed Member Moderator
Joined: 3 years ago
 
Posted by: tbl777

mac_editor

Another glitch, after installed script, the power consumption of the Macbook(10.13beta4) always increased 10-watt than no-script, I tested with Istat(software) and plug power meter(hardware).

When I uninstalled the script, it backed normal instantly.

It over and over again with install and uninstall.

This is a known issue that can currently only be resolved by loading the NVIDIA drivers (or perhaps just one of those kexts). Doing so might interfere with external graphics - therefore I have not created a mechanism for this.

There is probably a way to tune down the NVIDIA processor by modifying its default maximum state in AGPM - but I'm not pursuing this at the moment as I am prioritizing to at least get eGPU functional on recent High Sierra builds.

purge-wranglerpurge-nvdaset-eGPU
2018 MacBook Pro 15" RP560X + RX 5700 XT (Mantiz Venus)


ReplyQuote
tbl777
(@tbl777)
Trusted Member
Joined: 2 years ago
 

I have just wrote a email to tcook about nvidia-model incompatible with eGPU based on amd RX580.

late-2013 15" MacBook Pro GT750M + RX580@16Gbps-TB2 (AKiTiO thunder 2) + macOS 10.13


PsyPryss and Rycco liked
ReplyQuote
 of  9