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.

nsgr

macrumors 6502
May 22, 2017
317
117
Its OK if you don't have a gpu-active file, just make a new one with the correct contents as specified at the instruction Are you sure you're entering the command correctly? Some people had a problem with a different quotation symbol ". Also you're welcome to try the alternative instructions which could be also found at this thread If you've started observing the glitches again, that means something went wrong with your fix (e.g. after OS X update or full battery discharge) So I recommend you to repeat a fix again and see if that helps You need to enter this whole long command completely, in one-line command, and then press the "Enter" key to execute:
printf "\x07\x00\x00\x00\x01\x00\x00\x00" > /sys/firmware/efi/efivars/gpu-power-prefs-fa4ce28d-b62f-4c99-9cc3-6815686e30f9
Yes, its likely that your GPU has failed. In any case its worth trying this fix just to see if it helps, if we don't have any better ideas at the moment Start with checking your filesystem (if necessary) and then removing the AMD drivers. If you can't reach even the save mode, connect your OS X hard drive to another Mac or PC with Linux (see my original instruction for the description how to do it). In the worst case you'd have to reinstall your OS before moving forward with EFI variable fix Check your filesystem with fsck to make sure everything is OK there, please let me know if it doesn't help Thank you very much for this message, you wrote a great manual at your website. Are these modded EFI bin files available somewhere? (sorry if I've skipped this moment) During the installation these softwares probably saw your discrete GPU as available and set up themselves accordingly. I could recommend removing them completely together with their .plist files (where the hidden settings could have been stored) - could use some software like CleanMyMac for an easier location of them - and only then make a clean install of your softwares Are you sure that you've removed the AMD drivers? The description of their removal is available at my original instruction
Try using fsck (maybe it would repair your filesystem better than a Disk Utility, I don't know), if that doesn't help you could connect your OS X hard drive to another Mac or PC with Linux (see my original instruction for the description how to do it) and then there shouldn't be any problems with a write access
[doublepost=1526565700][/doublepost]
Sorry @nsgr I somehow skipped your message the previous time (too many messages at my inbox). Thank you for writing, will add this information to the front page right now
[doublepost=1526567050][/doublepost] Finally I've done it - archlinux information has been inserted the the 1st step of the original instruction, and also appended your links to the end of this message so that a user could continue with them. Please let me know if I did it correctly and if there are any other instructions/improvement you'd like me to insert to this 1st post

I forgot to put this information (step 3) so that Macbook Pro does not freeze after gpu-power-prefs -> Intel - reboot (step 2.3):

2.3 - Click the MacOS installer icon -> continue holding the Command + S keys until you finish the MacOS installer Single User boot .

Enter these commands (change gpu-power-prefs to Intel GPU and boot verbose):
.
.
3. Follow the MikeyN Guide - page 35 - #875 - to move the AMDRadeonX3000.kext from the /System/Library/Extensions directory and do not freeze Macbook Pro (at 75% progress bar or "IOConsoleUsers: gIOScreenLockState 3" message).
[doublepost=1526615392][/doublepost]
used Mikey N's process and it brought my mbp back to life. Thank all of you for spending all your time giving up this info. only been up and running for an hour or so, but have a few questions. Is this "hack" stored in the operating system or in the board? I run time machine regularly, so i didn't know if it will modify the file if I ever have to restore from it.

also is there a way to boot into bootcamp? holding the Option key on startup no longer functions booting in single user mode. I run windows on another partition and my version of my VM (parallels) does not work on High Sierra. my car tuning program only runs on windows.

The gpu-power-prefs -> Intel is stored in the EFI -> Logic Board.

Even removing the HDD or SSD, the boot will remain the Intel GPU.

Have you tried using the Virtualbox VM?

I'm using HighSierra (10.13.4) with Virtualbox 5.2.10 with VM's Linux Mint 18, Windows XP and Windows 10.

https://www.virtualbox.org/wiki/Downloads


1 - Download and install Virtualbox:

https://download.virtualbox.org/virtualbox/5.2.12/VirtualBox-5.2.12-122591-OSX.dmg


2 - Download VirtualBox 5.2.12 Oracle VM VirtualBox Extension Pack:

https://download.virtualbox.org/vir...VirtualBox_Extension_Pack-5.2.12.vbox-extpack


3 - Open Virtualbox -> Finder -> Applications -> Virtualbox

4 - Menu Virtualbox -> Preferences -> Extensions -> add Oracle_VM_VirtualBox_Extension_Pack-5.2.12.vbox-extpack

5 - After install Extension Pack, close Virtualbox and reboot Macbook Pro (load Virtualbox kexts at boot and configure other things.

6 - Open Virtualbox, create and install Windows.

7 - After complete install Windows -> install Guest Additions inside Windows -> Menu Devices -> Insert Guest Additions CD image.

https://download.virtualbox.org/virtualbox/5.2.12/VBoxGuestAdditions_5.2.12.iso


https://websiteforstudents.com/how-to-install-windows-10-pro-guest-machine-on-virtualbox-software/
 
  • Like
Reactions: AppleMacFinder

AppleMacFinder

macrumors 6502a
Original poster
Dec 7, 2009
796
152
Hi y'all, I'd like to know if this solution applies to 15" 2012 retina display MacBook pro's as well?
Theoretically it should be compatible with all the dual graphics Macs
[doublepost=1526763762][/doublepost]
3. Follow the MikeyN Guide - page 35 - #875 - to move the AMDRadeonX3000.kext from the /System/Library/Extensions directory and do not freeze Macbook Pro (at 75% progress bar or "IOConsoleUsers: gIOScreenLockState 3" message).
Thank you, updated this part at my first message
 

nik17able

macrumors newbie
May 19, 2018
1
0
Hello everyone.
I also have the latest 2011 15inch version and tried the archlynux way.
After I finished all the lines in the screen had disappeared which means that it boots from Intel integrated gpu, right ? However it still won't boot. It gets stuck at the apple logo and the "loading circle ". Any tips ?
 

MenloMan

macrumors newbie
Jan 20, 2018
3
0
Hello, so one of my 2011 17" MBP's started booting again (not sure why), but it does have some horizontal lines when it boots. Now that I have access to the OS again, is there an easier way than EFI or GRUB to disable the AMD card using the GUI, Terminal, or something else in macOS? Thank you.
 

nsgr

macrumors 6502
May 22, 2017
317
117
Theoretically it should be compatible with all the dual graphics Macs
[doublepost=1526763762][/doublepost] Thank you, updated this part at my first message

Step 3 should be within the "Or try the simplest way - No needed ArchLinux - Only MacOS".

If you do reboot after gpu-power-prefs -> Intel, then next step is to move AMDRadeonX3000.kext to not freeze the Macbook.

I'm trying to make a video capture simulation in Virtualbox with the alternative of ArchLinux and also MacOS.
I tried to record screen Macbook Pro with the mobile phone but the quality and the angle were not very good.
The problem is that Virtualbox 5.2.10 crashes when trying to make the Video Capture (1280x720). Old problem in the Virtualbox forum. I'll try with version 5.2.12 now.

Recording the screen with Quicktime has to then convert the .mov file (upload video website) and also make screen adjustments.
Video Capture resource inside Virtualbox have very good quality.


Or try the simplest way - No needed ArchLinux - Only MacOS:

1 - Boot Single User (press Command + S) at boot (If you have MacOS installed on your hard drive).

2 - If you have a blank HD, then use the USB stick/Pendrive with the MacOS installer (El Capitan, Sierra or HighSierra).

2.1 - Press Option key at boot, Position the mouse on the MacOS installer icon.

2.2 - Press Command + S and keep holding these two keys.

2.3 - Click the MacOS installer icon -> continue holding the Command + S keys until you finish the MacOS installer Single User boot .

Enter these commands (change gpu-power-prefs to Intel GPU and boot verbose):

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

nvram boot-args="-v"

reboot

3 - Follow the MikeyN Guide - page 35 - #875 - to move the AMDRadeonX3000.kext from the /System/Library/Extensions directory and do not freeze Macbook Pro (at 75% progress bar or "IOConsoleUsers: gIOScreenLockState 3" message).
.
.
If you've chosen the Arch Linux route, please continue reading:

 
Last edited:

Aquilesq

macrumors newbie
May 21, 2018
1
0
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. After downloading archlinux-2017.03.01-dual.iso (see the links below) you have to check the integrity of the .ISO file to see if it is not corrupted (avoid I/O error, printf: not found, chattr: not found, etc). After checking the integrity of archlinux-2017.03.01-dual.iso and everything is OK, then you can generate an ArchLinux boot disk.

archlinux-2017.03.01-dual.iso

MD5:
1d25235e7cebe45f93452fbc05a0fb66 archlinux-2017.03.01-dual.iso

SHA1
f426866ca632a35a3eeae8e4080cff25ec8da614 archlinux-2017.03.01-dual.iso

Official website ArchLinux (only Torrent) - See MD5 and SHA1 hash numbers:

https://www.archlinux.org/releng/releases/2017.03.01/

The MD5 and SHA1 of the official ArchLinux website are the same as the mirrors Virtapi.org and Belnet.be. The archlinux-2017.03.01-dual.iso on Virtapi.org and Belnet.be are legitimate.

Virtapi.org:

http://archive.virtapi.org/iso/2017.03.01/

http://archive.virtapi.org/iso/2017.03.01/archlinux-2017.03.01-dual.iso

http://archive.virtapi.org/iso/2017.03.01/md5sums.txt

http://archive.virtapi.org/iso/2017.03.01/sha1sums.txt

Belnet:

http://ftp.belnet.be/pub/archlinux.org/iso/2017.03.01/

http://ftp.belnet.be/pub/archlinux.org/iso/2017.03.01/archlinux-2017.03.01-dual.iso

http://ftp.belnet.be/pub/archlinux.org/iso/2017.03.01/md5sums.txt

http://ftp.belnet.be/pub/archlinux.org/iso/2017.03.01/sha1sums.txt

Check for archlinux-2017.03.01-dual.iso integrity (Mac OS):

Boot in Safe Mode (press SHIFT key at boot) -> no freeze Mac OS -> El Capitan or Sierra.

HighSierra maybe freeze at boot time (Safe Mode). There were changes in the HighSierra in relation to the AMD kexts loaded during the Safe Mode. More tests are needed.

File downloaded -> /Users/Your_User/Downloads/archlinux-2017.03.01-dual.iso

Finder -> Applications -> Utilities -> Terminal:

MD5:
Code:
cd Downloads/

md5 archlinux-2017.03.01-dual.iso
MD5 (archlinux-2017.03.01-dual.iso) = 1d25235e7cebe45f93452fbc05a0fb66

SHA1:
Code:
cd Downloads/

shasum archlinux-2017.03.01-dual.iso
f426866ca632a35a3eeae8e4080cff25ec8da614  archlinux-2017.03.01-dual.iso

Or try the simplest way - No needed ArchLinux - Only MacOS:

1 - Boot Single User (press Command + S) at boot (If you have MacOS installed on your hard drive).

2 - If you have a blank HD, then use the USB stick/Pendrive with the MacOS installer (El Capitan, Sierra or HighSierra).

2.1 - Press Option key at boot, Position the mouse on the MacOS installer icon.

2.2 - Press Command + S and keep holding these two keys.

2.3 - Click the MacOS installer icon -> continue holding the Command + S keys until you finish the MacOS installer Single User boot .

Enter these commands (change gpu-power-prefs to Intel GPU and boot verbose):

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

nvram boot-args="-v"

reboot

If you've chosen the Arch Linux route, please continue reading:

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!

=== NEWS ! YOU COULD ALSO FOLLOW THESE GUIDES FOR THE EXTRA IMPROVEMENTS : ===

Follow the MikeyN Guide - page 35 - #875 - to move the AMDRadeonX3000.kext from the /System/Library/Extensions directory and do not freeze Macbook Pro (at 75% progress bar or "IOConsoleUsers: gIOScreenLockState 3" message).

Rename old AMDRadeonX3000.kext and move new AMDRadeonX3000.kext after update - Page 57 - #1425

Shutdown or Restart Macbook Pro - avoid black screen freeze - Update 2 - Page 57 - #1425

Close the Lid - Sleep - Waking - Page 43 #1066 - Page 50 #1243

Hi, Im new here. First of all Thank you very much for your guide. I have a MacBook pro late 2011 with the logic board problem.
I would like to understand why all the people choose the archlunix way if you put a much more easy and short way? (I copy down)
What should I do to set the integrated as defaults and not use the discrete video card?? ( I don't care if I have to delete and make a clean macos install )
Thank you very much for advance!

Or try the simplest way - No needed ArchLinux - Only MacOS:

1 - Boot Single User (press Command + S) at boot (If you have MacOS installed on your hard drive).

2 - If you have a blank HD, then use the USB stick/Pendrive with the MacOS installer (El Capitan, Sierra or HighSierra).

2.1 - Press Option key at boot, Position the mouse on the MacOS installer icon.

2.2 - Press Command + S and keep holding these two keys.

2.3 - Click the MacOS installer icon -> continue holding the Command + S keys until you finish the MacOS installer Single User boot .

Enter these commands (change gpu-power-prefs to Intel GPU and boot verbose):
 

nnrr

macrumors newbie
May 21, 2018
1
0
Dear AppleMacFinder,

Thank you so much for taking the time and describing in detail how to disable the graphics card.

Just a small clarification, as I am not very clear on the instructions towards the end, for the arch-linux option.

I am able to see the gpu-power-prefs file under /sys/firmware/efi/efivars – that means I do not need to run any of the chattr or printf commands, but will need to still unmount efivars and reboot my machine after removing the file correct?

So basically the sequence of steps would be
  • Boot into arch-linux
  • cd /
  • umount /sys/firmware/efi/efivars
  • mount -t efivarfs rw /sys/firmware/efi/efivars/
  • cd /sys/firmware/efi/efivars
  • rm gpu-power-prefs-fa4ce28d-b62f-4c99-9cc3-6815686e30f9
  • cd /
  • umount /sys/firmware/efi/efivars
  • reboot
Is it also advisable to take a backup of the gpu-power-prefs file before deleting it?

Thanks again and appreciate your help!
 
Last edited:

elphasensa

macrumors newbie
May 21, 2018
2
0
Hi
i have a MBP mid 2010 with the same problem..it has nvidia gpu, an this method solve the problem?
thank you
 

nsgr

macrumors 6502
May 22, 2017
317
117
Hi
i have a MBP mid 2010 with the same problem..it has nvidia gpu, an this method solve the problem?
thank you

Macbook Pro 2010 Nvidia:

1 - gfxcardstatus - Steve Schow - Latest News:

https://github.com/steveschow/gfxCardStatus


2 - julian-poidevin/MBPMid2010_GPUFix

https://github.com/julian-poidevin/MBPMid2010_GPUFix


3 - Louis Rossmann - Hardware Solution - Macbook Pro 2010 kernel panic GPU issue repair: SOLVED! C9560



4 - GPU Kernel Panic in mid-2010; what's the best fix?

https://forums.macrumors.com/thread...010-whats-the-best-fix.1890097/#post-23317162
 
  • Like
Reactions: elphasensa

saqibhasan

macrumors regular
Oct 10, 2007
114
122
I have tried this several times but I keep getting told I cannot remove the gpu-power-.. file. I have unmounted it, tried a sudo rm and still nothing :(.

Any advice please?
 

benevans101

macrumors newbie
May 24, 2018
2
0
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....

MikeyN and all you genius people who have figured this out - thanks for your time and effort! The solution presented in "THE GUIDE" seems to have worked for many people. (Post #875, pg. 35)

Not me. I get through the steps of "Disable SIP", "Disable dGPU", "Enable Verbose mode" and then manage to boot into single-user. I then perform the "/sbin/mount -uw /" command, and it seems OK. However, when I try the next step, "mkdir -p /System/Library/Extensions-off", I'm given Operation not permitted.

Why can't I perform mkdir? I'm at localhost:/ root#, which is where I'm supposed to be, right? I suppose I could take the HD out, connect it to another computer and try creating a dir that way, but I'm guessing that if I'm not allowed to mkdir I'm not going to be allowed to move anything either (the next step).

I'm running HighSierra. Any thoughts from anybody would be great!
 
Last edited:

nsgr

macrumors 6502
May 22, 2017
317
117
MikeyN and all you genius people who have figured this out - thanks for your time and effort! The solution presented in "THE GUIDE" seems to have worked for many people. (Post #875, pg. 35)

Not me. I get through the steps of "Disable SIP", "Disable dGPU", "Enable Verbose mode" and then manage to boot into single-user. I then perform the "/sbin/mount -uw /" command, and it seems OK. However, when I try the next step, "mkdir -p /System/Library/Extensions-off", I'm given Operation not permitted.

Why can't I perform mkdir? I'm at localhost:/ root#, which is where I'm supposed to be, right? I suppose I could take the HD out, connect it to another computer and try creating a dir that way, but I'm guessing that if I'm not allowed to mkdir I'm not going to be allowed to move anything either (the next step).

I'm running HighSierra. Any thoughts from anybody would be great!

Two alternatives for Operation not permitted:

1 - SIP enable. SIP can only be disabled in Recovery Mode (Command + R) or Recovery Single User Mode (Command + R + S) or boot Single User Mode from pendrive /USB Stick Mac OS Installer.

Verify with command csrutil:
Code:
csrutil status

System Integrity Protection status: enabled.

csrutil disable

reboot

1.1 - Boot in Single User Mode (Command + S).


2 - You are not in Single User Mode (Command + S) but in Recovery Single User Mode (Command + R + S).

2.1 - Boot in Single User Mode (Command + S)

2.2 - Verify file system (fsck). The result should be "The volume NameVolume appears to be OK".

Mount file system with option read and write.

Code:
/sbin/fsck -fy

/sbin/mount -uw /
 

benevans101

macrumors newbie
May 24, 2018
2
0
Thanks NSGR. So, I booted in Single User, I run csrutil status and yep, I get status: enabled. Which is strange as I recall successfully disabling it in Recovery/Single User mode. I'll do that again!

Ok - having made sure the csrutil was disabled in Recovery+Single mode, I then rebooted in Single as instructed. I then performed the /sbin/mount command, which seemed to be OK. So again I tried mkdir. It didn't say "success" or anything, it just gave me a new command line. So I tried move, same thing. Then I did the "touch" command, after which I expected it to take a long time, but it didn't seem to do anything. Then I rebooted normally, but the same problem (rebooting/crashing at 75%).

So I tried all over again, including the nvram commands, and now, after one weird reboot, it finally started up such that it seems to be working! The clue was the second time I tried to move the kext it said that it didn't exist, so it must have successfully been moved the first time, even though it still failed to boot. Anyway. So now I'll go do those final extra steps (to automate the loading of the kext).

Looks like another satisfied customer! NSGR, Mikey, Applemacfinder, whoever else - Next time you find yourself in the French Alps, please get in touch and I will happily buy you Fondu and beer. You are good people!
 

elphasensa

macrumors newbie
May 21, 2018
2
0
Macbook Pro 2010 Nvidia:

1 - gfxcardstatus - Steve Schow - Latest News:

https://github.com/steveschow/gfxCardStatus


2 - julian-poidevin/MBPMid2010_GPUFix

https://github.com/julian-poidevin/MBPMid2010_GPUFix


3 - Louis Rossmann - Hardware Solution - Macbook Pro 2010 kernel panic GPU issue repair: SOLVED! C9560



4 - GPU Kernel Panic in mid-2010; what's the best fix?

https://forums.macrumors.com/thread...010-whats-the-best-fix.1890097/#post-23317162
Thank you
i went with option 3 Hardware Solution and it worked.
 

DVD Plaza

macrumors member
Jan 12, 2008
70
89
adelaide.sa.au
nvram fa4ce28d-b62f-4c99-9cc3-6815686e30f9:gpu-power-prefs=%01%00%00%00

nvram boot-args="-v"

reboot
My beloved 17" MacBook Pro suffered the video fault years ago, and thankfully was fixed when Apple finally caved and launched the repair program. However, even when I got it back I saw the occasional bit of distorted video so knew the death would someday return.

The symptoms have been showing more and more as time goes on, until tonight... BAM... vertical pink bars and no longer booting.

I was going to do the baking trick, but after getting my machine half apart realised I don't have the right tools.

Ironically I had finally given in to having a 17" and had decided that I'll get a new MacBook Pro when the next models come out, of all the timing. I am NOT going to part hard earned money on Apple premium gear on current machines that are now dated and due for update.

So then I looked at videos of people using heat guns, and it got me thinking when they were pointing directly at the discrete video chip.... wait just a minute, there is ALSO an inbuilt video in the CPU. What if I could force my Mac to use that?

Bit of searching later and I find these commands you have written. I boot into single user mode, sure display pretty stuffed but I can at least see what I'm doing, and I execute your commands. A long wait later and, well, here I am logged in and using Safari to write this message and say...

YOU SIR ARE A FRIGGEN LEGEND!!!

Thank you :) :) :) :) :) :) :)
 

apple_eater

macrumors newbie
Feb 12, 2018
3
1
Hi all - thank you for the collective wisdom here and all of the help provided! I've tried digging through a number of earlier posts but haven't quite figured out exactly how to safely accomplish what I'm trying to do and any ideas/insights/instructions would be greatly appreciated!

I have an early 2011 MBP running Mavericks with a pretty basic setup (no external hardware, no special programs/apps, etc). When my AMD GPU died last year, I went through the original "archlinux solution" as posted by AppleMacFinder and everything worked well (no problems rebooting, installing updates, etc.). I'm now at a point (for various reasons) where I would like to update my HDD to an SSD running a cleanly installed version of High sierra but I really don't want to brick the laptop (can't afford a new one right now).

I can use my brother's laptop to get a fully functioning version of High Sierra onto the new SSD, and I am comfortable enough physically swapping out the HDD for the SSD, but I'm not really sure what I would need to do after that or what commands I would need to run during/after after booting up the new SSD to ensure everything works properly and to avoid all of the reported problems with high sierra. Assuming some kind of configuration change would be required, would it make more sense to start with the SSD as an external drive and boot from it to make the necessary changes before swapping the drives just in case something goes wrong? Given that I really need to keep the laptop running, is this too risky of a process?

Thank you to anyone who can help!!!
 

saqibhasan

macrumors regular
Oct 10, 2007
114
122
Finally managed to get it working using the single user mode. THANK YOU! I am not keen to pay Apple more money while they loophole tax laws.

Some questions please:

I assume the '-v' is a verbose flag to ensure the integrated chip is used at all times?

Also, if I get the chip reballed, how do I reverse the powering down command? Will it be ...prefs=
%100%100%100%100?

And how would I remove the verbose mode?

Apologies for basic questions - I am not a coder in any way, shape or form.
 

Airbum88

macrumors newbie
Sep 14, 2013
9
0
I set my MBP to run on integrated GPU (my discrete GPU doesn't work anymore. Apple fixed my MBP twice already in the past). Now that it's running on integrated GPU, I can boot up and functionality is pretty much all there but when my MBP goes to sleep, it has trouble waking. Screen is completely black. In that case, I have to do a force shutdown. I don't want to shutdown my computer every single time that I don't use it. Is there something I can do to remedy this?
 

wmcran

macrumors newbie
May 29, 2018
6
0
Looking for help and clarification. I've read this thread up to page 54 so far and thank you to all the great minds that has shared and help.
I did one of the fixes, I don't remember which one, but after the Early 2011 Macbook Pro was up I continued with the LoginHook. The Macbook's video is back and stable. The fix holds after every reboot.

I think that I made a mistake where I directed the storage of the AMD_Kexts. They are at the "root" level (forgive me if that is the wrong language) of my SSHD. I do remember typing in "Extensions-off" when following the instructions but that folder is not in my Library.

Besides this mistake, the Macbook will not sleep. Tried setting pmset for hibernate mode of 25 and won't hibernate. I reset the pmset to normal and used DeepSleep, it appears to hibernate and I wait until the keyboard backlighting goes off to close the lid but I found it was not correctly hibernating with lid closed and getting hot. Had to force power down and restart.

It looks like "the fix" now addresses the sleep issues so I want to start from the beginning and reset Pram, etc to get Kexts back to their standard location. Since the Kexts aren't where they should be, I need instructions on how to do that along with any advice you can share.

Also in the photo, these are the commands that are in the "force-IGPU-boot.sh. Is this correct and in the correct location?
Thanks for everything.

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

AMD.jpeg
 
Last edited:

nsgr

macrumors 6502
May 22, 2017
317
117
Finally managed to get it working using the single user mode. THANK YOU! I am not keen to pay Apple more money while they loophole tax laws.

Some questions please:

I assume the '-v' is a verbose flag to ensure the integrated chip is used at all times?

Also, if I get the chip reballed, how do I reverse the powering down command? Will it be ...prefs=
%100%100%100%100?

And how would I remove the verbose mode?

Apologies for basic questions - I am not a coder in any way, shape or form.

nvram boot-args="-v" -> show information about system on boot -> no Apple logo and progress bar.

Delete verbose mode on boot -> show Apple logo and progress bar:
Code:
nvram -d boot-args

or
Code:
nvram boot-args=""


Clear NVRAM/PRAM -> change to default factory value (discrete AMD/nVidia GPU) -> press keys Option + Command + P + R at boot.


Manually:

Boot Single User Mode (press Command + S at boot):

Intel GPU (integrated gpu) - %01%00%00%00
Code:
nvram fa4ce28d-b62f-4c99-9cc3-6815686e30f9:gpu-power-prefs=%01%00%00%00


AMD/nVidia GPU (discrete gpu) - %00%00%00%00
Code:
nvram fa4ce28d-b62f-4c99-9cc3-6815686e30f9:gpu-power-prefs=%00%00%00%00
[doublepost=1527623953][/doublepost]
Looking for help and clarification. I've read this thread up to page 54 so far and thank you to all the great minds that has shared and help.
I did one of the fixes, I don't remember which one, but after the Early 2011 Macbook Pro was up I continued with the LoginHook. The Macbook's video is back and stable. The fix holds after every reboot.

I think that I made a mistake where I directed the storage of the AMD_Kexts. They are at the "root" level (forgive me if that is the wrong language) of my SSHD. I do remember typing in "Extensions-off" when following the instructions but that folder is not in my Library.

Besides this mistake, the Macbook will not sleep. Tried setting pmset for hibernate mode of 25 and won't hibernate. I reset the pmset to normal and used DeepSleep, it appears to hibernate and I wait until the keyboard backlighting goes off to close the lid but I found it was not correctly hibernating with lid closed and getting hot. Had to force power down and restart.

It looks like "the fix" now addresses the sleep issues so I want to start from the beginning and reset Pram, etc to get Kexts back to their standard location. Since the Kexts aren't where they should be, I need instructions on how to do that along with any advice you can share.

Also in the photo, these are the commands that are in the "force-IGPU-boot.sh. Is this correct and in the correct location?
Thanks for everything.

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

View attachment 763486

You made a Frankenstein Guide. Or you follow AppleMacFinder guide or you follow the MikeyN guide.


Clear NVRAM/PRAM -> do not move your kexts back to /System/Library/Extensions.

Command mv with verbose (-v) -> move your kexts back to /System/Library/Extensions

Verbose mode shows the result of the operation. You're sure where the kext was moved or directory created.

mv -v /Source_directory_Kext_with_Name_Kext /Destination_directory_Kext

SIP Disable -> then boot Single User Mode -> mount "/" with Read and Write permission:

Example:
Code:
mv -v /AMD_Kexts/AMD6000Controller.kext /System/Library/Extensions/
mv -v /AMD_Kexts/AMDSupport.kext /System/Library/Extensions/
mv -v /AMD_Kexts/AMDLegacySupport.kext /System/Library/Extensions/
mv -v /AMD_Kexts/AMDLegacyFramebuffer.kext /System/Library/Extensions/
mv -v /AMD_Kexts/AMDFramebuffer.kext /System/Library/Extensions/

Create directory with mkdir command with verbose (-v) and move AMDRadeonX3000.kext:
Code:
mkdir -v /System/Library/Extensions-off
mv -v /AMD_Kexts/AMDRadeonX3000.kext /System/Library/Extensions-off/

/System/Library/Extensions
AMD6000Controller.kext
AMDSupport.kext
AMDLegacySupport.kext
AMDLegacyFramebuffer.kext
AMDFramebuffer.kext

/System/Library/Extensions-off

AMDRadeonX3000.kext

Verify that the LoginHook (MikeyN Guide) is set to /System/Library/Extensions-off/AMDRadeonX3000.kext.

Follow this Guides:

MikeyN Guide deacrese AMD GPU - System temperature - Page 35 - #875

Rename old AMDRadeonX3000.kext - move new AMDRadeonX3000.kext after update - Page 57 - #1425


Shutdown or Restart Macbook -> black screen - Page 57 - #1425

Close Lid - Sleep - Wake - Pages 43-50 - #1066 #1243

Update MacOS, then MacOS put back new /System/Library/Extensions/AMDRadeonX3000.kext -> no freeze Macbook Pro? - Page 70 - #1747
 
Last edited:

Nightwing32

macrumors member
May 5, 2018
36
4
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 followed this entire process and now my computer is going infinite reboot. The infinite rebooting started after

"– wait for the kextcache process to finish
then

reboot

Reboot normally:"


Anyone now how I can restart?

Also, when I tried to do this "sudo defaults write com.apple.loginwindow LoginHook /Library/LoginHook/LoadX3000.sh " It said I could not go to the website com.apple.loginwindow

Did anyone get this issue too?
 

Nightwing32

macrumors member
May 5, 2018
36
4
Okay, i redid Mikey N's guide and now my computer won't even boot up. instead it's always freezes at this point.

SICPROTODETACH_IM6: Fw8 error-6

I included a screen shot. Anyone know what to do?
 

Attachments

  • 2416591727102634516.jpg
    2416591727102634516.jpg
    405 KB · Views: 1,405
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.