MikeyN, a million thanks for this. I really appreciate your help. I will try this today.
Just to be sure; I've already removed AMDRadeonX3000.kext. No need to put it back before the hack, right?
Thanks for your solution AppleMacFinder (efivar setting gpu-power-prefs-fa4ce28d-b62f-4c99-9cc3-6815686e30f9).
With this solution I can restart the Mac again and it runs well for a certain time.
Unfortunetaly it does not work for me for a longer time. After some time (or maybe reboots or using certain programms...not sure at the moment what it is) it freezes again.
When I check the efivars variables again after a freeze I can see that the gpu-power-prefs-fa4ce28d-b62f-4c99-9cc3-6815686e30f9 is missing. Crating it again and it will work fine again. It seems something removes the variable.
What is strange as well:
After creating the variable i am still able to change to discrete GPU in gfxCardStatus. I am using the version 2.4.3i from steveschow). I guess as long as I can change this it is not really fixed?
I checked that i made the variable immutable with the chattr command. I double checked it with the lsattr command and it returns the ...i.... in the result.
My Settings
- MacOS Seirra 10.12.6
- GeFore 640 instead of AMD
Hi MikeyN,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!
So, I did everything until >
Reboot normally:
you will have an accelerated iGPU display.
A few observations:
- after
touch /System/Library/Extensions/
– wait for the kextcache process to finish
then
nothing happened until I rebooted. When I booted, MBP rebooted itself 2-3 times and opened in OS as normal. I have now rebooted this MBP for 3-4 times and it has opened in OS X every time but every time this starts like it opened in "single mode", recovery mode or the like; a lot of txt lines but after that it goes to login window normally. So is this normal behavior?
I didn't do the rest of the procedure yet as I wasn't sure what to do. So should I do only this
sudo kextload /System/Library/Extensions-off/AMDRadeonX3000.kext
and nothing else or everything after that....or all of it? And how, using terminal?
Thanks again MikeyN,From your description I gather that the procedure worked. So, first, congrats on that.
One detail that I noticed when doing the procedure again today on a system running High Sierra was that the kextcache is apparently not run in Single User at all. Then causing the reboot after the next reboot, since the touch-command results just in an invalidated cache that has then to be rebuilt. Guide might need update there, ahem/cough.
All those "lines" are the verbose mode?
If the system now comes up reliably and in one single go, then all is well/normal behaviour.
Verbose mode is useful to you now, because you immediately see where it would hang, if it hangs.
To check for this setting, type into Terminal.app:
nvram -p
If it outputs (among some other stuff):
boot-args -v
Then verbose mode is enabled.
To clear this setting alone (if it really bothers you, not recommended):
sudo nvram boot-args=" "
To set it again:
sudo nvram boot-args="-v"
The same effect can be invoked once by holding <Cmd>+<v> on starting up the machine.
First, you should get a detailed temperature monitoring application (iStat, TGPo…).
Then look at the GPU diode temp before you load the kext.
Now, while keeping an eye on GPU temp, open Terminal and issue the command you just cited.
The temperature should drop significantly in a short amount of time. This is only listed separately for demonstration purposes. I found it bothering to always put in this command to get halfway proper thermal management on the now circumvented GPU.
-> To always get this effect and spare you the chore of remembering the command, issuing it after every reboot etc., follow the rest of the guide. The LoginHook part wil automate the "demonstration part" to always run after a reboot.
Until the next update, this setup then should be quite stable.
I checked in terminal, verbose mode is enabled and it's ok for me. I installed smcFanControl and it says that gpu temp is between 50-58c when using only Safari; fixed fan speed 2600 rpm.
I copied the command sudo kextload /System/Library/Extensions-off/AMDRadeonX3000.kext into terminal and saw this warning:
WARNING: Improper use of the sudo command could lead to data loss
or the deletion of important system files. Please double-check your
typing when using sudo. Type "man sudo" for more information.
To proceed, enter your password, or type Ctrl-C to abort.
It didn't let me write my password?!
If I want to try "LoginHook part" in terminal.....here's another stupid question:
Can I just copy-paste all those command lines into terminal (without "demonstration part") and only hit "enter" after each line?
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!
OK, I did this rest of the procedure and got thisYou really did never enter a single sudo command. That is why this warning appears. I didn't even remember the exact wording and had to netsearch it first/again. But this is normal. Don't worry too much, but reread it nevertheless, and remember it. The sudo command is powerful.
As long as your currently logged in user account is in the admin group (as is default on Macs for the first user set up) you just have to enter your login password. But Terminal app lacks indicators for characters entered, unlike other macOS password boxes of this type. This is also normal. Type it in blindly and hit enter.
Failure produces error message, success is just execution of your sudo command.
Your c&p plan should not only work, but I would recommend to do it in such a way. Less typos.
Copy this line:
sudo mkdir -p /Library/LoginHook
Copy this line:
sudo nano /Library/LoginHook/LoadX3000.sh
Copy this into the editor en bloc:
#!/bin/bash
kextload /System/Library/Extensions-off/AMDRadeonX3000.kext
exit 0
Now press, <Ctrl>+<x> and follow the instructions on screen in the lower left (save the file in the location and name as provided; basically just press 'y' then 'enter')
Copy this line:
sudo chmod a+x /Library/LoginHook/LoadX3000.sh
Copy this line:
sudo defaults write com.apple.loginwindow LoginHook /Library/LoginHook/LoadX3000.sh
To check if it worked: after the next reboot copy and paste into Terminal:
sudo kextstat | grep -i amd
You should get a line like:
172 0 0xffffff7f83567000 0x571000 0x571000 com.apple.AMDRadeonX3000 (1.5.1) F6F37414-893B-3F66-8AB7-F3327DE6AC55 <171 162 102 12 7 5 4 3 1>
If a line like this appears, you're set. Kext is loaded automatically and temps on the GPU should drop.
OK, I did this rest of the procedure and got this
106 2 0xffffff7f82eb5000 0x125000 0x125000 com.apple.kext.AMDSupport (1.4.2) 2B580087-CCBA-355B-8A20-431461A717E5 <105 93 12 11 7 5 4 3 1>
107 0 0xffffff7f8301d000 0x5f6000 0x5f6000 com.apple.kext.AMD6000Controller (1.4.2) 131713C7-08DB-395D-B024-87C4F6798E67 <106 93 12 11 5 4 3 1>
132 0 0xffffff7f82fe8000 0x22000 0x22000 com.apple.kext.AMDFramebuffer (1.4.2) 58917ED0-06C5-3FF0-AFB5-48BA784CBDA4 <106 93 12 11 7 5 4 3 1>
Doesn't look the same?
Mikey,
I did this:
So try this in Terminal first:
sudo kextload /System/Library/Extensions-off/AMDRadeonX3000.kext
sudo kextstat | grep -i amd
I got this:
/System/Library/Extensions-off/AMDRadeonX3000.kext failed to load - (libkern/kext) not found; check the system/kernel logs for errors or try kextutil(8).
I believe I did everything according to the instructions.....But.... my original AMDRadeonX3000.kext is still on the Desktop as I understood earlier that there is no need to replace it anywhere? So, should I put it in /System/Library/Extensions-off and repeat the rest of the procedure (LoginHook part)?
Mikey, I bought this second hand MBP a month ago and at the moment I don't use it for anything else than surfing on the internet. My plan is to use it as a second machine for music production, mixing etc when I'm not able to use my studio machine cMac Pro 12-core. So, I don't have any back ups yet as there hasn't been any need for it. Which also means that my AMDRadeonX3000.kext is only a copy and I don't have an original anymore. I tried to put it (AMDRadeonX3000.kext) back to /System/Library/Extensions but it failed. So what are my options? Reinstall OS X and start the whole procedure again? Or do I really need this "LoginHook part" as I don't think I have huge heating problems, at least for now....
I think I'll choose #4. and start from the scratch. Will do it later today or tomorrow and report back.
Btw. I still have to stay in El Capitan as that's in my studio machine as well. I guess that is not a problem...?
OK, thanks Mikey. Could it cause any harm if I still go through the whole procedure? I have a great, complete list that has been done by one person at the forum!El Capitan should not be a problem. It just invalidates the option to copy the kext from that machine if the laptop is on Sierra or Yosemite. The option remains valid if you have the same OS version on both machines.
If a whole reinstall is your way then keep in mind that during the install process the second reboot (that is the first reboot into the full system) will hang because the X3000.kext is then activated.
That is then the place to start with the guide. Wait for the hang, then force a shutdown.
But: your NVRAM should have remained in place (it is not touched by the install process).
You can spare yourself a few steps by starting in the line:
"– Boot into Recovery by holding"
that is still needed to disable SIP.
but then skip:
# – 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"
Also, it might be good idea to make an install medium for your OS of choice with e.g. diskmakerx.com.
To get the cleanest results possible, Format the drive in the laptop from the installer and do not touch Migration Assistant afterwards.
Good luck.
[doublepost=1504547957][/doublepost]hi, I was able to get my late 2011 MacBook pro working again as someone posted a you tube of this and it worked. i am so happy about it. My problem now is connecting my larger LG monitor to my MacBook pro, seems it is not recognized, i tried another samsung monitor as well and the MacBook pro does not know it. Will it be possible, in any way, to connect the remote monitor? I do not even care if I cannot use the laptop monitor and I only use the larger one. Any insight would be great. Thanks everyone. TuesdayTues...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(based on https://ubuntuforums.org/showthread.php?t=2157775 )
- Next I added the following after quiet splash
i915.lvds_channel_mode=2 i915.modeset=1 i915.lvds_use_ssc=0
===
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
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
- + : Adds the attribute to the existing attribute of the files.
- – : Removes the attribute to the existing attribute of the files.
- = : Keep the existing attributes that the files have.
*) 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=1504547957][/doublepost]hi, I was able to get my late 2011 MacBook pro working again as someone posted a you tube of this and it worked. i am so happy about it. My problem now is connecting my larger LG monitor to my MacBook pro, seems it is not recognized, i tried another samsung monitor as well and the MacBook pro does not know it. Will it be possible, in any way, to connect the remote monitor? I do not even care if I cannot use the laptop monitor and I only use the larger one. Any insight would be great. Thanks everyone. TuesdayTues...
If you disable your discrete graphics ( the one that is messing up your computer) , then you have pretty much disabled that ability. Sorry for the bad news.
Thanks for the quick reply. I guess when I did all the changes in single user mode I was not really sure what I was doing only that it WORKED and that was good enough for me. If that means I disabled the ability for an external monitor, that is OK, just good to know so I do not keep searching for a solution. I am just THRILLED i was able to bring the MacBook pro back up, and back up everything on an external hard drive. I am not very high tech but feel great i was able to solve this with this website and all the great people who show on the internet how to fix things. I am excited about that. Yes bummed that my MacBook pro is only 5 years old (from when I purchased it) and will probably need to buy another one so I can use my larger monitor. Thanks again for the quick reply.
Could it cause any harm if I still go through the whole procedure? I have a great, complete list that has been done by one person at the forum!
Thanks for the quick reply. I guess when I did all the changes in single user mode I was not really sure what I was doing only that it WORKED and that was good enough for me. If that means I disabled the ability for an external monitor, that is OK, just good to know so I do not keep searching for a solution. I am just THRILLED i was able to bring the MacBook pro back up, and back up everything on an external hard drive. I am not very high tech but feel great i was able to solve this with this website and all the great people who show on the internet how to fix things. I am excited about that. Yes bummed that my MacBook pro is only 5 years old (from when I purchased it) and will probably need to buy another one so I can use my larger monitor. Thanks again for the quick reply.
[doublepost=1504550626][/doublepost]
is there an easy way to add back a new external graphics card or is it best, in your opinion, to buy a new apple
Mikey, I did a clean installation of El Capitan 10.11.6, security update and went through the whole procedure. Now, I'm basically in the same situation as I was before the "new start"...this machine is booting as before, in verbose mode and I when I try to do the rest of the procedure ("LoginHook part"), it fails. I entered your "test commands" in terminal and AMDRadeonX3000.kext was not found. And actually now this thing is getting really hot; 88-90c, 6200 rpm using only Safari. In finder, I didn't see that AMDRadeonX3000.kext was in either System/Library/Extensions or System/Library/Extensions-off folders. Is it possible that AMDRadeonX3000.kext did not exist in basic El capitan installation?I would not expect any problems, especially since you have gained experience by now and already did more than ~90% of the work successfully before. Hack away.