Jump to content

[SCRIPT] Automating the installation of eGPU on OS X (inc display output)


euqlaog

Recommended Posts

Metal API renders smoothly through my 4K eGPU display, windowed and full screen. Reference GTX 980 and R9 390 tested.


17/10/15 14:51:41,900 MetalKitEssentials[431]: [DYMTLInitPlatform] platform initialization successful
17/10/15 14:51:41,969 MetalKitEssentials[431]: Metal GPU Frame Capture Enabled
17/10/15 14:51:41,969 MetalKitEssentials[431]: Metal API Validation Enabled

The future is not about OpenGL, it’s about Metal. Mac may become finally a real gaming platform. All the Macs introduced since 2012 are supported as mentioned in WWDC 2015. Meaning that Metal works with the all GPU vendors - Intel, AMD and Nvidia on OS X El Capitan. Nvidia Maxwell architecture is only supported if Nvidia continues releasing compatible web drivers, not only for high performance apps, but also through Core Animation and Core Graphics.

Link to comment
Share on other sites

Metal API renders smoothly through my 4K eGPU display, windowed and full screen. Reference GTX 980 and R9 390 tested.


17/10/15 14:51:41,900 MetalKitEssentials[431]: [DYMTLInitPlatform] platform initialization successful
17/10/15 14:51:41,969 MetalKitEssentials[431]: Metal GPU Frame Capture Enabled
17/10/15 14:51:41,969 MetalKitEssentials[431]: Metal API Validation Enabled

The future is not about OpenGL, it’s about Metal. Mac may become finally a real gaming platform. All the Macs introduced since 2012 are supported as mentioned in WWDC 2015. Meaning that Metal works with the all GPU vendors - Intel, AMD and Nvidia on OS X El Capitan. Nvidia Maxwell architecture is only supported if Nvidia continues releasing compatible web drivers, not only for high performance apps, but also through Core Animation and Core Graphics.

@goalque, how can I check if my system supports Metal or not?

Sent from my iPad using Tapatalk

Link to comment
Share on other sites

@goalque, how can I check if my system supports Metal or not?

I wrote a piece of code which determines Metal support. No need for Xcode IDE yet, command line tools are enough ;)

Open Terminal and type “nano metaltest.swift” and copy paste the following code:


import Metal

var supportedDevices: [MTLDevice] = MTLCopyAllDevices()

if (supportedDevices.count > 0)
{
for device in supportedDevices {
var isSupported = device.supportsFeatureSet(MTLFeatureSet.OSX_GPUFamily1_v1)
print("\(device.name), supported: \(isSupported)")
}
}
else
{
print("No supported devices found")
}

Save the file and then,


xcrun swiftc -o metaltest metaltest.swift


./metaltest

Here’s my system output as an example:


Optional("Intel Iris Pro Graphics"), supported: true
Optional("NVIDIA GeForce GTX 980"), supported: true

For R9 390 it gave a general name:


Optional("AMD Metal"), supported: true

This simply lists all the supported GPUs. Mac developer library is the best source of information.

Link to comment
Share on other sites

@goalque

Question. Here is my system report.

NVIDIA GeForce GTX 780 Ti:

Chipset Model: NVIDIA GeForce GTX 780 Ti

Type: GPU

Bus: PCIe

PCIe Lane Width: x4

VRAM (Total): 3071 MB

Vendor: NVIDIA (0x10de)

Device ID: 0x100a

Revision ID: 0x00a1

ROM Revision: VBIOS 80.80.30.00.0e

gMux Version: 4.0.8 [3.2.8]

<strike>Shouldn't the PCIe Lane Width be at x8 or 16?</strike>

Link to comment
Share on other sites

@goalque

Detected eGPU

GM206 [GeForce GTX 960]

Current OS X

10.11.1 15B42

Previous OS X

[not found]

Latest installed Nvidia web driver

Version: 346.03.03f01

Source: 3rd Party

Install Date: 10/22/15, 9:17 PM

Checking IOPCITunnelCompatible keys...

IOPCITunnelCompatible mods are valid.

Mac board-id found.

Searching for matching driver...

Your system is eGPU enabled and Nvidia web driver is up to date.

MBP 15" 2012 non retina iGPU HD4000 dGPU 650m

More details, when mac boot up it takes time more than usual like struggling at apple logo boot screen. And when it finish only internal screen is on.

Link to comment
Share on other sites

@errin: Are you aware of this bug?

https://github.com/goalque/automate-eGPU/issues/8

Seems that you have already installed the correct driver. If you are using v0.9.7, uninstall it and install v0.9.6. The script should say:


Driver [346.03.03f01] found from:
http://us.download.nvidia.com/Mac/Quadro_Certified/346.03.03f01/WebDriver-346.03.03f01.pkg
Do you want to download this driver (y/n)?

  • Thumbs Up 1
Link to comment
Share on other sites

*** automate-eGPU.sh v0.9.6 - © 2015 by Goalque ***

-------------------------------------------------------

Detected eGPU

GM206 [GeForce GTX 960]

Current OS X

10.11.1 15B42

Previous OS X

[not found]

Latest installed Nvidia web driver

Version: 346.03.03f01

Source: 3rd Party

Install Date: 10/22/15, 9:17 PM

Checking IOPCITunnelCompatible keys...

IOPCITunnelCompatible mods are valid.

Mac board-id found.

Searching for matching driver...

Your system is eGPU enabled and Nvidia web driver is up to date.

I used 0.9.6 and now it got Kernel Panic every time I boot. I have to pull TB cable out so MBP can boot normally.

About the Bug. in 10.11 I can run it fine so not sure if this bug just happen in 10.11.1 or not.

edit: Just reverted back to 10.11 and everything is running fine again. Seems 10.11.1 may cause a bug on dGPU like you say.

  • Thumbs Up 1
Link to comment
Share on other sites

The script doesn’t recognize 10.11 as previous OS X (maybe due to missing maintenance number).

- Since you have a Nvidia dGPU MBP, never use v0.9.7.

I suggest the following:

1) sudo ./automate-eGPU.sh -uninstall

2) uninstall Nvidia driver manager

3) Restart the Mac

4) Reset NVRAM https://support.apple.com/en-us/HT204063 (and disable SIP if it gets enabled)

5)


curl -o ~/Desktop/automate-eGPU.sh https://raw.githubusercontent.com/goalque/automate-eGPU/7192c79bda052bff92428700b59b652b30e6ab4d/automate-eGPU.sh

6) cd ~/Desktop

7) chmod +x automate-eGPU.sh

8) sudo ./automate-eGPU.sh

9) Restart

If still the same, it’s likely that a current web driver is not compatible with your dGPU/eGPU on OS X 10.11.1.

  • Thumbs Up 1
Link to comment
Share on other sites

Hi goalque,

I updated the eGPU stuff with 0.9.7 at the weekend and everything related to the eGPU works fine. Sad thing is that apparently since I turned off SIP, ran your script and turned on SIP afterwards again, I have no internal speakers or internal microphone anymore. I get them back when SIP is disabled though. I don't know if it's related to your script but I only turned off SIP for it, I didn't have to before.

Maybe you and/or others can check for your internal audio devices? I also don't know if it's related to the 10.11.1 update and I also don't know right now if I may have installed it(10.11.1) with SIP disabled and if this might cause trouble(wouldn't think so but... *shrug*).

Thanks.

I may consider reinstalling OS X otherwise at some time but right now I need a working machine and leave SIP disabled but this is not an option for the future.

Edit: Ok, it came back. Probably had to do with Refind and some other boot stuff that I didn't take into account.

Link to comment
Share on other sites

I get the following error after executing the automate-eGPU.sh file:


*** automate-eGPU.sh v0.9.6 - © 2015 by Goalque ***

-------------------------------------------------------

Detected eGPU

Current OS X

10.11.1 15B42

Previous OS X

10.10.4 14E46

Latest installed Nvidia web driver

Version: 346.01.03f01

Source: 3rd Party

Install Date: 7/10/15, 12:38 PM

You are running official Nvidia driver.

Checking IOPCITunnelCompatible keys...

Missing IOPCITunnelCompatible keys.

Mac board-id found.

Searching for matching driver...

Cannot parse a NULL or zero-length data

Cannot parse a NULL or zero-length data

Cannot parse a NULL or zero-length data

Cannot parse a NULL or zero-length data

Cannot parse a NULL or zero-length data

Cannot parse a NULL or zero-length data

Cannot parse a NULL or zero-length data

Cannot parse a NULL or zero-length data

Cannot parse a NULL or zero-length data

Cannot parse a NULL or zero-length data

Cannot parse a NULL or zero-length data

Cannot parse a NULL or zero-length data

Cannot parse a NULL or zero-length data

Cannot parse a NULL or zero-length data

...


I did an update on 10.11.1. Before I did the update everything worked fine. I followed your steps 1) to 9) but it´s still not working. I use a GTX 960.

Do you have any idea what´s going wrong?

Link to comment
Share on other sites

R9 Nano Support? Will there be any? because it still doesnt work for me :/

I guess the final support comes along with the new Mac hardware. R9 already gives screen output 3440x1440@60Hz, look here.

No new news regarding OpenGL acceleration, but you can test if Metal is supported:


curl -o ~/Desktop/metaltest.swift https://raw.githubusercontent.com/goalque/automate-eGPU/master/metaltest.swift
cd ~/Desktop
xcrun swiftc -o metaltest metaltest.swift
./metaltest

And OpenCL,

sudo ./automate-eGPU.sh -clpeak

Link to comment
Share on other sites

Hey Guys so I'm having a bit of trouble with getting my macbook to see my Gtx 970. I did everything correctly, got the script to run after i disabled "Crsutil"

My Specs:

rMBP 2015,

2.7 GHz intel Core i5

8gb of ram

Intel Iris Graphics 6100

OSX: El Capitan 10.11

EVGA 650W Power Supply

Akitio PCIe thunderbolt 2

Gtx 970

I got it to run and was using a thread from this site on how to get my computer to see the card but my computer kept black screening.

I need help, or exact instructions on how to get my macbook to recognize my card,

Link to comment
Share on other sites

Hey Guys,

i think I've got maybe the same problem. I run disabled crsutil and run the script(v0.9.6 & v0.9.7) ... but my external screen is still black.

My Setup:

MBP 2011 15"

2,2 GHz i7

8gb Ram

Intel HD 3000 / AMD 6750

My egpu setup:

Akitio PCIe thunderbolt 2

MSI GTX 70

post-40219-1449500103506_thumb.png

Hope you can help me

Thanks

post-40219-14495001034233_thumb.png

post-40219-14495001034475_thumb.png

post-40219-14495001034784_thumb.png

Link to comment
Share on other sites

Weird. Did you try the [-a] mode? It looks like you have no eGPU connected at all after restart. You can run the script, but no eGPU visible. Let’s see if it’s a hardware issue… can you give the output of these Terminal commands (eGPU connected):

system_profiler SPDisplaysDataType

system_profiler SPThunderboltDataType

Link to comment
Share on other sites

system_profiler SPDisplaysDataType

system_profiler SPThunderboltDataType

ystem_profiler SPDisplaysDataType

Graphics/Displays:

Intel HD Graphics 3000:

Chipset Model: Intel HD Graphics 3000

Type: GPU

Bus: Built-In

VRAM (Dynamic, Max): 512 MB

Vendor: Intel (0x8086)

Device ID: 0x0126

Revision ID: 0x0009

gMux Version: 1.9.23

Displays:

Color LCD:

Display Type: LCD

Resolution: 1680 x 1050

Pixel Depth: 32-Bit Color (ARGB8888)

Main Display: Yes

Mirror: Off

Online: Yes

Built-In: Yes

AMD Radeon HD 6750M:

Chipset Model: AMD Radeon HD 6750M

Type: GPU

Bus: PCIe

PCIe Lane Width: x8

VRAM (Total): 1024 MB

Vendor: ATI (0x1002)

Device ID: 0x6741

Revision ID: 0x0000

ROM Revision: 113-C0170L-573

gMux Version: 1.9.23

EFI Driver Version: 01.00.573

NVIDIA Chip Model:

Chipset Model: NVIDIA Chip Model

Type: GPU

Bus: PCIe

PCIe Lane Width: x4

Vendor: NVIDIA (0x10de)

Device ID: 0x13c2

Revision ID: 0x00a1

ROM Revision: preset 1.0.0

gMux Version: 1.9.23

system_profiler SPThunderboltDataType

Thunderbolt:

Thunderbolt Bus:

Vendor Name: Apple Inc.

Device Name: MacBook Pro

UID: 0x0001000A1CEC0BA0

Route String: 0

Firmware Version: 22,1

Domain UUID: 4E204530-38D1-7459-B066-831812A41503

Port:

Status: Device connected

Link Status: 0x2

Speed: Up to 10 Gb/s x2

Receptacle: 1

Port Micro Firmware Version: 2.1.3

Cable Firmware Version: 0.1.23

AKiTiO Thunder 2 Box:

Vendor Name: inXtron

Device Name: AKiTiO Thunder 2 Box

Vendor ID: 0x41

Device ID: 0x236

Device Revision: 0x1

UID: 0x00410236148019C0

Route String: 1

Firmware Version: 24,1

Port (Upstream):

Status: Device connected

Link Status: 0x2

Speed: Up to 10 Gb/s x2

Current Link Width: 0x1

Cable Firmware Version: 0.1.23

Link Controller Firmware Version: 0.14.0

Port:

Status: No device connected

Link Status: 0x7

Speed: Up to 10 Gb/s x2

Current Link Width: 0x1

Link Controller Firmware Version: 0.14.0

Thanks for the quick reply

Link to comment
Share on other sites

@chrise:

Thanks for the details. How is your eGPU powered?

“NVIDIA Chip Model” is detected so your “Graphics/Displays” screenshot is not up to date. Press Command + R to refresh the view.

To see what has happened since the previous startup (eGPU plugged), type the following:


syslog -B -F '$Time $(Sender): $Message' | grep NVDA

and if the kexts are loaded or not:


kextstat -l | grep NVDA

Link to comment
Share on other sites

@chrise:

Thanks for the details. How is your eGPU powered?

“NVIDIA Chip Model” is detected so your “Graphics/Displays” screenshot is not up to date. Press Command + R to refresh the view.

To see what has happened since the previous startup (eGPU plugged), type the following:


syslog -B -F '$Time $(Sender): $Message' | grep NVDA

and if the kexts are loaded or not:


kextstat -l | grep NVDA

Okay here ist the syslog output:

syslog -B -F '$Time $(Sender): $Message' | grep NVDA

Oct 28 20:47:41 kernel: Driver "NVDAStartup" needs "IOPCITunnelCompatible" key in plist

Oct 28 20:47:42 com.apple.kextd: kext-dev-mode allowing invalid signature -67030 0xFFFFFFFFFFFEFA2A for kext "/System/Library/Extensions/NVDAStartupWeb.kext"

Oct 28 20:47:42 kernel: Driver "NVDAStartup" needs "IOPCITunnelCompatible" key in plist

Oct 28 20:47:42 kernel: NVDAStartupWeb: Web

Oct 28 20:47:43 kernel: NVDAGM100HAL loaded and registered

Oct 28 20:47:43 kernel: Driver "NVDAStartup" needs "IOPCITunnelCompatible" key in plist

Oct 28 20:47:46 kernel: NVDA::rmStart failed

Oct 28 20:47:46 kernel: NVDA,Display-B: Not usable

Oct 28 20:47:46 kernel: NVDA,Display-C: Not usable

Oct 28 20:47:46 kernel: NVDA,Display-D: Not usable

Oct 28 20:47:46 kernel: NVDA,Display-E: Not usable

Oct 28 20:47:46 kernel: NVDA,Display-F: Not usable

Heres the kextstat output

kextstat -l | grep NVDA

142 0 0xffffff7f83dc2000 0x3000 0x3000 com.nvidia.NVDAStartupWeb (10.0.7) 012173D2-0B7B-360E-84E4-C5F7C7AE200D <12 4 3>

145 2 0xffffff7f83dc5000 0x2d6000 0x2d6000 com.nvidia.web.NVDAResmanWeb (10.0.7) B091F84F-7F3A-38DB-A8FC-94A59142D9FA <111 98 87 12 7 5 4 3 1>

146 0 0xffffff7f8409b000 0x1fd000 0x1fd000 com.nvidia.web.NVDAGM100HalWeb (10.0.7) EF27E881-89F0-3FAF-8327-7BC86FBA3FB4 <145 12 4 3>

The eGPU(akitio & GPU) is powered via Dell DA-2

Link to comment
Share on other sites

Okay here ist the syslog output:

syslog -B -F '$Time $(Sender): $Message' | grep NVDA

Oct 28 20:47:41 kernel: Driver "NVDAStartup" needs "IOPCITunnelCompatible" key in plist

Oct 28 20:47:42 com.apple.kextd: kext-dev-mode allowing invalid signature -67030 0xFFFFFFFFFFFEFA2A for kext "/System/Library/Extensions/NVDAStartupWeb.kext"

Oct 28 20:47:42 kernel: Driver "NVDAStartup" needs "IOPCITunnelCompatible" key in plist

Oct 28 20:47:42 kernel: NVDAStartupWeb: Web

Oct 28 20:47:43 kernel: NVDAGM100HAL loaded and registered

Oct 28 20:47:43 kernel: Driver "NVDAStartup" needs "IOPCITunnelCompatible" key in plist

Oct 28 20:47:46 kernel: NVDA::rmStart failed

Oct 28 20:47:46 kernel: NVDA,Display-B: Not usable

Oct 28 20:47:46 kernel: NVDA,Display-C: Not usable

Oct 28 20:47:46 kernel: NVDA,Display-D: Not usable

Oct 28 20:47:46 kernel: NVDA,Display-E: Not usable

Oct 28 20:47:46 kernel: NVDA,Display-F: Not usable

Heres the kextstat output

kextstat -l | grep NVDA

142 0 0xffffff7f83dc2000 0x3000 0x3000 com.nvidia.NVDAStartupWeb (10.0.7) 012173D2-0B7B-360E-84E4-C5F7C7AE200D <12 4 3>

145 2 0xffffff7f83dc5000 0x2d6000 0x2d6000 com.nvidia.web.NVDAResmanWeb (10.0.7) B091F84F-7F3A-38DB-A8FC-94A59142D9FA <111 98 87 12 7 5 4 3 1>

146 0 0xffffff7f8409b000 0x1fd000 0x1fd000 com.nvidia.web.NVDAGM100HalWeb (10.0.7) EF27E881-89F0-3FAF-8327-7BC86FBA3FB4 <145 12 4 3>

The eGPU(akitio & GPU) is powered via Dell DA-2

Thanks. Does your eGPU work on Windows? That would rule out a faulty GPU and power issue. Any difference if you start the Mac without an external monitor?

Driver "NVDAStartup" needs "IOPCITunnelCompatible" key in plist message is ok, since you are on El Capitan.

rmStart function in NVDAResmanWeb.kext failed. Interestingly, correct kexts are loaded.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.