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.

Ernestas

macrumors newbie
Jul 2, 2018
2
0
Hello. I'am heaving a problem to remove a gpu file.I am also getting a mistake-operation not premited..
I also tried to use command chattr -i /sys/firmware/efi/efivars/gpu-power-prefs-[press TAB to autocomplete]
But after that I don't knew that to do..I get message chattr[-pRVf][-taACdDeijPsStTu].and I can't do enything in this menu.
My operating system is EL Captain
 

Ernestas

macrumors newbie
Jul 2, 2018
2
0
How can I reverse this action?

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

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

nvram boot-args="-v"

reboot
I shoul do this in archlinux or in terminal?
[doublepost=1530991100][/doublepost]
How can I reverse this action?

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

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

nvram boot-args="-v"

reboot
error seting variable boot-args :(iokit/common)general error
 

zeromeg

macrumors newbie
Jul 7, 2018
2
0
I used the set of instructions you had provided and that seems to have resolved my issue where my machine requires reboot and has the vertical stripes and then a white screen but won't boot.

Only way I had gotten around what was happening was to let the battery drain and then to start back up.

After using your instructions, that isn't happening. However, I had one instance of the black screen that I couldn't resolve other than rebooting. That works but that black screen issue lifting lid and on battery had never happened before doing this.

Suggestions as to what I should do/try to get rid of that issue which you said you had but didn't return in your instance?

Problem for me is that I use this machine to go to clients for technical purposes. I can't afford to have to reboot or have the machine not working. I run Windows on my Mac in Parallels so I might just end up scrapping using a Mac but I hate to give up on this machine.

I would like to add that since removing all of the unnecessary AMD Kexts from /Extensions I have not had the black screen issue return.

The only Kexts I have in the /Extensions folder now are 10.12.6 v1.5.1 Support, LegacySupport, Framebuffer, LegacyFramebuffer and 6000Controller. I have not had any more black screens when opening the lid or restarting since removing all of the extra AMD Kexts which don't get loaded.
 

Sergio Alcala

macrumors newbie
Jul 7, 2018
3
0
How can I reverse this action?

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

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

nvram boot-args="-v"

reboot

I really need help, my laptop does not start after write these instructions, only gray screen, so I hope I can reverse them.

Apologize for my English, I live in Venezuela
 

tomoxy

macrumors newbie
Jul 8, 2018
2
1
Hi, firstly thanks for such a great fix. I followed the procedure and got this MacBook up and running again about three months ago now - success!

I have one minor gripe though - I used to have Windows 7 running on this machine aswell and have still been unsuccessful in getting it to recognise the internal graphics card other than in standard vga mode. So all I get is a very low resolution desktop which I cant do anything with.

My question is could anybody help me to get Windows displaying/working correctly, or even just explain why it isn't working to me.

I tried a few things but they didn't seem to work - ie. removing drivers for the AMD card. I read somewhere that it may be something to do with the way that Windows was installed and only a certain type of install could be recognised - but it started getting a bit to technical for me at this point and I have just left this operating system alone since that time.

I don't mind reinstalling it or updating it as long as I can somehow get it working :)

I hope someone out there can assist me with this matter!

Tom
 

damien_mattei

macrumors newbie
Jun 22, 2018
17
0
for windows i had the same problem, i had to reinstall it all:
boot Mac os X, use bootcamp to create a new driver usb key , it should not include the AMD driver has the GPU fails
reninstall windows
install bootcamp drivers from usb key
it's works fine ,even better graphically than mac os x
 

Popoto

macrumors newbie
Jul 10, 2018
1
0
Hello all, I've just followed this guide to revive back my 2011 15" mbp and after some effort, it is finally working once again! I can't thank you guys for this fix and I have a question to ask,

since all this fix is saved on the current HDD, and if I would like to upgrade my HDD to a SSD, does that mean that I do a clean install of High Sierra onto the SSD and then insert in the nvram lines and moving the AMD kext files as well?

Thank you!
 

damien_mattei

macrumors newbie
Jun 22, 2018
17
0
have the same problem, upgrade to a SSD
but you can NOT install high sierra on this mac because it will detect AMD GPU and will crash
what i have succeed is to install high sierra on a mac mini on an external drive (on a rack)
and later removed the AMD kext and connect it on an external usb port of the mac book pro and i succed in booting high sierra modified on the failed gpu mac book pro

so if you remove the disk from the external rack and put it in place of the internal disk of mac book pro i suppose it will work... but i did not test it already

other ideai is to use the mac book pro as a target disk system and use time machine from another mac...

Damien

Hello all, I've just followed this guide to revive back my 2011 15" mbp and after some effort, it is finally working once again! I can't thank you guys for this fix and I have a question to ask,

since all this fix is saved on the current HDD, and if I would like to upgrade my HDD to a SSD, does that mean that I do a clean install of High Sierra onto the SSD and then insert in the nvram lines and moving the AMD kext files as well?

Thank you!
 

Oleg-Sentia

macrumors newbie
Jun 9, 2018
12
2
Burgas, Bulgaria
since all this fix is saved on the current HDD, and if I would like to upgrade my HDD to a SSD, does that mean that I do a clean install of High Sierra onto the SSD and then insert in the nvram lines and moving the AMD kext files as well?
it seems to me U can upload your HDD to the another external HDD/SSD using Time machine.
Then, after replacing HDD to SSD, download it back.
Command-Option-R during power on will help U to do that.
Anyway U will have working HDD and Time machine copy :)
 

damien_mattei

macrumors newbie
Jun 22, 2018
17
0
yes assuming you already at High Sierra (i had problem with High and Firmware on the MBP,had to install on a Mac Mini first and put it after on the Mac Book Pro) Time Machine is the best if not the only solution.

Damien

it seems to me U can upload your HDD to the another external HDD/SSD using Time machine.
Then, after replacing HDD to SSD, download it back.
Command-Option-R during power on will help U to do that.
Anyway U will have working HDD and Time machine copy :)
 

wmcran

macrumors newbie
May 29, 2018
6
0
nvram boot-args="-v" -> show information about system on boot -> no Apple logo and progress bar.

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

or
Code:
nvram boot-args=""


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


Manually:

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

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


AMD/nVidia GPU (discrete gpu) - %00%00%00%00
Code:
nvram fa4ce28d-b62f-4c99-9cc3-6815686e30f9:gpu-power-prefs=%00%00%00%00
[doublepost=1527623953][/doublepost]

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


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

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

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

mv -v /Source_directory_Kext_with_Name_Kext /Destination_directory_Kext

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

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

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

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

/System/Library/Extensions-off

AMDRadeonX3000.kext

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

Follow this Guides:

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

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


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

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

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

Wanted to thank nsgr for your help. I followed your directions but for some reason it didn't work. At this time I decided to update my MacBook Pro to 10.13.5 by using target mode and my iMac. Did the update then followed the solution from the beginning. It worked great. Not only did I have my graphics back but brightness and sleep worked normal.
I'm using Macs Fan Control to keep the laptop cool.
Like to mention that anytime I turn the MacBook off, when rebooting I have to boot single user mode and apply the force-iGPU-boot. Since I usually never turn it off and I use sleep, It's no big deal.
Thanks for helping me.
 
Last edited:

mightymacman

macrumors member
Jul 26, 2017
39
11
San Luis Obispo, CA
[COLOR=#ff0000 said:
"funkwizard, post: 26220388, member: 1135364"]How to connect my MBP early 2011 built with complete black screen on turning on to a PC with Linux (Ubuntu) installed on it and remove the *kexts file.I think my amd GPU chip has failed completely. I have a mini display port to HDMI adapter and a HDMI cable.
And one more thing can I install Ubuntu Linux on a 2.5 " internal hard disk (spare one) and boot the Mac from the hard drive with Linux installed and remove the *kexts files.[/COLOR]

If it were me, I'd remove the bottom from the MBP. Remove the Hard Drive. Connect the Hard Drive to your Linux PC with a 2.5" SATA connector to USB. The drive will then mount on the Linux computer. From here you need additional advise as to where those kext's are located.
 

funkwizard

macrumors newbie
Jun 28, 2018
14
1
If it were me, I'd remove the bottom from the MBP. Remove the Hard Drive. Connect the Hard Drive to your Linux PC with a 2.5" SATA connector to USB. The drive will then mount on the Linux computer. From here you need additional advise as to where those kext's are located.
I tried but it's showing error- Error mounting path/Macintosh HD:wrong FS type,bad option,bad superblock:missing code page or helper program or other issue.
Any idea what this mean and can I connect the same hard drive to the Mac running on a virtual machine and erase the hard disk and make a fresh install of macos.
[doublepost=1531471559][/doublepost]
the difficulty will be that you have black screen, trying to boot from a linux debian 8.0 (does not use AMD) could be difficult because you cannot see what you type to select the drive.
Also booting in target disk mode https://support.apple.com/en-us/HT201462 is perheaps giving you access to your system disk...

the goal is to get access to the disk and remove the AMD*kext as described at the first page of this thread.

If nothing above works i would remove the hard drive , connect it to another Mac (or PC with Linux installed) and remove the AMD*kext files
,finally recconect it to the faulty AMD GPU logic board.
I'm almost sure this will works.
tried but it's showing error- Error mounting path/Macintosh HD:wrong FS type,bad option,bad superblock:missing code page or helper program or other issue.
Any idea what this mean and can I connect the same hard drive to the Mac through data datpter and erase the hard disk and make a fresh install of macos and then try to remove the AMD *kexts files
 
Last edited:

damien_mattei

macrumors newbie
Jun 22, 2018
17
0
I tried but it's showing error- Error mounting path/Macintosh HD:wrong FS type,bad option,bad superblock:missing code page or helper program or other issue.
Any idea what this mean and can I connect the same hard drive to the Mac running on a virtual machine and erase the hard disk and make a fresh install of macos.
[doublepost=1531471559][/doublepost]
tried but it's showing error- Error mounting path/Macintosh HD:wrong FS type,bad option,bad superblock:missing code page or helper program or other issue.
Any idea what this mean and can I connect the same hard drive to the Mac through data datpter and erase the hard disk and make a fresh install of macos and then try to remove the AMD *kexts files

what Linux version are you using?
it seems that on your linux system you have not installed the support for Mac os filesystem (HFS journaled)
also before mounting in RW mode you must before do a file check ( due to bad shutdown on the mac book pro)
see this:
https://askubuntu.com/questions/332...d-external-hdd-in-ubuntu-without-access-to-os
 

Erko

macrumors member
Aug 12, 2011
73
0
Estonia
Hi, have revived my brothers 2011 Macbook with this solution multiple times, great fix!
Is there a way to disallow programs in OS X to switch to the external GPU? For example he fired up Photoshop that defaulted to the eGPU a crashed everything?

Sorry if this has been covered in the thread previously, 75 pages is a lot to work through
 

funkwizard

macrumors newbie
Jun 28, 2018
14
1
what Linux version are you using?
it seems that on your linux system you have not installed the support for Mac os filesystem (HFS journaled)
also before mounting in RW mode you must before do a file check ( due to bad shutdown on the mac book pro)
see this:
https://askubuntu.com/questions/332...d-external-hdd-in-ubuntu-without-access-to-os
I am using Ubuntu 18.04 and and the Mac hard disk is successfully mounting but is saying you must have r/w access to the file system or be root? I will probably Google the error but can you tell me precisely what needs to be done like click->Macintosh hd->right click->open in terminal and execute the commands to remove the kexts(this is how I am proceeding to move and delete those *kexts files.Am I proceeding in the correct order or anything else need to be done any other way?
 

damien_mattei

macrumors newbie
Jun 22, 2018
17
0
I am using Ubuntu 18.04 and and the Mac hard disk is successfully mounting but is saying you must have r/w access to the file system or be root? I will probably Google the error but can you tell me precisely what needs to be done like click->Macintosh hd->right click->open in terminal and execute the commands to remove the kexts(this is how I am proceeding to move and delete those *kexts files.Am I proceeding in the correct order or anything else need to be done any other way?

ok we will proceed step by step:
the mac os disk mounted by ubuntu is not RW this the problem, if you can not graphically mount it RW or are not a privilegied user (root ,root or admin group member..)
first you need to get root with the command su (superuser)
type su
<password>
then you are root,if it does not works
use sudo command
to run a command with root privileges

when root type this command:
fdisk -l
this will list the partition on your hard disk you should get something like this:
root@macbookpro-3c075448dc3e-1:~# fdisk -l

Disk /dev/sda: 465.8 GiB, 500107862016 bytes, 976773168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x76606e68

Device Boot Start End Sectors Size Id Type
/dev/sda1 409640 566120447 565710808 269.8G af HFS / HFS+
/dev/sda2 566120448 567144447 1024000 500M 7 HPFS/NTFS/exFAT
/dev/sda3 * 567144448 710531071 143386624 68.4G 7 HPFS/NTFS/exFAT
/dev/sda4 710531072 976773119 266242048 127G 5 Extended
/dev/sda5 710533120 712630271 2097152 1G 83 Linux
/dev/sda6 712632320 817489919 104857600 50G 83 Linux
/dev/sda7 817491968 833746943 16254976 7.8G 82 Linux swap / Solaris
/dev/sda8 833748992 976773119 143024128 68.2G 83 Linux

and give me the output, so we can find where is your Mac OS X partition on your system,
for example on my system it is in first position:
/dev/sda1 is an HFS / HFS+ that is mac os x or mac os x journaled file system.

Next wi will work with this filesystem to mount it RW and remove the kext.....
[doublepost=1531663990][/doublepost]
ok we will proceed step by step:
the mac os disk mounted by ubuntu is not RW this the problem, if you can not graphically mount it RW or are not a privilegied user (root ,root or admin group member..)
first you need to get root with the command su (superuser)
type su
<password>
then you are root,if it does not works
use sudo command
to run a command with root privileges

when root type this command:
fdisk -l
this will list the partition on your hard disk you should get something like this:
root@macbookpro-3c075448dc3e-1:~# fdisk -l

Disk /dev/sda: 465.8 GiB, 500107862016 bytes, 976773168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x76606e68

Device Boot Start End Sectors Size Id Type
/dev/sda1 409640 566120447 565710808 269.8G af HFS / HFS+
/dev/sda2 566120448 567144447 1024000 500M 7 HPFS/NTFS/exFAT
/dev/sda3 * 567144448 710531071 143386624 68.4G 7 HPFS/NTFS/exFAT
/dev/sda4 710531072 976773119 266242048 127G 5 Extended
/dev/sda5 710533120 712630271 2097152 1G 83 Linux
/dev/sda6 712632320 817489919 104857600 50G 83 Linux
/dev/sda7 817491968 833746943 16254976 7.8G 82 Linux swap / Solaris
/dev/sda8 833748992 976773119 143024128 68.2G 83 Linux

and give me the output, so we can find where is your Mac OS X partition on your system,
for example on my system it is in first position:
/dev/sda1 is an HFS / HFS+ that is mac os x or mac os x journaled file system.

Next wi will work with this filesystem to mount it RW and remove the kext.....

alternatively if your disk is not using MBR schema
but GPT which should be the case on this model unless you change it like me, you can use the gdisk command:

root@mac-mini:~# gdisk -l /dev/sda
GPT fdisk (gdisk) version 1.0.1

Partition table scan:
MBR: protective
BSD: not present
APM: not present
GPT: present

Found valid GPT with protective MBR; using GPT.
Disk /dev/sda: 1953525168 sectors, 931.5 GiB
Logical sector size: 512 bytes
Disk identifier (GUID): 000071BD-41C1-0000-7A16-0000B12D0000
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 1953525134
Partitions will be aligned on 8-sector boundaries
Total free space is 1934 sectors (967.0 KiB)

Number Start (sector) End (sector) Size Code Name
1 40 409639 200.0 MiB EF00 EFI System Partition
2 409640 972550487 463.6 GiB AF05 Customer
3 972550488 973820023 619.9 MiB AB00
4 973821952 1422309375 213.9 GiB 8E00
5 1422309376 1953525134 253.3 GiB 0700 BOOTCAMP


but even on a GPT partition schema fdisk command run (but i m not sure if fdisk is installed on ubuntu)
and the output is more understandable
:

root@mac-mini:~# fdisk -l
Disk /dev/sda: 931.5 GiB, 1000204886016 bytes, 1953525168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: 000071BD-41C1-0000-7A16-0000B12D0000

Device Start End Sectors Size Type
/dev/sda1 40 409639 409600 200M EFI System
/dev/sda2 409640 972550487 972140848 463.6G Apple Core storage
/dev/sda3 972550488 973820023 1269536 619.9M Apple boot
/dev/sda4 973821952 1422309375 448487424 213.9G Linux LVM
/dev/sda5 1422309376 1953525134 531215759 253.3G Microsoft basic data


Disk /dev/mapper/mac--debian-racine: 213.9 GiB, 229608783872 bytes, 448454656 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/mapper/mac--debian-echange: 12 MiB, 12582912 bytes, 24576 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
 
Last edited:

funkwizard

macrumors newbie
Jun 28, 2018
14
1
ok we will proceed step by step:
the mac os disk mounted by ubuntu is not RW this the problem, if you can not graphically mount it RW or are not a privilegied user (root ,root or admin group member..)
first you need to get root with the command su (superuser)
type su
<password>
then you are root,if it does not works
use sudo command
to run a command with root privileges

when root type this command:
fdisk -l
this will list the partition on your hard disk you should get something like this:
root@macbookpro-3c075448dc3e-1:~# fdisk -l

Disk /dev/sda: 465.8 GiB, 500107862016 bytes, 976773168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x76606e68

Device Boot Start End Sectors Size Id Type
/dev/sda1 409640 566120447 565710808 269.8G af HFS / HFS+
/dev/sda2 566120448 567144447 1024000 500M 7 HPFS/NTFS/exFAT
/dev/sda3 * 567144448 710531071 143386624 68.4G 7 HPFS/NTFS/exFAT
/dev/sda4 710531072 976773119 266242048 127G 5 Extended
/dev/sda5 710533120 712630271 2097152 1G 83 Linux
/dev/sda6 712632320 817489919 104857600 50G 83 Linux
/dev/sda7 817491968 833746943 16254976 7.8G 82 Linux swap / Solaris
/dev/sda8 833748992 976773119 143024128 68.2G 83 Linux

and give me the output, so we can find where is your Mac OS X partition on your system,
for example on my system it is in first position:
/dev/sda1 is an HFS / HFS+ that is mac os x or mac os x journaled file system.

Next wi will work with this filesystem to mount it RW and remove the kext.....
[doublepost=1531663990][/doublepost]

alternatively if your disk is not using MBR schema
but GPT which should be the case on this model unless you change it like me, you can use the gdisk command:

root@mac-mini:~# gdisk -l /dev/sda
GPT fdisk (gdisk) version 1.0.1

Partition table scan:
MBR: protective
BSD: not present
APM: not present
GPT: present

Found valid GPT with protective MBR; using GPT.
Disk /dev/sda: 1953525168 sectors, 931.5 GiB
Logical sector size: 512 bytes
Disk identifier (GUID): 000071BD-41C1-0000-7A16-0000B12D0000
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 1953525134
Partitions will be aligned on 8-sector boundaries
Total free space is 1934 sectors (967.0 KiB)

Number Start (sector) End (sector) Size Code Name
1 40 409639 200.0 MiB EF00 EFI System Partition
2 409640 972550487 463.6 GiB AF05 Customer
3 972550488 973820023 619.9 MiB AB00
4 973821952 1422309375 213.9 GiB 8E00
5 1422309376 1953525134 253.3 GiB 0700 BOOTCAMP


but even on a GPT partition schema fdisk command run (but i m not sure if fdisk is installed on ubuntu)
and the output is more understandable
:

root@mac-mini:~# fdisk -l
Disk /dev/sda: 931.5 GiB, 1000204886016 bytes, 1953525168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: 000071BD-41C1-0000-7A16-0000B12D0000

Device Start End Sectors Size Type
/dev/sda1 40 409639 409600 200M EFI System
/dev/sda2 409640 972550487 972140848 463.6G Apple Core storage
/dev/sda3 972550488 973820023 1269536 619.9M Apple boot
/dev/sda4 973821952 1422309375 448487424 213.9G Linux LVM
/dev/sda5 1422309376 1953525134 531215759 253.3G Microsoft basic data


Disk /dev/mapper/mac--debian-racine: 213.9 GiB, 229608783872 bytes, 448454656 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/mapper/mac--debian-echange: 12 MiB, 12582912 bytes, 24576 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes

This is what i got with the sudo command
$ sudo -i

[sudo] password for swagatika:

root@swagatika-Inspiron-3521:~# fdisk -l

Disk /dev/loop0: 86.6 MiB, 90759168 bytes, 177264 sectors

Units: sectors of 1 * 512 = 512 bytes

Sector size (logical/physical): 512 bytes / 512 bytes

I/O size (minimum/optimal): 512 bytes / 512 bytes





Disk /dev/loop1: 1.6 MiB, 1691648 bytes, 3304 sectors

Units: sectors of 1 * 512 = 512 bytes

Sector size (logical/physical): 512 bytes / 512 bytes

I/O size (minimum/optimal): 512 bytes / 512 bytes





Disk /dev/loop2: 12.2 MiB, 12804096 bytes, 25008 sectors

Units: sectors of 1 * 512 = 512 bytes

Sector size (logical/physical): 512 bytes / 512 bytes

I/O size (minimum/optimal): 512 bytes / 512 bytes





Disk /dev/loop3: 3.3 MiB, 3411968 bytes, 6664 sectors

Units: sectors of 1 * 512 = 512 bytes

Sector size (logical/physical): 512 bytes / 512 bytes

I/O size (minimum/optimal): 512 bytes / 512 bytes





Disk /dev/loop4: 140 MiB, 146841600 bytes, 286800 sectors

Units: sectors of 1 * 512 = 512 bytes

Sector size (logical/physical): 512 bytes / 512 bytes

I/O size (minimum/optimal): 512 bytes / 512 bytes





Disk /dev/loop5: 21 MiB, 22003712 bytes, 42976 sectors

Units: sectors of 1 * 512 = 512 bytes

Sector size (logical/physical): 512 bytes / 512 bytes

I/O size (minimum/optimal): 512 bytes / 512 bytes





Disk /dev/sda: 465.8 GiB, 500107862016 bytes, 976773168 sectors

Units: sectors of 1 * 512 = 512 bytes

Sector size (logical/physical): 512 bytes / 4096 bytes

I/O size (minimum/optimal): 4096 bytes / 4096 bytes

Disklabel type: dos

Disk identifier: 0x61948d77



Device Boot Start End Sectors Size Id Type

/dev/sda1 * 2048 976771071 976769024 465.8G 83 Linux









GPT PMBR size mismatch (1953525167 != 1953525165) will be corrected by w(rite).

Disk /dev/sdb: 931.5 GiB, 1000204884992 bytes, 1953525166 sectors

Units: sectors of 1 * 512 = 512 bytes

Sector size (logical/physical): 512 bytes / 512 bytes

I/O size (minimum/optimal): 512 bytes / 512 bytes

Disklabel type: gpt

Disk identifier: C59FB961-880D-4A3A-91C0-D70D4865A4EC



Device Start End Sectors Size Type

/dev/sdb1 40 409639 409600 200M EFI System

/dev/sdb2 409640 1952255591 1951845952 930.7G Apple Core storage

/dev/sdb3 1952255592 1953525127 1269536 619.9M Apple boot
 

damien_mattei

macrumors newbie
Jun 22, 2018
17
0
This is what i got with the sudo command
$ sudo -i

[sudo] password for swagatika:

root@swagatika-Inspiron-3521:~# fdisk -l

Disk /dev/loop0: 86.6 MiB, 90759168 bytes, 177264 sectors

Units: sectors of 1 * 512 = 512 bytes

Sector size (logical/physical): 512 bytes / 512 bytes

I/O size (minimum/optimal): 512 bytes / 512 bytes





Disk /dev/loop1: 1.6 MiB, 1691648 bytes, 3304 sectors

Units: sectors of 1 * 512 = 512 bytes

Sector size (logical/physical): 512 bytes / 512 bytes

I/O size (minimum/optimal): 512 bytes / 512 bytes





Disk /dev/loop2: 12.2 MiB, 12804096 bytes, 25008 sectors

Units: sectors of 1 * 512 = 512 bytes

Sector size (logical/physical): 512 bytes / 512 bytes

I/O size (minimum/optimal): 512 bytes / 512 bytes





Disk /dev/loop3: 3.3 MiB, 3411968 bytes, 6664 sectors

Units: sectors of 1 * 512 = 512 bytes

Sector size (logical/physical): 512 bytes / 512 bytes

I/O size (minimum/optimal): 512 bytes / 512 bytes





Disk /dev/loop4: 140 MiB, 146841600 bytes, 286800 sectors

Units: sectors of 1 * 512 = 512 bytes

Sector size (logical/physical): 512 bytes / 512 bytes

I/O size (minimum/optimal): 512 bytes / 512 bytes





Disk /dev/loop5: 21 MiB, 22003712 bytes, 42976 sectors

Units: sectors of 1 * 512 = 512 bytes

Sector size (logical/physical): 512 bytes / 512 bytes

I/O size (minimum/optimal): 512 bytes / 512 bytes





Disk /dev/sda: 465.8 GiB, 500107862016 bytes, 976773168 sectors

Units: sectors of 1 * 512 = 512 bytes

Sector size (logical/physical): 512 bytes / 4096 bytes

I/O size (minimum/optimal): 4096 bytes / 4096 bytes

Disklabel type: dos

Disk identifier: 0x61948d77



Device Boot Start End Sectors Size Id Type

/dev/sda1 * 2048 976771071 976769024 465.8G 83 Linux









GPT PMBR size mismatch (1953525167 != 1953525165) will be corrected by w(rite).

Disk /dev/sdb: 931.5 GiB, 1000204884992 bytes, 1953525166 sectors

Units: sectors of 1 * 512 = 512 bytes

Sector size (logical/physical): 512 bytes / 512 bytes

I/O size (minimum/optimal): 512 bytes / 512 bytes

Disklabel type: gpt

Disk identifier: C59FB961-880D-4A3A-91C0-D70D4865A4EC



Device Start End Sectors Size Type

/dev/sdb1 40 409639 409600 200M EFI System

/dev/sdb2 409640 1952255591 1951845952 930.7G Apple Core storage

/dev/sdb3 1952255592 1953525127 1269536 619.9M Apple boot

good, your Apple Mac OS X is the second (b) (serial data device sdb (probably external?) and the mac os x filesystem is on the second partition sdb2

now if you type the 'mount' command it should show you if /dev/sdb2 is in RW or RO mode and what is the mount point (not important)
, check it ,if it's in RW we can proceed directly in the removing of kext if in RO umount it:
umount /dev/sdb2
what is the status of the hard disk?(RO or RW)
 

mightymacman

macrumors member
Jul 26, 2017
39
11
San Luis Obispo, CA
But, I'm sorry, it seems to me, this solution is nonstable as it written at the linked utility description:
As I key this in, using my 17" MBP with the above Work-a-round in place, I can assure you it works. If you follow the overall directions, this solution will work. Be sure to ask questions, if for some reason my directions above are unclear to you. I recognize what I think is "clear direction" might not be to the reader.
 

funkwizard

macrumors newbie
Jun 28, 2018
14
1
good, your Apple Mac OS X is the second (b) (serial data device sdb (probably external?) and the mac os x filesystem is on the second partition sdb2

now if you type the 'mount' command it should show you if /dev/sdb2 is in RW or RO mode and what is the mount point (not important)
, check it ,if it's in RW we can proceed directly in the removing of kext if in RO umount it:
umount /dev/sdb2
what is the status of the hard disk?(RO or RW)

This is what I got.I think its RO
/dev/sdb2 on /media/swagatika/Macintosh HD type hfsplus (ro,nosuid,nodev,relatime,umask=22,uid=1000,gid=1000,nls=utf8,uhelper=udisks2)

swagatika@swagatika-Inspiron-3521:~$ umount /dev/sdb2
swagatika@swagatika-Inspiron-3521:~$
Should i write anything after umount command?
AND ONE MORE THING
These are the steps I performed to get the /dev/sdb2 to RW
sudo apt-get install hfsprogs
sudo fsck.hfsplus -f /dev/sdb2
sudo umount /dev/sdb2
and finally
sudo mount -t hfsplus -o remount,force,rw /dev/sdb2
and this is what i got as a result

/dev/sdb2 on /media/swagatika/Macintosh HD type hfsplus (rw,nosuid,nodev,relatime,umask=22,uid=1000,gid=1000,nls=utf8,uhelper=udisks2)
But when I again take out the external drive from ths usb and then again it mounts by itself and then type mount its shows RO
So what I am saying is remounting the external hard disk and tying the command sudo mount -t hfsplus -o remount,force,rw /dev/sdb2 get the RW option so while staying in this state is it possible to delete kexts file?
 
Last edited:

hatimkahin

macrumors newbie
Jul 16, 2018
1
2
If you don't have time to read my story (which also describes some interesting technical approaches) just scroll down this thread until a "100% WORKING SOLUTION" text

Discrete AMD GPU of my 2011 MacBook Pro 8,2 has finally failed because of the reasons mentioned here ( http://logicboardmac.blogspot.ru/ ) and there ( https://www.macrumors.com/2015/02/19/2011-macbook-pro-repair-program-apple/ ) . It has been working perfectly for 6 years under quite a high load, even tried SETI@HOME mining at background! So I was confident that my MBP is not affected by bad solder / bad soldering quality and didn't want to bring it to Apple for a free repair program - partially because couldn't find the time to pause my important software projects, partially because I was afraid that Apple might give me a less reliable logic board or refuse a free repair because of the several unrelated repairs that I did manually by myself earlier to save money: changed thermal paste a few times, replaced the internal battery 2 times, replaced a keyboard with broken buttons, etc. But it finally broke down last week: laptop's screen image became distorted, it refused to boot OS X (always freezing half-way), and - Apple free repair program has already ended! I know there are affordable solutions like $50 BGA resoldering at unofficial local repair shop and that its possible to get a new replacement HD 6750M chip from AliExpress for $35 or cheaper ( http://www.aliexpress.com/item/DC-2...0028-216-0810028-BGA-Chipset/32764872143.html or https://www.aliexpress.com/item/DC-2015-New-216-0810001-216-0810001-Graphic-Chipset/32718112928.html , because don't know if this is true - https://www.rossmanngroup.com/board...0604-replace-216-0810005-gpu-with-216-0810028 ) to guarantee a successful repair, so the total price of repair would be either $50 or $50+$35=$85 - less than $100 in any case. But I don't like investing money to the old computers, so I have thought - what if there is some hack to force MBP to use integrated graphics ALL THE TIME, even while booting ? And then started to explore the possible solutions...

===

First of all, it is possible to successfully boot a MBP to OS X while still using the failed GPU, after you remove the AMD drivers by booting in command line mode (CMD+S) and entering these commands:
1) fsck -fy (to check a disk)
2) mount -uw / (mount a root filesystem with read/write permissions)
3) sudo mkdir /AMD_Kexts/ (make a directory to store the AMD drivers in case you'll need them in future)
4) sudo mv /System/Library/Extensions/AMD*.* /AMD_Kexts/ (move the AMD drivers)
5) sudo rm -rf /System/Library/Caches/com.apple.kext.caches/ (remove the AMD drivers cache)
6) sudo mkdir /System/Library/Caches/com.apple.kext.caches/ (just in case OS X will be dumb and will not recreate this directory, I am creating it for OS X)
7) sudo touch /System/Library/Extensions/ (to update the timestamps so that new driver caches - without AMD drivers - will be definitely rebuilt)
8) sudo umount / (umount a partition to guarantee that your changes are flushed to it)
9) sudo reboot

The degree of your inconvenience while doing these steps - strongly depends on how heavily a screen's image is distorted in your case. In my case it was even more difficult because the OS X partition became a "read-only" partition (because of too many emergency shutdowns I did while desperately trying to boot OS X with a failed GPU) so I had to remove a hard drive from MacBook Pro and (using a USB to SATA 2.5" adapter taken from my portable HDD) attached it to a computer with Linux, then followed these instructions:

https://superuser.com/questions/961401/mounting-hfs-partition-on-arch-linux (1st answer) - carefully executed a number of commands, calculated a sizelimit for my parition layout, and finally ran sudo mount -t hfsplus -o force,rw,sizelimit=YOURNUMBER /dev/sdb2 /mnt to mount this HFS+ partition to /mnt directory in read-write mode. Then I performed these "1)-7)" steps you see above, and also repaired a filesystem by running sudo fsck.hfsplus -f /dev/sdb2 before unmounting a partition with sudo umount /mnt and putting a hard drive back to MBP...

===

This gave me a MBP which could boot to OS X although STILL using a broken AMD GPU: so it screen's image is very distorted (could browse the Internet but quite inconvenient to read a text), Launchpad is super laggy, and you can't switch to Integrated GPU using gfxCardStatus because: without AMD drivers (which we had to remove to successfully boot to OS X) Macbook Pro thinks its' internal screen is External Display and gfxCardStatus tells it is impossible to switch because External Display is using AMD GPU. Somewhere I found a suggestion that it is possible to rebuild a gfxCardStatus from the source code - https://github.com/codykrieger/gfxCardStatus - with removed or commented out 156-166 lines in the ./gfxCardStatus/Classes/GSProcess.m to make it to ignore the external display:

// find out if an external monitor is forcing the discrete gpu on
CGDirectDisplayID displays[8];
CGDisplayCount displayCount = 0;
if (CGGetOnlineDisplayList(8, displays, &displayCount) == noErr) {
for (int i = 0; i < displayCount; i++) {
if ( ! CGDisplayIsBuiltin(displays))
[list addObject:[NSDictionary dictionaryWithObjectsAndKeys:
Str(@"External Display"), kTaskItemName,
@"", kTaskItemPID, nil]];
}
}


So I rebuilt a gfxCardStatus using the instructions from the last reply of this issue -
https://github.com/codykrieger/gfxCardStatus/issues/229
(also had to download a MacOSX10.11.sdk from here - https://github.com/phracker/MacOSX-SDKs/releases - unpack and copy it to XCode's /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk - because of the Apple's stupidity the latest XCode for El Capitan does not include SDK for El Capitan!) However, it still didn't work - gfxCardStatus only pretended that it has switched to Integrated GPU, while in reality OS X did not let it switch! Even after I edited ./gfxCardStatus/Classes/GSGPU.m file to enable the mysterious "Nuke it from orbit switching" option, it still couldn't switch...

===

Then I discovered this interesting repository - https://github.com/0xbb/gpu-switch - which is partially similar by its' source code to gfxCardStatus but also has the "Login Hooks" (install_hooks.sh) to "automate the switching process for login/logout". Sadly it didn't work for me... However, there is a very interesting gpu-switch text file right at the root of this repository, which describes the EFI variables!

https://github.com/0xbb/gpu-switch/blob/master/gpu-switch

After studying it and also reading this issue's comments - https://github.com/0xbb/gpu-switch/issues/11 - I became confident to try this solution, but found out that my MacBook Pro 2011 8,2 with OS X El Capitan 10.11.6 is in a VERY problematic situation:

1) rEFInd is not installed, and to install it - must disable SIP protection. But I cannot boot to Recovery mode (Command+Option+R) or to OS X Installation DVD/USB (hold Option), (to disable SIP), because they freeze while booting! - although I removed AMD kexts from my system, of course these recovery tools are using AMD kexts integrated to their design. Also cannot use Rootfool hack ( https://github.com/gdbinit/rootfool ) to disable SIP during runtime, because it works only at OS X version older than 10.11.4

2) Tried overheating my Macbook Pro on purpose (forcing CPU usage to 100% and putting it to a tightly closed bag) to force it to shutdown from overheating and then quickly reboot so that Integrated graphics will be enabled during the boot time - making it possible to boot to Recovery. But because of the wonderful high end thermal paste I have applied not so long ago - cannot overheat it even after waiting for a long time! At this point I thought that could either: a) remove AMD kexts from Installation media, or b) to connect MBP's hard drive to a Linux machine again and run a bunch of chmods to remove the SIP flags from the directories mentioned here ( http://apple.stackexchange.com/questions/193368/what-is-the-rootless-feature-in-el-capitan-really ) which could potentially make a system unbootable, or c) to try installing rEFInd to HFS+ partition directly from a Linux machine with root rights because it will bypass SIP --- but have not explored these options, although some of them might have worked...

3) Wanted to boot a Linux LiveCD to edit the EFI variables from there, but no matter what I did: tried booting straight without GRUB option modifications, tried editing GRUB boot options (with "e" key) to add nomodeset / remove quiet splash / or both in every combination , or like suggested in this article ( https://wiki.archlinux.org/index.php/MacBookPro8,1/8,2/8,3_(2011) ) also add i915.modeset=0 radeon.modeset=0 or radeon.modeset=0 i915.modeset=1 i915.lvds_channel_mode=2 ; and then pressed Fn+F10 or Shift+Ctrl+Fn+F10 to boot with these options: but the Linux boot process always failed at different boot stages, no matter what popular user-friendly Linux distribution or what version of it I am trying: tried many releases of Ubuntu / Lubuntu / Fedora , even the old "AMD64 Mac" and "Alternate AMD64 Mac" images, but they always failed - either at the very beginning of boot process (black screen, or a black screen with a blinking or stuck _ character at the left upper corner) or failed at the very end of it - right before it is supposed to show a graphical desktop environment...

Later, totoe_84 wrote that he was able to boot Ubuntu in graphical mode using the following setup for GRUB:
  • To disable the AMD graphics card I added the following lines after set gfxpayload=keep
outb 0x728 1
outb 0x710 2
outb 0x740 2
outb 0x750 0
  • Next I added the following after quiet splash
    i915.lvds_channel_mode=2 i915.modeset=1 i915.lvds_use_ssc=0
(based on https://ubuntuforums.org/showthread.php?t=2157775 )

===

Then I remembered that there are not-mainstream Linux distributions for advanced users, which have a LiveCD without any graphical interface: you are dropped to a pure console and you are supposed to install the system along with only those graphical interfaces and software packages / groups of packages which you explicitly select. For example: Arch Linux (https://www.archlinux.org/) and Gentoo Linux (https://gentoo.org/) . Because their LiveCD does not have a graphical interface, they could be booted without a problem to a pure Linux console and there you could edit the EFI variables ! So here is a...

===
=== 100% WORKING SOLUTION
===
=== Force your MBP to ALWAYS use Intel integrated GPU (EFI variable fix)
===
=== to make it great again ! ;)
===


1) Create the Arch Linux LiveCD/LiveUSB :

You need a working computer for that and a spare CD/DVD/USB drive. After downloading archlinux-2017.03.01-dual.iso (see the links below) you have to check the integrity of the .ISO file to see if it is not corrupted (avoid I/O error, printf: not found, chattr: not found, etc). After checking the integrity of archlinux-2017.03.01-dual.iso and everything is OK, then you can generate an ArchLinux boot disk.

archlinux-2017.03.01-dual.iso

MD5:
1d25235e7cebe45f93452fbc05a0fb66 archlinux-2017.03.01-dual.iso

SHA1
f426866ca632a35a3eeae8e4080cff25ec8da614 archlinux-2017.03.01-dual.iso

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

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

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

Virtapi.org:

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

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

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

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

Belnet:

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

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

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

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

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

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

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

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

Finder -> Applications -> Utilities -> Terminal:

MD5:
Code:
cd Downloads/

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

SHA1:
Code:
cd Downloads/

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

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

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

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

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

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

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

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

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

nvram boot-args="-v"

reboot

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

Then you could either simply burn this ISO to CD/DVD (which later could be either inserted to MBP's SuperDrive or External DVD Drive connected to MBP by two USB cables) or create a bootable USB: use the great detailed instructions from this page, https://wiki.archlinux.org/index.php/USB_flash_installation_media

2) Boot to it: insert this CD/DVD/USB to Macbook Pro, hold Option key while booting, choose "EFI boot" (that is your bootable installation media), press "e" key to edit the GRUB options of the Arch Linux archiso x86_64 UEFI CD menu entry while it is selected at the main screen, add nomodeset to the end of this line and press Enter. If everything is done correctly, you will find yourself at the Linux console!

3) Edit EFI vars: looks like efivarfs filesystem is mounted by default! So you can already cd /sys/firmware/efi/efivars and ls to explore this directory and see if there is a "gpu-power-prefs-..." variable (where ... is UUID of this variable). If there is such a variable, its better to remove it with rm. In my case the efivarfs has been mounted by default with read/write permissions, but if you are getting the "operation not permitted" message while attempting to rm, it means that in your case efivarfs has been mounted as read-only and you need to remount it with read-write permissions and try again (credits to totoe_84 for this valuable addition) :
*) cd /
*) umount /sys/firmware/efi/efivars/
*) mount -t efivarfs rw /sys/firmware/efi/efivars/
*) cd /sys/firmware/efi/efivars/

If your screen is so distorted that it is difficult to see the letters, just start typing the rm gpu-power-pre and then press TAB key for autocompletion. In my case there were not such a EFI variable, only "gpu-active-..." and maybe somehow related "gfx-saved-config-restore-status-..." . Then I looked again at that gpu-switch text file (mentioned above, https://github.com/0xbb/gpu-switch/blob/master/gpu-switch),
and entered THESE COMMANDS:

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

Actually a gpu-switch script had "${sysfs_efi_vars}/${efi_gpu}" but I didnt have a "gpu-power-prefs-..." variable - so, partially by mistake, I didn't add that efi_gpu suffix and entered this incomplete path accidentally

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

Did not have a EFI "gpu-power-prefs-" variable so I thought that it will be OK to create a new one with a random UUID - in this case, taken directly from a gpu-switch script

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

http://www.tecmint.com/chattr-command-examples/ - chattr (Change Attribute) is a command line Linux utility that is used to set/unset certain attributes to a file in Linux system to secure accidental deletion or modification of important files and folders, even though you are logged in as a root user.
...
Syntax of chattr ---> chattr [operator] [flags] [filename]
...
A file is set with ‘i‘ attribute (+i as you see in this command) ---> cannot be modified (immutable). Means no renaming, no symbolic link creation, no execution, no writable, only superuser can unset the attribute.
...
Operator
  1. + : Adds the attribute to the existing attribute of the files.
  2. : Removes the attribute to the existing attribute of the files.
  3. = : Keep the existing attributes that the files have.
This chattr command is supposed to lock a file to make it accessible only by "superuser" - and so that, while booting, your EFI will have no chance to screw up your gpu-power-prefs-... variable under any circumstances

*) cd /

Could not unmount efivars if you are inside this directory, so change to the root directory

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

Guarantees that your EFI variables are flushed to efivarfs filesystem, please unmount it safely before rebooting)

*) reboot

===> IF YOU DID EVERYTHING CORRECTLY, MOST LIKELY THAT YOUR MACBOOK PRO IS NOW USING INTEGRATED GRAPHICS WHILE BOOTING, AFTER BOOTING, AND IS WORKING GREAT AGAIN ! ;)

In the future maybe you could need to re-apply this solution if you would have to reset your PRAM / NVRAM / SMC because of some other problems, so remember this solution somewhere... Funny thing: now you can't switch to Discrete GPU even using gfxCardStatus, it is forever stuck at Integrated

I spent two working days to discover this solution, and really hope that it will work flawlessly for every MBP owner with a broken discrete GPU. Good luck!

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

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

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

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

Close the Lid - Sleep - Waking - Page 43 #1066 - Page 50 #1243
[doublepost=1531808078][/doublepost]@AppleMacFinder I would like to thank you for your help
following your instructions helped me to start using again my MAC after almost one year from the day I experienced the Graphic problem.
 

damien_mattei

macrumors newbie
Jun 22, 2018
17
0
This is what I got.I think its RO
/dev/sdb2 on /media/swagatika/Macintosh HD type hfsplus (ro,nosuid,nodev,relatime,umask=22,uid=1000,gid=1000,nls=utf8,uhelper=udisks2)

swagatika@swagatika-Inspiron-3521:~$ umount /dev/sdb2
swagatika@swagatika-Inspiron-3521:~$
Should i write anything after umount command?
AND ONE MORE THING
These are the steps I performed to get the /dev/sdb2 to RW
sudo apt-get install hfsprogs
sudo fsck.hfsplus -f /dev/sdb2
sudo umount /dev/sdb2
and finally
sudo mount -t hfsplus -o remount,force,rw /dev/sdb2
and this is what i got as a result

/dev/sdb2 on /media/swagatika/Macintosh HD type hfsplus (rw,nosuid,nodev,relatime,umask=22,uid=1000,gid=1000,nls=utf8,uhelper=udisks2)
But when I again take out the external drive from ths usb and then again it mounts by itself and then type mount its shows RO
So what I am saying is remounting the external hard disk and tying the command sudo mount -t hfsplus -o remount,force,rw /dev/sdb2 get the RW option so while staying in this state is it possible to delete kexts file?

yes!

here is below an history of the commands i used to remove the kext:

assuming /media/macosx is the point where your mac os x volume is mounted RW for you it will have to be replaced by:/media/swagatika/Macintosh HD

mkdir /root/AMDhighsierra ; just for backup of kext files in case of need
mv /media/macosx/System/Library/Extensions/AMD*.* /root/AMDhighsierra/ ; move the kexts
rm -rf /media/macosx/System/Library/Caches/com.apple.kext.caches/ ; remove cache
mkdir /media/macosx/System/Library/Caches/com.apple.kext.caches/
touch /media/macosx/System/Library/Extensions/
umount /media/macosx

i suppose after that it will be ok to boot again your Mac OS X
if not we will have to make a few modif in EFI firmware (i had done it prior to remove the kext so i'm not sure if it had to always be done)
 

macbookprodad

macrumors member
Jun 21, 2011
39
0
After 3 years when Apple replace my logic under the replacement program, today it died again and stuck in white screen. After isolating the problem from swapping ram, replacing ram, replacing hdd and running apple hardware test, no luck and no issue found.

So what I did, i move all the amd kexts file out of the extension folder and finally i can boot up with sluggish graphics, made my backup and out of despair I just run this command in the terminal:

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

nvram boot-args="-v"

reboot

and rebooted to integrated graphics only, and now my mac is fine with the integrated graphics on
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.