Reviving a dead MBP 2011 (or how I got a free MacBook)

Discussion in 'Apple and Mac OS X' started by superparamagnetic, Jun 27, 2017.

Thread Status:
Not open for further replies.
  1. superparamagnetic

    superparamagnetic Notebook Consultant

    Likes Received:
    Trophy Points:
    This was a pretty nifty hack I came across for working around a dead GPU, and I thought it would be worth sharing.

    To preface, I recently came into possession of (rescued from e-waste pile) a late 2011 MBP with a failing GPU. Unfortunately it's a few months too late for Apple's REP, but after some research I discovered that it may be possible to effectively disable the failing dGPU and use the integrated GPU instead.

    The details are from a macrumors thread here:

    The gist of the "fix" is that you need to both prevent the EFI from enabling the dGPU, and prevent the OS from activating the GPU. The latter can be done by removing the AMD kexts, which a lot of people have already tried with mixed results. The problem is that by default the EFI activates the dGPU, and without drivers OSX can't switch back to integrated and runs really sluggishly. If you deactivate GPU without removing the drivers though, the OS will try to activate the dGPU again. So to really "fix" it you need to do both.

    The summary of the fix is at follows:
    1. Boot into a non-graphical linux OS, which in this case is ArchLinux with nomodeset. If the OS attempts to load any sort of graphics drivers it will crash. If you successfully boot, this still won't fix the graphical artifacts caused by the bad GPU. But hopefully the artifacts aren't bad enough that you can...
    2. Modify the EFI variables to disable the dGPU upon boot. Remove any old gpu-power-prefs and write the new one, locking it with immutability. Flush the new settings to the NVRAM and reboot. At this stage you still can't boot into OSX since it will attempt to load the AMD drivers, but you can...
    3. Boot into recovery mode and remove the AMD kexts. You'll probably want to make a backup of them in case, and maybe force the OS to rebuilt the kext cache as well. After this..
    4. Reboot again, wait for the caches to rebuild, and voila you have a (mostly) working MBP again!

    P6250053_small.JPG P6250054_small.JPG P6250055_small.JPG

    There a few downsides to this "fix." The main one is that because the dGPU is effectively disabled, you cannot use external displays anymore or do anything graphically intensive (the iGPU is more than enough for basic use though). In addition if you ever reset the NVRAM or update the OS there's a good chance the computer will break again and you'll have to reapply the fix.

    If you can live with the above limitations and are reasonably competent at command line, I think this is a much easier, safer, and more reliable fix than baking or reflowing your GPU.

    Even if you're set on a hardware fix, I think this is a good way to confirm that it really is a GPU issue. This was part of my motivation for trying this fix actually.

    If you're interested in trying the fix, the main details are in the macrumors thread linked above. It's also worth reading through the start of the thread to understand what's happening under the hood.

    A few pointers I can give:
    - A bootable USB (1GB or above) is well worth it. You can make a few modifications to make your life easier, namely
    1. modifying grub to automatically append nomodeset so you're not racing the timer during startup
    2. Adding a few scripts to the USB drive to modify the EFI vars, saving you from some potential typo headaches.
    The most useful script is probably
    printf "\x07\x00\x00\x00\x01\x00\x00\x00" > /sys/firmware/efi/efivars/gpu-power-prefs-fa4ce28d-b62f-4c99-9cc3-6815686e30f9
    chattr +i /sys/firmware/efi/efivars/gpu-power-prefs-fa4ce28d-b62f-4c99-9cc3-6815686e30f9
    which creates the new gpu-power-prefs
    Scripts for removing the old ones and remounting efivars may be useful as well. You can move these to the root of your USB drive, which Arch mounts to /run/archiso/bootmnt/

    - I found that removing the AMD kexts was a bit tricky and I'm not quite sure what I did wrong. The exact commands to use will depend on your system setup. There's some tips later in the thread for forcing a rebuilt of the cache, which I think will probably help.

    - Verifying the fixes are useful as well. You can use
    lsattr /sys/firmware/efi/efivars/gpu-power-prefs-fa4ce28d-b62f-4c99-9cc3-6815686e30f9
    to verify that your new power prefs is there and immutable
    kextstat | grep AMD will show you if OSX loaded any AMD drivers (should be none after the fix).
    Jarhead, Starlight5, Wormwood and 5 others like this.
  2. Wormwood

    Wormwood Notebook Evangelist

    Likes Received:
    Trophy Points:
    I just got a free MacBook Pro 17" 2011 with what looks to be a failing GPU and will have to try this out.

    I figure this is a sign that I need to turn off the dGPU although I could be wrong:
  3. saturnotaku

    saturnotaku Notebook Prophet

    Likes Received:
    Trophy Points:
    I'd rather pay a service to try and re-ball the dGPU, preferably with leaded solder, especially if the computer was free otherwise. It shouldn't cost more than a couple hundred bucks.
    Vasudev likes this.
  4. Raidriar

    Raidriar Notebook Prophet

    Likes Received:
    Trophy Points:
    And this is the permanent fix if they used high quality leaded solder.
  5. Mr.Koala

    Mr.Koala Notebook Virtuoso

    Likes Received:
    Trophy Points:
    As mentioned by OP this is at least good for isolating/confirming the issue.

    For pure troubleshooting a Linux drive set to not load AMD drivers by default is good enough though.
Thread Status:
Not open for further replies.

Share This Page