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.

tmanx

macrumors newbie
Nov 1, 2017
22
3
I'm more in particular about the amount of pages and responses I have to weed through. I came across brainshutdown's solution quite by accident, and I believe it would be more beneficial for everyone else who might not get to see it, aside from the fact that it is a very different approach in terms of syntax.

As far as not finding it is concerned, I found this thread just by doing a google search, so I suppose, if this solution become as popular it would also be easily found by keyword search. People will also link to it if they find it useful.

As for the SIP, I've tried that earlier. No dice. Maybe I just did something wrong. I'll check out 1051 and 1058, since I must have skipped through them. I get dyslexic when I've read too much in a short span of time (which is what I've been doing).

I see where you're coming from - but the same can be said for a number of the fixes. There were 42 odd pages of various posts before the grub one was offered - and before that, there have been comments that the fix on the front page needs updating as guys drop on there and apply - whereas there are multiple updates to or variations of it - and even short cut versions that don't require half the coding.

If the grub solution gets moved - hope I can find it OK ;-)
 

xanderx007

macrumors 6502
Nov 7, 2017
262
140
I see where you're coming from - but the same can be said for a number of the fixes. There were 42 odd pages of various posts before the grub one was offered - and before that, there have been comments that the fix on the front page needs updating as guys drop on there and apply - whereas there are multiple updates to or variations of it - and even short cut versions that don't require half the coding.

If the grub solution gets moved - hope I can find it OK ;-)


Working solutions can be pinned or highlighted.
 

tmanx

macrumors newbie
Nov 1, 2017
22
3
Working solutions can be pinned or highlighted.

Not sure what you're referring to - the various versions of the fixes (they haven't been pinned or highlight - but then they've evolved too) - or locating the grub solution if it is moved or a separate thread created?
 

mcbeej

macrumors member
Jun 7, 2007
77
3
Thanks for this. I've been having similar issues:

- Late 2011 MBP, replaced motherboard with GFX failed, now the replacement has failed, so I've been investigating options.

Once (eventually) booted, I was using GFXCardStatus to force the internal GFX card, and this basically worked ok for everything - except Photoshop. Even with all GFX card processing prefs turned off in Photoshop, just launching it instantly caused the AMD graphics driver to panic and basically making my machine useless, forcing a restart.

I did the fix as described in the first post, and it now means my machine will now reliably boot (a win!) rather than booting once in every 50 or so attempts.

Edit: However, what I can gather then, that the OP's method stops the dGPU being used on boot, therefore letting the machine boot where previously it would hang. But it doesn't do more than that - for that, I need to remove the kext as in bicycleforthemind's solution on p38, but I can’t currently do this because of SIP and I can’t get to the recovery console... :(

Edit2: Ok, I've disabled sip with the rEFInd tool, and am trying brainshutdowns method, but so far, I cant boot into macOS from grub, it just stays at a black screen. Uuids are correct (it's the UUID of the MacOS system drive partition, I presume?)

(Incidentally, after I've tried to boot from the grub method, which hangs on a black screen, once I tr to boot normally, the boot process hangs again - I have to reset the gpu-power-prefs nvram again to get the machine to boot, so the grub process is doing *something* - just not booting into MacOS for me...)
 
Last edited:

xanderx007

macrumors 6502
Nov 7, 2017
262
140
Not sure what you're referring to - the various versions of the fixes (they haven't been pinned or highlight - but then they've evolved too) - or locating the grub solution if it is moved or a separate thread created?

They can be pinned on the Forum section/list and can be highlighted. We have at least two working solutions. It's becoming a bit difficult to follow which is which on the same thread, like I mentioned earlier, with now more than 46 pages and 50 replies per page.

Again this is just a suggestion, just so that brainshutdown's solution can easily be found by others (I've already found it, and my only concern right now is weeding through between his solution and AMF's.

Screen Shot 2017-11-11 at 00.03.49.png
 

qmgou

macrumors newbie
Nov 10, 2017
1
0
Thanks for your solution. But I could not find and AMD* file in /System/Library/Extensions/.
The system responsed with "there is no such file" when I performed "sudo mv /System/Library/Extensions/AMD*.* /AMD_Kexts/".
Any advice?
Thanks again.
 

Timmsy73

macrumors newbie
Nov 11, 2017
3
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. 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!


Hi and thanks you so much to the people who worked out this amazing solution. My friends 17inch MacBook Pro runs perfectly once done.
However I do have one issue that I’m hoping you can guide me on. Whenever I reboot the machine it loses the settings and I have to go through the whole process again. Is there a way round this so the settings “stick” permanently? I just cant seem to be able to get the settings to stick, not sure what I’m doing wrong.
Or is there a way to physically disable the AMD card?
Thanks again and look forward to your help.
 
Last edited:

Muhammad Toori

macrumors newbie
Nov 12, 2017
2
0
Hi,

First off, thanks for your step by step guide. I followed your steps and successfully fix the issue. Ran Yosemite for two weeks and then due to some virus I had to do a clean setup of Yosemite again that dint work wel and got stuck. Now I can not go into the single-user mode and can not reinstall OSX Yosemite or SL 10.6 that this MBP came with. Is there an installation solution of OSX Yosemite possible like this(
) one is for Ubuntu? Will appreciate your reply. Thanks in advance.

Muhammad
 

TitusVorenus

macrumors member
Mar 28, 2011
67
7
After early success with this fix:

https://forums.macrumors.com/thread...efi-variable-fix.2037591/page-3#post-24438644

I cannot get it to work again. I haven't had time to address this since posting earlier in this thread:

https://forums.macrumors.com/thread...efi-variable-fix.2037591/page-4#post-24502258

I'm considering to order a new chip and have it installed on the board. However, I cannot find a local service shop that will do this without shipping it off and charging me a fee to do so.

Is there a US based service that I can send a new chip and my current motherboard to, preferably west coast? The chip I'm going to order that was posted earlier in this thread:

http://www.aliexpress.com/item/DC-2...0028-216-0810028-BGA-Chipset/32764872143.html

Or is this the best option?

https://www.aliexpress.com/item/Pro...her-Board-Quad-Core-i7-2-0Ghz/2024020852.html

On a lark, I'm going to try to reinstall El Capitan again and give it one more shot, but I'm not optimistic.

(EDIT: After calling around for a while I was referred to rossmangroup.com to solder the chip to the board. The owner Louise was adamant these new chips aren't new, but reballed or pulled off of older failed boards, and he'd no longer do the work as it was a waste of money. Looks like I'm going to try again to address the graphics switching (see post below. Comments appreciated.) @AppleMacFinder
 
Last edited:

TitusVorenus

macrumors member
Mar 28, 2011
67
7
Can anyone help a command line noob?

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

(all ok until this point)

*) chattr -i "/sys/firmware/efi/efivars/"
chattr: Inappropriate ioctl for device while reading flags on /sys/firmware/efi/efivars/ (at this point I tried continuing, probably incorrectly)

*) printf "\x07\x00\x00\x00\x01\x00\x00\x00" > /sys/firmware/efi/efivars/gpu-power-prefs-fa4ce28d-b62f-4c99-9cc3-6815686e30f9
\`dquote (Google search indicates this is because of an opened ended quote but I made sure I closed the quotes. Although it probably wasn't correct, I added a quote and then it went back to:
1root@archiso /sys/firmware/efi/efivars #

*) chattr +i "/sys/firmware/efi/efivars/gpu-power-prefs-fa4ce28d-b62f-4c99-9cc3-6815686e30f9"
chattr: Invalid argument while trying to stat sys/firmware/efi/efivars/gpu-power-prefs-fa4ce28d-b62f-4c99-9cc3-6815686e30f9

(did not go further)

*) cd /

*) umount /sys/firmware/efi/efivars/

*) reboot
 

xanderx007

macrumors 6502
Nov 7, 2017
262
140
Can anyone help a command line noob?

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

(all ok until this point)

*) chattr -i "/sys/firmware/efi/efivars/"
chattr: Inappropriate ioctl for device while reading flags on /sys/firmware/efi/efivars/ (at this point I tried continuing, probably incorrectly)

*) printf "\x07\x00\x00\x00\x01\x00\x00\x00" > /sys/firmware/efi/efivars/gpu-power-prefs-fa4ce28d-b62f-4c99-9cc3-6815686e30f9
\`dquote (Google search indicates this is because of an opened ended quote but I made sure I closed the quotes. Although it probably wasn't correct, I added a quote and then it went back to:
1root@archiso /sys/firmware/efi/efivars #

*) chattr +i "/sys/firmware/efi/efivars/gpu-power-prefs-fa4ce28d-b62f-4c99-9cc3-6815686e30f9"
chattr: Invalid argument while trying to stat sys/firmware/efi/efivars/gpu-power-prefs-fa4ce28d-b62f-4c99-9cc3-6815686e30f9

(did not go further)

*) cd /

*) umount /sys/firmware/efi/efivars/

*) reboot

Everything is correct, but, you're supposed to skip the chattr -i step. Check my reply at 1130.
 

TitusVorenus

macrumors member
Mar 28, 2011
67
7
Everything is correct, but, you're supposed to skip the chattr -i step. Check my reply at 1130.

OK, I reset NVRAM and SMC. I confirmed there are no gpu pref files. Now I still get this error message on this step:

*) chattr +i "/sys/firmware/efi/efivars/gpu-power-prefs-fa4ce28d-b62f-4c99-9cc3-6815686e30f9"
chattr: Invalid argument while trying to stat sys/firmware/efi/efivars/gpu-power-prefs-fa4ce28d-b62f-4c99-9cc3-6815686e30f9

However, it did reboot properly, but it crashes after starting safari with a webpage that has video ads, I assume as they start graphics switching again.

What happens when I deselect automatic graphics switching in the energy saver tab in system preferences?

And at this point, I attempted to remove the kext files in single user mode. I entered everything correctly, but I was unable to unmount at the end. I rebooted anyway. A couple of restarts later (looped), it seems to be functioning.

Can you link to info on Steve Chows' gfxcardstatus? I searched the thread but didn't come up with hits.
 
Last edited:

xanderx007

macrumors 6502
Nov 7, 2017
262
140
OK, I reset NVRAM and SMC. I confirmed there are no gpu pref files. Now I still get this error message on this step:

*) chattr +i "/sys/firmware/efi/efivars/gpu-power-prefs-fa4ce28d-b62f-4c99-9cc3-6815686e30f9"
chattr: Invalid argument while trying to stat sys/firmware/efi/efivars/gpu-power-prefs-fa4ce28d-b62f-4c99-9cc3-6815686e30f9

However, it did reboot properly, but it crashes after starting safari with a webpage that has video ads, I assume as they start graphics switching again.

What happens when I deselect automatic graphics switching in the energy saver tab in system preferences?

And at this point, I attempted to remove the kext files in single user mode. I entered everything correctly, but I was unable to unmount at the end. I rebooted anyway. A couple of restarts later (looped), it seems to be functioning.

Can you link to info on Steve Chows' gfxcardstatus? I searched the thread but didn't come up with hits.

gfxcardstatus doesn't really do anything but tell you that the graphics is stuck at iGPU. Also, it's a bit buggy. I've been switching between Cody's and Steve's versions with random results, and in my case, it also crashes the MBP, depending on how bad a day the Mac is having. Disabling "Automatic Graphics Switching" actually switches it to the dGPU. When it is active, that's how the Mac decides if it will use the dGPU when a dependent app is launched.

Try the fix one more time, but, reset the SMC first before the NVRAM. After the NVRAM boot, immediately press <CMD+S+R> to boot into Single User Recovery Mode. At the prompt, type

csrutil disable

then press enter to disable the SIP. You should get a confirmation that the SIP is disabled. Then type

reboot

then press enter. Your ArchLinux USB boot disk should already be in the slot, so you should also be pressing the <option> key at boot. Do the process again (skip chattr -i) and see if it works this time. It worked for me earlier on after my Mac crashed opening Facebook.

If that fails, try @brainshutdown's fix here. I've also just tried it before this reply, and it has also worked so far. I've posted my results there as well.
 

molocono

macrumors member
Jan 13, 2004
68
4
Everything is correct, but, you're supposed to skip the chattr -i step. Check my reply at 1130.
Wow, my 2011 MBP has been resurrected! Thank you!
What do I need to look out for next? I have gfxCardStatus installed.
Don't plan on using it to do any heaving lifting anymore. Just web stuff and email.
 

xanderx007

macrumors 6502
Nov 7, 2017
262
140
Wow, my 2011 MBP has been resurrected! Thank you!
What do I need to look out for next? I have gfxCardStatus installed.
Don't plan on using it to do any heaving lifting anymore. Just web stuff and email.

As I have only been using the fix for a little over a week (as per my original reply after applying the solution the first time), it may not be a long-term, non-hardware-invasive solution. My MBP still crashed, but, I was able to restart properly after several tries. Just opening Facebook and some pages over Firefox or Safari crashed it (as it did yesterday, where I couldn't boot it up for an entire day until I reapplied the solution). It may or may not be stable, and that depends entirely on a case-to-case basis, since I believe the fix working properly depends on how every individual applies it. A simple misstep can make it worse. It may work for a few days (but I had to avoid Facebook and some pages), did not shut down and simply let the display sleep automatically or via sleep corner.

After that major crash yesterday, I decided to do brainshutdown's grub solution. It failed at first, but worked the second time around with a different variable. Check out the result here.
 
Last edited:

AppleMacFinder

macrumors 6502a
Original poster
Dec 7, 2009
796
152
when I tried booting from it, I got this error message:
View attachment 733706
Now, with the little coding I know, I'm guessing that the ArchLinux version I've downloaded is corrupt and thus could be unpacked. I'm currently downloading an older version, to see if that works, but, maybe you guys can help me figure out what went wrong here, in case I'm wrong with my assumption
Maybe a file got corrupt while downloading, but in any case its probably a good idea to use the same version of Arch Linux that I have used - for guaranteed results (some newer Arch Linux version had a UEFI vars related bug, and I am unsure if they have fixed it before releasing the latest available version)

Would this procedure work also on my 15" MBP Retina Mid 2012 as well?
If a problem is the same (failed discrete GPU) it should work for you. Moreover I believe it should work for any MBP with failed discrete GPU
 

xanderx007

macrumors 6502
Nov 7, 2017
262
140
Maybe a file got corrupt while downloading, but in any case its probably a good idea to use the same version of Arch Linux that I have used - for guaranteed results (some newer Arch Linux version had a UEFI vars related bug, and I am unsure if they have fixed it before releasing the latest available version)

Probably. I did try to get the version in your guide, but, it's "no longer available," so I just got the oldest one that is. At any rate, I've successfully done the fix a few times, but, it's unstable and crashes on some webpages, especially Facebook. I decided to do the grub fix yesterday, and so far, I haven't had to do a force restart.
 
  • Like
Reactions: AppleMacFinder

MichelHanna

macrumors newbie
Nov 16, 2017
1
0
I did all of the recommended solution and my mac successfully starts but it always freezes!! what should i do now :(
 

Jonathan50

macrumors member
Mar 30, 2017
89
35
For the time being both graphics cards appear to work ok on my 2011 15" mbp running Sierra 16G1036. The only issue it has is that occasionally it won't wake from sleep, irrespective of power source. Prepared a bootable usb with arch and rufus and managed to delete the gpu-power* file as per the initial instructions. After rebooting, the file reappears and I can again switch gpus with gfxcardstatus2.3 Is this normal? How can I tell the 6750m has been deactivated or not? Is it possible to copy the gpu-power* file from within the arch root prompt to some other location in order to later examine its contents? Is the /sys/firmware/efi/efivars/ directory accessible from Sierra, can't seem to find it.
 

xanderx007

macrumors 6502
Nov 7, 2017
262
140
For the time being both graphics cards appear to work ok on my 2011 15" mbp running Sierra 16G1036. The only issue it has is that occasionally it won't wake from sleep, irrespective of power source.

That seems to be one of the symptoms of the failing dGPU, at least in my case. The longer it was that I wasn't implementing any of the fixes, the worse it became.

Prepared a bootable usb with arch and rufus and managed to delete the gpu-power* file as per the initial instructions. After rebooting, the file reappears and I can again switch gpus with gfxcardstatus2.3 Is this normal?

So as long as the dGPU is working the slightest, the switching capability will still be there. It fails to wake up from sleep because the dGPU fails to wake up.

How can I tell the 6750m has been deactivated or not?

The fix does not deactivate the dGPU, rather it just forces the MBP to use the iGPU.


Is it possible to copy the gpu-power* file from within the arch root prompt to some other location in order to later examine its contents? Is the /sys/firmware/efi/efivars/ directory accessible from Sierra, can't seem to find it.

Based on my experience (and limited understanding), the file is a variable that appears and rewrites during startup as it calls the active GPUs, so, copying it from another system won't really do anything.

Try the Grub solution. It's more stable. I was a little bit intimidated and confused with it before, but after some additional research and tinkering, I was able to make it work in the simplest possible way. @brainshutdown has updated the instructions to its simplest form, based on the feedback we've given so far..
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.