fsck -fy

mount -uw /

sudo mkdir /AMD_Kexts/

sudo mv /System/Library/Extensions/AMD*.* /AMD_Kexts/

sudo rm -rf /System/Library/Caches/com.apple.kext.caches/

sudo mkdir /System/Library/Caches/com.apple.kext.caches/

sudo touch /System/Library/Extensions/

sudo umount /

sudo reboot

sudo mount -t hfsplus -o force,rw,sizelimit=YOURNUMBER /dev/sdb2 /mnt

sudo fsck.hfsplus -f /dev/sdb2

sudo umount /mnt

./gfxCardStatus/Classes/GSProcess.m

// 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]];

}

}

MacOSX10.11.sdk

/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk

./gfxCardStatus/Classes/GSGPU.m

Rootfool

nomodeset

quiet splash

i915.modeset=0 radeon.modeset=0

radeon.modeset=0 i915.modeset=1 i915.lvds_channel_mode=2

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 ​

archlinux-2017.03.01-dual.iso

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



Virtapi.org:



Belnet:

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



MD5

Code: cd Downloads/ md5 archlinux-2017.03.01-dual.iso MD5 (archlinux-2017.03.01-dual.iso) = 1d25235e7cebe45f93452fbc05a0fb66

Code: cd Downloads/ shasum archlinux-2017.03.01-dual.iso f426866ca632a35a3eeae8e4080cff25ec8da614 archlinux-2017.03.01-dual.iso

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

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

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

Arch Linux archiso x86_64 UEFI CD

nomodeset

cd /sys/firmware/efi/efivars

ls

rm

rm

efivarfs

cd /

umount /sys/firmware/efi/efivars/

mount -t efivarfs rw /sys/firmware/efi/efivars/

cd /sys/firmware/efi/efivars/

rm gpu-power-pre

gpu-switch

chattr -i "/sys/firmware/efi/efivars/" <----- skip this command

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

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

i

+i

+ : Adds the attribute to the existing attribute of the files. – : Removes the attribute to the existing attribute of the files. = : Keep the existing attributes that the files have.

cd /

umount /sys/firmware/efi/efivars/

reboot

Discrete AMD GPU of my 2011 MacBook Pro 8,2 has finally failed because of the reasons mentioned hereand there. 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 severalrepairs 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, 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 cheaperto 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 toMBP to use integrated graphics ALL THE TIME, even while booting ?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 () and entering these commands: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" partitionso I had to remove a hard drive from MacBook Pro andattached it to a computer with Linux, then followed these instructions:- carefully executed a number of commands, calculated a sizelimit for my parition layout, and finally ranto mount this HFS+ partition to /mnt directory in read-write mode. Then I performed thesesteps you see above, and also repaired a filesystem by runningbefore unmounting a partition withand putting a hard drive back to MBP...This gave me a MBP which could boot to OS X althoughusing a broken AMD GPU: so it screen's image is very distorted, Launchpad is super laggy, and you can't switch to Integrated GPU using gfxCardStatus because: without AMD driversMacbook 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 outin theto make it to ignore the external display:So I rebuilt a gfxCardStatus using the instructions from the last reply of this issue -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 editedfile to enable the mysterious "" 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" () to "automate the switching process for login/logout". Sadly it didn't work for me... However, there is a very interestingtext file right at the root of this repository, which describes the EFI variables!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 arEFInd is not installed, and to install it - must disable SIP protection. But I cannot boot to Recovery mode () or to OS X Installation DVD/USB (),, 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 usehack ( https://github.com/gdbinit/rootfool ) to disable SIP during runtime, because it works only at OS X version older than 10.11.4Tried overheating my Macbook Pro on purposeto 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:remove AMD kexts from Installation media, orto 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, orto 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...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 () to add/ remove/ 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 addor; and then pressedorto 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 stuckcharacter at the left upper corner) or failed at the very end of it -Then I remembered that there are not-mainstream Linux distributions for advanced users, which have a LiveCD: 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: https://www.archlinux.org/ ) and 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! So here is a...You need a working computer for that and a spare CD/DVD/USB drive. After downloading(see the links below) you have to check the integrity of the .ISO file to see if it is not corrupted (). After checking the integrity ofand everything is OK, then you can generate an ArchLinux boot disk.MD5:1d25235e7cebe45f93452fbc05a0fb66 archlinux-2017.03.01-dual.isoSHA1f426866ca632a35a3eeae8e4080cff25ec8da614 archlinux-2017.03.01-dual.isoThe MD5 and SHA1 of the official ArchLinux website are the same as the mirrors Virtapi.org and Belnet.be. Theon Virtapi.org and Belnet.be are legitimate.Boot in Safe Mode (press SHIFT key at boot) -> no freeze Mac OS -> El Capitan or Sierra.HighSierra maybe freeze at boot time (Safe Mode). There were changes in the HighSierra in relation to the AMD kexts loaded during the Safe Mode. More tests are needed.File downloaded -> /Users/Your_User/Downloads/archlinux-2017.03.01-dual.isoFinder -> Applications -> Utilities -> Terminal:SHA1:1 - Boot Single User (press) at boot (If you have MacOS installed on your hard drive).2 - If you have a blank HD, then use the USB stick/Pendrive with the MacOS installer (El Capitan, Sierra or HighSierra).2.1 - Press Option key at boot, Position the mouse on the MacOS installer icon.2.2 - Pressand keep holding these two keys.2.3 - Click the MacOS installer icon -> continue holding thekeys until you finish the MacOS installer Single User boot .Enter these commands (change gpu-power-prefs to Intel GPU and boot verbose):Then you could either simply burn this ISO to CD/DVDor create a bootable USB: use the great detailed instructions from this page, https://wiki.archlinux.org/index.php/USB_flash_installation_media insert this CD/DVD/USB to Macbook Pro, holdkey while booting, choose "EFI boot", press "" key to edit the GRUB options of themenu entry while it is selected at the main screen, addto the end of this line and press. If everything is done correctly, you will find yourself at the Linux console!looks likefilesystem is mounted by default! So you can alreadyandto explore this directory and see if there is avariable. If there is such a variable, its better to remove it with. In my case thehas been mounted by default with read/write permissions, but if you are getting themessage while attempting to, it means that in your casehas been mounted as read-only and you need to remount it with read-write permissions and try againIf your screen is so distorted that it is difficult to see the letters, just start typing theand then presskey for autocompletion. In my case there were not such a EFI variable, onlyand maybe somehow related. Then I looked again at thattext file (mentioned above, https://github.com/0xbb/gpu-switch/blob/master/gpu-switch ),and enteredActually 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 accidentallyDid 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 scriptis 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....chattr [operator] [flags] [filename]...A file is set with ‘‘ attribute---> cannot be modified (immutable). Means no renaming, no symbolic link creation, no execution, no writable, only superuser can unset the attribute....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 yourvariable under any circumstancesCould not unmount efivars if you are inside this directory, so change to the root directoryGuarantees that your EFI variables are flushed to efivarfs filesystem, please unmount it safely before rebooting)