[SCRIPT] PurgeWrangler: AMD + NVIDIA eGPUs for all Thunderbolt Macs
 
Notifications
Clear all

[Solved] [SCRIPT] PurgeWrangler: AMD + NVIDIA eGPUs for all Thunderbolt Macs  

 of  165
  RSS

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

A solid update to the script will be coming soon which will include the patch for NVIDIA eGPUs for all TB macs (credits @goalque + @fr34k). Other notable improvements will be:

  • Menu-driven instead of command args (they can still be used to bypass menu - allowing easy integration with other scripts)
  • Better macOS version checking
  • Binary installer (potential)

 

@fr34k’s upcoming eGPU script will cover/integrate all functionality of this script as well - making it a one-stop-solution for eGPUs on macOS.

Meanwhile, we are in the process of investigating hot-unplug crashes with NVIDIA eGPUs, black screens, and lack of OpenCL compute on NVIDIA eGPU on Macs with discrete NVIDIA GPUs. 

Just wanted to let y’all know what we’re up to 😉

purge-wranglertbt-flashpurge-nvdaset-eGPU
Insights Into macOS Video Editing Performance

Master Threads:
2014 15-inch MacBook Pro 750M
2018 15-inch MacBook Pro

 
2019 13" MacBook Pro [8th,4C,U] + RX Vega 64 @ 32Gbps-TB3 (Mantiz Venus) + macOS 10.14.6 & Win10 [build link]  


fr34k, goalque, PsyPryss and 2 people liked
ReplyQuote
itsage
(@itsage)
Illustrious Member Admin
Joined: 4 years ago
 

I've been testing with four Macs covering all three Thunderbolt generations. There's work left to do but the new workaround is functional. Thanks to @goalque and @fr34k we'll have an all-in-one installer soon. To put it in perspective, my trashcan could use exactly zero eGPU in 10.13.4 according to Apple. After running this installer, I can hot plug either an AMD or Nvidia graphics card to use in eGPU mode. The list of compatible cards is too long to show. Isn't that a nice problem? 😀

Here are a few screen shots from 2011 17" MacBook Pro, 2013 Mac Pro, 2015 11" MacBook Air, 2016 15" MacBook Pro. The eGPUs were GTX 980 Ti, GTX 1080, and R9 Fury X.

external graphics card builds
best laptops for external GPU
eGPU enclosure buyer's guide

 
2020 13" MacBook Pro [10th,4C,G] + RX 5700 @ 32Gbps-TB3 (Prototype eGPU Enclosure) + macOS 10.15.4 & Win10 1903 [build link]  


Harry M, Jeroenvankeulen, devild and 3 people liked
ReplyQuote
rubdub
(@rubdub)
Active Member
Joined: 2 years ago
 
Posted by: Blaine Miller
Posted by: rubdub

@mac_editor 
More data testing: Smile
I bought a RX570 just to test this:
Clean install of 10.13.4 + purge_wrangler(2.0.2) and no modifications to the kext (RX570 natively supported), same mysterious crash while asleep overnight when the egpu is connected.
I guess it's good to see I'm not the only one with the sleep issues (silently going crazy). What I find strange is that it does actually go to sleep successfully, for a significant amount of time ~1hr. It's only then that the system tries to do something and the crash occurs. In the past when I was debugging, I did try to change the energy saver settings to attempt at preventing whatever processes caused the longer term sleep issue (Perhaps powernap, or wake for wifi). I think I might revisit this. I also thought that perhaps my dGPU was causing issues but again, if the system is asleep, nothing should be happening. Any suggestions for finding crash/diagnostic logs?

---------------------------------
Edit
: I suspect the sleep issues may have something to do with sleep/standby transitions.  https://support.apple.com/en-us/HT202124 I know it says the macbook shouldn't try to enter standby when TB/usb devices are connected, but there are a few options we have to play with pmset.  "man pmset" gives some insight into what aspects of sleep/standby we can control. Overview of pmset options:  https://www.dssw.co.uk/reference/pmset.html  
"pmset -g" gives the current pmset settings. Interesting to note:

---------------------------------
standbydelay
 specifies the delay, in seconds, before writing the hibernation image to disk and powering off memory for Standby.
For me it's 10800 which corresponds to 3hours. (within my crash time window)

autopoweroff is enabled by default on supported platforms as an implementation of Lot 6 to the European Energy-related Products Directive. After sleeping for <autopoweroffdelay> seconds, the system will write a hibernation image and go into a lower power chipset sleep. Wakeups from this state will take longer than wakeups from regular sleep. 
For me this is 28800 which is 8 hours (outside of my crash time window, had a crash within 6hrs last night)

Well thanks to your references I came up with a solution that is probably excessive but based on the reading I did it looks like because we are using thunderbolt and I'm using usb storage my computer should not be going into hibernation and or standby. so I found something that is working well granted it makes my MacBook work like a desktop without a UPS but I'm ok with that for my use case since I leave it at my desk 95% of the time.

Running these in Terminal on macOS may solve your issue but may also consume more power, and prevent state saves if sleeping for prolonged time(maintaining which apps were open and what they were open too).

sudo pmset -a autopoweroff 0
sudo pmset -a standby 0
sudo pmset -a hibernatemode 0 **See Edit 2**


I have only been able to test for 15 minutes so your results may vary.

Edit 1:
Mac slept for almost 4 hours without issues and woke up just fine from a remote desktop call.

Edit 2:
Leaving hibernatemode at 3 (default) seems to be ok will test it overnight and half way through the day tomorrow for better testing. I initially thought using hibernatemode 25(strict hibernation) didn't work as the whole mac turned off essentially and I wasn't able to wake it up for use with remote desktop. However, I got home and pressed the space bar thinking it won't wake up, I was pleasantly surprised that it woke up and resumed where I left my mac before I turned it off, albeit, there was about 8 notifications saying my external flash drives were unmounted improperly (makes sense as hibernation/standby with external devices connected is "unsupported") This should help potentially recover most of the state if the battery doesn't die in a MacBook and the Mac doesn't loose power(normal behavior for the most part).

Great to see your results. I was optimistic, but unfortunately no luck here. I used the same pmset values but suffered the usual kernel panic overnight with my rx570 and rx460.

MBP mid 2015 15" w/AMD R9 M370X 10.13.4
Working on Mantiz + RX460 -> Apple TB3/TB2 -> Apple TB2 -> MBP


ReplyQuote
techyowl
(@techyowl)
Eminent Member
Joined: 3 years ago
 
Posted by: rubdub
Posted by: Blaine Miller
Posted by: rubdub

@mac_editor 
More data testing: Smile
I bought a RX570 just to test this:
Clean install of 10.13.4 + purge_wrangler(2.0.2) and no modifications to the kext (RX570 natively supported), same mysterious crash while asleep overnight when the egpu is connected.
I guess it's good to see I'm not the only one with the sleep issues (silently going crazy). What I find strange is that it does actually go to sleep successfully, for a significant amount of time ~1hr. It's only then that the system tries to do something and the crash occurs. In the past when I was debugging, I did try to change the energy saver settings to attempt at preventing whatever processes caused the longer term sleep issue (Perhaps powernap, or wake for wifi). I think I might revisit this. I also thought that perhaps my dGPU was causing issues but again, if the system is asleep, nothing should be happening. Any suggestions for finding crash/diagnostic logs?

---------------------------------
Edit
: I suspect the sleep issues may have something to do with sleep/standby transitions.  https://support.apple.com/en-us/HT202124 I know it says the macbook shouldn't try to enter standby when TB/usb devices are connected, but there are a few options we have to play with pmset.  "man pmset" gives some insight into what aspects of sleep/standby we can control. Overview of pmset options:  https://www.dssw.co.uk/reference/pmset.html  
"pmset -g" gives the current pmset settings. Interesting to note:

---------------------------------
standbydelay
 specifies the delay, in seconds, before writing the hibernation image to disk and powering off memory for Standby.
For me it's 10800 which corresponds to 3hours. (within my crash time window)

autopoweroff is enabled by default on supported platforms as an implementation of Lot 6 to the European Energy-related Products Directive. After sleeping for <autopoweroffdelay> seconds, the system will write a hibernation image and go into a lower power chipset sleep. Wakeups from this state will take longer than wakeups from regular sleep. 
For me this is 28800 which is 8 hours (outside of my crash time window, had a crash within 6hrs last night)

Well thanks to your references I came up with a solution that is probably excessive but based on the reading I did it looks like because we are using thunderbolt and I'm using usb storage my computer should not be going into hibernation and or standby. so I found something that is working well granted it makes my MacBook work like a desktop without a UPS but I'm ok with that for my use case since I leave it at my desk 95% of the time.

Running these in Terminal on macOS may solve your issue but may also consume more power, and prevent state saves if sleeping for prolonged time(maintaining which apps were open and what they were open too).

sudo pmset -a autopoweroff 0
sudo pmset -a standby 0
sudo pmset -a hibernatemode 0 **See Edit 2**


I have only been able to test for 15 minutes so your results may vary.

Edit 1:
Mac slept for almost 4 hours without issues and woke up just fine from a remote desktop call.

Edit 2:
Leaving hibernatemode at 3 (default) seems to be ok will test it overnight and half way through the day tomorrow for better testing. I initially thought using hibernatemode 25(strict hibernation) didn't work as the whole mac turned off essentially and I wasn't able to wake it up for use with remote desktop. However, I got home and pressed the space bar thinking it won't wake up, I was pleasantly surprised that it woke up and resumed where I left my mac before I turned it off, albeit, there was about 8 notifications saying my external flash drives were unmounted improperly (makes sense as hibernation/standby with external devices connected is "unsupported") This should help potentially recover most of the state if the battery doesn't die in a MacBook and the Mac doesn't loose power(normal behavior for the most part).

Great to see your results. I was optimistic, but unfortunately no luck here. I used the same pmset values but suffered the usual kernel panic overnight with my rx570 and rx460.

Changing hibernation mode to 0 is apparently needed see Edit 3 on my post

early-2015 13" MBP Retina + RX580@16Gbps-TB2 (AKiTiO Node via TB3->TB2 adapter)


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

eGPU detected but not used.

Hi, Thank you for this effort, for the first time my eGPU Nvidia GTX 950 was detected in the system report.

I have a  MBp mid-2012 15" non  retina. and i m running high sierra 10.13.4

After following the steps above  i see 3 cards , the intel 4000 card, the nvidia 650m , and the eGPU NVIDIA eVGA GTX 950

the external and internal monitors none of them uses the eGPU although i see the eGPU in the system report.

How can i fix this please ?

To do: Create my signature with system and expected eGPU configuration information to give context to my posts. I have no builds.

.

ReplyQuote
Victorcan
(@victorcan)
Active Member
Joined: 2 years ago
 

Im running a 10 core Mac Pro Trashcan with 32 gigs of ram dual d300 system and have successfully run this script 3 times now, however the reason for 3 installs of OS X 10.13.4 is my system for some reason ceases to boot and just gets stuck at the apple loader screen? It won't boot with the eGPU cards at all and I have to plug in the HDMI cable just to see that its crashing or freezing before booting into OS X ? I am using a sonnet breakaway box with an Vega 64. Problems started after installing my adobe creative suite, gonna try not installing this time to see if it survives but very frustrating as the script seems to work flawlessly and is so easy to get installed..  Any ideas or has anyone else experianced CS issues? I mean CS is extremely laggy and seems to be a regular problem for some? But just curious if anyones had this issue or similar ?

To do: Create my signature with system and expected eGPU configuration information to give context to my posts. I have no builds.

.

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

Im running a 10 core Mac Pro Trashcan with 32 gigs of ram dual d300 system and have successfully run this script 3 times now, however the reason for 3 installs of OS X 10.13.4 is my system for some reason ceases to boot and just gets stuck at the apple loader screen? It won't boot with the eGPU cards at all and I have to plug in the HDMI cable just to see that its crashing or freezing before booting into OS X ? I am using a sonnet breakaway box with an Vega 64. Problems started after installing my adobe creative suite, gonna try not installing this time to see if it survives but very frustrating as the script seems to work flawlessly and is so easy to get installed..  Any ideas or has anyone else experianced CS issues? I mean CS is extremely laggy and seems to be a regular problem for some? But just curious if anyones had this issue or similar ?

There is a recovery option in the script which might help in case you can't boot (no need to reinstall OS every time). Please see the troubleshooting section for that. @itsage has had tremendous success with multiple eGPUs on the nMP. Best to test on a separate clean install first to remove other variables.

purge-wranglertbt-flashpurge-nvdaset-eGPU
Insights Into macOS Video Editing Performance

Master Threads:
2014 15-inch MacBook Pro 750M
2018 15-inch MacBook Pro

 
2019 13" MacBook Pro [8th,4C,U] + RX Vega 64 @ 32Gbps-TB3 (Mantiz Venus) + macOS 10.14.6 & Win10 [build link]  


artik liked
ReplyQuote
mac_editor
(@mac_editor)
Famed Member Moderator
Joined: 3 years ago
 
Posted by: Khalid Halba

eGPU detected but not used.

Hi, Thank you for this effort, for the first time my eGPU Nvidia GTX 950 was detected in the system report.

I have a  MBp mid-2012 15" non  retina. and i m running high sierra 10.13.4

After following the steps above  i see 3 cards , the intel 4000 card, the nvidia 650m , and the eGPU NVIDIA eVGA GTX 950

the external and internal monitors none of them uses the eGPU although i see the eGPU in the system report.

How can i fix this please ?

NVIDIA workaround not out yet. Temporary workaround available - and is mentioned in OP. Please check that.

purge-wranglertbt-flashpurge-nvdaset-eGPU
Insights Into macOS Video Editing Performance

Master Threads:
2014 15-inch MacBook Pro 750M
2018 15-inch MacBook Pro

 
2019 13" MacBook Pro [8th,4C,U] + RX Vega 64 @ 32Gbps-TB3 (Mantiz Venus) + macOS 10.14.6 & Win10 [build link]  


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

Hi,

Thank you @mac_editor for your reply. 

where can I find the OP ?. and will it allow me to use my eGPU ?.

sorry I m a newbie here.

To do: Create my signature with system and expected eGPU configuration information to give context to my posts. I have no builds.

.

ReplyQuote
itsage
(@itsage)
Illustrious Member Admin
Joined: 4 years ago
 

@victorcan Make sure you use the two bottom Thunderbolt ports. These two ports share the same Bus 0 with the HDMI port. We found them to be more eGPU-friendly and allow boot with eGPU attached.

@khalid_halba Either select #1 the page drop-down or click macOS 10.13.4 ≥ TB1/2 eGPU Enabler under Software in the Top Menu.

external graphics card builds
best laptops for external GPU
eGPU enclosure buyer's guide

 
2020 13" MacBook Pro [10th,4C,G] + RX 5700 @ 32Gbps-TB3 (Prototype eGPU Enclosure) + macOS 10.15.4 & Win10 1903 [build link]  


ReplyQuote
 of  165