[SCRIPT] Accelerate All Applications On eGPU - macOS 10.13.4+  

Page 2 / 4 Prev Next
  RSS

eAlchemist
(@ealchemist)
Active Member
Joined: 6 months  ago
Posts: 17
July 1, 2018 3:15 pm  

This. Is. Awesome.

Will test FCP utilisation using an external Ultrafine 5k on a MacBook soon.
As it seems to utilise on an internal, an external Monitor (connected to the dGPU) should also work, right?

Very exiting. I'll report back.


mac_editor liked
ReplyQuote
Riss
 Riss
(@riss)
Active Member
Joined: 1 year  ago
Posts: 17
July 1, 2018 5:56 pm  

Tested successfully on Mac mini 2012 with Quadro P2000 and Capture One 10 and 11, Nvidia drivers 387.10.10.10.30.107 and macOS 10.13.5

I did a very quick&dirty testing and can confirm that the script indeed forces eGPU to do part of the OpenCL calculations and helps with rendering raw files during editing. My monitor is connected to eGPU. I tried without headless HDMI and with but haven't noticed any difference.

Unfortunately, but here I blame Phase One and their processing engine on macOS, exporting final pictures as .jpgs is still processed on CPU and not eGPU. When I tested my eGPU setup on Win10 exporting was offloaded to eGPU and nearly halved the time.

Still, this is a very good progress and really appreciate the effort! Will try next on MBP 15" mid 2014 with GT750M

mid 2014 MBP 15" GT750m | Mac mini 2012 | Akitio Thunder 2 | GTX 780 3GB (flashed) | Quadro P2000 (stock)


ReplyQuote
goalque
(@goalque)
Noble Member Admin
Joined: 2 years  ago
Posts: 1296

Chippy McChipset and avj liked
ReplyQuote
mac_editor
(@mac_editor)
Noble Member Moderator
Joined: 2 years  ago
Posts: 1472
July 1, 2018 7:39 pm  

@goalque Yea, saw the YT video. The GPUEjectPolicy can also be set via same command line technique.

purge-wrangler.shpurge-nvda.shset-eGPU.sh
----
Troubleshooting eGPUs on macOS
Command Line Swiss Knife
----
Multiple Build Guides


goalque liked
ReplyQuote
Magoon84
(@magoon84)
Eminent Member
Joined: 2 years  ago
Posts: 32
July 2, 2018 8:28 am  

Oh wow, this changes so much! 

I'm waiting for a long time to accelerate all apps by egpu on internal display of my MacBook Pro 13 (2016).

May anyone test if blender is working as well as some games like Starcraft 2 or Tomb Raider. 

That would be great. 

Thank you in advance.


ReplyQuote
ikir
 ikir
(@ikir)
Prominent Member
Joined: 2 years  ago
Posts: 753
July 2, 2018 9:55 am  
Posted by: Magoon84

Oh wow, this changes so much! 

I'm waiting for a long time to accelerate all apps by egpu on internal display of my MacBook Pro 13 (2016).

May anyone test if blender is working as well as some games like Starcraft 2 or Tomb Raider. 

That would be great. 

Thank you in advance.

This is great indeed, but sorry for asking, why you are not using an external display with a 13"? it is just the perfect setup, little and light to carry, big display at home/office. You will get better performance too. Check my personal setup video if you want an example.

eGPU.it | LG 34" 4K 34UC88 curved ultrawide display
MacBook Pro 2018 Touch Bar i7 quad-core 2.7Ghz - 16GB RAM - 512GB PCIe SSD --> my Mantiz Venus extreme mod with Sapphire Nitro+ RX Vega 64


ReplyQuote
eAlchemist
(@ealchemist)
Active Member
Joined: 6 months  ago
Posts: 17
July 2, 2018 10:06 am  

I shared my experience with this script and FCP here:

Posted by: eAlchemist

Experience using an LG 5k on a MacBook 15" 2017 (Monitor connected to dGPU 560 via TB3):

Good News: FCPX 10.4.3 (with the script activated) is utilising the eGPU for timeline and export, when working on the LG 5k.
Bad News: Performance is worse then just using the dGPU. Very low FPS, not smooth.

This is with 4k footage. I guess the bad performance is caused by a signal overhead, getting the render data to the egpu and simultaneously transfer it back to the MacBook and then to the LG 5k.

Though for exporting, this seems to be useful.
But even here my 7970 (eGPU) has very similar results then exporting via the dGPU: Around 44 Seconds for BruceX.
Having the Radeon in a Hackintosh I get around half the time.

Timeline Performance:
FPS are measured over the iStat FPS Parameter

eGPU:
Internal: ~10FPS
LG 5k: ~6FPS
Ext. Monitor via eGPU: ~55FPS

dGPU:
~55FPS in every scenario

What the Bottleneck

I'm not sure if even a Vega64 would be a fluid solution here, as the loss in performance is so major.
The only usable solution with FCP still seems to be connecting a monitor directly to the eGPU to get usable performance.
Which excludes the internal monitor and the LG 5k.

The only other solution (for internal Monitor and TB3 Displays) would be, that FCP changes the way it utilises eGPUs, as i.e. Davinci Resolve does.
Right?


ReplyQuote
Chippy McChipset
(@chippy-mcchipset)
Reputable Member
Joined: 1 year  ago
Posts: 295
July 2, 2018 10:01 pm  

This is going to be very useful for many people while they wait for developers to build eGPU "skills" into their apps.

Do I understand correctly that after the first installation, on subsequent computer sessions we have to run the 'set-eGPU' terminal command each time? That is, every time you restart or shut-down and power up, the system will revert back to its non-eGPU-friendly defaults for apps?


ReplyQuote
mac_editor
(@mac_editor)
Noble Member Moderator
Joined: 2 years  ago
Posts: 1472
July 2, 2018 10:03 pm  

No. The setting should be permanent until you disable it using the script, since its writing to plist files.

purge-wrangler.shpurge-nvda.shset-eGPU.sh
----
Troubleshooting eGPUs on macOS
Command Line Swiss Knife
----
Multiple Build Guides


ReplyQuote
Chippy McChipset
(@chippy-mcchipset)
Reputable Member
Joined: 1 year  ago
Posts: 295
July 2, 2018 10:03 pm  
Posted by: mac_editor

No. The setting should be permanent until you disable it using the script, since its writing to plist files.

OK thanks for clearing that up. And for your great efforts here, obviously.


mac_editor liked
ReplyQuote
mac_editor
(@mac_editor)
Noble Member Moderator
Joined: 2 years  ago
Posts: 1472
July 2, 2018 10:40 pm  

I am very interested to see how the GPU preference settings affect apps in Mojave once the issues are resolved in the beta - because  the mechanism is very different than on HS. Also, script v1.1.0 is out with improvements. No need to type in the exact app name anymore, can use acronym like FCP (script will find closest possibilities and provide a list - tho this is obviously much slower than typing exact name - but a great fallback if display name != real app name: ex. Rocket League).

purge-wrangler.shpurge-nvda.shset-eGPU.sh
----
Troubleshooting eGPUs on macOS
Command Line Swiss Knife
----
Multiple Build Guides


ReplyQuote
nando4
(@nando4)
Noble Member Admin
Joined: 2 years  ago
Posts: 1802
July 3, 2018 7:27 am  

@mac_editor,  was excited by your finding including your previous comments on how to eGPU accelerate apps under Mojave.  This would have also been huge news in the Hackintosh community if it worked.

Though no success so far.  Using your method,  I was unable to get FCPX to be eGPU accelerated. Nor did Valley/Heaven accelerate if launched from the iGPU-attached LCD as has been reported here.

Only difference is my RX580 reports as discrete (PCIe not Thunderbolt) device, plus it's not "removable".  The reports here have been mostly with Nvidia TB eGPUs.

If you have any suggestions, please advise. I was however able to get FCPX acceleration by booting up with the eGPU as the primary video device, with iGPU disabled. So only one LCD active there.

eGPU Setup 1.35    •    eGPU Port Bandwidth Reference Table    •    Several builds
2015 15" Dell Precision 7510 M1000M + macOS 10.14 & Win10


ReplyQuote
mac_editor
(@mac_editor)
Noble Member Moderator
Joined: 2 years  ago
Posts: 1472
July 3, 2018 8:32 am  

@nando4 thank you for giving it a shot. So if you’re testing on Mojave, it’ll likely crash the app as the underlying setting itself is buggy. On High Sierra, for OpenGL stuff, you’ll need a headless adapter attached to the egpu. Might help with other apps too. Sadly I cannot test AMD eGPU at the moment, but the commands are intended to be display or GPU agnostic. It should not matter what the GPU is seen as (removable or discrete). Though if you are using the config as described in your signature, I cannot say how the system is handling stuff underneath (would assume tho, it’s really identical to Mac thanks to Clover). 9to5Mac got FCP acceleration on AMD eGPU. 

In my testing, I was able to get metal games running with headless adapter/non-primary external display, and FCP worked directly. Some games, such as Rocket League, don’t really take advantage of an NVIDIA eGPU regardless of how they’re set up on macOS (got poor perf even on external display).

purge-wrangler.shpurge-nvda.shset-eGPU.sh
----
Troubleshooting eGPUs on macOS
Command Line Swiss Knife
----
Multiple Build Guides


nando4 liked
ReplyQuote
Magoon84
(@magoon84)
Eminent Member
Joined: 2 years  ago
Posts: 32
July 3, 2018 3:25 pm  

Hi ikir,

of course you can ask. I work a lot on trips and also gaming is more on the go. So I would love to use FCP as well as playing Blizzard games on my internal display. Also I like Mac OS more than Win 10, which I really only use for gaming. 

Therefore It would be great to know how the performance is with Starcraft 2, X-Com .... as well as Blender under Mac OS with internal display. 

I'm thinking about to buy the RX 580 Gaming box as it is powerful but also very compact. 


ReplyQuote
Eightarmedpet
(@eightarmedpet)
Noble Member
Joined: 2 years  ago
Posts: 1006

ReplyQuote
nando4
(@nando4)
Noble Member Admin
Joined: 2 years  ago
Posts: 1802
July 4, 2018 10:33 pm  

@eightarmedpet , neither of us are seeing apps being eGPU accelerated using this method on our AMD eGPUs.

You with a [email protected], me with a [email protected]

This looks to be working only with Nvidia eGPUs.  A big win for the green team.

Hope Apple/AMD enable their drivers for this functionality.

eGPU Setup 1.35    •    eGPU Port Bandwidth Reference Table    •    Several builds
2015 15" Dell Precision 7510 M1000M + macOS 10.14 & Win10


ReplyQuote
detunedradios
(@detunedradios)
Trusted Member
Joined: 10 months  ago
Posts: 59
July 4, 2018 10:48 pm  
Posted by: nando4

@eightarmedpet , neither of us are seeing apps being eGPU accelerated using this method on our AMD eGPUs.

You with a [email protected], me with a [email protected]

This looks to be working only with Nvidia eGPUs.  A big win for the green team.

Hope Apple/AMD enable their drivers for this functionality.

I had this work perfectly fine on my RX 580 for FCPX, at least. Haven't tried other apps yet.

2016 15" MacBook Pro - 2.7GHz Core i7, Radeon Pro 460 4GB, 1TB SSD
Sonnet Breakaway Box 350, modded with 650W PSU, with Radeon RX Vega 64


nando4 liked
ReplyQuote
dre
 dre
(@dre)
Active Member
Joined: 8 months  ago
Posts: 19
July 5, 2018 12:19 am  
Posted by: nando4

@eightarmedpet , neither of us are seeing apps being eGPU accelerated using this method on our AMD eGPUs.

You with a [email protected], me with a [email protected]

This looks to be working only with Nvidia eGPUs.  A big win for the green team.

Hope Apple/AMD enable their drivers for this functionality.

?? Works with my Vega 64 just a lot slower in FCPX 10.4.3 than it did nativity in 10.3.4 but faster in 10.4.x than before the script. See my previous posts 

FCPX 10.3.4 doesn’t require a script to use an egpu to render, see the post mentioned earlier relating to FCPX 10.4.x and egpu rendering. 


ReplyQuote
Eightarmedpet
(@eightarmedpet)
Noble Member
Joined: 2 years  ago
Posts: 1006
July 5, 2018 6:12 am  

@nando4 aye, it's very odd that others have had luck with AMD cards. If my version of FCP is meant to use eGPU's then I'd say it looks like the script made it worse - in fact the whole system felt laggy (as if my boot drive was full) so have reinstalled macOS. I also had issues with DaVinci resolve even launching with this script but that may be unrelated (it's the public beta of 15).

I'm on 10.13.5.

What could be the common factors for success/failure?

2017 13" MacBook Pro Touchbar + [email protected] (AKiTiO Thunder3) + Win10
2017 13" MacBook Pro Touch Bar + [email protected] (Sonnet Breakaway Box) + Win10

2017 13" MacBook Pro Touch Bar + GTX1070 (debating 2070 upgrade) @32Gbps-TB3 (Razer Core V1) + Win10
---
LG 5K Ultrafine flickering issue fix


ReplyQuote
dre
 dre
(@dre)
Active Member
Joined: 8 months  ago
Posts: 19
July 5, 2018 6:22 am  

Why use the script at all with Davinci? It utilises the egpu for rendering whereas FCPX 10.4.x doesn’t, hence needing to use/try the script 

FCPX 10.3.4 works fine, you don’t need to force it to use an egpu to render.


ReplyQuote
Eightarmedpet
(@eightarmedpet)
Noble Member
Joined: 2 years  ago
Posts: 1006
July 5, 2018 6:32 am  

Yep, I'm aware of that, which is why I'm shifting my workflow to DaVinci, I only tried it to see how it behaved. My main goal was getting games to run on my eGPU but I tested my work tools too as needed both, sadly ended up with none!

(and for those who've seen me post about error 12 before, still getting it after every step (apart from apple_set_os/refind - which I will be trying next) on every TB3 port.

Getting frustrated with Apple not playing their cards - new Mac Pro/Mini/Monitor using TB3 might mean software updates to get round a lot of these problems, but thats prob wishful thinking.

2017 13" MacBook Pro Touchbar + [email protected] (AKiTiO Thunder3) + Win10
2017 13" MacBook Pro Touch Bar + [email protected] (Sonnet Breakaway Box) + Win10

2017 13" MacBook Pro Touch Bar + GTX1070 (debating 2070 upgrade) @32Gbps-TB3 (Razer Core V1) + Win10
---
LG 5K Ultrafine flickering issue fix


ReplyQuote
eAlchemist
(@ealchemist)
Active Member
Joined: 6 months  ago
Posts: 17
July 5, 2018 11:03 am  
Posted by: dre

FCPX 10.3.4 works fine, you don’t need to force it to use an egpu to render.

You do if you want to utilise the eGPU for Timeline when working in an internal or TB3 Display. But performance is very bad / worse then dGPU for now..


ReplyQuote
Jeroenvankeulen
(@jeroen-van-keulen)
Trusted Member
Joined: 11 months  ago
Posts: 78
July 6, 2018 6:26 pm  

ALLn1 Installer 10.13.4 > 10.14 beta latest release


What does it do?
This little app let's you install all  @mac_editor scripts without using terminal in depth.

  1. It installs the scripts like it would when using terminal commands
  2. Places ALLn1 enabler in the folder Programs
  3. Deletes PW cTB enabler 2.0 (if it is in applications folder)


Instructions for ALL
n1 Installer:

!!!Make sure SIP is disabled!!!

Edit: if on 10.14 b, reboot after installing twice.

  1. Download ALLn1.dmg
  2. Mount ALLn1.dmg by clicking the icon
  3. Open ALLn1 Installer
  4. Select the script you want to install
  5. Wait a moment, you will be asked your password.
  6. type your password (script is being installed)
  7. In the background ALLn1 is placed in Programs folder.

After your first patch you can easily acces your installed scripts by just opening ALLn1 from you Program folder.

Scripts will auto update like normal.

Download

UPDATE:
Installer will automatically contain the latest release.

ALLn1
MBP11,4, i7-4980HQ, 256gb SSD, 16gbRAM Mojave (Sonnet Breakaway box 350 + Gigabyte Radeon RX 580 Gaming 8GB)
MacBook7,1 A1342, P8600 120gb SSD 4gbRAM. Mojave (Hiking/Camping)
iMac7,1 A1224, T9500 CPU upgrade 120gb SSD 4gbRAM. HS
Mac mini3,1 P7350, 250gb SSD 8gbRAM. HS (server) iPhone10,3 64gb. iOS12 iPad5,3, 16gb. iOS12 iPod shuffle 2nd gen. 2gb
GeekBench


ReplyQuote
jonwatso
(@jonwatso)
Trusted Member
Joined: 2 years  ago
Posts: 69
July 9, 2018 8:40 am  

@mac_editor Thank you so much for this wonderful little tool. It has worked wonders on my setup and fixes a major annoyance which is accidentally opening the app on an Internal screen before moving it to the external and therefore missing out on eGPU acceleration. 

I tested this with valley and found it worked great with the obvious performance hit. The biggest improvement however is that Lightroom can finally see my RX480 and therefor be accelerated by it. 

2017 15" MacBook Pro RP560 i7 3.1Ghz - 16GB RAM
Akitio Node + Sapphire RX480 8GB (Reference Card)
Dell 4K DELL P2715Q Display


ReplyQuote
Wesley
(@wesley)
Active Member
Joined: 7 months  ago
Posts: 19
July 10, 2018 4:51 am  

I tried this hoping it could get Photoshop to stop activating the dGPU when I have eGPU but no dice. Is there a way for some apps to not activate it?

Late 2011 15" MBP - Gigabyte RX 580 Gaming Box - 10.13.4


ReplyQuote
kingbri
(@kingbri)
Eminent Member
Joined: 6 months  ago
Posts: 39
July 10, 2018 9:59 pm  

@mac_editor, I installed this patch and have my egpu connected. Do I have to set my default display to the "external" monitor that I have plugged in or can I use the internal display?


ReplyQuote
Chippy McChipset
(@chippy-mcchipset)
Reputable Member
Joined: 1 year  ago
Posts: 295
July 12, 2018 4:25 pm  

@mac_editor
OK to run this script on 10.13.6, after @goalque 's new 1.0.4 hybrid solution is installed?


ReplyQuote
mac_editor
(@mac_editor)
Noble Member Moderator
Joined: 2 years  ago
Posts: 1472

ReplyQuote
Chippy McChipset
(@chippy-mcchipset)
Reputable Member
Joined: 1 year  ago
Posts: 295
July 12, 2018 4:38 pm  
Posted by: mac_editor

@chippy-mcchipset Yep, should not be a problem.

Thanks, will test both and report back.


mac_editor liked
ReplyQuote
Chippy McChipset
(@chippy-mcchipset)
Reputable Member
Joined: 1 year  ago
Posts: 295
July 13, 2018 3:20 pm  

Ran script to set preference for All. Seemed to work OK. Quit out of Terminal and restarted into AMD dGPU Hybrid mode. Worked so far. Any apps besides FCP / Resolve / Adobe you guys have tested successfully that showed improvement vs. dGPU default?


ReplyQuote
P-Mac
(@p-mac)
Trusted Member
Joined: 2 years  ago
Posts: 54
July 13, 2018 10:57 pm  

Has anyone figured out the app name / bundle to get Compressor to prefer the eGPU? I use it for exporting FCP projects / transcoding ProRes masters and it'd be nice to get the eGPU to accelerate this as well.

I've used the script on "Compressor" but I think the encoding is taken care of by a different daemon (compressord?) but I can't figure out where compressord is, and searching for compressord in the script comes up with no results.

2016 15" MacBook Pro RP460 + RX Vega64 @32Gbps-TB32 (Asus XG Station 2) + macOS10.13.4
---
AG241QX 1440p 144hz FreeSync // Logitech G602 / SteelSeries QcK+ & Drevo Gramr TKL, Blues // Scarlett 2i4 + JBL Linear Spatial Reference 305's


nanoBit liked
ReplyQuote
mac_editor
(@mac_editor)
Noble Member Moderator
Joined: 2 years  ago
Posts: 1472
July 20, 2018 9:47 pm  

In the latest macOS Mojave beta (4, or maybe earlier beta - didn't check those), information about setting the eGPU preference is gone, glad I found those when they were visible in the command line tool (phew). Still works.

purge-wrangler.shpurge-nvda.shset-eGPU.sh
----
Troubleshooting eGPUs on macOS
Command Line Swiss Knife
----
Multiple Build Guides


ReplyQuote
damonhayhow
(@damonhayhow)
Eminent Member
Joined: 2 years  ago
Posts: 22
July 21, 2018 5:35 am  

This works spectacularly in High Sierra on new 2018 MBP 15". Bruce X test on FCPX gets:

  • 1min 21secs on the Intel 630
  • 39secs on the internal Radeon 560X 
  • 20secs with RX580 eGPU

HOWEVER, it has TWICE caused total graphics failure under Mojave Beta 4! As in, the eGPU works, then fails to be recognised at all, then other external displays fail to connect and finally the internal graphics switching and even internal display brightness controls are lost. Resetting NVRAM and SMC do not help and only a full system erase and restore back to High Sierra solves the problem. Even then the eGPU is not recognised until performing a reboot with the eGPU attached.

On my 2016 13" MBP there is no problem at all. Potentially this problem has nothing to do with Set-eGPU? But in my last test, it was after running set-egpu that I lost all graphics card and external display recognition. 

If anyone has any idea why this would be, and why Mojave would initially work and then permanently break, please let me know? Its clearly a software issue.

but it’s interesting what you say about Mojave not having information about setting the gpu preference. Do you mean the setting is no longer in the plist files? Or does Mojave no longer use a gpu preference model on an app level?

2018 15" Macbook Pro I7 2.6 Ghz / 16Gb / 512 Gb / 560X. 2x LG Ultrafine 4K displays. Razer Core V2 eGPU, Radeon RX580, Sunnix UPD2018 Displayport adapter.


mac_editor liked
ReplyQuote
mac_editor
(@mac_editor)
Noble Member Moderator
Joined: 2 years  ago
Posts: 1472
July 21, 2018 5:38 am  

@damonhayhow Not set-eGPU itself - likely the Apple-end with respect to eGPU preference in Mojave causing the issues. SafeEjectGPU ResetPrefs (Option #4) should solve the problem tho. Mojave mechanism itself buggy.

purge-wrangler.shpurge-nvda.shset-eGPU.sh
----
Troubleshooting eGPUs on macOS
Command Line Swiss Knife
----
Multiple Build Guides


ReplyQuote
damonhayhow
(@damonhayhow)
Eminent Member
Joined: 2 years  ago
Posts: 22
July 22, 2018 12:51 am  

Thanks @mac_editor.  But I tried that too, several times, and it did nothing.

now I’m more convinced that set-egpu did cause the problem with the new 15” mbp under Mojave. Or should I say, Mojave caused the problem with set-egpu. 

When neither the egpu or external display was working, the external display could still play sound and the USB ports still connected devices through to the mbp. External displays are always powered by the internal discrete gpu, which the system could no longer see or use. And the absence of display brightness control, and failure of the touchbar brightness controls suggests the system even had issues communicating with the integrated gpu. 

Given that set-egpu simply tells the os which gpu to use (prefer) with an app, and the only problem I had was the system did not know which gpu to use, it suggests that caused the glitch. But it’s bizarre it wasn’t fixed by resetting set-egpu, safeejectegpu, reset nvram or smc; and even erasing the disk and reinstalling still didn’t recognise plugging in an egpu!

2018 15" Macbook Pro I7 2.6 Ghz / 16Gb / 512 Gb / 560X. 2x LG Ultrafine 4K displays. Razer Core V2 eGPU, Radeon RX580, Sunnix UPD2018 Displayport adapter.


ReplyQuote
mac_editor
(@mac_editor)
Noble Member Moderator
Joined: 2 years  ago
Posts: 1472
July 22, 2018 7:21 am  

@damonhayhow Gotcha. Did you set all apps to use eGPU or selected by app? Maybe doing the former on Mojave is causing issues. Perks of a beta I suppose. Surprised to hear issues with eGPU not working after resetting/clean install. Would be best to state your setup in your signature 😉

The script just makes it easy to call the OS's built-in features to change GPUs - doesn't add its own functionality or anything.

purge-wrangler.shpurge-nvda.shset-eGPU.sh
----
Troubleshooting eGPUs on macOS
Command Line Swiss Knife
----
Multiple Build Guides


ReplyQuote
Page 2 / 4 Prev Next