[SCRIPT] fr34k's macOS-eGPU.sh - one script, all solutions, fully automated  

Page 1 / 20 Next
  RSS

fr34k
(@fr34k)
Reputable Member Moderator
Joined: 9 months  ago
Posts: 386
May 4, 2018 7:23 pm  

macOS-eGPU.sh

Make your Mac compatible with NVIDIA and AMD eGPUs. Works on macOS High Sierra.

Since my time has become extremely limited I've decided to switch all info over to GitHub. This way I only need to update texts once. Please follow the following link:

macOS-eGPU.sh @ GitHub


Parameters @ GitHub | Problems and Tweaks @ GitHub | Changelog @ GitHub


Creator Notices

--iopcieTunneledPatch | -l
IOGraphicsFamily Patch © egpu.io [goalque]
AppleGPUWrangler Discrete Patch © egpu.io [goalque]

--unlockNvidia | -N
AppleGPUWrangler Removable 10.13.4 and 10.13.5 Patch © egpu.io [goalque, fr34k]


Unknown Issues

If you’ve got a problem then try the tweaks first.

If nothing works open an issue on GitHub or ask in this thread.
 
BUT please include the output of the script when executing, as well as as much information about the issue as possible:


macos-egpu -C


or bash <(curl -s https://raw.githubusercontent.com/learex/macOS-eGPU/master/macOS-eGPU.sh) -C


Donate

You think it's amazing what we did? Then just say thanks.

paypal (@fr34k)

macOS-eGPU.sh on GitHub (fr34k's macOS-eGPU.sh on eGPU.io)
----
2016 15'' MacBook Pro + GTX1080Ti@32Gbps-TB3 (Sonnet Breakaway 550) + macOS 10.13.6 (17G65 driver: 378.10.10.10.30.107 + CUDA: 396.148)


Hayakawa Eiji, Vaspo, mintroini and 20 people liked
ReplyQuote
ozzy
 ozzy
(@ozzy)
Trusted Member
Joined: 1 year  ago
Posts: 72
May 4, 2018 8:11 pm  

Installing 10.3.4 as we speak. Will let you know the results on my end!

MBP 15" 2012 Retina with nVidia 650m, TB1, Akitio Node, and GTX 1070

2012 15" Macbook Pro Retina GT650M + GTX1070@10Gbps-TB1 (AKiTiO Node via TB3->TB2 adapter) + macOS10.13 & Win10


ReplyQuote
philw
(@philw)
Trusted Member
Joined: 1 year  ago
Posts: 60
May 4, 2018 8:21 pm  

Excellent work 🙂

Might I be ok installing on my MBP Mid 2014 after having removed the temporary 10.13.4 solution with its own uninstall facility?


ReplyQuote
itaki
(@itaki)
New Member
Joined: 10 months  ago
Posts: 3
May 4, 2018 8:28 pm  

What's the best way of removing all prior eGPU solutions?

Would it be this command?

bash <(curl -s  https://raw.githubusercontent.com/learex/macOS-eGPU/master/macOS-eGPU.sh)  --uninstall


ReplyQuote
fr34k
(@fr34k)
Reputable Member Moderator
Joined: 9 months  ago
Posts: 386
May 4, 2018 8:34 pm  

@philw
See in the initial post. I've made a section for those people.


@itaki
It depends.
Have you used @goalque's automate-eGPU.sh for macOS Sierra (10.12) then use the uninstall command of that script.
Have you used @rastafabi's installer for macOS Sierra (10.12) then use the uninstaller shipped with the app.
Have you used my
temporary script or @goalque's instructions then follow the section in the post.

Otherwise just go ahead.

macOS-eGPU.sh on GitHub (fr34k's macOS-eGPU.sh on eGPU.io)
----
2016 15'' MacBook Pro + GTX1080Ti@32Gbps-TB3 (Sonnet Breakaway 550) + macOS 10.13.6 (17G65 driver: 378.10.10.10.30.107 + CUDA: 396.148)


ReplyQuote
philw
(@philw)
Trusted Member
Joined: 1 year  ago
Posts: 60
May 4, 2018 8:38 pm  

Thanks, will do. Just waiting for my time machine to finish backing up...


ReplyQuote
mac_editor
(@mac_editor)
Noble Member Moderator
Joined: 2 years  ago
Posts: 1269
May 4, 2018 8:43 pm  

@fr34k Should also add a Known Issues section - eg. No OpenCL for NVIDIA eGPU+dGPU configs.

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


fr34k liked
ReplyQuote
philw
(@philw)
Trusted Member
Joined: 1 year  ago
Posts: 60
May 4, 2018 8:57 pm  

Ok - so will it be just the built in Iris Pro that is still able to do OpenCL ?


ReplyQuote
fr34k
(@fr34k)
Reputable Member Moderator
Joined: 9 months  ago
Posts: 386
May 4, 2018 9:01 pm  

@mac_editor
does deactivation of dGPU help?

macOS-eGPU.sh on GitHub (fr34k's macOS-eGPU.sh on eGPU.io)
----
2016 15'' MacBook Pro + GTX1080Ti@32Gbps-TB3 (Sonnet Breakaway 550) + macOS 10.13.6 (17G65 driver: 378.10.10.10.30.107 + CUDA: 396.148)


ReplyQuote
mac_editor
(@mac_editor)
Noble Member Moderator
Joined: 2 years  ago
Posts: 1269
May 4, 2018 9:05 pm  
Posted by: fr34k

@mac_editor
does deactivation of dGPU help?

No - the NVRAM commands for dGPU deactivation apply to all NVIDIA GPUs - so they cannot be applied. Either both GPUs enabled or not. It is probably possible to modify NVIDIA drivers to ignore the specific dGPUs (750m, 650m), but this may result in boot failure.

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


ICULikeMac liked
ReplyQuote
psonice
(@psonice)
Estimable Member
Joined: 9 months  ago
Posts: 109
May 4, 2018 9:14 pm  

@fr34k I'm getting this:

Checking for incompatibilies and up to date software...

   NVIDIA drivers                                             [update scheduled]

   NVIDIA eGPU enabler                             [FAILURE, no match was found]

2014 iMac 27 (TB2, AMD GPU) + Sonnet 550 / 1080TI. Freshly upgraded from 10.3.3 (all working there), SIP disabled, eGPU disconnected.


ReplyQuote
fr34k
(@fr34k)
Reputable Member Moderator
Joined: 9 months  ago
Posts: 386
May 4, 2018 9:14 pm  

@mac_editor
Oh what a dumb question of mine and so I knew but asked anyways. I've read all of the scripts... It's getting late... It was a long day today...


@psonice
what build number do you have

macOS-eGPU.sh on GitHub (fr34k's macOS-eGPU.sh on eGPU.io)
----
2016 15'' MacBook Pro + GTX1080Ti@32Gbps-TB3 (Sonnet Breakaway 550) + macOS 10.13.6 (17G65 driver: 378.10.10.10.30.107 + CUDA: 396.148)


mac_editor liked
ReplyQuote
goalque
(@goalque)
Noble Member Admin
Joined: 2 years  ago
Posts: 1159
May 4, 2018 9:32 pm  
Posted by: mac_editor
Posted by: fr34k

@mac_editor
does deactivation of dGPU help?

No - the NVRAM commands for dGPU deactivation apply to all NVIDIA GPUs - so they cannot be applied. Either both GPUs enabled or not. It is probably possible to modify NVIDIA drivers to ignore the specific dGPUs (750m, 650m), but this may result in boot failure.

If you can force iGPU only gmux power state, remove Apple's native Nvidia kexts completely or dGPU device ids, and use only web driver kexts with correct IOPCIMatch patterns (your eGPU device id), it might work.

automate-eGPU EFIapple_set_os.efi
--
late-2016 13" Macbook Pro nTB + Vega64@32Gbps-TB3 (Netstor HL23T) + macOS & Win10
late-2016 13" Macbook Pro nTB + GTX980/RX580@32Gbps-TB3 (Netstor HL23T) + macOS10.13 & Win10


ReplyQuote
itaki
(@itaki)
New Member
Joined: 10 months  ago
Posts: 3
May 4, 2018 9:38 pm  

15" 2017 Macbook Pro with both Intel and Radeon graphics and after a couple restarts it works the old way (i.e. boot, log out, plug in card, log back in)

Thanks so much! This script is great!

Question on the Adobe front though. I have the entire suite installed, but it didn't seem to recognize it.

Fetching CUDA needs...
   fetching CUDA requiring apps list                                                          [done]
   preparing matching                                                                         [done]
   matchinggrep: Premiere: No such file or directory
grep: Pro*: No such file or directory
grep: After: No such file or directory
grep: Effects*: No such file or directory
grep: Photoshop*: No such file or directory

ReplyQuote
fr34k
(@fr34k)
Reputable Member Moderator
Joined: 9 months  ago
Posts: 386
May 4, 2018 9:39 pm  

@itaki
OK. Will investigate. (Or rather I kinda know where things go south...)
In the meantime do:
bash <(curl -s https://raw.githubusercontent.com/learex/macOS-eGPU/master/macOS-eGPU.sh) --install --cudaDriver

Update: should be fixed... (Wait approx 5min for GitHub to distribute fix)
I also noticed a CUDA toolkit bug...

macOS-eGPU.sh on GitHub (fr34k's macOS-eGPU.sh on eGPU.io)
----
2016 15'' MacBook Pro + GTX1080Ti@32Gbps-TB3 (Sonnet Breakaway 550) + macOS 10.13.6 (17G65 driver: 378.10.10.10.30.107 + CUDA: 396.148)


ReplyQuote
ozzy
 ozzy
(@ozzy)
Trusted Member
Joined: 1 year  ago
Posts: 72
May 4, 2018 9:52 pm  

Finished install on a fresh 10.3.4 install with the security update. Installation script worked flawlessly. My observations:

  • Hot-plugging didn't seem to fully work (menu bar icon came up, and eGPU fans activated, but no screen on the eGPU)
  • Using the menu bar to try to disconnect appears to do it, it closes all windows, acts like it is disconnecting, but then kernel panics
  • Starting up with the eGPU attached works fine (like it always has before)
  • Running the Heaven benchmark oddly only has ~2 FPS, lower than it ever was on the 650m. Used to be 50-70. Judging by the iStat menus, it's actually the 650m that is doing all the rendering for the Heaven benchmark, even though the external display is the main one. That's interesting, as that's the first time that has been the case (it never used to have problems). 
  • Running the MetalBench app gets me ~3000 MRays/second, slightly faster than the last time I did it a few months ago
  • Deus Ex won't even launch - says this isn't a high enough spec mac. Civ VI (only other game I have installed) doesn't even seem to be able to load the menu screens. So it seems that games aren't actually recognizing or using the eGPU and instead doing their rendering on the 650m and then piping that through the eGPU
  • It installed nVidia drivers 387.10.10.10.30.103. nVidia is telling me there is 387.10.10.10.30.107 available and wants me to update

I'll try with the new nVidia drivers and see if that is any better.

2012 15" Macbook Pro Retina GT650M + GTX1070@10Gbps-TB1 (AKiTiO Node via TB3->TB2 adapter) + macOS10.13 & Win10


ReplyQuote
psonice
(@psonice)
Estimable Member
Joined: 9 months  ago
Posts: 109
May 4, 2018 9:53 pm  

@fr34k sorry, it's 10.13.4 (17E199)


ReplyQuote
fr34k
(@fr34k)
Reputable Member Moderator
Joined: 9 months  ago
Posts: 386
May 4, 2018 9:56 pm  

@psonice
I've got to 
apologise: I forgot the 10.13.4 no SU...
Fixed (wait for GitHub to distribute ~5min)


@ozzy
About eM, try the suggestion under known issues. worked for me

macOS-eGPU.sh on GitHub (fr34k's macOS-eGPU.sh on eGPU.io)
----
2016 15'' MacBook Pro + GTX1080Ti@32Gbps-TB3 (Sonnet Breakaway 550) + macOS 10.13.6 (17G65 driver: 378.10.10.10.30.107 + CUDA: 396.148)


psonice liked
ReplyQuote
mardarethedog
(@mardarethedog)
New Member
Joined: 5 months  ago
Posts: 3
May 4, 2018 10:04 pm  

@fr34k

Getting the below error while running the script.

iMac (Retina 5K, 27-inch, 2017) HS 10.13.4 17E199

Fetching CUDA needs...
fetching CUDA requiring apps list [done]
preparing matching [done]
matching [done]
Checking for incompatibilies and up to date software...
NVIDIA drivers [install scheduled]
NVIDIA eGPU enabler [FAILURE, no match was found]
Interrupt...
cleaning system [done]
The script has failed.
Nothing has been changed.

Please advise!
Thanks


ReplyQuote
psonice
(@psonice)
Estimable Member
Joined: 9 months  ago
Posts: 109
May 4, 2018 10:05 pm  

@fr34k yep that’s fixed. Will update with success or details 🙂


ReplyQuote
ozzy
 ozzy
(@ozzy)
Trusted Member
Joined: 1 year  ago
Posts: 72
May 4, 2018 10:07 pm  

@fr34k what do you mean about known issues? For hot-plugging and getting the external monitor to work? It's not that big of an issue for me, I'm fine to startup with it. I just wish I could get it to work with any games 🙁

I tried the updated nVidia drivers but with the same result.

2012 15" Macbook Pro Retina GT650M + GTX1070@10Gbps-TB1 (AKiTiO Node via TB3->TB2 adapter) + macOS10.13 & Win10


ReplyQuote
lovejimbo
(@lovejimbo)
Active Member
Joined: 5 months  ago
Posts: 9
May 4, 2018 10:10 pm  

Hey fr34k, great work!

 

I've got an issue which is most probably me not reading something properly!

I had previously installed using goalque's instructions and have uninstalled that solution with the uninstaller script and rebooted... however upon activation the new script is stopping and saying:

"You use the old wrangler patch. Please wait a little longer"

I take it this means there's not a solution for me yet? Just need clarification before I hit my head against this for a few hours :p


ReplyQuote
psonice
(@psonice)
Estimable Member
Joined: 9 months  ago
Posts: 109
May 4, 2018 10:11 pm  

@fr34k minor issue at end of script, reboot didn't happen. Got this:

A reboot will soon be performed...

5..4..3..2..1..0

 

iMac:~ chris$ Password:

I thought it was asking for superuser permission again, but my password appeared as plain text... deleted + hit return, script ended, no reboot. Looks OK so far otherwise, let's reboot and find out.


ReplyQuote
mac_editor
(@mac_editor)
Noble Member Moderator
Joined: 2 years  ago
Posts: 1269
May 4, 2018 10:11 pm  

@ozzy OpenCL OpenGL does not work with NVIDIA dGPU + NVIDIA eGPU at the moment. Only Metal + CUDA.

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


ReplyQuote
ozzy
 ozzy
(@ozzy)
Trusted Member
Joined: 1 year  ago
Posts: 72
May 4, 2018 10:13 pm  

@mac_editor Do you mean OpenGL doesn't work? Or OpenCL? I don't think OpenCL would affect something like the Heaven benchmark, right?

2012 15" Macbook Pro Retina GT650M + GTX1070@10Gbps-TB1 (AKiTiO Node via TB3->TB2 adapter) + macOS10.13 & Win10


ReplyQuote
mac_editor
(@mac_editor)
Noble Member Moderator
Joined: 2 years  ago
Posts: 1269
May 4, 2018 10:14 pm  
Posted by: ozzy

@mac_editor Do you mean OpenGL doesn't work? Or OpenCL? I don't think OpenCL would affect something like the Heaven benchmark, right?

My bad... OpenGL lol. Well, both don't if I recall correctly.

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


ReplyQuote
fr34k
(@fr34k)
Reputable Member Moderator
Joined: 9 months  ago
Posts: 386
May 4, 2018 10:27 pm  

@lovejimbo
Ah I've been 
ambiguous...
If you used @goalque's instructions there is no backup to get back from... (bad @goalque 😝)
You will need to perform the upgrade in order to get the new wrangler... (Or if you've backed it up then restore it... (including permissions (755) and ownership (root:wheel) and cache-rebuild, (steps 12-14)))

macOS-eGPU.sh on GitHub (fr34k's macOS-eGPU.sh on eGPU.io)
----
2016 15'' MacBook Pro + GTX1080Ti@32Gbps-TB3 (Sonnet Breakaway 550) + macOS 10.13.6 (17G65 driver: 378.10.10.10.30.107 + CUDA: 396.148)


ReplyQuote
goalque
(@goalque)
Noble Member Admin
Joined: 2 years  ago
Posts: 1159
May 4, 2018 10:30 pm  

Just ran the script on a 2014 Mac mini, rebooted and two functional eGPU monitors (DP & HDMI) from the GTX 980.

automate-eGPU EFIapple_set_os.efi
--
late-2016 13" Macbook Pro nTB + Vega64@32Gbps-TB3 (Netstor HL23T) + macOS & Win10
late-2016 13" Macbook Pro nTB + GTX980/RX580@32Gbps-TB3 (Netstor HL23T) + macOS10.13 & Win10


mac_editor and fr34k liked
ReplyQuote
fr34k
(@fr34k)
Reputable Member Moderator
Joined: 9 months  ago
Posts: 386
May 4, 2018 10:30 pm  

@psonice
Why 
Password: appeared I don't know.
But it may just take about 15s to reboot. / will be busy and must be locked first...

macOS-eGPU.sh on GitHub (fr34k's macOS-eGPU.sh on eGPU.io)
----
2016 15'' MacBook Pro + GTX1080Ti@32Gbps-TB3 (Sonnet Breakaway 550) + macOS 10.13.6 (17G65 driver: 378.10.10.10.30.107 + CUDA: 396.148)


ReplyQuote
psonice
(@psonice)
Estimable Member
Joined: 9 months  ago
Posts: 109
May 4, 2018 10:32 pm  

@fr34k: after reboot, logged in with eGPU disconnected. Plugged in, eGPU detected, external screen (connected to eGPU) black but showed cursor. Logged out, external display came on, internal display now black 😀

Rebooted with eGPU connected, system shut itself down after the initial progress bar. Retried, it booted and logged in but with only the external display working and extreme lag.

Going to uninstall, and the security update has now appeared so I'll install that and try again.


ReplyQuote
fr34k
(@fr34k)
Reputable Member Moderator
Joined: 9 months  ago
Posts: 386
May 4, 2018 10:35 pm  

@psonice
also try under know issues:
Black monitor with/without mouse

macOS-eGPU.sh on GitHub (fr34k's macOS-eGPU.sh on eGPU.io)
----
2016 15'' MacBook Pro + GTX1080Ti@32Gbps-TB3 (Sonnet Breakaway 550) + macOS 10.13.6 (17G65 driver: 378.10.10.10.30.107 + CUDA: 396.148)


ReplyQuote
ozzy
 ozzy
(@ozzy)
Trusted Member
Joined: 1 year  ago
Posts: 72
May 4, 2018 10:37 pm  
Posted by: mac_editor
Posted by: ozzy

@mac_editor Do you mean OpenGL doesn't work? Or OpenCL? I don't think OpenCL would affect something like the Heaven benchmark, right?

My bad... OpenGL lol. Well, both don't if I recall correctly.

Ahha. I edited the system check plist for Deus Ex to get it to launch despite the failed system check. Sadly though it runs at about 0.1 FPS, so it definitely isn't using the eGPU. That's a Metal game, so looks like games are still a no-go unfortunately. Will stick to just using the eGPU in Windows.

2012 15" Macbook Pro Retina GT650M + GTX1070@10Gbps-TB1 (AKiTiO Node via TB3->TB2 adapter) + macOS10.13 & Win10


ReplyQuote
mac_editor
(@mac_editor)
Noble Member Moderator
Joined: 2 years  ago
Posts: 1269
May 4, 2018 10:40 pm  
Posted by: ozzy

Ahha. I edited the system check plist for Deus Ex to get it to launch despite the failed system check. Sadly though it runs at about 0.1 FPS, so it definitely isn't using the eGPU. That's a Metal game, so looks like games are still a no-go unfortunately. Will stick to just using the eGPU in Windows.

Good find. Haven't extensively tested myself (away from eGPUs for a few days). Last I tested was Geekbench Metal compute which worked. GFXBench also worked, if I recall correctly. Use Activity Monitor -> Press CMD+4 to monitor GPU activity.

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


ReplyQuote
lovejimbo
(@lovejimbo)
Active Member
Joined: 5 months  ago
Posts: 9
May 4, 2018 11:26 pm  
Posted by: fr34k

@lovejimbo
Ah I've been 
ambiguous...
If you used @goalque's instructions there is no backup to get back from... (bad @goalque 😝)
You will need to perform the upgrade in order to get the new wrangler... (Or if you've backed it up then restore it... (including permissions (755) and ownership (root:wheel) and cache-rebuild, (steps 12-14)))

Perfect - works brilliantly! Thank you for all your efforts, much appreciated!


ReplyQuote
goalque
(@goalque)
Noble Member Admin
Joined: 2 years  ago
Posts: 1159
May 4, 2018 11:48 pm  
Posted by: fr34k

@psonice
also try under know issues:
Black monitor with/without mouse

2014 Mac mini was my 3rd test machine. Still no black screen on any of my monitors connected to the eGPU. However, the iGPU displayed black through HDMI (with background light). We should collect a detailed list of used monitors, display interfaces, macOS settings [displays have separate spaces, automatic graphics switching, the main display, displays order/position, FileVault] and monitor settings [AMD FreeSync on/off, DP version] and boot procedure to pinpoint this issue.

If some can read the system log, they could answer the following question: have you got any of these errors?

Fallback GPU Display Pipe transaction submission failed

DisplayPipe Capabilities Extended are not supported on offline Fbs

To be sure that there are no other factors (old workarounds or conflicting software), people should start from a fresh installation of macOS 10.13.4.

Could the culprit be a certain dGPU/iGPU + eGPU combo or monitor model? We don't know yet.

automate-eGPU EFIapple_set_os.efi
--
late-2016 13" Macbook Pro nTB + Vega64@32Gbps-TB3 (Netstor HL23T) + macOS & Win10
late-2016 13" Macbook Pro nTB + GTX980/RX580@32Gbps-TB3 (Netstor HL23T) + macOS10.13 & Win10


ReplyQuote
ozzy
 ozzy
(@ozzy)
Trusted Member
Joined: 1 year  ago
Posts: 72
May 5, 2018 12:13 am  
Posted by: mac_editor
Posted by: ozzy

Ahha. I edited the system check plist for Deus Ex to get it to launch despite the failed system check. Sadly though it runs at about 0.1 FPS, so it definitely isn't using the eGPU. That's a Metal game, so looks like games are still a no-go unfortunately. Will stick to just using the eGPU in Windows.

Good find. Haven't extensively tested myself (away from eGPUs for a few days). Last I tested was Geekbench Metal compute which worked. GFXBench also worked, if I recall correctly. Use Activity Monitor -> Press CMD+4 to monitor GPU activity.

Metalbench definitely worked, and showed activity on the 1070 eGPU. I didn't try GFXBench Metal though. Deus Ex (Metal) and the Heaven benchmark (OpenGL) used the 650m dGPU though interestingly.

I can't remember, are we supposed to have displays have separate spaces On, or Off?

2012 15" Macbook Pro Retina GT650M + GTX1070@10Gbps-TB1 (AKiTiO Node via TB3->TB2 adapter) + macOS10.13 & Win10


ReplyQuote
Page 1 / 20 Next