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
well, tried to reinsall an older version using shift+opt+cmd+R , didn't work (newer version is present ..) but ran diskutility check, then tried again safe boot and .. it worked ... but graphics are very slow. I moved out AMDRadeonX3000.kext, and add the script to load it after booting (
)
now will make a time backup of my disk while I have a working desktop
and try rebooting afterwards

You have an I/O Error. Two alternatives:

1 - Problem with the SATA cable that connects the Hard Disk to the logic board. There are several cases where the problem was solved by replacing a new SATA cable.

2 - Hard disk problem. I lost a HDD due to several force shutdown. I had to replace it with an SSD (no mechanical parts).

You may have a problem with the HDD called "bad block". This can be solved by formatting the HDD "zeroing out".

I/O error may be that there is information (data) that the system is trying to read but as this part is corrupted, then Mac OS can not read this information.

I confirmed this information from Apple. SSDs can not be "zeroing out" by the Disk Utility of the Mac OS installer.

"Note: With a solid-state drive (SSD), secure erase options are not available in Disk Utility. For more security, consider turning on FileVault encryption when you start using your SSD drive.".

http://hivelogic.com/articles/how-to-securely-erase-storage-media-in-mac-os-x/


You only need to select after Fastest.

Boot Mac OS Installer (gpu-power-prefs = Intel) -> Disk Utility -> select View -> Show All Devices -> Select All HDD (not partition) -> Erase -> Security Options -> Move to the next "mark" after Fastest.

It will take 1 hour or more to complete the entire process. The higher the HDD size, the longer it takes to finish.

In the photo is an example with a USB stick / Pendrive. I do not have an HDD installed.

The normal "Fastest" formatting only deletes the table with the names of the files, etc. That's why a bad block remains. That is a possibility. There are bad blocks that remain and only switching to a new HDD / SSD.

- - - - - - - -

Miniguide to fixing Volume-Filesystem errors
Authored by: Doc-Izzy on Apr 29, '11 10:43:33AM
Very good post. I have two tips to add. Here's the first:

Often, data access slowdowns & I/O errors are caused by bad blocks on the disk. Once you've secured a good back-up, "zeroing-out" the drive can fix this issue by re-writing the bad block map. This map prevents any attempts to write to or read from a bad block, thus preventing slow downs & freezing that doing so would result in.

Zeroing out is also a tool for exposing drive failure. The process should fail or generate errors if the drive is failing. Note that Zeroing all data takes a long time. The larger the drive, the longer it takes.

http://hints.macworld.com/article.php?story=20110216112523818



HOW TO SECURELY ERASE STORAGE MEDIA IN MAC OS X
http://hivelogic.com/articles/how-to-securely-erase-storage-media-in-mac-os-x/


Disk Utility for macOS Sierra: Erase a volume using Disk Utility
https://support.apple.com/kb/PH22241?locale=en_US
 

Attachments

  • Zeroing-out-drive-Mac-OS-High-Sierra.png
    Zeroing-out-drive-Mac-OS-High-Sierra.png
    122 KB · Views: 305
Last edited:
  • Like
Reactions: AppleMacFinder

erican

macrumors newbie
May 4, 2018
3
3
You have an I/O Error. Two alternatives:

1 - Problem with the SATA cable that connects the Hard Disk to the logic board. There are several cases where the problem was solved by replacing a new SATA cable.

2 - Hard disk problem. I lost a HDD due to several force shutdown. I had to replace it with an SSD (no mechanical parts).

You may have a problem with the HDD called "bad block". This can be solved by formatting the HDD "zeroing out".

I/O error may be that there is information (data) that the system is trying to read but as this part is corrupted, then Mac OS can not read this information.

I confirmed this information from Apple. SSDs can not be "zeroing out" by the Disk Utility of the Mac OS installer.

"Note: With a solid-state drive (SSD), secure erase options are not available in Disk Utility. For more security, consider turning on FileVault encryption when you start using your SSD drive.".

http://hivelogic.com/articles/how-to-securely-erase-storage-media-in-mac-os-x/


You only need to select after Fastest.

Boot Mac OS Installer (gpu-power-prefs = Intel) -> Disk Utility -> select View -> Show All Devices -> Select All HDD (not partition) -> Erase -> Security Options -> Move to the next "mark" after Fastest.

It will take 1 hour or more to complete the entire process. The higher the HDD size, the longer it takes to finish.

In the photo is an example with a USB stick / Pendrive. I do not have an HDD installed.

The normal "Fastest" formatting only deletes the table with the names of the files, etc. That's why a bad block remains. That is a possibility. There are bad blocks that remain and only switching to a new HDD / SSD.

- - - - - - - -

Miniguide to fixing Volume-Filesystem errors
Authored by: Doc-Izzy on Apr 29, '11 10:43:33AM
Very good post. I have two tips to add. Here's the first:

Often, data access slowdowns & I/O errors are caused by bad blocks on the disk. Once you've secured a good back-up, "zeroing-out" the drive can fix this issue by re-writing the bad block map. This map prevents any attempts to write to or read from a bad block, thus preventing slow downs & freezing that doing so would result in.

Zeroing out is also a tool for exposing drive failure. The process should fail or generate errors if the drive is failing. Note that Zeroing all data takes a long time. The larger the drive, the longer it takes.

http://hints.macworld.com/article.php?story=20110216112523818



HOW TO SECURELY ERASE STORAGE MEDIA IN MAC OS X
http://hivelogic.com/articles/how-to-securely-erase-storage-media-in-mac-os-x/


Disk Utility for macOS Sierra: Erase a volume using Disk Utility
https://support.apple.com/kb/PH22241?locale=en_US

Thanks for your help
If i replace my HDd by a ssd
Given possible bad block issue and GPU issue would you recommend to copy carbon the old disk or do a fresh install (possibly of an older version of the Os - my Mbp was using lion at the beginning- since I ve seen some post arguing that older Os seemed to cope better with that GPU ISSUE )
If I just put in a new ssd would the shift-opt-Cmd-r trick still work to reinstall the os ?

Again thanks a lot !
 
  • Like
Reactions: AppleMacFinder

nsgr

macrumors 6502
May 22, 2017
317
117
Thanks for your help
If i replace my HDd by a ssd
Given possible bad block issue and GPU issue would you recommend to copy carbon the old disk or do a fresh install (possibly of an older version of the Os - my Mbp was using lion at the beginning- since I ve seen some post arguing that older Os seemed to cope better with that GPU ISSUE )
If I just put in a new ssd would the shift-opt-Cmd-r trick still work to reinstall the os ?

Again thanks a lot !

I prefer to do a fresh/clean installation.

In my tests it did not work to load the Lion installer over the Internet with the gpu-power-prefs with Intel GPU. It resulted in the famous gray screen and overheating -> from boot with shift-opt-Cmd-r

Try Option-Command-R or a USB Stick / Pendrive with Mac OS Installer El Capitan, Sierra or HighSierra.

HighSierra with Macbook Pro 2011 do not work 100% without AMD6000Controller.kext, AMDFramebuffer.kext, AMDSupport.kext, AMDLegacyFramebuffer.kext, AMDLegacySupport.kext (brightness adjust).
Power off AMD GPU -> AMDRadeonX3000.kext (MikeyN Guide - #875).

If remove all AMD kexts (AppleMacFinder method) -> use El Capitan or Sierra.

If use GRUB solution (brainshutdown method) -> use El Capitan or Sierra.

I used Mavericks a bit but I did not use a very old operating system due to security issues.


Command (⌘)-R - Install the latest macOS that was installed on your Mac, without upgrading to a later version.*

Option-Command-R - Upgrade to the latest macOS that is compatible with your Mac.**

Shift-Option-Command-R - Requires macOS Sierra 10.12.4 or later Install the macOS that came with your Mac, or the version closest to it that is still available.

* If you're selling or giving away a Mac that is using OS X El Capitan or earlier, use Command-R to make sure that the installation isn't associated with your Apple ID.

** If you haven't already updated to macOS Sierra 10.12.4 or later, Option-Command-R installs the macOS that came with your Mac, or the version closest to it that is still available.

https://support.apple.com/en-us/HT204904

 
Last edited:
  • Like
Reactions: AppleMacFinder

VinceLx

macrumors newbie
May 8, 2018
6
1
Hello,
Thanks for this post.
I am absolutely not familiar with Linux but I will try all the steps in page 1 to try to rescue a macbook 8.2 with this issue.
As I cannot boot properly on the Arch Linux USB (the macbook keeps rebooting) I was wondering if it would be possible to do all these steps on a properly functioning macbook 8.2 (I have a second one working), then move its HDD with the modifed configuration to the macbook with the issue?

Edit:
I finally managed to boot to the Arch Linux USB.
I am at step 3 of the procedure. When using the chattr, it says: chattr: not found
What did I miss? I googled and they say we can use chflags. but not found either
Any idea?

Edit 2:
I decided to try with another linux: linux mint 18.3. I booted normally in the console, without using nomodeset (seems unknow in mint). I could use chattr with sudo, reboot and... it worked!

I am impressed how everything works fine now! Youtube videos run flawlessly, crazy... it was just a dead Mac!

I have more questions though. Once we are in OS X, is there any way to configure which GPU to use? So updates will not reset everything?
I see for example in Hardware > video cards. When I select AMD video card, there is an item called: Automatic graphic switching. It says Managed, even if I deactivate it in menu Energy saver.
Also, the option GPUswitch remains at 2 in Power menu. No way to set that to always use Intel GPU?

Edit 3:
The magic did not resist a reboot :D
And I don't manage to boot again in mint console... so stuck again!

Edit 4:
My Arch Linux USB was not created with dd... so no root access, now I see root in the console.
So all done again, Mac is working again... but after reboot I see again the white page. How can this be permanently fixed? What did I do wrong this time?

Edit 5:
After more trying and more searching, I finally got something working even after a reboot here:
https://apple.stackexchange.com/questions/267581/gpu-problem-boot-hangs-on-grey-screen

And they raise and solve an interesting point about power management, as it seems that even disabled, the dGPU is still pumping its amount of juice.

I am also very curious about this hardware fix:
https://realmacmods.com/macbook-2011-radeon-gpu-disable/

Has anybody ever tested that?
 
Last edited:
  • Like
Reactions: AppleMacFinder

Nightwing32

macrumors member
May 5, 2018
36
4
Okay, I was able to get my computer booted using the EFI variable method.

I am able to get into safe mode, after I boot into safe mode, then it will boot normally when I restart.

However, in my normal OSX, its very laggy and often freezes. Is there a way to fix this?

When it freezes, and I use the power button to shutdown, then it will not load again and the loading bar freezes halfway when I reboot.

I then need to boot back into safe mode, shutdown, and then it will boot without freezing into the normal osx.

Does anyone have any tips on how to fix these issues?
 
Last edited:
  • Like
Reactions: AppleMacFinder

horatiocox

macrumors newbie
Apr 16, 2018
3
3
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

Firstly Many thanks, this is brilliant!
Do you mind clarifying the bit above when you say "mounting your boot volume". What do we type into the command prompt to get it to do this?

Also wonder if anyone else has extremely trebley speakers after doing this? Small price to pay nevertheless.
 
  • Like
Reactions: AppleMacFinder

ace3

macrumors newbie
May 11, 2018
1
1
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...

===

Thanks for a detailed solution, however it is not working on my late 2011 15" mac.
my mac book pro late 2011 15" keeps rebooting in a loop while loading. it would not reach the disk utility stage. Apple diagnosed that the GPU is not working however there was no image distortion before it crashed so I have doubts it that is the issue. I have changed the Hard disk to a new disk however still while loading the copy from internet it will go to blue screen after some time. while doing a back up from external hard drive it will start loading and then turn to grey screen and then nothing (no shutdown or anything else). I am very confused whether it is the graphic card or something else is creating this issue. I followed full above guide however still absolutely the same issue continued. Any suggestions Please ?



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!
[doublepost=1526040505][/doublepost]Sorry posted in the middle of the original post.

Thanks for a detailed solution, however it is not working on my late 2011 15" mac.
my mac book pro late 2011 15" keeps rebooting in a loop while loading. it would not reach the disk utility stage. Apple diagnosed that the GPU is not working however there was no image distortion before it crashed so I have doubts it that is the issue. I have changed the Hard disk to a new disk however still while loading the copy from internet it will go to blue screen after some time. while doing a back up from external hard drive it will start loading and then turn to grey screen and then nothing (no shutdown or anything else). I am very confused whether it is the graphic card or something else is creating this issue. I followed full above guide however still absolutely the same issue continued. Any suggestions Please ?
 
  • Like
Reactions: AppleMacFinder

HarryPot

macrumors 65816
Sep 5, 2009
1,082
541
I'm currently starting to see issues with my MBP 2011, like past times when the GPU started failing.

Would you guys advise doing this fix before the GPU fails?
It sounds perfectly OK to me, I just don't want to make anything wrong.
 
  • Like
Reactions: AppleMacFinder

Nightwing32

macrumors member
May 5, 2018
36
4
Thanks so much for the fix. I applied it and its still working. The only issue is it freezes randomly and even when I open webpages like this https://www.aliexpress.com/item/DC-...0028-216-0810028-BGA-Chipset/32764872143.html

Any tips how to fix this?
[doublepost=1526133880][/doublepost]
Big thanks to the wonderful human beings in this forum, my mac died 2 years ago and is now alive again thanks to you!

I have used the fix in @MikyeN s post Force 2011 MacBook Pro 8,2 with failed AMD GPU to ALWAYS use Intel integrated GPU (EFI variable fix)

I am now able to boot into my clean install of Sierra. Everything is just perfect for some minutes, but after a while kernel_task takes up a 100-something% of cpu and everything becomes sluggish. I have tried clean install a couple of times and reapplied the fix, no luck! Always the same, it boots, works fine, but slowly the system uses about 95% of cpu.

I am fairly certain I have done the fix correctly as I now have probably executed it about 10 times.

Anyone else experience similar things?

I am now considering trying the GRUB fix instead to see if this will help.
Mine is also very slow and sluggish. Did you ever find a solution?
 
  • Like
Reactions: AppleMacFinder

koxa

macrumors newbie
May 12, 2018
1
1
Hi everybody,

Ok, so i created this account only for this issue, and this is the first Mac product I've owned (also only for 1½ year, the previous owner probably didn't use any graphic heavy applications).

I've tried fast-reading some parts here and there in this thread, but couldn't really find any place to start a solution for me. My computer starts with a white-grayish screen after disk-start and the chime. If I do this a couple of times in a row, it only goes black and I have to wait a longer while before it starts with the lighter whiteish screen again.

I tried doing the cmd+s+r after chime thingy but nothing appears/happens. What should/can I do?

Thanks in advance.
 
  • Like
Reactions: AppleMacFinder

Macbookprodude

Suspended
Jan 1, 2018
3,306
898
I maybe a little late to this discussion, but do ALL 2011 17 and 15 inch have this issue ? i have a 2011 Macbook Pro and never had graphics issues. I just ran a very intense video test and it didn't do anything bad at all.
 
  • Like
Reactions: AppleMacFinder

Mongoose49

macrumors newbie
May 14, 2018
1
1
Ok, i have a cundundrum, this is really weird, i was making an osx boot disc to do the fix on page 68, and in making it, os x install hung midway through. When i restarted my computer the computer was was perfect again, with the AMD graphics card disabled, still all the AMD Kexts are gone from the extensions folder, nothing in the extensions-off folder, cause i think i deleted them all in one of my commands, but somehow it's now functioning properly, brightness controls working, as far as i can tell just about everything working, its so weird...anyone any idea what could have happened?
 
  • Like
Reactions: AppleMacFinder

josemgmalaga

macrumors newbie
May 14, 2018
1
1
Hi, I did all the options (Applemacfinder's, Grub's...) and I could only make it boot in safe mode, not in normal mode? any suggestions? I have a macbook pro 15" early 2011 and MacOS High Sierra. Thanks!!!
 
  • Like
Reactions: AppleMacFinder

informaticanapoli

macrumors newbie
May 15, 2018
2
2
Hi,

Some very little introduction...
1) I'm Apple repair and to solve GPU problems on Mac/iMac usually I propose professional GPU reballing/substition (with new BGA chip) or NVRAM reballing/substitution, the only definitive/final solution to GPU problems on MacBook.
2) I'm very terrible with my english..and I'll not use google translate. Sorry.
Ok, little introduction is end.

I tried some full discrete hardware GPU deactivation with hardware/software (HW/SW) mixed approach as 'last choice' on very damaged MacBook logic boards, when normal GPU repair or chip change is not useful.

This is a very interesting way to disable a discrete GPU: my approach starts from realmacmods idea, described here:

https://realmacmods.com/macbook-2011-radeon-gpu-disable/

On my website there is some report (only in italian, sorry) here:

https://www.informaticanapoli.it/come-disattivare-gpu-discreta-amd-macbook-pro/

I tried HW/SW approach with success on:
- MacBook pro 15 2011 with AMD GPU;
- MacBook pro 17 2011 with AMD GPU;
- MacBook pro retina 15 mid 2012 with nVidia GPU (soon reported on my website);

I didn't try this fix on MacBook pro 15 mid 2010 with nVidia GPU.

In order to avoid everytime manual EFI mods (sometime this operation is not possible on damaged boards), I wrote directly modded EFI bin (with EFI variables already altered) in EEPROM chip, with SPI programmer.

Modded EFI Bin file was readed from EEPROM of each MacBook model after a first EFI vars modify (arch linux); before EFI programming in destination Mac I need to update serial number with original mac serial.

The direct EFI programming is an extreme way.. but I think this is the only way to perform some mod to EFI vars when Your Mac show big lines | stripes | black screen | white screen (video issues) and You cannot boot Linux or Single User Mode.

I created some Arch Linux disk (with Archiso util) to run shell script at startup, with all EFI mods (like RealMacMods .iso image available on their site); but Unfortunately I cannot boot any linux USB/CD if my macs are near to Knock Out... So automatic linux USB/CD is not useful here. The manual way to change EFI vars works only on Macs that give You minimal interaction.

Here are some personal feedback after some HW/SW fix.

Advantages:
- Full discrete GPU power off: with both hardware/software fix You can disable discrete GPU with main power disconnection. No ATI GPU will appears in your hardware list!
- GPU and NVRAM are dead components: during some my work I need to remove shorted GPU and NVRAM chips from board.... and Mac works fine with integrated GPU.
- No mods needed with .kext files; no mods in macOS system;
- No problems with macOS updates or changes;
- Fix works fine with Windows boot camp;
- Mac never will try to switch to discrete... because there is no discrete chip to switch...
- Temperature are always LOW;
- Battery duration increased;
- MAIN ADVANTAGE for me: sometimes HW/SW mod is the only way to recover a deep dead MacBook !
- A new MacBook pro 15 is very expensive...

Disadvantages:
- Hardware repair skill and some lab instrument needed;
- If Mac display is not useful (black/white screen or lines/distorted images) and if dGPU or NVRAM are very damaged You cannot change EFI vars manually (EFI eeprom programming is a solution);
- If You cannot boot linux distribution (e.g. Arch linux) or Single User Mode, simple You cannot change EFI vars manually and EFI eeprom programming is a solution;
- With HW/SW solution, external display output doesn't work!
- NVRAM reset (cmd+alt+P+R) at boot can reset your EFI fix! As workaround, You can set some password protect in your EFI boot to avoid any EFI reset/mod;
- With HighSierra You need extra hardware Fix to avoid black screen during sleep or display lid closed;
- With HighSierra and extra hardware fix You cannot change display luminosity (but You can use some trick as workaround).

Open points:
- I want to modify EFI bin file directly without first change of EFI variables via Linux; I tried to edit binary file without success (but I'm studying its...);

Final conclusions:
All these fix are only workarounds and not a definitive solutions; but sometimes are the only way to restore some dead mac.
There are too many disadvantages.... but If You are putting your MacBook in the trash... this a good solution.

Ciao,
Carlo
 
  • Like
Reactions: AppleMacFinder

Macbookprodude

Suspended
Jan 1, 2018
3,306
898
Are there any 2011 Macbook Pro models that don't have any problems with the AMD chip ? I have one and I have not experienced any, even with heavy gaming and video editing.. my AMD graphics chip is working nicely. I even increased the 3000's memory to 1.5MB video.
 
  • Like
Reactions: AppleMacFinder

informaticanapoli

macrumors newbie
May 15, 2018
2
2
Are there any 2011 Macbook Pro models that don't have any problems with the AMD chip ? I have one and I have not experienced any, even with heavy gaming and video editing.. my AMD graphics chip is working nicely. I even increased the 3000's memory to 1.5MB video.

NO. All 15" and 17" 2010/2011 models have this problem. But issue is not only GPU related (Amd and nVidia). NVRAM chips are second cause for this issue (chips are soldered in opposite side from GPU). Same problem occurs on 'new' logic boards changed by Apple during return campain ended in 2016 (for 2011 models).... in some cases GPU/NVRAM break after some month on new MB!
 
  • Like
Reactions: AppleMacFinder

pkkrusty

macrumors member
Dec 8, 2002
40
1
France
Just wanted to throw in a little more info for those of use chugging along on 10.6.8 Snow Leopard. It would seem that just changing the EFI variable is not sufficient, as I still crashed on every startup. However, when I followed the instructions on https://apple.stackexchange.com/questions/267581/gpu-problem-boot-hangs-on-grey-screen and remove the ATIRadeonX3000.kext (note that this kext is named differently in future OSs, it's called AMDRadeonX3000.kext) file from my Extension folder, the computer starts normally. It would seem that it's not even necessary to do a post-startup load of the kext for thermal management. I tried that and it made no difference on my core temps.

The test of trying to switch graphics cards on gfxCardStatus passes. Choosing Dedicated does nothing.
[doublepost=1526473546][/doublepost]
Hi everybody,

Ok, so i created this account only for this issue, and this is the first Mac product I've owned (also only for 1½ year, the previous owner probably didn't use any graphic heavy applications).

I've tried fast-reading some parts here and there in this thread, but couldn't really find any place to start a solution for me. My computer starts with a white-grayish screen after disk-start and the chime. If I do this a couple of times in a row, it only goes black and I have to wait a longer while before it starts with the lighter whiteish screen again.

I tried doing the cmd+s+r after chime thingy but nothing appears/happens. What should/can I do?

Thanks in advance.

Hi Koxa, I just successfully fixed the issue on mine (early 2011 15"). Can you boot into safe mode (holding down the shift key during startup)? If you boot in verbose mode (holding down Command-V during startup), what happens?
 
  • Like
Reactions: AppleMacFinder

dlittledlite

macrumors newbie
May 16, 2018
1
1
Long time reader first time poster.

First of all, many thanks to all those who have contributed so much to this thread. Because of you're work I have been able to keep my computer in working order. Huge Thanks you!

I've never had to post for anything because this forum has been so helpful.

Alas, I have a pseudo problem, or rather a confusing situation.

I updated the OS today and was expecting to have to redo all the kext stuff... But, to my surprise, the computer boots with no problems. There is an AMDRadeonX3000.kext file sitting in the /System/Library/Extensions folder.

Should I continue using the computer as normal?
Should I move that file anyways?
Should I try re enabling the discrete GPU and test the functions of that GPU?
Has anyone else had this happen?
 
  • Like
Reactions: AppleMacFinder

nsgr

macrumors 6502
May 22, 2017
317
117
Long time reader first time poster.

First of all, many thanks to all those who have contributed so much to this thread. Because of you're work I have been able to keep my computer in working order. Huge Thanks you!

I've never had to post for anything because this forum has been so helpful.

Alas, I have a pseudo problem, or rather a confusing situation.

I updated the OS today and was expecting to have to redo all the kext stuff... But, to my surprise, the computer boots with no problems. There is an AMDRadeonX3000.kext file sitting in the /System/Library/Extensions folder.

Should I continue using the computer as normal?
Should I move that file anyways?
Should I try re enabling the discrete GPU and test the functions of that GPU?
Has anyone else had this happen?

gpu-power-prefs -> Intel GPU

HighSierra 10.13.3 -> update to 10.13.4 -> new AMDRadeonX3000.kext -> no Info.plist.

There is no Info.plist file inside AMDRadeonX3000.kext. So this kext is not loaded during boot -> does not freeze Macbook Pro.

Info.plist has the name of the AMDRadeonX3000 executable file.


AMDRadeonX3000.kext/Contents/Info.plist

<key>CFBundleExecutable</key>
<string>AMDRadeonX3000</string>


AMDRadeonX3000.kext/Contents/MacOS/AMDRadeonX3000 (executable file)


Your AMD GPU continues at full power, consuming battery and increasing system temperature.

So it's always nice to have the last complete AMDRadeonX3000.kext (all files within kext) for plan B.

If you did an update of the Mac OS and there was no freeze after the reboot, then after logging in, you should check if the Info.plist is inside the AMDRadeonX3000.kext of the new kext.

/System/Library/Extensions/AMDRadeonX3000.kext/Contents/


In my case, the last AMDRadeonX3000.kext (update HighSierra 10.13.4) remains inside /System/Library/Extensions. This kext is not loaded because it does not have Info.plist.

I manually load the kext (HighSierra 10.3.3) /System/Library/Extensions-off/AMDRadeonX3000.kext to Power Off AMD GPU.

This is not the first time that the Apple developer forgets to put Info.plist into AMDRadeonX3000.kext. Sometimes I think it's on purpose.
It would be a lot of lack of attention to forget more than once to put a important file for loading a kext GPU.
 
Last edited:

Macbookprodude

Suspended
Jan 1, 2018
3,306
898
NO. All 15" and 17" 2010/2011 models have this problem. But issue is not only GPU related (Amd and nVidia). NVRAM chips are second cause for this issue (chips are soldered in opposite side from GPU). Same problem occurs on 'new' logic boards changed by Apple during return campain ended in 2016 (for 2011 models).... in some cases GPU/NVRAM break after some month on new MB!

So, far I haven't seen any issues with my 2011.. though I really want the 2012 because i hear its better GPU wise.
 
  • Like
Reactions: AppleMacFinder

Georges V

macrumors newbie
May 17, 2018
1
1
Hey all,

I Managed to do the EFI variable way and I managed to boot without any problem.
Nevertheless, when I tried to launch any programme with heavy GPU usage (Music Production apps) it crashed.

Then I removed the kexts manually from Finder and after a reboot, all I got was Yosemite using AMD without its kext that I deleted from Finder - Yosmite stuck in dGPU saying that there is an external monitor and cannot switch to iGPU.

What do you suggest in order for things to get back to normal?

I did not manage to mount my disk in read & write in single-user mode, even after repairing the permissions in Disk Utility... So I did not manage to remove the AMD kexts from single-user mode.

Thanks in advance!
 
  • Like
Reactions: AppleMacFinder

AppleMacFinder

macrumors 6502a
Original poster
Dec 7, 2009
796
152
after I do the cd /sys/efi... and do ls there are no files at all beggining with g. A lot of people seem to have a gpu-active file but I have none.
Trying to fix my MacBook Pro 2011, and did the arch Linux usb thing and entered the console. I’m not seeing any AMD or GPU files.. what now?
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
Probably worth noting that after it says "operation not permitted" if i do the ls command I can actually see a file of the name we input with the printf. However on reboot I get the same problem as always.
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
Any Ideas on this please?
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
stuck at printf "\x07\x00\x00\x00..... command. I am not sure how to use this as full command, I am confused about ">" character in the command, in do i have to combine ">" after printf with /Sys/firmware/...... (which is next line in your document).
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
my mac book pro late 2011 15" keeps rebooting in a loop while loading. it would not reach the disk utility stage. Apple diagnosed that the GPU is not working however there was no image distortion before it crashed so I have doubts it that is the issue. I have changed the Hard disk to a new disk however still while loading the copy from internet it will go to blue screen after some time. while doing a back up from external hard drive it will start loading and then turn to grey screen and then nothing (no shutdown or anything else). I am very confused whether it is the graphic card or something else is creating this issue
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
I've tried fast-reading some parts here and there in this thread, but couldn't really find any place to start a solution for me. My computer starts with a white-grayish screen after disk-start and the chime. If I do this a couple of times in a row, it only goes black and I have to wait a longer while before it starts with the lighter whiteish screen again. I tried doing the cmd+s+r after chime thingy but nothing appears/happens. What should/can I do?
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
could only make it boot in safe mode, not in normal mode? any suggestions?
Check your filesystem with fsck to make sure everything is OK there, please let me know if it doesn't help
...In order to avoid everytime manual EFI mods (sometime this operation is not possible on damaged boards), I wrote directly modded EFI bin (with EFI variables already altered) in EEPROM chip, with SPI programmer....
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)
Nevertheless, when I tried to launch any programme with heavy GPU usage (Music Production apps) it crashed.
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
Then I removed the kexts manually from Finder and after a reboot, all I got was Yosemite using AMD without its kext that I deleted from Finder - Yosmite stuck in dGPU saying that there is an external monitor and cannot switch to iGPU.
Are you sure that you've removed the AMD drivers? The description of their removal is available at my original instruction
did not manage to mount my disk in read & write in single-user mode, even after repairing the permissions in Disk Utility... So I did not manage to remove the AMD kexts from single-user mode.
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]
I sent a message to you (conversations) about repeated questions.

Subject: Information for the first page of this topic
https://forums.macrumors.com/conversations/

There are a lot of people who read the first page and then jump to the last page. And most of the answers are in the middle of this topic (between page 1 and page 69).

Download the same ArchLinux (archlinux-2017.03.01-dual.iso) and verify integrity - The Page 68 -
Many who download ArchLinux.iso "or do not know or forget" to check the integrity of the downloaded file. Then they ask about I/O error, printf: not found, chattr: not found, etc.

The Page 68 - #1697 - with "3 - Follow this Guides - #1697" would avoid many repeated questions on this topic about NVRAM method.

The two alternatives ArchLinux and NVRAM method if they were on the first page would avoid further questions.


The Page 68 - #1697 - Or try the simplest way - No needed ArchLinux - Only MacOS:
Boot in Single User Mode (Command + S at boot) - Do not forget to move AMDRadeonX3000.kext - MikeyN Guide #875:

Code:
nvram fa4ce28d-b62f-4c99-9cc3-6815686e30f9:gpu-power-prefs=%01%00%00%00
nvram boot-args="-v"
reboot

[doublepost=1524952830][/doublepost]

Only isolate the AMDRadeonX3000.kext.

Remember that for everything to work you have to have the gpu-power-prefs for the Intel GPU.
Boot in Single User Mode (Command + S at boot):
Code:
nvram fa4ce28d-b62f-4c99-9cc3-6815686e30f9:gpu-power-prefs=%01%00%00%00

nvram boot-args="-v"


/System/Library/Extensions-off
AMDRadeonX3000.kext

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


After login -> sudo kextload /System/Library/Extensions-off/AMDRadeonX3000.kext ->

verify Power Off AMD GPU with executable file AGDCDiagnose (HighSierra) -> IG=Intel GPU and EG=AMD GPU ->

Finder -> Applications -> Utilities -> Terminal:

Code:
/System/Library/Extensions/AppleGraphicsControl.kext/Contents/MacOS/AGDCDiagnose -a | grep -i Power

  IG: FB0:on  FB1:N/A FB2:N/A 3D:idle HDA:N/A  Power:on

  EG: FB0:off FB1:off FB2:off 3D:idle HDA:idle Power:off

Policy:off GPUPowerDown:on Backlight Control:on Recovery:on

Power State Machine IG: 0 EG: 6

EG: FB0 : off FB1 : off FB2 : off 3D:idle HDA:idle Power : off
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]
I sent a message to you (conversations) about repeated questions.

Subject: Information for the first page of this topic
https://forums.macrumors.com/conversations/

There are a lot of people who read the first page and then jump to the last page. And most of the answers are in the middle of this topic (between page 1 and page 69).
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
 
Last edited:

russ472

macrumors member
Jan 1, 2014
34
1
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.
 
  • Like
Reactions: AppleMacFinder
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.