Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.
Status
The first post of this thread is a WikiPost and can be edited by anyone with the appropiate permissions. Your edits will be public.

AppleMacFinder

macrumors 6502a
Original poster
Dec 7, 2009
796
152
Thank you so much for your post!!! My macbook pro 8,2/ OS X Lion with busted dgpu is now working after more than 2 years being dead. My only problem is that I cannot use the internal gpu in boot camp/ windows 7. Can you help me how to use the intel graphics when I'm using Win7. Thanks a lot!
I'm happy if you are happy ;) Sorry I don't know about boot camp, but you could always use W7 in a virtual machine. The performance difference, compared to host, is not that big - I measured for Parallels Desktop and it was like -2% in CPU performance, -35% in GPU performance (might upset the gamers though). However maybe you will need to upgrade the RAM - could get 16 GB max at this laptop, 2x8GB DDR3 SO-DIMM modules
 
  • Like
Reactions: Mhanix

xanderx007

macrumors 6502
Nov 7, 2017
262
140
Hi guys!

Thanks to AppleMacFinder in particular, and to those who have contributed so far on this thread.

I've been lurking and looking around at the solutions and comments, and although I did do a little coding back then, I'm not a programmer. I can understand a little bit, enough to try the solution/s myself.

Now, creating the bootable EFI USB drive was easy and worked without a hitch. I downloaded the latest ArchLinux and successfully made a drive, but, when I tried booting from it, I got this error message:

archlinuxerror.jpg


Now, with the little coding I know, I'm guessing that the ArchLinux version I've downloaded is corrupt and thus could be unpacked. I'm currently downloading an older version, to see if that works, but, maybe you guys can help me figure out what went wrong here, in case I'm wrong with my assumption.

I have an MBP 15 Early 2011 15, with an AMD 6490, which has already been replaced via the replacement program. The replacement board gave way much quicker this time around, in only a little over a year when the original GPU failed. I was able to boot it up after a few restarts when it failed a couple of months ago, and used Cody Krieger's SwitchGPU with relative success on and off. It's become worse the past couple of weeks, when I'm forced to restart, it sometimes takes hours of restarting before I can get a decent one, just to launch SwitchGPU to integrated mode.

After I was forced to restart earlier, I tried the fix a couple of times, and that is when I got the error. I even did the USB drive again, just to see if I screwed that up, but, the same error occurred.

I'm currently booted on high-fan mode (smc reset, with the power key held 5 seconds longer), just to be able to download the older ArchLinux version. I just got notification that it just finished downloading, so I'll try the fix again.
 
  • Like
Reactions: AppleMacFinder

ILoveYouGuys22

macrumors newbie
Nov 8, 2017
1
1
I really want to thank everyone on this site, especially @AppleMacFinder and @FGuarini. It took me some time to get the spacing correct in the commands; but once I did, it fixed everything. I've already done this twice since my computer went kaput a couple months ago—I only had to do it a second time today due to updating my OS—and it works perfectly!

Apple was trying to get me to buy a new computer; but seeing how I purchased my 17-inch 2011 MacBook Pro for $3000 and the newest low-end MacBook Pros still have worse hardware than it, I really didn't want to. You guys made it possible. I truly can't thank you enough.

Thanks!!!!!
 
  • Like
Reactions: AppleMacFinder

xanderx007

macrumors 6502
Nov 7, 2017
262
140
First, I've verified that the latest version of ArchLinux I've downloaded was corrupted, so I downloaded the oldest one available in https://www.archlinux.org/releng/releases/. I was able to re-create the USB Boot Disk and boot into it right away without a hitch.

Screen Shot 2017-11-09 at 11.34.09.png

Next, after uneasy several tries over a few hours, which kept failing, I did a "clean" fix by resetting the NVRAM/PRAM and SMC. I realized that the reset removes any gpu-power-prefs... instance, including gpu-active-... and gpu-policy-..., which can't be removed. As soon as I did the reset, I did an ls command after cd /sys/firmware/efi/efivars, which showed that there were no gpu-power-prefs-... at all.

ArchLinuXGPUfix.jpg

So, I skipped the other commands which involved having to remove the gpu-power-prefs-... file, and did the following (as per the screenshot):

---

*) cd /

*) umount /sys/firmware/efi/efivars/

*) mount -t efivarfs rw /sys/firmware/efi/efivars/

*) cd /sys/firmware/efi/efivars/

*) ls (list, just to verify that the file didn't magically appear)


*) printf "\x07\x00\x00\x00\x01\x00\x00\x00" > /sys/firmware/efi/efivars/gpu-power-prefs-fa4ce28d-b62f-4c99-9cc3-6815686e30f9

*) chattr +i "/sys/firmware/efi/efivars/gpu-power-prefs-fa4ce28d-b62f-4c99-9cc3-6815686e30f9"

*) cd /

*) umount /sys/firmware/efi/efivars/

*) reboot


---

which, aside from the ls command, is exactly what @AppleMacFinder wrote on his first post, sans the commentaries. I found those commentaries were a bit distracting and my bad eyesight wasn't helping since I have to pan between the screen, the keyboard, and the printout I was referring to. After several hours of failed attempts though, I was starting to memorize what I was typing that this final try went smoothly.

And it worked, I was able to successfully boot up without a hitch on the first reboot. By that time, which was a few hours, I was going to post the result. I ran into some problem after launching Cody's current version of switchGPU (the MBP froze when I tried switching GPUs), but, I was able to successfully do a force restart at least a couple of times.

After that, I removed the AMD kexts using AMF's steps in his first post by logging in Single-User Mode.

1) fsck -fy (to check a disk)

2) mount -uw / (mount a root filesystem with read/write permissions)

3) sudo mkdir /AMD_Kexts/ (make a directory to store the AMD drivers in case you'll need them in future)

4) sudo mv /System/Library/Extensions/AMD*.* /AMD_Kexts/ (move the AMD drivers)

5)
sudo rm -rf /System/Library/Caches/com.apple.kext.caches/ (remove the AMD drivers cache)

6)
sudo mkdir /System/Library/Caches/com.apple.kext.caches/ (just in case OS X will be dumb and will not recreate this directory, I am creating it for OS X)

7)
sudo touch /System/Library/Extensions/ (to update the timestamps so that new driver caches - without AMD drivers - will be definitely rebuilt)

8)
sudo umount / (umount a partition to guarantee that your changes are flushed to it)

9)
sudo reboot

The bootups failed, and I fell asleep while the MBP went through its bootup loop (I saw a few loops before I dozed off). I'm not sure when it actually happened, but, when I woke up a few hours later, it's working again. I'm not sure if removing the AMD Kexts helped (it probably did), and right now, I don't want to risk having to do another restart just to check if it won't switch under switchGPU/gfxcardStatus.

I'll be posting observation updates over the next few days. For the meantime, at least, my MBP is working again. I know it's temporary, but, I'm planning to get another laptop soon.

Addt'l: Here's my System Configuration and it shows it's currently on integrated.

Screen Shot 2017-11-09 at 13.40.15.png

Thanks again, @AppleMacFinder!

Update:

Seems the kext removal process didn't work at all. I still have the kexts in their original place. Though I can restart and shutdown properly most of the time, sometimes, it goes on a startup loop at least twice before fully starting up.

Cody's version of gfxcardstatus now freezes while Steve Chows version is working. The laptop works almost most of the time, but now freezes when I open a Facebook chat window (which I suppose tries to switch to the dGPU). It's done that before this fix.
 
Last edited:

iphone2g&3gfan

macrumors regular
Jun 14, 2013
147
103
Orlando, Florida
Hello everyone,
I wanted to share my success story with my machine as nearly all testing has occurred with later models than my own 2010 15 inch. The 330M finally began to croak to its end as it filled the screen with seemingly organized and color shifting bars of corruption.

I happened to have an old drive with 10.11.4 installed and from single user mode (system integrity protection disabled) i ran the usual:

"nvram fa4ce28d-b62f-4c99-9cc3-6815686e30f9:gpu-power-prefs=%01%00%00%00"

(no sudo as single user console is already root)

and I did a

"mv NVDA* backup_nvda"

in /system/library/extensions because I have an nvidia card, and I rebuilt the prelinkedkernel (i use:

"kextcache -prelinked-kernel /system/library/prelinkedkernels/prelinkedkernel -kernel /system/library/kernels/kernel /system/library/extensions /library/extensions -v 6 -z"

... so that i can see the kextcache being rebuilt in the foreground) and it worked out well! The i5-540m's original Intel HD Graphics (Arrandale) work with full Quartz Extreme and all the other apply eye candy. Brightness controls work as well.

However, what kext configuration is the recommended one for optimum battery life? All gpus alike have two (or three) different types of kexts for their functionality:
  • framebuffer, like com.apple.amdframebuffer, sometimes shared among multiple gpu families
  • specific accelerator kext, like com.apple.amdradeonx3000 (usually only for one gpu family)
  • resolution manager, like com.apple.nvdaresmantesla (usually nvidia gpus only, for amd and intel this functionality is usually incorporated into either the framebuffer or specific accelerator kext)
The specific accelerator kext calls the actual OpenGL accelerator .bundle like AMDRadeonX3000GLDriver.bundle (quartz extreme utilizes OpenGL)

According to some posts, it has been variously recommended to

a) leave out all of the dgpu kexts,

b) keep one type of kext: framebuffer, like com.apple.amdframebuffer,
or regular kext, like com.apple.amdradeonx3000, or

c) keep all the dgpu kexts and bundles.

Which one is the best option for battery life? All the recommendations somewhat contradict each other yet state the same benefit of the best battery life. Thank you for the clarification, and hopefully I helped you somewhat understand the hierarchy of graphics drivers in macOS.
 
Last edited:

E.Amrol

macrumors newbie
Oct 2, 2017
4
0
My issue came back again and this time your steps work for me. Can you guide on step 11, after type it, how to proceed? Normally just enter, for this time after complete type what to do? Exit by control X? What you mean with make it executable?

Anyone using mikeyn step can help me on this?
 

rubyme8

macrumors newbie
Oct 30, 2017
2
0
I just want to report back on my High Sierra experience.. So for regular Sierra this grub menu entry worked great.. booted fine AMD card didnt show up, sleep, display dimming worked as expected and fans/temp seemed normal. After upgrading to High Sierra this still kind of works, the AMD card doesn't show up but sleep and display dimming no longer work.. I've tried everything I could think of including:
  • Converted drive back to HPFS+ and reinstalled high sierra without converting to APFS
  • Cleared SMC and PRAM and retried all steps
But no matter what I do in High Sierra Sleep and Display dimming do not work.. I'm wondering if anyone else has tried or experienced this.. any solutions out there? Worst case I'll just stay on Sierra with the grub boot loader.. for me that has been the best overall experience but it would be great to be on High Sierra.

For High Sierra, I believe this menu entry will work:

Code:
menuentry "macOS" {
   outb 0x728 1
   outb 0x710 2
   outb 0x740 2
   outb 0x750 0
   exit
}
 

OldwithNew

macrumors newbie
Nov 9, 2017
1
0
Oh. Well perhaps a hardware solution is the only way for you to go (Other than buying a new MBP). My research has turned up that a new Graphics GPU is available for $35US, and service companies exist to remove and install the new chip... This process is not cheap, and most of the advice I've seen is such an investment in a five year old MBP is probably not a good idea...
[doublepost=1510257015][/doublepost]Thanks, was able to access MacBook after using your post. Do you think GFXCardStatus would be an asset or should I forget it? Again, thank-you!
 

brainshutdown

macrumors regular
Jul 16, 2012
124
110
@tmanx
Did you change the permissions as explained here?

If you did, run this on terminal and post the results here:
Code:
sudo kextutil -v /Library/Extensions/AMDGPUWakeHandler.kext

@rubyme8
High Sierra has too much problems right now, and for me the three major changes (APFS, Metal2 and HEVC) aren't worth the upgrade because:
  1. Benchmarks show that APFS is actually slower than HFS+
  2. I never had any problems with HFS+
  3. The HD3000 isn't compatible with Metal2
  4. No hardware acceleration for HEVC on my mac
 
Last edited:

tmanx

macrumors newbie
Nov 1, 2017
22
3
For everyone interested I've created a github gist with the instructions for booting with grub without installing linux:

https://gist.github.com/blackgate/17ac402e35d2f7e0f1c9708db3dc7a44



The grub solution doesn't have any of the problems you described. It can boot, sleep, shutdown and restart normally. It even works without removing the AMD kexts and doesn't need the login hook. I've been using it for about a year now, and haven't had a single crash.
@tmanx
Did you change the permissions as explained here?

If you did, run this on terminal and post the results here:
Code:
sudo kextutil -v /Library/Extensions/AMDGPUWakeHandler.kext

@rubyme8
High Sierra has too much problems right now, and for me the three major changes (APFS, Metal2 and HEVC) aren't worth the upgrade because:
  1. Benchmarks show that APFS is actually slower than HFS+
  2. I never had any problems with HFS+
  3. The HD3000 isn't compatible with Metal2
  4. No hardware acceleration for HEVC on my mac

@brainshutdown - thanks for picking this up. No I haven't. I first saw your post #1111 and followed the link to the AMDGPUWakeHandler on Github. I found a load of code and understood I needed to use XCode to build it (so went about getting a copy of that). Then I saw the kext you posted in 1114 and assumed that that was the built kext?

I took that and tried to follow the instructions below to install it

sudo chown -R root:wheel /Library/Extensions/AMDGPUWakeHandler.kext
touch /Libary/Extensions

But was just getting the error I posted.

I can't see any explanation for changing permissions on Github? Can you clarify what that is? Does the kext in 1114 still need building with XCode? Thanks for your help.
 

brainshutdown

macrumors regular
Jul 16, 2012
124
110
Ok, if you followed the instructions to install, you have already changed the permissions. Post here the results for the command I said earlier.
 

tmanx

macrumors newbie
Nov 1, 2017
22
3
Ok, if you followed the instructions to install, you have already changed the permissions. Post here the results for the command I said earlier.

Hi @brainshutdown - here's the results

Phoebes-MacBook-Pro:~ phoebe$ sudo kextutil -v /Library/Extensions/AMDGPUWakeHandler.kext

Password:

/Library/Extensions/AMDGPUWakeHandler.kext - no compatible dependency found for com.apple.kpi.mach.

/Library/Extensions/AMDGPUWakeHandler.kext - no compatible dependency found for com.apple.kpi.iokit.

/Library/Extensions/AMDGPUWakeHandler.kext - no compatible dependency found for com.apple.kpi.libkern.

/Library/Extensions/AMDGPUWakeHandler.kext - no compatible dependency found for com.apple.kpi.mach.

/Library/Extensions/AMDGPUWakeHandler.kext - no compatible dependency found for com.apple.kpi.iokit.

/Library/Extensions/AMDGPUWakeHandler.kext - no compatible dependency found for com.apple.kpi.libkern.

/Library/Extensions/AMDGPUWakeHandler.kext - no compatible dependency found for com.apple.kpi.mach.

/Library/Extensions/AMDGPUWakeHandler.kext - no compatible dependency found for com.apple.kpi.iokit.

/Library/Extensions/AMDGPUWakeHandler.kext - no compatible dependency found for com.apple.kpi.libkern.

Diagnostics for /Library/Extensions/AMDGPUWakeHandler.kext:

Authentication Failures:

File owner/permissions are incorrect (must be root:wheel, nonwritable by group/other):

/Library/Extensions/AMDGPUWakeHandler.kext

/Library/Extensions/AMDGPUWakeHandler.kext/Contents

/Library/Extensions/AMDGPUWakeHandler.kext/Contents/Info.plist

/Library/Extensions/AMDGPUWakeHandler.kext/Contents/MacOS

/Library/Extensions/AMDGPUWakeHandler.kext/Contents/MacOS/AMDGPUWakeHandler


Dependency Resolution Failures:

Only incompatible kexts found for these libraries:

com.apple.kpi.mach

com.apple.kpi.iokit

com.apple.kpi.libkern


Code Signing Failure: not code signed
 

brainshutdown

macrumors regular
Jul 16, 2012
124
110
OK, I believe the libs versions I used aren't compatible with your macOS. Just tell me which version of macOS you have, and paste here the results for this command:
Code:
kextlibs -xml /Library/Extensions/AMDGPUWakeHandler.kext
 

tmanx

macrumors newbie
Nov 1, 2017
22
3
OK, I believe the libs versions I used aren't compatible with your macOS. Just tell me which version of macOS you have, and paste here the results for this command:
Code:
kextlibs -xml /Library/Extensions/AMDGPUWakeHandler.kext

Cheers again.

The affected Mac is on 10.9.5. (no rush to update - she's just happy it's working)

return from command:

Phoebes-MacBook-Pro:~ phoebe$ kextlibs -xml /Library/Extensions/AMDGPUWakeHandler.kext
<key>OSBundleLibraries</key>
<dict>
<key>com.apple.kpi.iokit</key>
<string>13.4</string>
<key>com.apple.kpi.libkern</key>
<string>13.4</string>
</dict>

For x86_64:
1 symbol not found in any library kext.
 

brainshutdown

macrumors regular
Jul 16, 2012
124
110
Thank you.
Just one more thing to know which symbol it didn't find:
Code:
kextlibs -undef-symbols /Library/Extensions/AMDGPUWakeHandler.kext
 

tmanx

macrumors newbie
Nov 1, 2017
22
3
Thank you.
Just one more thing to know which symbol it didn't find:
Code:
kextlibs -undef-symbols /Library/Extensions/AMDGPUWakeHandler.kext
thanks again @brainshutdown

here's the command and return

Phoebes-MacBook-Pro:~ phoebe$ kextlibs -undef-symbols /Library/Extensions/AMDGPUWakeHandler.kext
For all architectures:
com.apple.kpi.iokit = 13.4
com.apple.kpi.libkern = 13.4

For x86_64:
1 symbol not found in any library kext:
__ZN9IOService4initEP15IORegistryEntryPK15IORegistryPlane
 

xanderx007

macrumors 6502
Nov 7, 2017
262
140
OK, thank you.

Maybe you should create a new, dedicated thread for this fix, or ask a moderator/admin to split the thread, since your solution is unique to the solution offered by AppleMacFinder.

I'll try your solution soon. I can understand some codes, but others just seem alien to me, and I have to re-read instructions a few times to get them right. Though my MBP is kinda working (using AFM's fix, still can't seem to remove the AM kexts), I still have some freeze issues with some apps, and when I use Facebook (probably an incompatibility issue with gfxcardstatus). I can shut it down and restart, but some of the restarts loop back, at least once or twice, before fully starting up. The OS doesn't freeze unless I do something, like open a Facebook chat or link.

BTW, can this solution work with an ArchLinux boot disk?
 
Last edited:

Mhanix

macrumors newbie
Oct 26, 2017
3
1
I'm happy if you are happy ;) Sorry I don't know about boot camp, but you could always use W7 in a virtual machine. The performance difference, compared to host, is not that big - I measured for Parallels Desktop and it was like -2% in CPU performance, -35% in GPU performance (might upset the gamers though). However maybe you will need to upgrade the RAM - could get 16 GB max at this laptop, 2x8GB DDR3 SO-DIMM modules


Thank you so much for your reply. Very much appreciated.
 

bluetao

macrumors newbie
Jun 11, 2012
1
1
Amazing stuff AppleMacFinder!
At the moment I'm sitting with both 15" MBP late 2011 and 15" MBP Retina Mid 2012 with logic board issue and Apples replacement program is not accepting to repair anymore.

Would this procedure work also on my 15" MBP Retina Mid 2012 as well?

Thank you so much for the great post and hard work you went thru finding the fix!

Michael
 
  • Like
Reactions: AppleMacFinder

tmanx

macrumors newbie
Nov 1, 2017
22
3
@xanderx007
I understand where you're coming from in that many of the fixes here are focussed on coding rather than a boot grub per se. But then again, this thread includes a range of fixes - to the point that users need to check which 'fix' has been tried before responding to a query (AppleMacFinder's, MikeyN's, nsger's, FGuarini's etc.).

Some fixes use a Linux distro - some don't - but all are trying to get the same outcome (disable dGPU). The original fix has been evolved and in some ways has had to evolve because of sleep issues, power issues etc. @brainshutdown's solution is just another step in that evolution to try and get us our Mac's back from Apple's failure - and was responding to the tricky issue of needing to load kexts to manage the dGPU. I'm glad it was here, I probably wouldn't have found it if it had been on another thread.

Like you - I'm no expert in coding and I'm blown away at the generosity of the guys helping here.

Regarding moving AMD Kexts - have you got SIP (El Capitan +) and have you disabled?

Responding to your last question about ArchLinux - I think that's been asked for before (e.g. #1051) It seems as long as the distro is using grub it can (per answer at #1055) - which it seems some ArchLinux does (#1058). I first tried FGuarini's fix #106 then used the non-install version of the Ubuntu grub (#1070) and it was easy to setup and deploy.
 
  • Like
Reactions: AppleMacFinder

xanderx007

macrumors 6502
Nov 7, 2017
262
140
@xanderx007
I understand where you're coming from in that many of the fixes here are focussed on coding rather than a boot grub per se. But then again, this thread includes a range of fixes - to the point that users need to check which 'fix' has been tried before responding to a query (AppleMacFinder's, MikeyN's, nsger's, FGuarini's etc.).

Some fixes use a Linux distro - some don't - but all are trying to get the same outcome (disable dGPU). The original fix has been evolved and in some ways has had to evolve because of sleep issues, power issues etc. @brainshutdown's solution is just another step in that evolution to try and get us our Mac's back from Apple's failure - and was responding to the tricky issue of needing to load kexts to manage the dGPU. I'm glad it was here, I probably wouldn't have found it if it had been on another thread.

Like you - I'm no expert in coding and I'm blown away at the generosity of the guys helping here.

Regarding moving AMD Kexts - have you got SIP (El Capitan +) and have you disabled?

Responding to your last question about ArchLinux - I think that's been asked for before (e.g. #1051) It seems as long as the distro is using grub it can (per answer at #1055) - which it seems some ArchLinux does (#1058). I first tried FGuarini's fix #106 then used the non-install version of the Ubuntu grub (#1070) and it was easy to setup and deploy.

I'm more in particular about the amount of pages and responses I have to weed through. I came across brainshutdown's solution quite by accident, and I believe it would be more beneficial for everyone else who might not get to see it, aside from the fact that it is a very different approach in terms of syntax.

As far as not finding it is concerned, I found this thread just by doing a google search, so I suppose, if this solution become as popular it would also be easily found by keyword search. People will also link to it if they find it useful.

As for the SIP, I've tried that earlier. No dice. Maybe I just did something wrong. I'll check out 1051 and 1058, since I must have skipped through them. I get dyslexic when I've read too much in a short span of time (which is what I've been doing).
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.