Skip to content

Instantly share code, notes, and snippets.

@0XDE57
Created November 24, 2019 12:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save 0XDE57/745751cda04f9dd143f4b0adbf0b50e4 to your computer and use it in GitHub Desktop.
Save 0XDE57/745751cda04f9dd143f4b0adbf0b50e4 to your computer and use it in GitHub Desktop.
Recovery util to re-disable gpu in my dead 2011 macbook when it decides to not boot or you have to reset PRAM (Command, Option, P, and R)
cd /
umount /sys/firmware/efi/efivars/
mount -t efivarfs rw /sys/firmware/efi/efivars/
cd /sys/firmware/efi/efivars/
printf "\x07\x00\x00\x00\x01\x00\x00\x00" > /sys/firmware/efi/efivars/gpu-power-prefs-fa4ce28d-b62f-4c99-9cc3-6815686e30f9
chattr +i "/sys/firmware/efi/efivars/gpu-power-prefs-fa4ce28d-b62f-4c99-9cc3-6815686e30f9"
cd /
umount /sys/firmware/efi/efivars/
@0XDE57
Copy link
Author

0XDE57 commented Nov 24, 2019

the problem:

MacBook Pro 2011 AMD 6750 / 6770GPU graphics card failure

methods:

https://forums.macrumors.com/threads/force-2011-macbook-pro-8-2-with-failed-amd-gpu-to-always-use-intel-integrated-gpu-efi-variable-fix.2037591/

https://apple.stackexchange.com/questions/166876/macbook-pro-how-to-disable-discrete-gpu-permanently-from-efi

https://apple.stackexchange.com/questions/267581/gpu-problem-boot-hangs-on-grey-screen

boot into Single User (CMD+S) entering these commands:

fsck -fy (to check a disk)
mount -uw / (mount a root filesystem with read/write permissions)
sudo mkdir /AMD_Kexts/ (make a directory to store the AMD drivers in case you'll need them in future)
sudo mv /System/Library/Extensions/AMD*.* /AMD_Kexts/ (move the AMD drivers)
sudo rm -rf /System/Library/Caches/com.apple.kext.caches/ (remove the AMD drivers cache)
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)
sudo touch /System/Library/Extensions/ (to update the timestamps so that new driver caches - without AMD drivers - will be definitely rebuilt)
sudo umount / (umount a partition to guarantee that your changes are flushed to it)
sudo reboot

my mods so far

quirks / todo:

-switch from "Turbo Boost Switcher" to kext because it keeps asking password on boot/wake = annoying: https://www.quora.com/q/kjbrtcdcwnhewjnd/Suppress-Turbo-Boost-to-let-your-MacBook-stop-overheating
-set battery charge limit cuz always plugged in
-still sometimes heats, kernel panics when above 60-65. would love if smcFanControl let you set your own curve instead of manual set. fork it.
-kernel panics when plugging / unplugging usb on sleep/wake. i found its best to unplug all USB, then sleep, then close lid.
-install arch from repair stick onto extra drive, setup dual boot, and setup one-click repair script
-not possible to undervolt it seems on Sandy Bridge? [i7-2720QM] http://forum.notebookreview.com/threads/undervolt-disable-turbo-boost-for-increasing-battery-life-of-macbook-and-hackintosh.821361/
-could flash gMux IC with arduino?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment