Resolved Force 2011 MacBook Pro 8,2 with failed AMD GPU to ALWAYS use Intel integrated GPU (EFI variable fix)

Discussion in 'MacBook Pro' started by AppleMacFinder, Mar 18, 2017.

  1. AppleMacFinder thread starter macrumors 6502a


    Dec 7, 2009
    No, these commands are present at Arch Linux boot image by default. I don't know why it tells you that these commands are "not found", maybe there is a problem with your USB Arch Linux boot media - either on software or hardware level. Verify the checksums of your .iso file before writing it to USB, try another USB drive, etc. chattr executable file is probably located at /bin/chattr or /usr/bin/chattr , you could try running this executable file by writing its' full system path if you are afraid that your PATH variable became corrupted

    1. operation not permitted / invalid argument - First of all, please check that you have successfully removed the previous variable with rm command. Write ls command and check if this previous variable has been removed. Then you could try again

    Next time, please try to show a full photo of your screen. For example, I cannot see what is happening at the left edge of the screen, e.g. why "root@archiso" shifted 2 characters to the right. It could be that your EFI variables partition became unmounted because of some error, or that it became read-only somehow, and that is why you can't write a correct value to this variable using printf

    Please try again from the beginning, hopefully it will work for you at the next time
    These instructions already worked for many people - even if not at the first try

    2. nomodeset - of course with a space before, and with all the lower case letters: nomodeset - OK , Nomodeset - FAIL
  2. Electrifying macrumors newbie

    May 3, 2017
    Hello, newbie here!

    Registered to say thanks for an amazing fix. It works really well!

    Do want to note that a PRAM reset removes the fix, so try not to use it when it isn't neccessary.

    Further, a question: Is it possible to script this approach so that it autoboots when using the prepared Archlinux disk? I'm asking because I've used this fix on a Macbook i've given to dad. It works, but there is going to be a problem when I'm not around to fix the issue when the system decides to crap out again. The fix is way to difficult for my dad.

    I'm a sys admin, but programming isn't my forte and I have very basic Linux knowledge.

    Thanks in advance!
  3. AppleMacFinder thread starter macrumors 6502a


    Dec 7, 2009
    Also you could lose this fix if you will fully discharge your MBP or disconnect the charger as well as internal battery from its' motherboard

    You could create a script which will contain all these commands and insert this script to ArchLinux .iso image before writing it to a dedicated USB, and it will be possible to run this script with a simple sh /path/to/ command. Perhaps it is better not to put this script to autorun - it might not work if it will try to execute these operations too early, before the OS is fully loaded. You will just need to write the instructions for your dad: how to boot from this special ArchLinux USB and simple 1-line command which he needs to type to launch this script ;)
  4. Electrifying macrumors newbie

    May 3, 2017
    Thanks for your reply! I can just copy paste all the commands in the script without the need to add additional things like @echo etc.? (I know that is Windows batch stuff, but just to indicate). It will just execute the lines one by one?

    I had to do a SMC reset today. Fix survived and I swapped the battery for a new aftermarket one (which unfortunately throttles the CPU down to 0,8GHZ, even though sysinfo reports it as manufacturer: SMP (OEM manufacturer) and notes the model as bq20z451, which is also original. With this, the AC was also disconnected and the fix also survived this! :)
  5. Coastalwaves macrumors newbie

    May 2, 2017
  6. Electrifying macrumors newbie

    May 3, 2017
    I've had that too. You need to remove the AMD drivers so that MacOS can boot. Make sure SIP is disabled (csrutil disable) in terminal! Reboot in Single User mode (CMD+S) and use the following commands:

    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/ (remove the AMD drivers cache)

    6) sudo mkdir /System/Library/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) My own comment: it is possible the system says it can’t unmount the volume, just continue with step 9)

    9) sudo reboot

    10)Should be done and the system should boot normally
  7. AppleMacFinder thread starter macrumors 6502a


    Dec 7, 2009
    Yes, you could just copy paste all these commands, preferable in a correct order :) But if you would like - in addition to executing these commands you could also "echo" them to the command line, for debug purposes (if a script becomes stuck at some command, user will be able to see what command is causing this problem

    It is strange that your aftermarket battery throttles the CPU... Me and my friends are always getting the aftermarket batteries from AliExpress, sellers like this one - - as you see it costs less than $40 with a free shipping, and the positive reviews (as well as my personal experience) guarantee that this battery is working as good as the original, if not better
  8. Electrifying macrumors newbie

    May 3, 2017
    Mmmh, strange, I bought it via a Dutch webshop and it is a battery from a German manufacturer (OTB). Coconut battery did say it couldn't read the firmware version. Perhaps this is the problem? My hunch is that the Macbook knows it is a aftermarket one. AHT also gave an error in regard to the battery (4xxx /4 /40000005 : G "Battery") I already ran It down completely and charged it to almost 100% and it was still stuck at 0,8. :|

    Of course I could have removed the kexts responsible for throttling, but I don't want the system to screw around when I'm not around. :p

    One more question. How to deal with the GPU-Power-prefs file. I mean the UUID probably won't be the same everytime? Can you script the autocompletion? Sorry, for the utter noob questions. My command line knowledge is pretty basic overall, but I usually get the things I want with them done. :)
  9. AppleMacFinder thread starter macrumors 6502a


    Dec 7, 2009
    My battery information, if that is interesting for you:

    UUID could be the same for all the MBPs, as far as I know, so you could put it right in the script. Looks like there are some requirements for the UUID to be valid - e.g. when a person from this thread accidentally confused 9 with g a fix didn't work
  10. Electrifying macrumors newbie

    May 3, 2017
    Thanks! Cannot check the battery anymore right now, cause I already took it out and put the (very slightly) puffy one back in for the day. The Macbook has a 60 Watt adapter, so it doesn't start without the battery. Maybe I'll check it out tomorrow. :)

    In regards to the UUID. Do you have it somewhere if they are pretty much all the same? The Macbook is running fine now. so I only get the new UUID if I'll go look for it. Don't want to redo the fix if it isn't needed. :p

    I'll see if I can cook a ready to go ISO with the script in it and put it up if it is appreciated, but don't hold me on that one. :p
  11. woolooo macrumors newbie

    May 19, 2011
    it is awesome that you guys come up with fixes, while Apple does not come up with a software fix and encourages us to throw these great computers to the trash.

    Anyway here is how I fixed it, only using info on this forum page.

    1- made a USB Linux Arch drive
    2- booted from it like explained on first topic, but when trying to follow the guide it would give me some errors like "invalid argument" etc... So I tried to boot in recovery (CMD+R) to check drive for errors...
    3- rebooted with arch linux, this time I could follow the command lines on the guide with no errors. Glitches and distortion on the screen were gone but I could not boot.
    4- reinstalled mac os x (was not necessary I think) and it still wouldn't boot
    5- restarted in recovery (CMD+R), opened a terminal, disabled System Protection (csrutil disable)
    6- restarted in command mode (CMD+S) and followed the guide from "Electrifying" to remove AMD kexts

    And it is now working !

    Thanks :)
  12. Electrifying macrumors newbie

    May 3, 2017
    Good to hear it is working for you too!

    I don't take credits for the steps to remove the kexts though. Those are just the steps as AppleMacFinder wrote them down. I only wrote down a few extra comments (for myself), based on my observations. I pasted all the steps in a "Note" with my own comments so I can always fall back onto it in case I don't have access to this thread. :)
  13. zaurak macrumors newbie

    Apr 12, 2010
    Does anyone have a clue on which chip suits 2011 MacBooks? 216-0810028 or 216-0810005?

    This thread here states that might need some VRAM modifications:

    I Also think, that by removing the kexts the dGPU is without power management so it runs all the time. My computer heats up ike when I used the GPU intensively before it broke.
  14. AppleMacFinder thread starter macrumors 6502a


    Dec 7, 2009
    Also, last time I checked, Macbook is downclocked if without a battery

    If by UUID we both mean that line which goes after gpu-power-prefs- , just use these values everywhere:
    I don't see any reason for trying a different value. There are some constraints for the valid values of UUID,
    for example, fa4ce28d-b62f-4c99-9cc3-6815686e30fg (g at the end, instead of 9) is invalid, will not work

    Thank you very much for raising this question about chip ID ! Before, I was 100% confident that this chip will work - - it is 216-0810028 . But now I am a bit unsure... Maybe this chip will work flawlessly, or maybe there will be a need for another EFI variable fix ;)

    Well, if you are unsure about 216-0810028 , you could search for 216-0810005 at AliExpress - it is even sold for the cheaper prices! For example:

    Seller promises this chip is from 2014+ year, which is good
  15. Electrifying macrumors newbie

    May 3, 2017
    Really? This Macbook wouldn't even turn on without the battery. :| . Which i suspect is because of the 60 watt power supply. 85 is supposed to be standard with this type of MBP I believe.

    No, I mean the "original" UUID. Not the new power prefs file you create. I thought the original UUID was a unique value which differs per system? In that case you will need autocomplete for a script. If the original power prefs has the same UUID over multiple systems, than indeed you wouldn't need an autocomplete, but you can just fill in the predefined value. :)
  16. Stuffa macrumors newbie

    May 7, 2017
    Hi all. Newbie here trying to resurrect an early 2011 MBP with failed AMD graphics. In the past have tried the gpuSwitch and associated fixes to no avail. Even after getting the system up and running and set to integrated graphics, it would only last a few days (wasn't game to turn off) before it crashed.
    So have just done a brand new install of Yosemite and will attempt this fix.

    So far have successfully booted into ARCH LiveCD and checked the gpu-power-pref- variable exists and is does. Before I make any changes I checked the gpu-power-prefs variable and the full name is exactly the same as github file name. It also has the same attribute (as in ----i-----------) as required by this fix. Seems like nothing changes. Or is it the printf command that creates different "content" in the gpu-power-prefs... that makes the difference? Could someone clarify please. To me it seems like I am deleting something and then recreating it again exactly the same???
  17. AppleMacFinder thread starter macrumors 6502a


    Dec 7, 2009
    Probably it's a fault of 60 watt power supply. With 85 watt power supply the MBP works, but - maybe as a precaution against a spike in power consumption - it works like two times slower

    I believe that, while there are some constraints for the possible UUID values, they are not machine-specific. Probably the only machine-specific thing is a serial number of a laptop. So you could use exactly the same script, with the same UUID value, for many MBPs out there. If you have some suggestions about how to obtain a "proper" UUID value, which is "better suitable" for a particular MBP, it would be interesting to hear these suggestions

    Yes, the contents of this variable will be different, and that will determine a changed behaviour of your laptop - usage of integrated only GPU instead of integrated+discrete combination. Wish you good luck in trying these instructions, hopefully they will work for you from the 1st time ;)
  18. Stuffa, May 7, 2017
    Last edited: May 7, 2017

    Stuffa macrumors newbie

    May 7, 2017
    Thanks AppleMacFinder for quick reply. Went ahead and did your fix. Completed without any problems. Just don't know if it worked as I "toasted" the MBP earlier and had good graphics while doing the fix. Without installing gpu-switch, is there a way to tell if fix was successful? If not I suppose time will tell. Don't know if it is relevent but it does boot a lot quicker than before, but it might just because of the fresh install too. Also have not done anything with the AMD kexts either.
    Edited -
    Thought I would just install switchGPU and see. Can still select and switch to discrete graphics. About this Mac also change graphics in use to the AMD Radeon card. Seems the fix hasn't worked on this machine.:(:(
  19. Bwil10, May 7, 2017
    Last edited: May 7, 2017

    Bwil10 macrumors newbie

    Mar 31, 2017
    Hi everyone,

    I have a new possible fix (although kinda desperate) for people who the previous fix didn't work and don't want to spend money on a machine that may die at any moment.
    I had it working yesterday but I reset my pram so I may need some assistance getting it back up and going again.

    I made two partitions, one for OS X(which will not load at all) and one larger one for ubuntu, from ubuntu I installed VMware windows machine.

    Was working fine yesterday, ubunto didn't detect any GPU and VMware gives you option of disabling accelerated graphics.
    Not an ideal setup but working!

    Issue is I reset my pram yesterday and it tries to natively boot to OS X now, So I put it the ubuntu boot USB.

    None of the options will load ubunto unless I edit the startup with "e" and type in code for disabling GPU.
    Found here.

    So it is booting to ubuntu but the swap partition.

    It's the dev/sda3 where everything is installed

    Can I use terminal to set boot priority? Internet seems not to be working but I may be able to get that working.

    Any help would be amazing, I'm so close!!!!

    Edit, I don't have access to grub, I don't think

    Edit again, I can virtually mount the partition I'd like to boot normally from disk manager. And it seems to have grub and efi folders if that helps, see pic

    Attached Files:

  20. AppleMacFinder thread starter macrumors 6502a


    Dec 7, 2009
    You are supposed to verify this fix by using gfxCardStatus. If you can't switch from integrated only to discrete only with gfxCardStatus, that means a fix is successful. Please try it
  21. Stuffa, May 8, 2017
    Last edited: May 8, 2017

    Stuffa macrumors newbie

    May 7, 2017

    Have installed gfxCardstatus and can still switch to discrete graphics. :(:( I am sure every step of the fix worked (no errors). Not sure what to do now. Any chance doing it again would make any difference? Can I check the contents of the gpu... variable somehow to see if the correct values have been "written" to it.
  22. AppleMacFinder thread starter macrumors 6502a


    Dec 7, 2009
    Yes, maybe you accidentally made some mistake in the process, and repeating it from the beginning - could work. This is quite a lengthy instruction, and even a small mistake makes the whole fix not functional, so in any case it is a good idea to try again

    Very good, you are almost there! Too bad I am not effective at helping, most of my advices are about trying again... :p

    Have you tried the instructions for booting Ubuntu from the 1st message of our thread?

    If by boot priority you mean choosing which OS loads by default - Ubuntu or OS X - you may try rEFInd

    Please clarify what are you trying to achieve by that, I am a bit confused :confused:
  23. Yaizi, May 8, 2017
    Last edited: May 8, 2017

    Yaizi macrumors newbie


    May 8, 2017
    Hello I'm a noob here trying to get my laptop to work. What am I doing wrong?

    I'm getting permission denied when trying to delete in step 3..

    And how am I supposed to put this in..

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

    I can't hit enter to write the rest I'm so confused sorry super new..
  24. Bwil10 macrumors newbie

    Mar 31, 2017
    it would be amazing is someone could clone a fixed machine running anything, osx, ubuntu or windows and post it somewhere!
  25. Electrifying macrumors newbie

    May 3, 2017
    Did you boot into Archlinux by pressing the "E" key as soon as the first text appeared?
    After that, you need to press spacebar and add "nomodeset" to the command line.

    Further, type in the exact underlined sentence directly below when you get to this step:

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

    That should do it.

Share This Page