Mid 2015 15-inch MacBook Pro eGPU Master Thread
@nicefour, can you please confirm that both of your tests were carried out using the internal LCD only?
I installed Dota 2 (since it is free) but the game seems to only utilise either the Intel Iris Pro (forced Integrated mode via gfxCardStatus) or the M370X (forced discreet only or dynamic switching mode). I carried out this test using the internal LCD only. How did you manage to force the game to use the RX 580 without any external display connected to the RX 580?
I also carried out another test using an external 5K monitor connected to the RX 580. With Dota 2 at high settings, I got about 60-70fps at 2560 x 1440 and about 20-30fps at 5120 x 2880. I was surprised that the RX 580 could handle the game at 5K. The GPU history chart confirmed that only the RX 580 was used although both internal fans were running at high rpm throughout the game. I guess the game demands for CPU processing power as well.
Intel Iris Pro generally stays idle when used with external monitor connected directly to the RX 580. However, the iGPU is used for h264 hardware acceleration so when I play a h264 video file, the Intel Iris Pro will be used to decode the file even if the laptop is in clamshell mode.
Yes, I can confirm - I'm using internal display only. I don't have any external display yet, that's why i'm so curious about internal lcd better performance.
1. If you want to have the same behavior in dota 2. You need to close all the apps on the Mac, then open gfx and make sure that igpu is enabled, press the switch 2- 3 times on igpu. Only then open steam and launch the game (game resolution mode should be exclusive screen), during these steps dgu can change itself to discrete, even if you see letter I in top bar). The best way to determine if you succeed - this bugged cursor.
igpu lcd acceleration
dgpu lcd acceleration
I'm not sure if it's only on my machine but I see this cursor with artifacts only when display is accelerated by the igpu. FPS will be capped to 60 no matter what. I guess it's hardware vsync for igpu. And it doesn't even matter if you rx580 is connected or not. Case is the same on Catalina and high Sierra. (Use only exclusive mode and don't open desktop while test - gpu can switch to dicrete mode during this). In game go to hero demo mode, after check the exclusive mode and resolution one more time (exclusive mode can be turned off). I tested in many ways and my thoughts that if d gpu will be completely disabled you won't get more then 60 fps in any app or game. Unless built in LCD will be accelerated from m2 gpu. Also i forgot to say - i’m using Vulkan api ( tight click on the game and choose manage - dlc)
2.I found few possible solutions for this. And already started to test one
https://apple.stackexchange.com/questions/267581/gpu-problem-boot-hangs-on-grey-screen/295805#295805 - In this article there are 3 steps how to disable dgpu completely. There are 2 kexts in Mac OS fo r 370, one is responsible for the card, another one is responsible for the lcd display ( not mentioned in this article).
I applied first step from the instructions above and deleted dgpu main kext, but left the display kext in the place. My dgpu didn't disappear from the system - it's still working and accelerating the display. Performance results are quite different, before in Dota I got around 70% usage of r370x and 30% usage of RX580. Now the results are fully opposite. And fps are not capped to 60 like in scenario 1. with igpu. Also you can see that gpu monitor change cards places. RX580 (570) is now higher, which can mean higher priority in system usage.
before the fix
I'm currently back to High Sierra (because of system stability and better performance) so I can continue to test this solution around. But even if i can disable DGPU fully - then fps will be capped to 60 again which is not so good.
3.This solutions I didn't try yet, but it seems exactly what it needs to be. https://forums.macrumors.com/threads/howto-mp-3-1-use-amd-rx-580-for-mojave-catalina-and-bootscreen-without-flashing.2204882/
In short words it uses custom efis and kexts to enable boot screen on rx580 and nearest models on Mac Pro. Solution seems to work even on Catalina. And I believe it can be use to enable rx 580 direct internal lcd acceleration instead of igpu or dgpu.
• I will they to test solution 2 (high Sierra only) more and 3 in the nearest time. Please check solution n 3 as well and let me know if you will succeed
• Btw what are your FPS on external screen with dota 2 and 1920 resolution? When Rx is mainly used.
modulating egpu with my imagination and taobao links
Thanks @nicefour. I did a quick test to see if I can force Dota 2 to use RX 580 only but I have not been successful even after following your advice. When I selected Integrated Only mode, the game uses Intel Iris Pro rather than the RX 580. Which version of gfxCardStatus are you using?
I will carry out further tests tonight.
Edit: Did you choose OpenGL or Vulkan under video settings in Dota 2? I changed the settings to Vulkan and it started using the RX 580 (internal LCD only, Integrated Only mode). For OpenGL, it defaults to Intel Iris Pro in Integrated Only mode. This explains why I could not force Unigine Heaven benchmark to use the RX 580 (internal LCD only) because it uses OpenGL.
@nicefour, with internal LCD only (Integrated only mode, RX 580 in use), I am able to get more than 60 fps if I select Desktop-friendly Fullscreen mode. With Exclusive Fullscreen mode, the fps is capped at 60 fps. I did not encounter any issue with the cursor.
At 1920 x 1080 pixels (on a 5K display), I was getting about 70-90 fps. It did go over 100 fps few times. I could not remember if this was in Desktop-friendly Fullscreen or Exclusive Fullscreen mode.
Interesting find about the dGPU kext.
I have installed Linux for testing purpose. Currently, I am trying to switch from dGPU to iGPU but each time when I execute the command to force it to iGPU, the display goes blank. This is similar to the situation when I run the mm commands in the UEFI shell.
There are few working scripts to run mb air 11.5 (with dual graphics) on the integrated graphics and solving blackscreen issue. Screen goes black because after turning of the card - you didn’t switch to the integrated graphics, blacklight driver and used apple_set_os. While this working for linux im thinking that the thing with @goalque s script for Mac migt be connected either with iris pro display drivers.
May be layter @Goalque will be able to explain why the screen goes black in mac os and how to improve the script to make it work in mac os.
modulating egpu with my imagination and taobao links
Thanks @nicefour. I tried switching from dGPU to iGPU in Linux with external monitor connected and the internal LCD just turned black. This was done using vgaswitcheroo. I could still see the Terminal on my external monitor and it showed iGPU as active. I could even power down the dGPU but the internal LCD remained black. I suspect having the external monitor connected via the RX 580 might have complicated the situation. It might also have something to do with the boot loader. I have to use apple_set_os for the iGPU to be detected.
In macOS, if the system boots into the desktop with iGPU active, the external monitor connected to the RX 580 will remain black. As soon as I launch Google Chrome (or any apps that uses hardware acceleration), the external monitor comes to live and you can see gfxCardStatus showing that the M370X is active. If I quit Google Chrome now, gfxCardStatus will report that the system has switched back to iGPU. The external monitor continues to work. It seems that the M370X needs to be active to "kick start" the external monitor connected to RX 580. If the system boots up using dGPU, I can even see the Apple loading screen on my external monitor just few seconds before it jumps to the login screen/desktop because the external monitor would have been "kick start" by the M370X already.
@macnexus, I see. Seems it’s gmux or may be hardware problem. But what about goalgues script? Before you told that when you are using it your monitor can be enabled and dgpu dissapears from the system. How your monitor gets enabled in that case?
modulating egpu with my imagination and taobao links
Yes, I am able to get the dGPU to disappear from macOS System Information if I run the mm commands provided by goalgue using the EFI shell. I believe the system will switch to dGPU as soon as it boots into the EFI shell (which triggers the external monitor so the monitor will work anyway if I continue to boot into macOS). I guess this is regardless of you forcing "Integrated Only" mode using gfxCardStatus in macOS (followed by restarting the system hoping gmux will stay in iGPU mode) because once the system boots into the EFI shell, the system will automatically switch back to dGPU (this is subject to more testing to prove that it is true).
I have read somewhere (can't find the link now) that some people managed to get the system to stick with iGPU by booting using rEFInd bootloader. The system has to boot straight into rEFInd bootloader after you hit the power button (meaning you cannot hold Options key to select which partition you want to boot) because apparently the boot partition selector screen will also cause the system to revert back to dGPU (again this is subject to testing to prove that it is true as I have not carried out enough tests).
This also explains why the internal LCD goes black when you attempt to run the mm commands to turn off the dGPU via EFI shell because the dGPU is driving the internal LCD at that time during boot up (even if you have selected "Integrated Only" mode in macOS followed by a restart). For some unknown reason, the mm commands to switch to iGPU via EFI shell does not work although we have confirmed that the mm commands to turn off the dGPU do work.
Perhaps if you can find a way to make the system stick with iGPU during boot up (+ running the mm commands to turn off dGPU) then maybe there is a chance to achieve your goal to completely turn off the dGPU and use iGPU to drive the internal LCD in macOS (with the RX 580 accelerating some apps).
Good write-up! I have a 2015 and installed an NVMe, too. I plan to post my build after 5 posts so I can include pictures ;p
I did a clean install (not through bootcamp) of Windows 10 LTSC, version 1809, and my 1080ti runs normal.