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.

sidn

macrumors newbie
Aug 14, 2012
3
1
Hi AppleMacFinder,

First of all. Thank you sooo much for your solution. You are simply a god to all those souls that have lost to Apple and its menacy for so shamelessly not owning to their mistake and selling out faulty stuff at such a premium price and not standing by it.

I have tried you solution below. Everything went well. IT reboots well and just after I login and the desktop shows up, after like a second the whole display goes crazy showing blue dotted lines and shuts down automatically. The same repeats after every reboot since I have followed your solution. Before even the login screen showed bad and was always stuck at the grey screen after login and never goes to the desktop. After following your fix I do see progress, the login screen and user thumbnail now display well which confirm that it is using only integrated intel graphics and not the discrete graphics card, however I am not sure what is happening the moment it is done rebooting it just goes haywire and shuts down again. It doesnt even give me any chance to do anything. I am not sure how to proceed by this. Please advice.

Thanks a ton for your help. You are awesome.

-Sridhar


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. 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
  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!
 
  • Like
Reactions: AppleMacFinder

nsgr

macrumors 6502
May 22, 2017
317
117
Thanks! I am dual booting OSX and Windows 7, and Windows was badly overheating even with almost no load. CPU-z showed that the CPU was always running at overdrive speed (3.3GHz on my 2.5GHz spec 2011 MBP). Does this allow Intel speedstep to work correctly?

Also, did you mean to say gpu-policy in the line above? I did not see where you are changing the policy anywhere.

I mentioned gpu-policy because I noticed AppleGraphicsDevicePolicy.kext was not being loaded.
/System/Library/Extensions/AppleGraphicsControl.kext/Contents/PlugIns/AppleGraphicsDevicePolicy.kext

But I do not think that's the problem. I made a new installation and it is not loaded by default (Mac OS Sierra and Mac OS X Yosemite).

If I do the printf > gpu-power-prefs -... or the sudo nvram GUID:NVRAM_Variable=value - and remove the kexts AMD, I have a temperature increase of 20 degrees Celsius. IStat Menu5 -> Sensors -> CPU Die Analog

Doing the above procedure, the macbook pro 2011 gets the temperature of 60 degrees Celsius (idle mode).

Usually the 2011 macbook pro gets the temperature at 40 degrees Celsius (idle mode -> CPU Die Analog).

If I do not remove the AMD kexts, the screen freezes at boot in IOConsoleUsers: gIOScreenLockState 3, hs 0, bs 0 now 0 sm 0x0

The printf > gpu-power-prefs-... and sudo nvram GUID:NVRAM_Variable=value procedures are excellent and simple to implement. Unfortunately I'm having this problem of temperature rise.

Instead of using Hexdump in ArchLinux, I discovered the command efivar in Linux.
Unfortunately, efivar does not work on all GUID-NVRAM_Variable files (gpu-active, gpu-power-prefs).

https://www.mankier.com/1/efivar

Example:

List current variables:
efivar -l

View information GUID-NVRAM_Variable:
efivar -n 7C436110-AB2A-4BBB-A880-FE41995C9F8-gpu-policy -p

To make a clean installation, I have to Burn the macbook pro (overheating) by cleaning the NVRAM and let the AMD toast video card to shutdown and boot into the Intel video card. If I do not do this, I have the problem of raising the temperature after complete install Mac OS.

I'm investigating the file gfx-saved-config-restore-status-4d1ede05-38c7-4a6a-9cc6-4bcca8b38c14 and /System/Library/Extensions/AppleGraphicsControl.kext/Contents/Plugins/AppleMuxControl.kext .

https://gist.github.com/0xbb/974999591da4b1b2635c
 
Last edited:
  • Like
Reactions: AppleMacFinder

nsgr

macrumors 6502
May 22, 2017
317
117
I got through IOConsoleUsers: gIOScreenLockState 3, hs 0, bs 0 now 0 sm 0x0 and maintain the temperature at 40 degrees Celsius.

The key is to use the agc=0 option inside boot-args.

With agc=1, freeze on IOConsoleUsers: gIOScreenLockState 3, hs 0, bs 0 now 0 sm 0x0 and reboot.

nvram boot-args="-v agc=0"

The agc option must be set to Recovery Mode (Command + R) -> Terminal.

Test:
Macbook Pro Early 2011
Mac OS Sierra 10.12.5 - with Kexts AMD

I'll do a test later without the AMD Kexts.

0 - Clear NVRAM (Option + Command + P + R)

1 - Boot ArchLinux - with nomodeset (red background screen and white stripes)

2 - If exist file /sys/firmware/efi/efivars/gpu-power-prefs-fa4ce28d-b62f-4c99-9cc3-6815686e30f9 -> remove

3 - printf "\x07\x00\x00\x00\x01\x00\x00\x00" > /sys/firmware/efi/efivars/gpu-power-prefs-fa4ce28d-b62f-4c99-9cc3-6815686e30f9

4 - chattr +i "/sys/firmware/efi/efivars/gpu-power-prefs-fa4ce28d-b62f-4c99-9cc3-6815686e30f9"

5 - cd /

6 - umount /sys/firmware/efi/efivars/

7 - Enter Recovey Mode (Command + R)

8 - Open Utilities -> Terminal

9 - List nvram variables -> nvram -p

10 If exists nvram variable boot-args -> delete -> nvram -d boot-args

11 - Add new values boot-args -> nvram boot-args="-v agc=0"

12 - Reboot


Boot argument option agc=3
"Those parameters are undocumented and I don't know what all of them do. They were set by the technician while servicing the machine. They're not needed for normal operation. If I had to guess, I'd guess that "agc=3" disables automatic switching between discrete and integrated graphics."

https://discussions.apple.com/thread/7295722?start=0&tstart=0
 
Last edited:

AppleMacFinder

macrumors 6502a
Original poster
Dec 7, 2009
796
152
I have tried you solution below. Everything went well. IT reboots well and just after I login and the desktop shows up, after like a second the whole display goes crazy showing blue dotted lines and shuts down automatically. The same repeats after every reboot since I have followed your solution. Before even the login screen showed bad and was always stuck at the grey screen after login and never goes to the desktop. After following your fix I do see progress, the login screen and user thumbnail now display well which confirm that it is using only integrated intel graphics and not the discrete graphics card, however I am not sure what is happening the moment it is done rebooting it just goes haywire and shuts down again. It doesnt even give me any chance to do anything. I am not sure how to proceed by this

Thank you very much for the kind words, Sridhar - and sorry for the slightly late reply... Please tell: have you removed the AMD kexts ? The instruction how to remove them - is described in the first message of this thread, just go to the first page and press Ctrl+F or Command+F then type kext to find these instructions quickly. Hopefully it helps! You might also want to check FGuarini's message here - https://forums.macrumors.com/thread...efi-variable-fix.2037591/page-5#post-24511780 Good luck ;)
 

kjob3022

macrumors newbie
Feb 21, 2017
7
3
Thank you very much for the kind words, Sridhar - and sorry for the slightly late reply... Please tell: have you removed the AMD kexts ? The instruction how to remove them - is described in the first message of this thread, just go to the first page and press Ctrl+F or Command+F then type kext to find these instructions quickly. Hopefully it helps! You might also want to check FGuarini's message here - https://forums.macrumors.com/thread...efi-variable-fix.2037591/page-5#post-24511780 Good luck ;)
 
  • Like
Reactions: AppleMacFinder

kjob3022

macrumors newbie
Feb 21, 2017
7
3
Dear Apple Mac Finder,thanks so much for your incredible work,I am truly amazed of some of the minds out there.I have a 2011/15"/8.2 MacBook Pro with the and chip and although it works fine,I'm waiting for the crash.Why can't I fix this now while I have a screen that works and remove the EFI and AMD stuff before it goes out?Also,is there any chance I can send my unit to you for a fix when it does go,I don't know if you have been approached about this but it seems to me you could make a lot of people happy and make a buck at the same time, please don't take offense if this is out of line but I am curious if this is now an easy fix for you because of your time and effort.Just wondering out loud here.Thanks again for the amazing saves you have provided.Regards,Ken
 
  • Like
Reactions: AppleMacFinder

Jbrussee

macrumors newbie
Jun 5, 2017
2
2
I removed power-prefs and now I'm unsure what to do.. I tried the printf and chattr commands that come after it and neither work.. Then I tried rebooting and it still won't boot.
 
  • Like
Reactions: AppleMacFinder

AppleMacFinder

macrumors 6502a
Original poster
Dec 7, 2009
796
152
I removed power-prefs and now I'm unsure what to do.. I tried the printf and chattr commands that come after it and neither work.. Then I tried rebooting and it still won't boot.
This instruction is quite lengthy and it is easy to accidentally make a mistake at a single step which will break this solution. Please try it again ; if you are still getting the problems and you believe that you have done everything correctly (including the removal of AMD kexts!) - could look through other people's posts for helpful advices, and post a more detailed question if nothing helps
Why can't I fix this now while I have a screen that works and remove the EFI and AMD stuff before it goes out?
Of course you could use this solution to disable a discrete GPU at any moment, even right now while your GPU is still fully functional - if you don't need it at all. Otherwise you could keep using it while it lasts, play computer games and stuff...

Also,is there any chance I can send my unit to you for a fix when it does go,I don't know if you have been approached about this but it seems to me you could make a lot of people happy and make a buck at the same time, please don't take offense if this is out of line but I am curious if this is now an easy fix for you because of your time and effort.Just wondering out loud here
Although it is easy to do this fix, sadly I could not help you - partially because I am at foreign country and without a permanent residence, also because it is a lot of personal responsibility ; and of course the postal services could easily mishandle such an expensive item - which would really suck. If not these issues I would have done it for you for free, but sadly it is hardly doable as you see... Please be confident at your powers, I am sure you could successfully complete this solution - it should take 1 day at max even for the inexperienced people ;) Just need some patience and, most importantly, enough attention to avoid the mistakes . By the way: everyone should learn how to perform this solution by themselves, because if one day this solution will "disappear" - e.g. because of complete laptop battery discharge or PRAM reset - and you need this computer for important work, having the experience with this solution will help you to quickly fix this computer again
 
Last edited:

SirMeowington5

macrumors member
May 21, 2017
95
6
A new Sierra update was just announced. Will it be possible to update with the fix in place?

My concern is that the fix will get removed at some point during the installation of the Sierra update causing the update to get corrupted due to a failed installation. Does the NVRAM get cleared at any point during the installation?
 
  • Like
Reactions: AppleMacFinder

dynek

macrumors newbie
Jun 6, 2017
4
4
Hello,

I did the efivars trick but I am still able to switch to discrete using gfxCardStatus.
Do I understand correctly that both efivars trick + AMD kext files should be removed?

Thank you for your post and time!
 
  • Like
Reactions: AppleMacFinder

kjob3022

macrumors newbie
Feb 21, 2017
7
3
This instruction is quite lengthy and it is easy to accidentally make a mistake at a single step which will break this solution. Please try it again ; if you are still getting the problems and you believe that you have done everything correctly (including the removal of AMD kexts!) - could look through other people's posts for helpful advices, and post a more detailed question if nothing helps
Of course you could use this solution to disable a discrete GPU at any moment, even right now while your GPU is still fully functional - if you don't need it at all. Otherwise you could keep using it while it lasts, play computer games and stuff...

Although it is easy to do this fix, sadly I could not help you - partially because I am at foreign country and without a permanent residence, also because it is a lot of personal responsibility ; and of course the postal services could easily mishandle such an expensive item - which would really suck. If not these issues I would have done it for you for free, but sadly it is hardly doable as you see... Please be confident at your powers, I am sure you could successfully complete this solution - it should take 1 day at max even for the inexperienced people ;) Just need some patience and, most importantly, enough attention to avoid the mistakes . By the way: everyone should learn how to perform this solution by themselves, because if one day this solution will "disappear" - e.g. because of complete laptop battery discharge or PRAM reset - and you need this computer for important work, having the experience with this solution will help you to quickly fix this computer again
Thanks for the reply and your'e correct that I need to not be afraid to dig in and fix this .I read the complete pages of the thread and I came away with even though mine is a 15" 2011,8.2, it's the same fix for both AMD chips.I will start at the start and start before I lose the screen,Thanks again for all you have done.Think of all the people you've helped!-Ken
 
  • Like
Reactions: AppleMacFinder

dynek

macrumors newbie
Jun 6, 2017
4
4
OK so I tried to remove (move) the AMD kernel extensions as well as modify the EFI var and then everything becomes really slow. I thought the Intel graphic card was performing better. Did I do something wrong to get a very slow display or is it the expected behavior?
 
  • Like
Reactions: AppleMacFinder

SirMeowington5

macrumors member
May 21, 2017
95
6
OK so I tried to remove (move) the AMD kernel extensions as well as modify the EFI var and then everything becomes really slow. I thought the Intel graphic card was performing better. Did I do something wrong to get a very slow display or is it the expected behavior?

Sounds to me like the EFI modification didn't hold for you. Everything becoming really slow is what people describe happening after only moving the AMD files. Maybe try the EFI mod again.
 
  • Like
Reactions: AppleMacFinder

dynek

macrumors newbie
Jun 6, 2017
4
4
Sounds to me like the EFI modification didn't hold for you. Everything becoming really slow is what people describe happening after only moving the AMD files. Maybe try the EFI mod again.
You are correct - This is strange but I have done it one again and this time it worked. Probably issued an incorrect string to printf. My mac is working great again :) It used to switch the display all pink when discrete was being used.

Thanks for the manual and help guys!
 
  • Like
Reactions: AppleMacFinder

charliefineman123

macrumors newbie
Jun 7, 2017
2
2
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


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

Dear AppleMacFinder, first of all, thanks a million for this tutorial, as i was able finally to access my system and all the data again. Great work! You just saved me not only that stupid repair for 650 Euros, but also all my work...

Still I've got a question, which I hope someone here can answer:

Now everything is running really slow plus with every reboot the grey screen appears again - and I have to do the whole procedure all over again.

You mentioned this might be due to the AMD kexts. The problem is: I cannot delete them. Each time I try it says (in both terminal and single user mode): "operation not permitted".

I use Sierra 10.12.4. and read somewhere, that Apple put a new layer of security over those kext-files in sierra. Any idea how I can still delete them? Help would be greatly appreciated!

Thanks a lot!!!

Cheers, Charlie
 
  • Like
Reactions: AppleMacFinder

dynek

macrumors newbie
Jun 6, 2017
4
4
  • Like
Reactions: AppleMacFinder

Jbrussee

macrumors newbie
Jun 5, 2017
2
2
This instruction is quite lengthy and it is easy to accidentally make a mistake at a single step which will break this solution. Please try it again ; if you are still getting the problems and you believe that you have done everything correctly (including the removal of AMD kexts!) - could look through other people's posts for helpful advices, and post a more detailed question if nothing helps
Of course you could use this solution to disable a discrete GPU at any moment, even right now while your GPU is still fully functional - if you don't need it at all. Otherwise you could keep using it while it lasts, play computer games and stuff...

Although it is easy to do this fix, sadly I could not help you - partially because I am at foreign country and without a permanent residence, also because it is a lot of personal responsibility ; and of course the postal services could easily mishandle such an expensive item - which would really suck. If not these issues I would have done it for you for free, but sadly it is hardly doable as you see... Please be confident at your powers, I am sure you could successfully complete this solution - it should take 1 day at max even for the inexperienced people ;) Just need some patience and, most importantly, enough attention to avoid the mistakes . By the way: everyone should learn how to perform this solution by themselves, because if one day this solution will "disappear" - e.g. because of complete laptop battery discharge or PRAM reset - and you need this computer for important work, having the experience with this solution will help you to quickly fix this computer again


You were right, I had the wrong direction slashes for printf. I have an issue now though, I cannot get the Mac to stay in integrated mode upon shut down. I did the Amd Kexts as well but it still fails to boot up.
 
  • Like
Reactions: AppleMacFinder

charliefineman123

macrumors newbie
Jun 7, 2017
2
2
Do not delete them. Better to move them in case you need them for any reason.
To do so you will need to disable system integrity protection in recovery mode:
http://osxdaily.com/2015/10/05/disable-rootless-system-integrity-protection-mac-os-x/

Hope this helps.

Thanks! Not easy to get into recovery mode as he kept forgetting I had switched to integrated graphics (despite using the chattr +i command), but it worked in the end ;)

Still everything is slow. Maybe even slower than before and some graphic bugs (flickering in menus, when something new pops up) appeared plus my brightness-adjustment keys dont work anymore. Did I move to many AMD files. These I removed.... should I put some back?

Thanks a lot!!
 

Attachments

  • Bildschirmfoto 2017-06-07 um 16.38.47.png
    Bildschirmfoto 2017-06-07 um 16.38.47.png
    49.9 KB · Views: 459
  • Like
Reactions: AppleMacFinder

SirMeowington5

macrumors member
May 21, 2017
95
6
Do not delete them. Better to move them in case you need them for any reason.
To do so you will need to disable system integrity protection in recovery mode:
http://osxdaily.com/2015/10/05/disable-rootless-system-integrity-protection-mac-os-x/

Hope this helps.

I'm getting the same "Operation not permitted" error. I can't boot into recovery mode as instructed in the link you posted. Is there an alternative way?

Edit : Never mind, for those of you who also get stuck on a grey screen booting into recovery mode, there is an undocumented single user recovery mode which you can access with CMD + R + S.

Unfortunately now I am being hit with a "Read-only file system" message.

Edit: Never mind again, I didn't mount the drive properly. It's working like a charm. Thanks a million AppleMacFinder!
 
Last edited:
  • Like
Reactions: AppleMacFinder

JBlazeRSP

macrumors newbie
Jun 10, 2017
1
1
OK I still have hope but I can't seem to get this right. Late 2011 model. I have reset the nvram, unmounted and remounted efivars as rw and I can't get past the printf command. It gives me invalid argument. I've tried it 20 times making sure I don't type it wrong. Anything else I can try?

Thanks to everyone in the thread. I've learned a lot!
 
  • Like
Reactions: AppleMacFinder

the_marked

macrumors newbie
Jun 14, 2017
2
1
AppleMacFinder thank you SO SO SO SO SO much! I was ready to toss my MacBook! The Apple store wanted $900 to fix it as the repair program is no longer in place, and another local place wanted $450 to replace the GPU. This works PERFECTLY my MacBook is alive again!

One problem, however, is upon reboot I have to do all the steps again because it just reverts back to the same problem. I noticed a few other people have had the same issue...anyone figure out a fix?

Thanks again!

EDIT: Hmmm...also seems like I'm unable to play movies (twice tried playing an .mkv file in VLC and computer restarted).
 
Last edited:
  • Like
Reactions: AppleMacFinder

zz2003

macrumors newbie
Jun 15, 2017
3
3
AppleMacFinder Thank you so much for your post! Saved my laptop! I am in the middle of the semester, and cannot afford losing all the settings on the laptop, and following your way, it works great!
I also have the same problem that when rebooting, I need to redo all the steps. I am waiting on a fix as well.
The other thing I have noticed is not being able to use external display. I ordered a USB to VGA converter, and hopefully that will let me use the external monitor again.
 
  • Like
Reactions: AppleMacFinder

AppleMacFinder

macrumors 6502a
Original poster
Dec 7, 2009
796
152
A new Sierra update was just announced. Will it be possible to update with the fix in place?

My concern is that the fix will get removed at some point during the installation of the Sierra update causing the update to get corrupted due to a failed installation. Does the NVRAM get cleared at any point during the installation?
Although I don't have any experience with Sierra, I've installed various OS X El Capitan updates (10.11.5-->10.11.6 plus some security ones) and my fix is still there. But, just in case, have some spare time to re-do the fix again in case its removed.

Do I understand correctly that both efivars trick + AMD kext files should be removed?
Yes, of course both things need to be done

OK so I tried to remove (move) the AMD kernel extensions as well as modify the EFI var and then everything becomes really slow. I thought the Intel graphic card was performing better. Did I do something wrong to get a very slow display or is it the expected behavior?
Intel graphics card has worse performance than AMD, but not to a point where your desktop is horribly slow. Usually it means that a fix didn't work and you have to repeat it, after removing the AMD kexts of course

Now everything is running really slow plus with every reboot the grey screen appears again - and I have to do the whole procedure all over again
I believe a solution was in FGuarini's message here - https://forums.macrumors.com/thread...efi-variable-fix.2037591/page-5#post-24511780 It gives slighly different instructions and made a fix to be permanent for some people. But for many people, including me, this fix is already permanent and I didn't need anything additional. We still don't know - on what it depends, whether you have a permanent fix instantly or have to do something additional. Maybe the motherboard revisions? :p

You mentioned this might be due to the AMD kexts. The problem is: I cannot delete them. Each time I try it says (in both terminal and single user mode): "operation not permitted".

I use Sierra 10.12.4. and read somewhere, that Apple put a new layer of security over those kext-files in sierra. Any idea how I can still delete them? Help would be greatly appreciated!

If you can't delete or move these files by using OS X, no matter what you are doing - then you could remove your hard drive and, using any SATA-->USB adapter, connect this hard drive to another OS X computer or to computer running Linux (or a temporary RAM based Linux LiveCD which doesn't do any changes to your computer, useful if you don't have a Linux installation on your hard drive and don't want to install it yet). Of course, if you connect this hard drive to another computer, nothing can prevent you from modifying the files

There is an undocumented single user recovery mode which you can access with CMD + R + S
Great to know! Thank you for this valuable information

OK I still have hope but I can't seem to get this right. Late 2011 model. I have reset the nvram, unmounted and remounted efivars as rw and I can't get past the printf command. It gives me invalid argument. I've tried it 20 times making sure I don't type it wrong. Anything else I can try?
Please try FGuarini's instruction here - https://forums.macrumors.com/thread...efi-variable-fix.2037591/page-5#post-24511780 These instructions are slightly different and their difference helps to some people who didn't have a 100% success with my version of them

Upon reboot I have to do all the steps again because it just reverts back to the same problem. I noticed a few other people have had the same issue...anyone figure out a fix?
Check FGuarini's instruction (link given above), it is slightly different and may help you

Hmmm...also seems like I'm unable to play movies (twice tried playing an .mkv file in VLC and computer restarted).
Uninstall VLC with the removal of its' plists (settings files), then install it again. There could be some setting in plist that is still trying to switch to discrete. Alternatively, maybe this fix haven't been completed to 100% and you need to repeat the last parts of instruction

I also have the same problem that when rebooting, I need to redo all the steps. I am waiting on a fix as well
Check FGuarini's instruction (link given above), it is slightly different and may help you.

The other thing I have noticed is not being able to use external display. I ordered a USB to VGA converter, and hopefully that will let me use the external monitor again
Please tell us the results with USB to VGA converter, it will be great to know if its' possible
 

Bonaire

macrumors newbie
Jun 18, 2017
6
4
This fix got me to the stage of being able to boot up in safe mode with integrated GPU. Like others with Sierra installed normal booting still ends in hanging grey screen trying to go to login page.

Unfortunately trying to move the AMD kexts ends in 'system file is read only'. Is there a way to still move them. Or is it possible to go back to rw status booting up in Archlinux (EFI boot)?

Alternatively: is there another way to pass the grey screen?

In safe modus I can do 90% of what I use my MBP for, but no video and sound. And Spotlight does't work either (except as a dictionary).
 
Last edited:
  • Like
Reactions: AppleMacFinder
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.