Mid 2018 13" MacBook Pro + RX [email protected] (Gaming Box) + W10 1803 [theitsage]  

  RSS

theitsage
(@itsage)
Famed Member Admin
Joined: 2 years ago
Posts: 3198
November 2, 2018 5:24 pm  

In an attempt to help forum member, @ruuuuuu resolve error 12 with the RX 580 Gaming Box I found a workaround that keeps all Thunderbolt 3 ports in the 2018 13" MacBook Pro enabled. Through two hours of trial and error, the PCI Express Root Port #3 - 9DBA [wireless card] seems to be the main culprit of error 12. Once I disabled this Root Port, the Gigabyte RX 580 Gaming Box worked well on all Thunderbolt 3 ports. 

 

System specs:

2018 13" QC MacBook Pro - i5-8259U/Iris Plus Graphics 655 iGPU/8GB RAM/512GB SSD

 

eGPU hardware:

Gigabyte Gaming Box + Radeon RX 580 + .5m Thunderbolt 3 cable

 

Hardware pictures:

 

Installation steps:

Take a look at the four PCI Express Root Ports in Windows for the 2018 13" MacBook Pro. PCIe x4 Root Port #13 - 9DB4 connects to many crucial internal components such as the NVMe drive, trackpad, keyboard, Audio and iSight. This port is interconnected with the Apple T2 chip so I prefer to leave it alone. Next one down is the PCIe x1 Root Port #3 - 9DBA that connects to the Wireless card. PCIe x4 Root Port #5 - 9DBC connects to the left Thunderbolt 3 ports and PCIe x4 Root Port #9 - 9DB0 connects to the right Thunderbolt 3 ports.

Below are the step by step process I took to set up my 2018 13" MacBook Pro for the Gigabyte RX 580 Gaming Box:

  • Boot into Recovery mode to disable SIP through Terminal. Open Startup Security Utility to set Secure Boot to No Security and External Boot to Allow booting from external media [in Option Boot]
  • Download Windows 10 ISO and install through Boot Camp Assistant [in macOS and Windows]
  • Complete Boot Camp driver installation then open Device Manager to disable PCI Express Root Port #3 - 9DB4 (to wireless card) [in Windows]
  • Download and install rEFInd then mount EFI partition to enable spoof_osx_version 10.9 [in macOS]
  • Connect eGPU to the left Thunderbolt 3 port closest to display hinge then hit POWER button [Computer off]
  • Select Windows volume then hit ENTER [in rEFInd Boot]
  • Wait for Windows to complete booting and open Device Manager to verify there's a second Display Adapter. [in Windows]
  • Proceed to download and install latest Radeon drivers [in Windows]

If all goes well, you should see AMD Xconnect notification and icon. During my trial and error process, the RX 580 eGPU can actually work on either side Thunderbolt 3 ports. I found using the left TB3 port closest to the display hinge works most reliable. Here are screen captures of HWiNFO.

If you tried other methods and would like to give this a try, make sure to run DDU first and remove all Nvidia and AMD graphics drivers.

 

Benchmarks:

I didn't have time to run benchmarks. The setup can work with both the internal display and external monitor. FIFA19 is an exception in that it refuses to work with internal display. 

 

Comments:

The only inconvenience with this workaround is to disable the Wireless card Root Port before you shut down Windows then re-enabled once AMD XConnect detects and works with RX 580 eGPU. All four TB3 ports remain enabled is a nice tradeoff. I will try hot-plugging external SSD and see whether there's issues.

Best ultrabooks for eGPU use

eGPU enclosure buying guide

86 external GPU build guides


ReplyQuote
mac_editor
(@mac_editor)
Noble Member Moderator
Joined: 2 years ago
Posts: 1571
November 2, 2018 5:34 pm  

@itsage I thought the wireless card as a culprit was evident because sometimes hot-plugging an eGPU in Windows Bootcamp disconnects the wireless device for a bit. Anyway, this is a great find because having just 2 TB ports available can be painful (I use all at all times ;p).

The disabling/enabling of the device could be scripted as Windows has the option to run some on startup/shutdown. Same with the other PCIe controllers. All in all, if one had time, could build a series of automations to automatically run to resolve error 12.

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


theitsage liked
ReplyQuote
theitsage
(@itsage)
Famed Member Admin
Joined: 2 years ago
Posts: 3198
November 2, 2018 5:49 pm  

I noticed this behavior of wireless card disconnection when hot-plugging eGPU too. It happens on Windows laptops too. Having a script to automate this process would be great!

Best ultrabooks for eGPU use

eGPU enclosure buying guide

86 external GPU build guides


mac_editor liked
ReplyQuote
mac_editor
(@mac_editor)
Noble Member Moderator
Joined: 2 years ago
Posts: 1571
November 2, 2018 5:57 pm  

@itsage When I was into testing the 2018 MBP on Windows (now works with both AMD and NVIDIA eGPU equally well while plugged in from boot - just no internal display), I looked into scripting the controllers but left the idea there once I got my setup working. I have actually been looking at some better ways at patching macOS as well (non-EFI) such as with kexts (hence slow on the app). The problem with the latter approach is dependencies (major OS upgrades could break kext libraries even though patches may be same: example is the Thunderbolt3Unblocker that depends on xnu_override - didn't work on Mojave when I checked last).

If I have the time, I could look into this (though I honestly don't think I'll have any until semester-end). Is your bootcamp guide about disabling resources up-to-date with this new info? It'd be great to have all the resource disabling stuff in one place.

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


theitsage liked
ReplyQuote
tsakal
(@tsakal)
Estimable Member
Joined: 3 months ago
Posts: 115
November 20, 2018 8:14 am  

@mac_editor

Mac_editor hi, 

I have uninstalled the patch and then setup my new mbp13 2018 i7 on macOS 10.14.1. Everything works fine with the gaming box rx580 apart from the fact that when i do a stabilisation on fcpx the system crashes and i get an error //"macos_system_state":"running","bug_type":"210","os_version":"Bridge OS 3.1//
Is there any additional setting i need to change in relation to the patch. Also performance is not as much better as with my mbp13 2015 as i was expecting. Any suggestions would be highly appreciated. 

Best

A. 2.7 GHz I7 4 Cores, 16Gb, 1TB MBP 13 2018 TB3 , EGPU Gigabyte Gaming Box RX580 8Gb

B. 3.1 GHz I7, 16Gb, 1TB MBP 13 2015 TB2 , EGPU Gigabyte Gaming Box RX580 8Gb


ReplyQuote
tsakal
(@tsakal)
Estimable Member
Joined: 3 months ago
Posts: 115
November 20, 2018 8:24 am  

@itsage
Hi there, 
I have a setup exactly the same with one of your recent builds and looking for some guidance in a couple of issues. I run the purge wrangler patch on my tb2 mbp 13 2015 before but uninstalled before the last backup that i used for the new setup. 
A. Crashes: i have setup my new mbp13 2018 i7 on macOS 10.14.1. Everything works fine with the gaming box rx580 apart from the fact that when i do a stabilisation on fcpx the system crashes and i get an error //"macos_system_state":"running","bug_type":"210","os_version":"Bridge OS 3.1//
B, Performance: Do you think that i need to change any setting? I got a new mbp 13 2018 2.7 16gb 1 tb paired with the gaming box rx580 and a Dell 29' 2k and the benchmarks i get are not as i expected and not better than what i got with my 2015 mbp 13 with TB2. With the mbp 13 2018 i get the 41fps (1040) on Heaven ultra setting 1080p  vs 39fps on the mbp 2015 and 67.5 fps on the basic preset. Cinebench is at 62fps vs 61fps. Dirt Rally on macOS at 55 fps. FCPX looks to perform a bit faster but similar to the mbp2015 but as the projects i quickly looked at were only 3.3 min the difference might not be apparent, i will revert when checking longer projects. 
I run macOS 10.14.1 (18B75)
Do you think that i need to change any setting?

A. 2.7 GHz I7 4 Cores, 16Gb, 1TB MBP 13 2018 TB3 , EGPU Gigabyte Gaming Box RX580 8Gb

B. 3.1 GHz I7, 16Gb, 1TB MBP 13 2015 TB2 , EGPU Gigabyte Gaming Box RX580 8Gb


ReplyQuote
mac_editor
(@mac_editor)
Noble Member Moderator
Joined: 2 years ago
Posts: 1571
November 20, 2018 8:55 am  

@tsakal Your new Mac supports that eGPU natively so uninstalling the patch is sufficient. Bridge OS crashes are not related to the patch. Wait for a fix from Apple (10.14.2 has less panics IMO), or reinstall macOS over existing install. Also performance of the eGPU won’t suddenly increase if you change macs.

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


ReplyQuote
tsakal
(@tsakal)
Estimable Member
Joined: 3 months ago
Posts: 115
November 20, 2018 9:05 am  

@mac_editor
Thanks a lot for the prompt reply. Re performance i am not expecting miracles but i was expecting a 25% boost due to the tb3 vs tb2. You guys are more experienced, that is why i am checking whether i have missed some setting somewhere. By the way with the 2018 mbp 13 and 10.14.1 i see the internal gpu being engaged more or less all the time. 

A. 2.7 GHz I7 4 Cores, 16Gb, 1TB MBP 13 2018 TB3 , EGPU Gigabyte Gaming Box RX580 8Gb

B. 3.1 GHz I7, 16Gb, 1TB MBP 13 2015 TB2 , EGPU Gigabyte Gaming Box RX580 8Gb


ReplyQuote
tsakal
(@tsakal)
Estimable Member
Joined: 3 months ago
Posts: 115
November 20, 2018 9:12 am  

@mac_editor
One more thing.
I noticed on my mbp 13 2018 that when i plug the Apple USB-C charger the mbp power switches from the gaming box 100w  the the Apple charger 60w. GPU performance and mbp heat management should be better to power through the charger, right? Any thoughts ?

A. 2.7 GHz I7 4 Cores, 16Gb, 1TB MBP 13 2018 TB3 , EGPU Gigabyte Gaming Box RX580 8Gb

B. 3.1 GHz I7, 16Gb, 1TB MBP 13 2015 TB2 , EGPU Gigabyte Gaming Box RX580 8Gb


ReplyQuote
tsakal
(@tsakal)
Estimable Member
Joined: 3 months ago
Posts: 115
November 20, 2018 9:31 am  

@mac_editor
Re Performance, cinebench is at 62 fps the same as with the mbp 13 2015. It should be a bit higher. I am afraid that apple has started to throttle non blackmagic cards, unless i do something wrong.

A. 2.7 GHz I7 4 Cores, 16Gb, 1TB MBP 13 2018 TB3 , EGPU Gigabyte Gaming Box RX580 8Gb

B. 3.1 GHz I7, 16Gb, 1TB MBP 13 2015 TB2 , EGPU Gigabyte Gaming Box RX580 8Gb


ReplyQuote
tsakal
(@tsakal)
Estimable Member
Joined: 3 months ago
Posts: 115
November 20, 2018 10:15 am  

@mac_editor

I checked my thunderbolt system data and i see that the speed on the gaming box is 20gb/s x2, from what i read it should read 40gb/s x 1. I am using the gaming box 0.5 cable connected to the top left port. Any thoughts. 

Thunderbolt Bus 0:

 

  Vendor Name: Apple Inc.

  Device Name: MacBook Pro

  UID: xxxxxxxxxxxxxxx

  Route String: 0

  Firmware Version: 34.6

  Domain UUID: fffffffffffff

  Port:

  Status: No device connected

  Link Status: 0x7

  Speed: Up to 40Gb/s x1

  Current Link Width: 0x1

  Receptacle: 2

  Link Controller Firmware Version: 0.97.0

  Port:

  Status: Device connected

  Link Status: 0x2 / 0x1

  Speed: Up to 20Gb/s x2

  Current Link Width: 0x1

  Receptacle: 1

  Link Controller Firmware Version: 0.97.0

 

GAMING BOX:

 

  Vendor Name: GIGABYTE

  Device Name: GAMING BOX

  Vendor ID: 0xED

  Device ID: xxxxxxxx

  Device Revision: 0x1

  UID: xxxxxxxxxx

  Route String: 3

  Firmware Version: 27.27

  Port (Upstream):

  Status: Device connected

  Link Status: 0x2 / 0x7

  Speed: Up to 20Gb/s x2

  Current Link Width: 0x1

  Link Controller Firmware Version: 0.36.0

 

A. 2.7 GHz I7 4 Cores, 16Gb, 1TB MBP 13 2018 TB3 , EGPU Gigabyte Gaming Box RX580 8Gb

B. 3.1 GHz I7, 16Gb, 1TB MBP 13 2015 TB2 , EGPU Gigabyte Gaming Box RX580 8Gb


ReplyQuote
mac_editor
(@mac_editor)
Noble Member Moderator
Joined: 2 years ago
Posts: 1571
November 20, 2018 5:43 pm  

@tsakal Most of your questions and concerns have already been answered elsewhere. Please search through the forum for answers. 🙂

No, there is no throttling going on. 

Charging is not a factor in performance.

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


ReplyQuote
tsakal
(@tsakal)
Estimable Member
Joined: 3 months ago
Posts: 115
November 26, 2018 7:23 pm  

@mac_editor
I hope you had a nice thanksgiving. 
I have tried all recommendations from the forum including reinstalling the macOS and updating the gigabyte firmware. However the way the mbp is connected to the gaming box still is the same like above 

Status: Device connected

  Link Status: 0x2 / 0x1

  Speed: Up to 20Gb/s x2

  Current Link Width: 0x1

  Link Controller Firmware Version: 0.36.0

If everything was good is should read status 0x2, speed 40 x 1 and width 0x2. Do you agree?  Is there a way to check whether there are any leftovers from the patch i was using before? Unless there is a problem with the tb3 of the gaming box. 

Performance wise cinebench should be around 72 vs 60 that I get based on other people using the a mbp with a gaming box. I have access to a dell XPS 13 how can I check whether the tb3 is functioning correctly?  Is there some software to do that as I am not very familiar with windows.

thank you in advance 

A. 2.7 GHz I7 4 Cores, 16Gb, 1TB MBP 13 2018 TB3 , EGPU Gigabyte Gaming Box RX580 8Gb

B. 3.1 GHz I7, 16Gb, 1TB MBP 13 2015 TB2 , EGPU Gigabyte Gaming Box RX580 8Gb


ReplyQuote
theitsage
(@itsage)
Famed Member Admin
Joined: 2 years ago
Posts: 3198
November 26, 2018 8:03 pm  

@tsakal Can you download and run CL!ing on the eGPU? Here's an example of what the correct bandwidth in CL!ng would look like.

Best ultrabooks for eGPU use

eGPU enclosure buying guide

86 external GPU build guides


ReplyQuote
tsakal
(@tsakal)
Estimable Member
Joined: 3 months ago
Posts: 115
November 26, 2018 8:20 pm  

@theitsage

doing it right now

What do you think ? 

A. 2.7 GHz I7 4 Cores, 16Gb, 1TB MBP 13 2018 TB3 , EGPU Gigabyte Gaming Box RX580 8Gb

B. 3.1 GHz I7, 16Gb, 1TB MBP 13 2015 TB2 , EGPU Gigabyte Gaming Box RX580 8Gb


ReplyQuote
theitsage
(@itsage)
Famed Member Admin
Joined: 2 years ago
Posts: 3198
November 26, 2018 9:00 pm  

Those numbers showed the Thunderbolt 3 connection is limited to 20Gb/s. The firmware on RX 580 Gaming Box is good because H2D would have showed 1,1XX MiB/s otherwise. I'd recommend contacting Apple Support to have your 2018 MacBook Pro looked at.

Best ultrabooks for eGPU use

eGPU enclosure buying guide

86 external GPU build guides


ReplyQuote
tsakal
(@tsakal)
Estimable Member
Joined: 3 months ago
Posts: 115
November 26, 2018 9:14 pm  

@itsage
it is 25% lower.
What do you think?

A. 2.7 GHz I7 4 Cores, 16Gb, 1TB MBP 13 2018 TB3 , EGPU Gigabyte Gaming Box RX580 8Gb

B. 3.1 GHz I7, 16Gb, 1TB MBP 13 2015 TB2 , EGPU Gigabyte Gaming Box RX580 8Gb


ReplyQuote
mac_editor
(@mac_editor)
Noble Member Moderator
Joined: 2 years ago
Posts: 1571
November 26, 2018 9:17 pm  

@tsakal What about trying a different TB cable? Might help. Hope you had a great thanksgiving yourself 🙂

purge-wrangler patches cannot affect TB-link speed regardless of their presence. Also, if the script says there's nothing to uninstall then it's impossible for anything to have been left-over.

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


ReplyQuote
tsakal
(@tsakal)
Estimable Member
Joined: 3 months ago
Posts: 115
November 26, 2018 9:18 pm  

@itsage

thank you
Do you think that there might be some leftover from the purgewrangler patch?

A. 2.7 GHz I7 4 Cores, 16Gb, 1TB MBP 13 2018 TB3 , EGPU Gigabyte Gaming Box RX580 8Gb

B. 3.1 GHz I7, 16Gb, 1TB MBP 13 2015 TB2 , EGPU Gigabyte Gaming Box RX580 8Gb


ReplyQuote
theitsage
(@itsage)
Famed Member Admin
Joined: 2 years ago
Posts: 3198
November 26, 2018 9:55 pm  

Like @mac_editor stated this bandwidth limitation is not due to software. Some where in your setup, a hardware component is not working properly. The Thunderbolt 3 cable is the easiest one to swap out and see if there's a difference.

Best ultrabooks for eGPU use

eGPU enclosure buying guide

86 external GPU build guides


ReplyQuote
Clement
(@mowglibook)
New Member
Joined: 14 hours ago
Posts: 1
December 9, 2018 10:48 pm  

I have a very similar config and first of all, wanted to thank you @theitsage for pointing me in the right direction. 

Secondly, I wanted to say my experience has been a lot easier than I expected.

I have a Mid 2018 13" MacBook Pro: 2.7 GHz i7, 16GB DDR3, 1TB SSD, Touch Bar, 4 TB3 Ports (running 10.14.1 & just updated to 10.14.2, with a Windows 10 Pro 1809 install via Bootcamp)
I just bought an RX 580 Gaming Box on sale during Black Friday. I was keeping an eye out for eGPU compatible with macOS Mojave & Windows around £300 for a while and got mine for £316.78 - not cheap but very good value for money in the UK. 
It came with the standard non H2D firmware, so bandwidth was split evenly for USB & GPU.
I have plugged my Samsung T1 512GB SSD to the bottom left port (next to the TB3 port) and my Logitech MX Revolution receiver to the bottom right port. The other two ports are not used.

macOS is plug and play (almost) as the PSU fan stays on after shutdown. It's a little annoying and flashing the F1 BIOS from Gigabyte doesn't fix the problem with my Mac. Pulling the plug after shutdown is enough to make it stop.
Everything else works flawlessly on Mac, even Gigabyte's Aorus Engine app, that is capable of adjusting (or in my case, turning off, the lights).
Every app I use uses the GPU on the external display, Adobe Indesign uses it to accelerate previews... basically, it's performing as expected, and iStat Menu even picks up the Temperature, Core clock & Memory clock, as well as displaying graphs of GPU processor and memory usage; handy.

The scenic route
As a good satisfied customer I took the scenic route looking at Windows, after some (quick) research on this forum about Windows setup etc.

  • I first tied the plug and play approach, left all security on, used DDU to remove the AMD drivers drivers, and installed the latest, rebooted with the GPU plugged and enjoyed something like a 50/50 success rate. The GPU is picked up and initialised most of the time, sometimes it won't. I got to 100% by disabling the PCI port of the WiFi card (Port #3) and the right hand side ports as well (Port #9).
  • Next I had a look at automate-eGPU EFI (1.0.4) on a USB stick, plugged at the back of the Gaming Box. I turned off Secure Boot (No Security) and set External Boot to Allow booting from external media. Didn't touch SPI, not the boot loader of the MacBook, it's all external. That worked well, both GPU worked, XConnect kick in. But after reading about the impact of apple_set_os.efi, I decided to look at refind, on an external drive. (I was still running the standard, non H2D firmware back then)

The compromise
Finally I installed refind on my external SSD. I still don't want this to be on the main SSD, but since my external one is a partitioned with GUID (AFPS + NTFS partitions) it already has one for EFI, so it was really easy to run the refind installer on the SSD.

Indentify the partition:

diskutil list

Run refind-install on it:

sudo ./refind-install --usedefault /dev/disk2s1

Mount it to customise it:

sudo mkdir /Volumes/EFI

sudo mount -t msdos /dev/disk2s1 /Volumes/EFI

At this point it, the minimum you have to do is edit the refind config in /Volumes/EFI/EFI/BOOT/refind.conf, where you're looking for the following section:

# Tell a Mac's EFI that macOS is about to be launched, even when it's not.
# This option causes some Macs to initialize their hardware differently than
# when a third-party OS is launched normally. In some cases (particularly on
# Macs with multiple video cards), using this option can cause hardware to
# work that would not otherwise work. On the other hand, using this option
# when it is not necessary can cause hardware (such as keyboards and mice) to
# become inaccessible. Therefore, you should not enable this option if your
# non-Apple OSes work correctly; enable it only if you have problems with
# some hardware devices. When needed, a value of "10.9" usually works, but
# you can experiment with other values. This feature has no effect on
# non-Apple computers.
# The default is inactive (no macOS spoofing is done).
#
spoof_osx_version 10.9

line is that this line must be uncommented. There's a lot more you can don with refind, like custom themes and defining what you see on your boot screen and it's worth taking a moment to make this exactly how you want it to be.

Reboot, and enjoy.
I then started playing with re-enabling back the two PCI connections, and found out that it was very happy to initialise everything when I reboot from macOS to Windows, and that I get the occasional black screen when I cold boot to Windows. The solution is elegant enough for me, I didn't like having to switch off the wifi card, before shutting down the laptop and having to reactivate it after login in.

The need for speed
Last but not least, when you have a stable setup, it's time to test it. I didn't benchmark it but rather played for a bit and was impressed with the RX 580. Mind you, I haven't had a powerful desktop GPU in nearly a decade, so games look very good to me.
I installed Gigabyte softwares and found out how buggy they are, then removed them.
The one thing that bothered me a bit was the H2D bandwidth, which seemed too aggressively capped. So I decided to give the firmware update a go. The guide to Update Thunderbolt 3 eGPU enclosure firmware in Boot Camp was handy but also scary. I tried to install the latest software from Intel:

I installed both and yellow banged the graphics card, and it showed up, hassle free. So I used the firmware update tool to lash the firmware Gigabyte_RX580IXEB_8GD_Ver1.0 H2D.bin from Gigabyte's page Gigabyte_RX580IXEB_8GD_Ver10_H2D.zip
And that too worked flawlessly. I rebooted and checked CL!ng with is now reporting double the bandwidth. You can see the benefit in games too, and I was pleasantly surprised by the performance of my two USB devices, the mouse works perfectly (no interruption) and the SSD is still fast enough to load games and program data, so it's perfect for my use-case.
I've then removed both Intel software as I don't intend to go back anytime soon.

I may post a full guide if there's people interested.

Mid 2018 13" MacBook Pro: 2.7 GHz i7, 16GB DDR3, 1TB SSD, Touch Bar, 4 TB3 Ports
eGPU: RX 580 Gaming Box


theitsage liked
ReplyQuote
theitsage
(@itsage)
Famed Member Admin
Joined: 2 years ago
Posts: 3198
December 10, 2018 3:02 am  

@mowglibook Nice writeup about your eGPU setup experience. We'd love to see a build guide.  😀

Best ultrabooks for eGPU use

eGPU enclosure buying guide

86 external GPU build guides


ReplyQuote