Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

mcbeej

macrumors member
Jun 7, 2007
77
3
Please download the version in this thread, because the other I posted in the other thread is only compatible with Sierra.

Ah yes, I had downloaded the other one, I assumed the one in this thread was the same as the other one - it's running now, thanks!

So this solution is working great for me, and IMO is the best of all dGPU solutions I've seen/tried.
 
Last edited:

xanderx007

macrumors 6502
Nov 7, 2017
262
140
Installing GRUB

Follow the steps described in this guide:
https://gist.github.com/blackgate/17ac402e35d2f7e0f1c9708db3dc7a44

[/CODE]

@brainshutdown,

I'm still on the AMF fix, but earlier today, my MBP crashed when I opened my Facebook page (it has been doing that for quite some time). It happened while I was at school, and I didn't have my ArchLinux USB with me. After several failed restarts, I downloaded Ubuntu and created a rescue disk (using another Mac) as per your instruction.

Now, I couldn't start into recovery mode to use Terminal, I tried changing the gpu-power-prefs and the disabling the SIP via Single User Recovery (CMD+S+R) instead of using rEFInd to disable the SIP I've read the steps a few times, but, the process of creating the rEFInd USB drive is too confusing to me. Maybe you have a simpler way to make one without having to go through the steps in the link, which jumps from one point to another.

It seemed to have worked, and it said that the SIP was disabled. I was able to boot into Ubuntu, took note of my UUID, but after pressing fn F10, the screen just went black, with the light on the USB drive steadily on. I waited for several minutes, but there's no activity on the drive and the MBP didn't boot as expected.

I'm not sure where I went wrong (or, maybe I didn't wait long enough), since I the SIP was disabled, and there was no error message when I changed the gpu-power-prefs setting.

Any ideas?

EDIT: I've redone AMF's EFI fix, the MBP started right away, and I've managed to make it work without having to disable or remove the AMD kexts. Though it's working now, I would still like to try your fix, since it seems to be a stable solution.
 
Last edited:

brainshutdown

macrumors regular
Original poster
Jul 16, 2012
124
110
@xanderx007
Try to reset the SMC and NVRAM and retry the first two steps in the guide.

If you are still having trouble booting and you only have one macOS partition try to replace the contents of your grub.cfg with this:
Code:
menuentry "macOS" {
   insmod hfsplus
   outb 0x728 1
   outb 0x710 2
   outb 0x740 2
   outb 0x750 0
   search --set=root --file /System/Library/CoreServices/boot.efi
   chainloader /System/Library/CoreServices/boot.efi
}
With this you can press enter straight way when GRUB appears without changing the uuid.
 
Last edited:

brainshutdown

macrumors regular
Original poster
Jul 16, 2012
124
110
Thanks1 I've already edited the grub file, but, will try the fix later after my downloads.

Do I need to disable the SIP again?
Yes. When you reset the NVRAM the SIP is also reseted, and it's needed if want to do the steps 4, 5 and 6.
 
Last edited:

xanderx007

macrumors 6502
Nov 7, 2017
262
140
Yes. When you reset the NVRAM the SIP is also reseted, and it's needed if want to do the steps 4, 5 and 6.

Just to clarify, resetting the NVRAM (CMD+OPT+P+R) is not the same as changing the gpu setting with the sudo nvram command, yes?
 

xanderx007

macrumors 6502
Nov 7, 2017
262
140
SUCCESS, in just one try after braindshutdown's most recent reply before this one!

The dGPU no longer appears in System Profile, and the kext are no longer listed with grep in Terminal. Since the MBP was crashing by just opening Facebook (and other pages), I tested it right away and Facebook loaded without a hitch (so far, I haven't opened a chat window yet, which crashed the MBP as well).

Screen Shot 2017-11-15 at 00.58.26.png Screen Shot 2017-11-15 at 01.33.20.png

Things to note:

A. I did everything <almost> exactly in @brainshutdown's guide, but, beforehand, I prepared the Ubuntu USB RESCUE drive (even naming it as "RESCUE"). Since my MBP's HDD only has a single partition, I followed brainshutdown's grub addendum in #29.

B. Before doing anything else, I did the SMC and NVRAM resets first.

C. Disabling the SIP in Recovery Mode> Terminal wasn't working, and my brain felt like scrambled eggs after reading all the MacOS-specific material regarding rEFInd, how to create a USB disk with it, and use it to disable SIP.

But, having scoured AMF's thread and other sources, I tried booting into Single User Recovery Mode (CMD+S+R), and did steps 1 (changing the gpu-power-prefs variable) and 2 (disabling the SIP) consecutively from within SURM before rebooting. Also, you can drop "sudo" in SURM (as you can see in the screenshot).

23473138_10212340308917697_8951267092719153752_n.jpg

Like I mentioned earlier, this went without a hitch.

D. I booted from the USB drive, pressed enter, and the Mac booted right away.

E. I had a few screw ups with step 4, but, I simply backtracked a bit from where I typed incorrectly and retyped the commands.

F. Did a reboot, and writing this reply is the first thing I did.

Now, I'm still deciding if I'll need to do the optional step 5 (preventing the GPU from waking up from sleep). I'll observe it for a few days and keep you guys updated.
 
Last edited:

xanderx007

macrumors 6502
Nov 7, 2017
262
140
@xanderx007
Thanks for your feedback. I will update the guide with this information you have gathered.

@brainshutdown,

Thanks for the guide as well. I was a bit reluctant trying both solutions to begin with, mainly because I can be a dyslexic when looking at so much code, that I do mistype a lot of the commands.

One thing weird though, I'm pretty sure that my last attempt before yesterday to move the AMD kexts (in AMF's guide) failed. I checked the /System/Library/Extensions/ folder, and all the kexts were there before I even started whacking my brain trying to understand rEFInd (I basically just parrot the instructions here, though I do have a little idea how the commands work). When I checked the /Extensions folder after my earlier reply, the AMD kexts are not there.

Now, I have two disabled AMD Folders in my /Library, AMD_Kext, to which I earlier copied the AMD kexts into via Mac OS GUI (just to be safe), then created the AMDdisabled, which is blank, created in a second attempt to move the kexts (SIP wasn't disabled). The Mac was <kinda> working with a few hiccups, so I didn't bother moving them.

But, when I checked earlier, all the AMD kexts aren't there. Should I move them back into the /Extensions folder via Terminal? What would be the syntax?

Screen Shot 2017-11-15 at 03.38.43.png
 

xanderx007

macrumors 6502
Nov 7, 2017
262
140
No dice (an all kexts).

Screen Shot 2017-11-15 at 03.52.33.png

Can I go back to a Time Machine backup and copy and paste that?

Edit: Went back a few days, weeks and months via Time Machine. The kexts aren't there.

Screen Shot 2017-11-15 at 04.05.09.png

I also checked my Secondary External Startup disk, they aren't there either.

Screen Shot 2017-11-15 at 04.07.14.png

Maybe these kexts are loaded from some other location (and placed into /Extensions) during startup?
 
Last edited:

brainshutdown

macrumors regular
Original poster
Jul 16, 2012
124
110
You shouldn't move those extensions there. Those extensions belong to /System/Library/Extensions. It seems that the copies you made have lost the permissions. You can move them to /System/Library/Extensions and then fix the permissions by doing:
Code:
sudo chmod -R 755 /System/Library/Extensions/AMD*.kext
sudo chown -R root:wheel /System/Library/Extensions/AMD*.kext
sudo touch /System/Library/Extensions
 
Last edited:

xanderx007

macrumors 6502
Nov 7, 2017
262
140
You shouldn't move those extensions there. Those extensions belong to /System/Library/Extensions. It seems that the copies you made have lost the permissions. You can move them to /System/Library/Extensions and then fix the permissions by doing:
Code:
sudo chmod -R 755 /System/Library/Extensions/AMD*.kext
sudo chown -R root:wheel /System/Library/Extensions/AMD*.kext
sudo touch /System/Library/Extensions

Got it! Thanks!
 

xanderx007

macrumors 6502
Nov 7, 2017
262
140
@xanderx007
Thanks for your feedback. I will update the guide with this information you have gathered.

Checked your gist link, you have two "number 1" steps.

Just a suggestion: maybe you should put creating the rescue USB as the first step, as I already made it beforehand, before doing anything. As most people here are probably not so coding savvy, and might or might not have a working MBP that boots into the OS properly, they'll need to know that they might or might not need a second computer to download Ubuntu and create the RESCUE drive, as I have done in my case.

Also, I had the drive ready to boot as soon as did the reboot command after disabling SIP.
 

brainshutdown

macrumors regular
Original poster
Jul 16, 2012
124
110
Checked your gist link, you have two "number 1" steps.
Thanks, I hadn't noticed.

Just a suggestion: maybe you should put creating the rescue USB as the first step, as I already made it beforehand, before doing anything. As most people here are probably not so coding savvy, and might or might not have a working MBP that boots into the OS properly, they'll need to know that they might or might not need a second computer to download Ubuntu and create the RESCUE drive, as I have done in my case.

Also, I had the drive ready to boot as soon as did the reboot command after disabling SIP.

Most people looking for this will probably have a non working MBP anyway, and you need to do the first two steps before the step 3.5.
 

xanderx007

macrumors 6502
Nov 7, 2017
262
140
Most people looking for this will probably have a non working MBP anyway, and you need to do the first two steps before the step 3.5.

No worries. BTW, I tried it a couple of times, but, I still get the same error message re: AMD kexts which I posted earlier. Not worried about that now, it's finally working, though, as per your discussion with tmanx on the other thread, it's a bit on the warm side, though I'm not sure if it's just as warm as before when I first got it and starting using it. I'm currently on battery power, and with just Firefox on I'm down to just 3 hours or less. I tried shutting the lid on my way to class, restarting and shutting down, and it restarted without a hitch. It does take a while for the grub to come up, around 10 seconds or so.

I'll try the AMDwakeuphandler kext in a little while.

Edit: Still running on battery power, and it's slightly improved, now at 4 hours.

Addt'l Edit: Tried the wakeup handler. I also got the same error message across all kexts, except the wakeup handler.


Screen Shot 2017-11-15 at 10.54.00.png

Screen Shot 2017-11-15 at 15.17.13.png
 
Last edited:

tmanx

macrumors newbie
Nov 1, 2017
22
3
OK, it must be the permissions. Did you try rerunning the chown and then doing the kextload?
If it still doesn't work try this:
Code:
sudo chmod -R 755 /System/Library/Extensions/AMDGPUWakeHandler.kext
sudo chown -R root:wheel /System/Library/Extensions/AMDGPUWakeHandler.kext
sudo touch /System/Library/Extensions
sudo kextload /System/Library/Extensions/AMDGPUWakeHandler.kext

Hi @brainshutdown

I tried -

Code:
 sudo chown -R root:wheel /System/Library/Extensions/AMDGPUWakeHandler.kext
Password:
sudo touch /System/Library/Extensions

and at that point got an error dialogue.

So then I tried

Code:
sudo chmod -R 755 /System/Library/Extensions/AMDGPUWakeHandler.kext
sudo chown -R root:wheel /System/Library/Extensions/AMDGPUWakeHandler.kext
sudo touch /System/Library/Extensions
sudo kextload /System/Library/Extensions/AMDGPUWakeHandler.kext

And didn't get any errors.

On wake from sleep:
GPU VCore is 0.00,
GPU Die Analogue is -
and battery time on iStat is 5:30 (from charged @ 95%) - it was 3 or so hours before.

I do believe you've cracked it!!!!!!!

Thank you so much for everything :)
 
  • Like
Reactions: brainshutdown

molocono

macrumors member
Jan 13, 2004
68
4
Got my machine to turn on again yesterday using the steps provided in this thread. Left it on overnight, then was frozen in the morning. Restarted it successfully and after about an hour is froze up again. Gonna order a 2017 MBP today.
 

brainshutdown

macrumors regular
Original poster
Jul 16, 2012
124
110
Got my machine to turn on again yesterday using the steps provided in this thread. Left it on overnight, then was frozen in the morning. Restarted it successfully and after about an hour is froze up again. Gonna order a 2017 MBP today.
Are you sure it's the same problem and not the HDD?

I do believe you've cracked it!!!!!!!

Thank you so much for everything :)
You're Welcome.


The AMDGPUWakeHandler can be placed in /Library/Extensions, but those AMD kexts you removed belong to /System/Library/Extensions.
 

brainshutdown

macrumors regular
Original poster
Jul 16, 2012
124
110
All the glitches have pointed to it being a GPU problem. But curious to know why would mention the HDD being a problem?
Because some years ago I had problems with the HDD and the symptoms were constant freezes and a clicking noise coming from the HDD.
 
  • Like
Reactions: molocono
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.