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.

xanderx007

macrumors 6502
Nov 7, 2017
262
140
Problems!

Computer: early 2011 MBP 15" with OS 10.10

I was successful (about 5 times successful!) in executing the Linux Live CD procedure which gave me a fully operating powerbook. But every time I restarted, it froze.

I reset the PRAM and did the pocedure all over again. Then I read you have to disable the AMD Kexts via single user mode... this is where I'm running into a problem.

I'm getting a "permissions denied" "Unable to stat" after entering the command: sudo mkdir /AMD_Kexts/

I then read you have to disable the SIP using terminal via "Command-R" (which I can't get to load because the computer freezes after startup. But I though on OS 10.10 that I would not have to do that. I tried "Command-S-R" and tried "csrutil disable" with it not recognizing the "csrutil" command.

Where do I go from here? I have a working computer, I just can never shut it down or put it to sleep!

Thanks for any help!


Whenever you reset the PRAM/NVRAM/SMC, the SIP is reenabled. Boot into Single User Recovery Mode (Cmd+S+R) which is text based recovery, and you can enter the csrutil disable command.

Anyway, though the EFI fix works, it's a bit unstable for any long-term operation, so, you might want to trry the GRUB Solution.
 

samisabbani

macrumors newbie
Nov 30, 2017
5
0
I have a MBP running 3 different OS's (Lion, Mavericks, Sierra). I need to upgrade to High Sierra, but I recall someone saying these workaround do not work in High Sierra... Any idea if it will work in High Sierra ?

I am using the two following guides, which have worked for me without a single issue so far, in all 3 systems:

Complete Guide to Permanently Disable AMD 6XXXm series dGPU and Prevent Thermal Throttling

Acknowledgements: This guide is entirely based on nsgr's work.

1. This is an optional step. If you have previously attempted to remove AMD kexts, revert your system to the original state by installing the latest Mac OS combo update. At the time of writing of this guide, the latest combo update can be found here. Installing the update will update your kext files to the latest version. After the update is finished, your macbook will restart and freeze as soon as the dGPU is activated. Shutdown or force a restart.

2. Clear the NVRAM by holding Option + Command + P + R on startup until the macbook reboots.

3. Boot into the single user mode by pressing Command + S on startup. Execute the following commands to enable the iGPU during the boot phase:
Quote
sudo nvram fa4ce28d-b62f-4c99-9cc3-6815686e30f9:gpu-power-prefs=%01%00%00%00
Quote
reboot
4. Disable System Integrity Protection to allow editing system files. Boot into the verbose recovery mode by pressing Command + R + S on startup. Execute
Quote
csrutil disable
Quote
reboot
5. Go again into the the single user mode by pressing Command + S on startup. Mount root with write permissions via
Quote
/sbin/mount -uw /
(Note the space in front of the last forward slash). Next, create a backup folder by executing
Quote
mkdir backup
Move the AMDRadeonX3000.kext file to the backup folder you created by executing
Quote
mv System/Library/Extensions/AMDRadeonX3000.kext backup/
Moving this kext file is sufficient to prevent graphics switching.
Quote
reboot
6. Re-enable System Integrity Protection inside the verbose recovery mode (Command + R + S) by executing
Quote
csrutil enable
Quote
reboot
7. Boot into Mac OS normally and start the Terminal. Navigate to your backup folder using
Quote
cd /backup
Load the former kext file manually by executing
Quote
sudo kextload AMDRadeonX3000.kext
to prevent the dGPU from idling at maximum TDP. This will not re-enable graphics switching. A restart is not required.

Closing remarks: Step 7 will have to be executed after every system restart to prevent overheating. Steps 4, 5 and 6 will have to be executed after each major system update that breaks graphics switching. Step 3 has to be repeated after a NVRAM reset.

--

11. Now follow the rest of MikeyN’s guide:

Automate this with the following LoginHook:
sudo mkdir -p /Library/LoginHook
sudo nano /Library/LoginHook/LoadX3000.sh

with the following content:
#!/bin/bash
kextload /System/Library/Extensions-off/AMDRadeonX3000.kext
exit 0

then make it executable and active:
sudo chmod a+x /Library/LoginHook/LoadX3000.sh
sudo defaults write com.apple.loginwindow LoginHook /Library/LoginHook/LoadX3000.
---------------------------------------------------------------------------------------
please i have macbook pro late 2011
running high sierra 10.13.1

i did this step ;
6. Re-enable System Integrity Protection inside the verbose recovery mode (Command + R + S) by executing
Quote
csrutil enable
Quote
reboot

- What should i do after on detail please? because my english no too good
 

Dbarnblatt

macrumors newbie
Nov 30, 2017
3
1
Los Angeles
Whenever you reset the PRAM/NVRAM/SMC, the SIP is reenabled. Boot into Single User Recovery Mode (Cmd+S+R) which is text based recovery, and you can enter the csrutil disable command.

Anyway, though the EFI fix works, it's a bit unstable for any long-term operation, so, you might want to trry the GRUB Solution.

I already tried the Single User Recovery Mode (Cmd+S+R) and entered csrutil disable with the following result:

csrutil: command not found
 

weswes106

macrumors newbie
Nov 29, 2017
2
1
I spent two working days to discover this solution, and really hope that it will work flawlessly for every MBP owner with a broken discrete GPU. Good luck!

I think I spent a whole working day trying to implement the fix. :)

I succeeded deleting and re writing the "gpu-power-prefs..." file and got through to the end and applied the chattr +i command to it. I then did the unmount and the reboot and to my great pleasure the machine booted into the integrated graphics mode. However after a restart the fault reappeared. I've done this twice now with the same result. After spending so much time I hate to admit defeat.

HEPL! Please.
 

samisabbani

macrumors newbie
Nov 30, 2017
5
0
I have a MBP running 3 different OS's (Lion, Mavericks, Sierra). I need to upgrade to High Sierra, but I recall someone saying these workaround do not work in High Sierra... Any idea if it will work in High Sierra ?

I am using the two following guides, which have worked for me without a single issue so far, in all 3 systems:

Complete Guide to Permanently Disable AMD 6XXXm series dGPU and Prevent Thermal Throttling

Acknowledgements: This guide is entirely based on nsgr's work.

1. This is an optional step. If you have previously attempted to remove AMD kexts, revert your system to the original state by installing the latest Mac OS combo update. At the time of writing of this guide, the latest combo update can be found here. Installing the update will update your kext files to the latest version. After the update is finished, your macbook will restart and freeze as soon as the dGPU is activated. Shutdown or force a restart.

2. Clear the NVRAM by holding Option + Command + P + R on startup until the macbook reboots.

3. Boot into the single user mode by pressing Command + S on startup. Execute the following commands to enable the iGPU during the boot phase:
Quote
sudo nvram fa4ce28d-b62f-4c99-9cc3-6815686e30f9:gpu-power-prefs=%01%00%00%00
Quote
reboot
4. Disable System Integrity Protection to allow editing system files. Boot into the verbose recovery mode by pressing Command + R + S on startup. Execute
Quote
csrutil disable
Quote
reboot
5. Go again into the the single user mode by pressing Command + S on startup. Mount root with write permissions via
Quote
/sbin/mount -uw /
(Note the space in front of the last forward slash). Next, create a backup folder by executing
Quote
mkdir backup
Move the AMDRadeonX3000.kext file to the backup folder you created by executing
Quote
mv System/Library/Extensions/AMDRadeonX3000.kext backup/
Moving this kext file is sufficient to prevent graphics switching.
Quote
reboot
6. Re-enable System Integrity Protection inside the verbose recovery mode (Command + R + S) by executing
Quote
csrutil enable
Quote
reboot
7. Boot into Mac OS normally and start the Terminal. Navigate to your backup folder using
Quote
cd /backup
Load the former kext file manually by executing
Quote
sudo kextload AMDRadeonX3000.kext
to prevent the dGPU from idling at maximum TDP. This will not re-enable graphics switching. A restart is not required.

Closing remarks: Step 7 will have to be executed after every system restart to prevent overheating. Steps 4, 5 and 6 will have to be executed after each major system update that breaks graphics switching. Step 3 has to be repeated after a NVRAM reset.

--

11. Now follow the rest of MikeyN’s guide:

Automate this with the following LoginHook:
sudo mkdir -p /Library/LoginHook
sudo nano /Library/LoginHook/LoadX3000.sh

with the following content:
#!/bin/bash
kextload /System/Library/Extensions-off/AMDRadeonX3000.kext
exit 0

then make it executable and active:
sudo chmod a+x /Library/LoginHook/LoadX3000.sh
sudo defaults write com.apple.loginwindow LoginHook /Library/LoginHook/LoadX3000.

guys please i did all the steps but when i executed the step 7 for "cd /back" up i got (
-bash: cd: /backup: No such file or directory) and for "sudo kextload AMDRadeonX3000.kext" i got (
/Users/pro/AMDRadeonX3000.kext failed to load - (libkern/kext) not found; check the system/kernel logs for errors or try kextutil(8). )

when i run photoshop my macbook restart
 
Last edited:

nsgr

macrumors 6502
May 22, 2017
317
117
Problems!

Computer: early 2011 MBP 15" with OS 10.10

I was successful (about 5 times successful!) in executing the Linux Live CD procedure which gave me a fully operating powerbook. But every time I restarted, it froze.

I reset the PRAM and did the pocedure all over again. Then I read you have to disable the AMD Kexts via single user mode... this is where I'm running into a problem.

I'm getting a "permissions denied" "Unable to stat" after entering the command: sudo mkdir /AMD_Kexts/

I then read you have to disable the SIP using terminal via "Command-R" (which I can't get to load because the computer freezes after startup. But I though on OS 10.10 that I would not have to do that. I tried "Command-S-R" and tried "csrutil disable" with it not recognizing the "csrutil" command.

Where do I go from here? I have a working computer, I just can never shut it down or put it to sleep!

Thanks for any help!

SIP -> only El Capitan (10.11) and later Mac OS (Sierra, HighSierra, etc).

https://support.apple.com/en-us/HT204899
 

xanderx007

macrumors 6502
Nov 7, 2017
262
140
I already tried the Single User Recovery Mode (Cmd+S+R) and entered csrutil disable with the following result:

csrutil: command not found

EDIT:

Seems like nsgr spotted the issue: You're still in Yosemite which does not have SIP.

[doublepost=1512105963][/doublepost]
I think I spent a whole working day trying to implement the fix. :)

I succeeded deleting and re writing the "gpu-power-prefs..." file and got through to the end and applied the chattr +i command to it. I then did the unmount and the reboot and to my great pleasure the machine booted into the integrated graphics mode. However after a restart the fault reappeared. I've done this twice now with the same result. After spending so much time I hate to admit defeat.

HEPL! Please.


Again, though the EFI fix works, it's a bit unstable for any long-term operation, so, you might want to try the GRUB Solution, which will enable your MBP to fully ignore the dGPU, that it wouldn't even appear in the System Information report. You should be be able to put your MBP to sleep, shut it down, boot and restart, without issue (at least in my case and others who have implemented it).

Screen Shot 2017-12-01 at 13.23.28.png
 

Attachments

  • 24058972_10212471225270524_891642616880205122_n.jpg
    24058972_10212471225270524_891642616880205122_n.jpg
    73.2 KB · Views: 614
Last edited:
  • Like
Reactions: AppleMacFinder

nsgr

macrumors 6502
May 22, 2017
317
117
So what is causing the "permission denied" when I try to move the kexts? I followed the procedure exactly.

If you are in Single User Mode (Command + S) and can not execute the mkdir command, then you probably have not set up the system partition with Read / Write.

1 - Boot Single User Mode (Command + S)

You reported problem in Recovery Mode (Graphical) freezing (AMD6000Controller.kext). This happens when the ArchLinux procedure or sudo nvram fa4ce ...::gpu-power-prefs=%01%00%00%00 is not enabled.

Putting the Intel GPU as the main video card. Do not forget or change any letter or number or place a space where it does not exist.
Code:
sudo nvram fa4ce28d-b62f-4c99-9cc3-6815686e30f9:gpu-power-prefs=%01%00%00%00

2 - Verify partition system
Code:
/sbin/fsck -fy

3 - Mount partition system Read and Write. Do not forget the final "/".
Code:
/sbin/mount -uw /

4 - Go to "/". First level of hierarchy partition system.
Code:
cd /

5 - Create directory AMD_Kexts. Yes, no slash here. You are in the first level "/". Check with command pwd.
Code:
pwd
/
sudo mkdir AMD_Kexts

6 - Move the problematic AMDRadeonX3000.kext to directory /AMD_Kexts
Code:
sudo mv -v /System/Library/Extensions/AMDRadeonX3000.kext /AMD_Kexts

7 - Change time stamp /System/Library/Extensions to rebuild cache.
Code:
sudo touch /System/Library/Extensions/

8 - Restart the system.
Code:
reboot

9 - Boot normal. After login (graphical), load the problematic AMDRadeonX3000.kext to drop down temperature AMD GPU.
Code:
sudo kextload /AMD_Kexts/AMDRadeonX3000.kext

Or try the GRUB solution.
GRUB

Both of the above procedures need to be with the Intel video card as gpu-power-prefs.
Code:
sudo nvram fa4ce28d-b62f-4c99-9cc3-6815686e30f9:gpu-power-prefs=%01%00%00%00
 
Last edited:
  • Like
Reactions: AppleMacFinder

AppleMacFinder

macrumors 6502a
Original poster
Dec 7, 2009
796
152
I'm getting a "permissions denied" "Unable to stat" after entering the command: sudo mkdir /AMD_Kexts/

Hi there Dbarnblatt, if you read my first message at this thread - you will see these instructions:

The degree of your inconvenience while doing these steps - strongly depends on how heavily a screen's image is distorted in your case. In my case it was even more difficult because the OS X partition became a "read-only" partition (because of too many emergency shutdowns I did while desperately trying to boot OS X with a failed GPU) so I had to remove a hard drive from MacBook Pro and (using a USB to SATA 2.5" adapter taken from my portable HDD) attached it to a computer with Linux, then followed these instructions:

https://superuser.com/questions/961401/mounting-hfs-partition-on-arch-linux (1st answer) - carefully executed a number of commands, calculated a sizelimit for my parition layout, and finally ran sudo mount -t hfsplus -o force,rw,sizelimit=YOURNUMBER /dev/sdb2 /mnt to mount this HFS+ partition to /mnt directory in read-write mode. Then I performed these "1)-7)" steps you see above, and also repaired a filesystem by running sudo fsck.hfsplus -f /dev/sdb2 before unmounting a partition with sudo umount /mnt and putting a hard drive back to MBP...

SIP is a thing enforced by a running OS X system. If you remove your hard drive and attach it to a Linux computer, then mount a hard drive, you can do anything you want - without worrying about the permissions. Not very convenient, of course: have to remove a hard drive from MBP, need to have a USB to SATA adapter, and the mounting instructions are a bit tricky - but this method is 100% guaranteed to work, while with SIP its more of trial and error
[doublepost=1512121450][/doublepost]
Thanks tutorial, I fix my macbook pro 8,2 2011. I like how to use external monitor using intel integrated?

here is this post: https://forums.macrumors.com/thread...fi-variable-fix.2037591/page-10#post-24733694
  1. "I just received my USB to VGA converter. It works, although not perfect. A little lagging noticed when manipulating windows (opening, closing, switching, etc). I've played youtube videos in HD, with screen resolution 1920*1080, and the lagging is barely noticeable. Also the taskbar is showing up in the wrong color and resolution. But other than that, no complains. Mine is 2011 MBP with USB2.0, USB3.0 might be better."
Try to get this or any other adapter and lets see if it works for you! :) This experiment is not expensive, should be about $5 for such adapter, so why not give it a try ;)
[doublepost=1512121798][/doublepost]
I keep a Snow Leopard partition on my SSD. My question is whether this fix will work on SL as well?
Should be OS independent, though you can't know for sure until you try it ;) Sadly a lot of modern software (the latest versions of it) have a minimum requirement of 10.11 El Capitan - so, while Snow Leopard is a great stable system, its of a little use today...
[doublepost=1512122069][/doublepost]
I am curious though, I believe I read on one of the pages here, that because we switched from the AMD or NVidia GPUs to the Intel, that there is less heat being produced, is that true or did I misread that?
To reduce the amount of heat being produced, you need to follow the "Complete Guide to Permanently Disable AMD 6XXXm series dGPU and Prevent Thermal Throttling" (somewhere in this thread, please use Search). Because this fix alone just hides this failed AMD GPU from OS, while its still being powered and is producing heat
 

isaberu8891

macrumors newbie
Dec 1, 2017
1
0
First of all, i want to thank you AppleMacFinder for your hard work!!

So I successfully fixed my GPU issue after following your instructions carefully, but I have noticed some glitches here and there:

- the screen brightness can no longer be controlled via keyboard shortcuts and in system prefs

- I can no longer close the laptop to allow the mac to go to sleep; the fans keep spooling and the LED indicator seems to show that system is still in use

- temperature seems to be higher than normal, which seems to make the fans spin at higher RPMs (I've noticed that I can force the temperature down by forcing the fans to spin even higher RPMs through the use of SMCfanControl app.

- the trackpad doesn't seem to track now and then, and glitches out thus my screen keeps switching windows/desktops.

So far these are the only bugs that I have found and encountered.
But I just want to say thank you so much for creating this, you just saved this poor girl from buying another expensive laptop! =)
 

xanderx007

macrumors 6502
Nov 7, 2017
262
140
First of all, i want to thank you AppleMacFinder for your hard work!!

So I successfully fixed my GPU issue after following your instructions carefully, but I have noticed some glitches here and there:

- the screen brightness can no longer be controlled via keyboard shortcuts and in system prefs

- I can no longer close the laptop to allow the mac to go to sleep; the fans keep spooling and the LED indicator seems to show that system is still in use

- temperature seems to be higher than normal, which seems to make the fans spin at higher RPMs (I've noticed that I can force the temperature down by forcing the fans to spin even higher RPMs through the use of SMCfanControl app.

- the trackpad doesn't seem to track now and then, and glitches out thus my screen keeps switching windows/desktops.

So far these are the only bugs that I have found and encountered.
But I just want to say thank you so much for creating this, you just saved this poor girl from buying another expensive laptop! =)



If you are on High Sierra, you might want to follow the GRUB solution thread, which has addressed the screen brightness, sleep and heating issue.
 

baloontire3

macrumors newbie
Dec 2, 2017
5
1
e. Oregon
I was glad to find this post (thanks AppleMacFinder) but I had to do the re-flowing trick first to get any screen to come up at all. That worked:) (for how long is uncertain) and I was able to start the process on my wife's 15" MPB late 2011 running Sierra. Having downloaded and burned a CD to boot up with the Arch Linux file, however I cannot get "EFI boot" to appear. It only shows a HD icon and an "up arrow" after having held down the Option Key during startup. I can't seem to get it to bring up the CD while booting. A hand getting past square one would be appreciated!


I discovered my problem with the help of "peytonplaymc" on youtube. Dragging and dropping does not work for the archlinux download. You must use the disk utility to make a copy on your disk. Then it will be bootable. Trivial to most of you, but it had me stuck for a while
 
Last edited:

MacMan1213

macrumors newbie
Dec 2, 2017
1
0
Earth
If you don't have time to read my story (which also describes some interesting technical approaches) just scroll down this thread until a "100% WORKING SOLUTION" text

Discrete AMD GPU of my 2011 MacBook Pro 8,2 has finally failed because of the reasons mentioned here ( http://logicboardmac.blogspot.ru/ ) and there ( https://www.macrumors.com/2015/02/19/2011-macbook-pro-repair-program-apple/ ) . It has been working perfectly for 6 years under quite a high load, even tried SETI@HOME mining at background! So I was confident that my MBP is not affected by bad solder / bad soldering quality and didn't want to bring it to Apple for a free repair program - partially because couldn't find the time to pause my important software projects, partially because I was afraid that Apple might give me a less reliable logic board or refuse a free repair because of the several unrelated repairs that I did manually by myself earlier to save money: changed thermal paste a few times, replaced the internal battery 2 times, replaced a keyboard with broken buttons, etc. But it finally broke down last week: laptop's screen image became distorted, it refused to boot OS X (always freezing half-way), and - Apple free repair program has already ended! I know there are affordable solutions like $50 BGA resoldering at unofficial local repair shop and that its possible to get a new replacement HD 6750M chip from AliExpress for $35 or cheaper ( http://www.aliexpress.com/item/DC-2...0028-216-0810028-BGA-Chipset/32764872143.html or https://www.aliexpress.com/item/DC-2015-New-216-0810001-216-0810001-Graphic-Chipset/32718112928.html , because don't know if this is true - https://www.rossmanngroup.com/board...0604-replace-216-0810005-gpu-with-216-0810028 ) to guarantee a successful repair, so the total price of repair would be either $50 or $50+$35=$85 - less than $100 in any case. But I don't like investing money to the old computers, so I have thought - what if there is some hack to force MBP to use integrated graphics ALL THE TIME, even while booting ? And then started to explore the possible solutions...

===

First of all, it is possible to successfully boot a MBP to OS X while still using the failed GPU, after you remove the AMD drivers by booting in command line mode (CMD+S) and entering these commands:
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 degree of your inconvenience while doing these steps - strongly depends on how heavily a screen's image is distorted in your case. In my case it was even more difficult because the OS X partition became a "read-only" partition (because of too many emergency shutdowns I did while desperately trying to boot OS X with a failed GPU) so I had to remove a hard drive from MacBook Pro and (using a USB to SATA 2.5" adapter taken from my portable HDD) attached it to a computer with Linux, then followed these instructions:

https://superuser.com/questions/961401/mounting-hfs-partition-on-arch-linux (1st answer) - carefully executed a number of commands, calculated a sizelimit for my parition layout, and finally ran sudo mount -t hfsplus -o force,rw,sizelimit=YOURNUMBER /dev/sdb2 /mnt to mount this HFS+ partition to /mnt directory in read-write mode. Then I performed these "1)-7)" steps you see above, and also repaired a filesystem by running sudo fsck.hfsplus -f /dev/sdb2 before unmounting a partition with sudo umount /mnt and putting a hard drive back to MBP...

===

This gave me a MBP which could boot to OS X although STILL using a broken AMD GPU: so it screen's image is very distorted (could browse the Internet but quite inconvenient to read a text), Launchpad is super laggy, and you can't switch to Integrated GPU using gfxCardStatus because: without AMD drivers (which we had to remove to successfully boot to OS X) Macbook Pro thinks its' internal screen is External Display and gfxCardStatus tells it is impossible to switch because External Display is using AMD GPU. Somewhere I found a suggestion that it is possible to rebuild a gfxCardStatus from the source code - https://github.com/codykrieger/gfxCardStatus - with removed or commented out 156-166 lines in the ./gfxCardStatus/Classes/GSProcess.m to make it to ignore the external display:

// find out if an external monitor is forcing the discrete gpu on
CGDirectDisplayID displays[8];
CGDisplayCount displayCount = 0;
if (CGGetOnlineDisplayList(8, displays, &displayCount) == noErr) {
for (int i = 0; i < displayCount; i++) {
if ( ! CGDisplayIsBuiltin(displays))
[list addObject:[NSDictionary dictionaryWithObjectsAndKeys:
Str(@"External Display"), kTaskItemName,
@"", kTaskItemPID, nil]];
}
}


So I rebuilt a gfxCardStatus using the instructions from the last reply of this issue -
https://github.com/codykrieger/gfxCardStatus/issues/229
(also had to download a MacOSX10.11.sdk from here - https://github.com/phracker/MacOSX-SDKs/releases - unpack and copy it to XCode's /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk - because of the Apple's stupidity the latest XCode for El Capitan does not include SDK for El Capitan!) However, it still didn't work - gfxCardStatus only pretended that it has switched to Integrated GPU, while in reality OS X did not let it switch! Even after I edited ./gfxCardStatus/Classes/GSGPU.m file to enable the mysterious "Nuke it from orbit switching" option, it still couldn't switch...

===

Then I discovered this interesting repository - https://github.com/0xbb/gpu-switch - which is partially similar by its' source code to gfxCardStatus but also has the "Login Hooks" (install_hooks.sh) to "automate the switching process for login/logout". Sadly it didn't work for me... However, there is a very interesting gpu-switch text file right at the root of this repository, which describes the EFI variables!

https://github.com/0xbb/gpu-switch/blob/master/gpu-switch

After studying it and also reading this issue's comments - https://github.com/0xbb/gpu-switch/issues/11 - I became confident to try this solution, but found out that my MacBook Pro 2011 8,2 with OS X El Capitan 10.11.6 is in a VERY problematic situation:

1) rEFInd is not installed, and to install it - must disable SIP protection. But I cannot boot to Recovery mode (Command+Option+R) or to OS X Installation DVD/USB (hold Option), (to disable SIP), because they freeze while booting! - although I removed AMD kexts from my system, of course these recovery tools are using AMD kexts integrated to their design. Also cannot use Rootfool hack ( https://github.com/gdbinit/rootfool ) to disable SIP during runtime, because it works only at OS X version older than 10.11.4

2) Tried overheating my Macbook Pro on purpose (forcing CPU usage to 100% and putting it to a tightly closed bag) to force it to shutdown from overheating and then quickly reboot so that Integrated graphics will be enabled during the boot time - making it possible to boot to Recovery. But because of the wonderful high end thermal paste I have applied not so long ago - cannot overheat it even after waiting for a long time! At this point I thought that could either: a) remove AMD kexts from Installation media, or b) to connect MBP's hard drive to a Linux machine again and run a bunch of chmods to remove the SIP flags from the directories mentioned here ( http://apple.stackexchange.com/questions/193368/what-is-the-rootless-feature-in-el-capitan-really ) which could potentially make a system unbootable, or c) to try installing rEFInd to HFS+ partition directly from a Linux machine with root rights because it will bypass SIP --- but have not explored these options, although some of them might have worked...

3) Wanted to boot a Linux LiveCD to edit the EFI variables from there, but no matter what I did: tried booting straight without GRUB option modifications, tried editing GRUB boot options (with "e" key) to add nomodeset / remove quiet splash / or both in every combination , or like suggested in this article ( https://wiki.archlinux.org/index.php/MacBookPro8,1/8,2/8,3_(2011) ) also add i915.modeset=0 radeon.modeset=0 or radeon.modeset=0 i915.modeset=1 i915.lvds_channel_mode=2 ; and then pressed Fn+F10 or Shift+Ctrl+Fn+F10 to boot with these options: but the Linux boot process always failed at different boot stages, no matter what popular user-friendly Linux distribution or what version of it I am trying: tried many releases of Ubuntu / Lubuntu / Fedora , even the old "AMD64 Mac" and "Alternate AMD64 Mac" images, but they always failed - either at the very beginning of boot process (black screen, or a black screen with a blinking or stuck _ character at the left upper corner) or failed at the very end of it - right before it is supposed to show a graphical desktop environment...

Later, totoe_84 wrote that he was able to boot Ubuntu in graphical mode using the following setup for GRUB:
  • To disable the AMD graphics card I added the following lines after set gfxpayload=keep
outb 0x728 1
outb 0x710 2
outb 0x740 2
outb 0x750 0
  • Next I added the following after quiet splash
    i915.lvds_channel_mode=2 i915.modeset=1 i915.lvds_use_ssc=0
(based on https://ubuntuforums.org/showthread.php?t=2157775 )

===

Then I remembered that there are not-mainstream Linux distributions for advanced users, which have a LiveCD without any graphical interface: you are dropped to a pure console and you are supposed to install the system along with only those graphical interfaces and software packages / groups of packages which you explicitly select. For example: Arch Linux (https://www.archlinux.org/) and Gentoo Linux (https://gentoo.org/) . Because their LiveCD does not have a graphical interface, they could be booted without a problem to a pure Linux console and there you could edit the EFI variables ! So here is a...

===
=== 100% WORKING SOLUTION
===
=== Force your MBP to ALWAYS use Intel integrated GPU (EFI variable fix)
===
=== to make it great again ! ;)
===


1) Create the Arch Linux LiveCD/LiveUSB :

You need a working computer for that and a spare CD/DVD/USB drive. Download the latest Arch Linux ISO image from this page - https://www.archlinux.org/download/ , at the time of writing it is archlinux-2017.03.01-dual.iso . Then you could either simply burn this ISO to CD/DVD (which later could be either inserted to MBP's SuperDrive or External DVD Drive connected to MBP by two USB cables) or create a bootable USB: use the great detailed instructions from this page, https://wiki.archlinux.org/index.php/USB_flash_installation_media

2) Boot to it: insert this CD/DVD/USB to Macbook Pro, hold Option key while booting, choose "EFI boot" (that is your bootable installation media), press "e" key to edit the GRUB options of the Arch Linux archiso x86_64 UEFI CD menu entry while it is selected at the main screen, add nomodeset to the end of this line and press Enter. If everything is done correctly, you will find yourself at the Linux console!

3) Edit EFI vars: looks like efivarfs filesystem is mounted by default! So you can already cd /sys/firmware/efi/efivars and ls to explore this directory and see if there is a "gpu-power-prefs-..." variable (where ... is UUID of this variable). If there is such a variable, its better to remove it with rm. In my case the efivarfs has been mounted by default with read/write permissions, but if you are getting the "operation not permitted" message while attempting to rm, it means that in your case efivarfs has been mounted as read-only and you need to remount it with read-write permissions and try again (credits to totoe_84 for this valuable addition) :
*) cd /
*) umount /sys/firmware/efi/efivars/
*) mount -t efivarfs rw /sys/firmware/efi/efivars/
*) cd /sys/firmware/efi/efivars/

If your screen is so distorted that it is difficult to see the letters, just start typing the rm gpu-power-pre and then press TAB key for autocompletion. In my case there were not such a EFI variable, only "gpu-active-..." and maybe somehow related "gfx-saved-config-restore-status-..." . Then I looked again at that gpu-switch text file (mentioned above, https://github.com/0xbb/gpu-switch/blob/master/gpu-switch),
and entered THESE COMMANDS:

*) chattr -i "/sys/firmware/efi/efivars/" <----- skip this command

Actually a gpu-switch script had "${sysfs_efi_vars}/${efi_gpu}" but I didnt have a "gpu-power-prefs-..." variable - so, partially by mistake, I didn't add that efi_gpu suffix and entered this incomplete path accidentally

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

Did not have a EFI "gpu-power-prefs-" variable so I thought that it will be OK to create a new one with a random UUID - in this case, taken directly from a gpu-switch script

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

http://www.tecmint.com/chattr-command-examples/ - chattr (Change Attribute) is a command line Linux utility that is used to set/unset certain attributes to a file in Linux system to secure accidental deletion or modification of important files and folders, even though you are logged in as a root user.
...
Syntax of chattr ---> chattr [operator] [flags] [filename]
...
A file is set with ‘i‘ attribute (+i as you see in this command) ---> cannot be modified (immutable). Means no renaming, no symbolic link creation, no execution, no writable, only superuser can unset the attribute.
...
Operator
  1. + : Adds the attribute to the existing attribute of the files.
  2. : Removes the attribute to the existing attribute of the files.
  3. = : Keep the existing attributes that the files have.
This chattr command is supposed to lock a file to make it accessible only by "superuser" - and so that, while booting, your EFI will have no chance to screw up your gpu-power-prefs-... variable under any circumstances

*) cd /

Could not unmount efivars if you are inside this directory, so change to the root directory

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

Guarantees that your EFI variables are flushed to efivarfs filesystem, please unmount it safely before rebooting)

*) reboot

===> IF YOU DID EVERYTHING CORRECTLY, MOST LIKELY THAT YOUR MACBOOK PRO IS NOW USING INTEGRATED GRAPHICS WHILE BOOTING, AFTER BOOTING, AND IS WORKING GREAT AGAIN ! ;)

In the future maybe you could need to re-apply this solution if you would have to reset your PRAM / NVRAM / SMC because of some other problems, so remember this solution somewhere... Funny thing: now you can't switch to Discrete GPU even using gfxCardStatus, it is forever stuck at Integrated


I spent two working days to discover this solution, and really hope that it will work flawlessly for every MBP owner with a broken discrete GPU. Good luck!
[doublepost=1512263751][/doublepost]Hey Thx for the great work!

Can you still run a second display with this fix?

Best regards,

MM
 

xanderx007

macrumors 6502
Nov 7, 2017
262
140
[doublepost=1512263751][/doublepost]Hey Thx for the great work!

Can you still run a second display with this fix?

Best regards,

MM


No, as external monitors are driven exclusively by the dGPU. I'm looking into USB to HDMI/VGA adapters.
[doublepost=1512269669][/doublepost]
I was glad to find this post (thanks AppleMacFinder) but I had to do the re-flowing trick first to get any screen to come up at all. That worked:) (for how long is uncertain) and I was able to start the process on my wife's 15" MPB late 2011 running Sierra. Having downloaded and burned a CD to boot up with the Arch Linux file, however I cannot get "EFI boot" to appear. It only shows a HD icon and an "up arrow" after having held down the Option Key during startup. I can't seem to get it to bring up the CD while booting. A hand getting past square one would be appreciated!

Your CD drive might not be functioning properly anymore (the hardware can still be seen by the system, but, it can't read the CD). Just use a USB stick.
 

davidescion

macrumors newbie
Dec 3, 2017
4
0
The 2D World
So, I might seem new here but I've been following this thread for a while now, I first used the "original fix" and I later updated to the grub method, but I have a huge problem since I want to actually have a windows partition. I tried with the "old" efi method but installing windows was impossible and using another computer to install windows with on a drive and booting off of it works one or two times and then never works again, with grub its the same. I can't even see the drive using the command "ls -l" on grub. Is there a fix or has someone got windows to boot (btw 10 and 8 do this and 7 doesn't even get this far).
 

mr_redeemer

macrumors newbie
Dec 3, 2017
1
0
As with the above person, I'm new on here, but I have attempted to fix my 15" early 2011 MBP using a YouTube video using these instructions:
1 - Enter Recovery Mode (text mode)

Command + R + S


2 - Disable SIP (SIP lock System folder -> no move kexts to another folder). SIP (csrutil) only enable / disable on Recovery Mode.

csrutil disable


3 - Restart the system

reboot


(steps 4-17 didn't work for me technically since it said my disk was write protected.. if they don't work for you skip to step 19 and see if that works right away. It might have something to do with the new APFS hdd format).


4 - Enter Single User mode

boot up holding down the CMD and S keys


5 - Check a disk

fsck -fy



6 - Mount a root filesystem with read/write permissions

mount -uw /


7 - Make a directory to store the AMD drivers in case you'll need them in future

mkdir /AMD_Kexts/



8 - Move the AMD drivers

mv /System/Library/Extensions/AMD*.* /AMD_Kexts/


9 - Remove the AMD drivers cache)

rm -rf /System/Library/Caches/com.apple.kext.caches/


10 - Just in case OS X will be dumb and will not recreate this directory, we are creating it for OS X

mkdir /System/Library/Caches/com.apple.kext.caches/


11 - to update the timestamps so that new driver caches - without AMD drivers - will be definitely rebuilt


touch /System/Library/Extensions/



12 - Unmount a partition to guarantee that your changes are flushed to it

umount /


13 – Reboot

reboot



14 - Before enabling SIP again, try the normal boot without pressing any key. The Mac OS will rebuild the kernel cache and restart. See if the system starts normally.



15 - Enable SIP again (restart the system)



16 - Enter Recovery Mode (text mode)


Command + R + S


17 - Enable SIP again


csrutil enable


18 - Restart the system




reboot



19 - Enter Recovery Mode
Command + R + S

18 - type this in to clear GPU

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


20 - Restart the system

shutdown -r now
My MacBook, running High Sierra, can now run without major graphical issues, but as others have mentioned in this post, as well as that videos comments, my brightness does not work, and when the computer goes to sleep, I have to reboot it in order for it to work again. I know some have had success in getting rid of these issues, but I am not great at working through these issues. Is there a way, using the current method I have already done, to fix these issues easily, and if not, what is the best way of starting over what I already did in order to implement a new fix that gets rid of the brightness issues? Also, fixes without installing Linux would be ideal. Any help would be greatly appreciated!
 

xanderx007

macrumors 6502
Nov 7, 2017
262
140
As with the above person, I'm new on here, but I have attempted to fix my 15" early 2011 MBP using a YouTube video using these instructions:

My MacBook, running High Sierra, can now run without major graphical issues, but as others have mentioned in this post, as well as that videos comments, my brightness does not work, and when the computer goes to sleep, I have to reboot it in order for it to work again. I know some have had success in getting rid of these issues, but I am not great at working through these issues. Is there a way, using the current method I have already done, to fix these issues easily, and if not, what is the best way of starting over what I already did in order to implement a new fix that gets rid of the brightness issues? Also, fixes without installing Linux would be ideal. Any help would be greatly appreciated!

Both EFI and GRUB fixes does not "install" Linux in any way. The USB stick in both cases is needed to be able to force the MBP to use the iGPU, but it doesn't install anything on your base system.

For the High Sierra brightness issue, check the GRUB solution. There's an ongoing discussion in that thread on how to fix it, but you'll have to apply the GRUB fix.
 

samisabbani

macrumors newbie
Nov 30, 2017
5
0
Hey guys i have the macbook pro late 2011 i'm running mac os high sierra i did all the steps and i was able to start up my macbook thank you . But when i run photoshop or final cut pro the macbook restart and i need to do all the steps again. I have the gfxcardstatuts when i switch to the intel card the macbook restart too. Any advice how to fix that please.
 

mantler

macrumors newbie
Dec 4, 2017
24
5
AppleMacFinder, I also created an account on here just to say, you win the day (or maybe year) for saving one more MBP from the recycle heap. My early 2011 15" is running again after its second GPU failure. Thankfully I have been too lazy to upgrade from El Capitan and didn't have to mess around with any of the GRUB stuff, though a post by FGuarini 5 pages into the thread did help me wrap my head around the process a little better when I got stuck at a few points. I didn't read through all 40-something pages of the thread, so not sure if you or somebody else rehashed everything into a slick guide, but it seems like such a shame to throw out almost "perfectly good" computers for such a stupid, preventable problem when you've provided a working solution. I am curious to know how many people on here have bothered to have a replacement chip installed, I can't seem to find a local shop for it here in my part of Spain, and the places that I'd have to mail it to charge upwards of 250€!
 

xanderx007

macrumors 6502
Nov 7, 2017
262
140
Hey guys i have the macbook pro late 2011 i'm running mac os high sierra i did all the steps and i was able to start up my macbook thank you . But when i run photoshop or final cut pro the macbook restart and i need to do all the steps again. I have the gfxcardstatuts when i switch to the intel card the macbook restart too. Any advice how to fix that please.


Honestly, to begin with, you won't really need High Sierra that much. There's very little advantage to it over Sierra, or even El Capitan, if all you need is a working (vintage) MBP. Personally, I hold off upgrading to a new OS as much as possible so as long as the current one I have installed works just fine with the applications I'm using. I'm still on El Capitan.

I've used the EFI solution, and it has worked for a certain time, but it's rather unstable, so you might want to try the GRUB Solution at this point (and, downgrade to Sierra for that matter).
 

samisabbani

macrumors newbie
Nov 30, 2017
5
0
Honestly, to begin with, you won't really need High Sierra that much. There's very little advantage to it over Sierra, or even El Capitan, if all you need is a working (vintage) MBP. Personally, I hold off upgrading to a new OS as much as possible so as long as the current one I have installed works just fine with the applications I'm using. I'm still on El Capitan.

I've used the EFI solution, and it has worked for a certain time, but it's rather unstable, so you might want to try the GRUB Solution at this point (and, downgrade to Sierra for that matter).
okay i will downgrade to sierra thank you so much
 

boy80

macrumors newbie
Oct 16, 2017
21
7
after doing this mod to disable the amd gpu. can i upgrade the osx to a newer version? Im currently running lion and would like to run sierra if possible. Would I need to redo the mod again? The reason I ask is because when I try upgrading, the screen freezes and then i seem to lose my mod. then i have to redo the linux mod all over. I currently have the amd gpu disabled by having r8911 resistor removed. so the mac doesnt even see the amd gpu anymore.

thx
 

Lloyd22

macrumors newbie
Apr 28, 2017
8
3
Hi everyone and thanks a lot for all the help & efforts!
I successfully modified the EFI more than 6 months ago and my mbp was working perfectly, didn't have any issue with waking it up or anything. I did not update the system or anything else, I just wanted to keep it as stable as possible. I tried the usual SMC reset and PRAM but still nothing...

And this morning, bam, I'm stuck with a black screen, no chime, heating, fans going crazy and the sleep light indicator being solid but dim... Do you think it can be related to the GPU again? Or it might be something else? I'm getting tired of all this...

Thank you very much for your insights.
 

dijkvanthomas

macrumors newbie
Dec 7, 2017
1
0
Hi MikeN,

I followed what you did and its amazing, thank you very much, works like a charm.
Macbook pro late 2011.
I do have to "sudo shutdown -h now" because it doesn't do sleep mode but that's minor.

I did get a new error (mail, iCloud and internet accounts preferences stopped working), so I want to upgrade from yosemite to Sierra.
Should I do this with my graphics card failure? Is it easy to upgrade and immediately use the integrated graphics chip?

Thanks!!

Best,
Thomas




There is not *one* guide to write up. Many roads lead to Rome. The best option would be if AppleMacFinder would update the first post of this thread pointing to the best alternatives.

Anyway. Even if this post now will quickly drown in the sheer length of this thread, I think this is currently one of the better guides:

#####__ The Guide __#####

This guide assumes that you run a stock system. Problem just occured. That means:
This guide assumes that all kexts are still in their default location /System/Library/Extensions.
Having all AMD-kexts there except one is beneficial for 'proper' operation.

To get some display acceleration back it will be necessary to force the machine to not boot into discrete graphics (dGPU) but directly into integrated graphics (iGPU). This will give you back your laptop – but you will lose some features: e.g. the ability to drive an external display. Thunderbolt data connections should work.

The initial procedure:

– To start from a clean slate: reset SMC and PRAM/NVRAM:

shutdown, unplug everything except power, now hold

<leftShift>+<Ctrl>+<Opt>+<Power>

release at the same time;

– Now power on again and hold

<Cmd>+<Opt>+<p>+<r>

at the same time until you hear the startup chime two times.

– Boot into Recovery by holding

<Cmd>+<r>+<s>

– Disable SIP:

csrutil disable

– disable dGPU on boot

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

– enable verbose boot mode:

nvram boot-args="-v"

– reboot into single user-mode by holding

<Cmd>+<s>

on boot

– mount root partition writeable

/sbin/mount -uw /

– make a kext-backup directory

mkdir -p /System/Library/Extensions-off

– only move ONE offending kext out of the way:

mv /System/Library/Extensions/AMDRadeonX3000.kext /System/Library/Extensions-off/

– let the system update its kextcache:

touch /System/Library/Extensions/

– wait for the kextcache process to finish
then

reboot

Reboot normally:
you will have an accelerated iGPU display.


But the system doesn't know how to power-management the failed AMD-chip.
For that you have to either manaully load the kext after boot by:

sudo kextload /System/Library/Extensions-off/AMDRadeonX3000.kext

Automate this with the following LoginHook:

sudo mkdir -p /Library/LoginHook
sudo nano /Library/LoginHook/LoadX3000.sh


with the following content:

#!/bin/bash
kextload /System/Library/Extensions-off/AMDRadeonX3000.kext
exit 0


then make it executable and active:

sudo chmod a+x /Library/LoginHook/LoadX3000.sh
sudo defaults write com.apple.loginwindow LoginHook /Library/LoginHook/LoadX3000.sh


Preventive measures for future use

There are two further caveats to know: This is reversible when the SMC/PRAM/NVRAM is reset. If that happens the GPU-power-pref nvram can/has to be set again to force the use of the iGPU from boot-time.

Since this can happen quite easily (and is often erroneously recommended way too many times than it is actually useful), you should probably prepare for such a scenario and create a simple script to greatly speed up the process and also make entering the necessary variable much less error prone:

sudo nano /force-iGPU-boot.sh

– Enter the following content to this file:

#/bin/sh
sudo nvram boot-args="-v"
sudo nvram fa4ce28d-b62f-4c99-9cc3-6815686e30f9:gpu-power-prefs=%01%00%00%00
exit 0


– Now make that executable:

sudo chmod a+x /force-iGPU-boot.sh

In the future, when the SMC/PRAM/NVRAM gets reset to default values it is now possible to boot into SingleUser with:

<Cmd>+<s>

– And after mounting your boot-volume read-write to execute just:

sh /force-iGPU-boot.sh

This setup has now one kext in a place Apple's installers do not expect. That is why in this guide SIP has not been reenabled. If an update that contains changes to the AMD drivers is about to take place it is advisable to move back the AMDRadeonX3000.kext to its default location before the update process. Otherwise the updater writes at least another kext of a different version to its default location or at worst you end up with an undefined state of partially non-matching drivers.

After any system update the folder /System/Library/Extensions has to be checked for the offending kext. Its presence there will lead to e.g. a boot hang on Yosemite and Sierra, an overheating boot-loop in High Sierra.

Further: this laptop is overheating, no matter what you do. The cooling system is inadequate and the huge number of failing AMD chips are just proof of that.

To prolong the life of this now hacked machine it is advisable to abstain from really heavy lifting over prolonged stretches of time. Strictly follow the usual recommendations for laptops: use on hard surfaces, keep the fans and fins inside it clean. Using any fancontrol software with relatively aggressive settings should also help: like smcFanControl, MacsFanControl, or TGPro (the latter both commercial).


This is fairly complete and what I do recommend to everyone asking me.
Nevertheless. We're not done here, yet. Improvements are welcome. Share them!
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.