gfxCardStatus icon indicating copy to clipboard operation
gfxCardStatus copied to clipboard

Add UI to perma-switch via EFI params

Open codykrieger opened this issue 10 years ago • 17 comments

Per some clever reverse-engineering of the EFI, someone figured out a way to forcibly enable/disable a particular GPU across boots: https://github.com/0xbb/gpu-switch

This could make gfxCardStatus more useful yet for prolonging the life of troublesome machines.

codykrieger avatar Dec 27 '14 13:12 codykrieger

(Actually it seems like activating Integrated Only mode might already cause AppleGraphicsControl to set the necessary EFI variable. But we could provide an interface to manipulate this without going through AGC, which would be useful in single user mode, etc.)

codykrieger avatar Dec 27 '14 13:12 codykrieger

I think this might be pretty simple to control: "sudo nvram gpu-power-prefs=%01%00%00%00". Reboot and see if it boots up reliably in Integrated mode. If not, try it from single user mode too. I'm seeing lots of Nvidia references regarding gpu-power-prefs, so this might not work with ATI GPUs. My MacBook Pro 2011 (ATI/AMD) is in for Apple "Depot Repair", so I can't test this until I get it back.

sbytnar avatar Dec 27 '14 15:12 sbytnar

This sounds like a perfect feature!

A couple questions if you both may:

  • Regarding the command in prev comment, is it reversible? What would be the command to "reset" the state / undo this command?
  • Would doing this from EFI allow running multiple displays with the integrated GPU? For example the Iris Pro in Mid 2014 15" MBPr can do it, but something in the MBPr doesn't allow it For the record, I think this feature is very valuable even if it doesn't work with multiple displays

Thanks a lot.

Meligy avatar Jan 11 '15 05:01 Meligy

How to use the GPU switch?

orphicpixel avatar Feb 03 '15 04:02 orphicpixel

Hi, Sorry for my poor english. My Macbook pro dGpu is dead. I had to move ATI_6000_.kext to another folder then I can boot my mac,but every thing is very slow. I have tried eEFInd shell script as this:

echo -off
cls
mm 7C2 1 ;IO :1
mm 7D4 1 ;IO :28
stall 100000
mm 7C2 1 ;IO :2
mm 7D4 1 ;IO :10
stall 100000
mm 7C2 1 ;IO :2
mm 7D4 1 ;IO :40
stall 100000
mm 7C2 1 ;IO :1
mm 7D4 1 ;IO :50
stall 100000
mm 7C2 1 ;IO :0
mm 7D4 1 ;IO :50

mm 750 1 ;IO :2
mm 710 1 ;IO :2
mm 740 1 ;IO :2
mm 0001013E 1 ;PCI :8
mm 00020004 1 ;PCI :7
mm 00020050 1 ;PCI :2
mm 00020054 1 ;PCI :1

echo "Starting HD3000"
fs1:\System\Library\CoreServices\boot.efi

I got a black screen. But everyting woks fine,my macbook pro 2011 can sleep well. (I use the teamviewer to access my mac , the ati (amd4960) graphics card disappeared in the SystemInfo . There is only the iGPU. ) How can I make the monitor works?

I hope the newest version GfxCardStatus coming soon. Thanks.

Normal boot:

System Report

normal boot systeminfo

GfxCardStatus

normal boot gfxcardstatus

Boot with rEFInd script:

Black Screen

fullsizerender

Use the TeamViewer I can see the System Report and GfxCardStatus

fullsizerender

boangs avatar Feb 03 '15 16:02 boangs

@codykrieger, have you made any headway on those EFI parameters? I've tried messing with gpu-power-prefs and gpu-policy to no avail. It might help me avoid the current (software/firmware) solution for the early 2011 MBP discrete graphics card issue, which is to bake it and apparently trigger a thermal check that brings it up using integrated graphics.

emersonf avatar Oct 18 '15 15:10 emersonf

You know there is a repair program for 2011 mbp with discreet gpu issues right?

Sent from my iPhone

On Oct 18, 2015, at 9:39 AM, Emerson Farrugia [email protected] wrote:

@codykrieger, have you made any headway on those EFI parameters? I've tried messing with gpu-power-prefs and gpu-policy to no avail. It might help me avoid the current solution for the early 2011 MBP discrete graphics card issue, which is to bake it and apparently trigger a thermal check that brings it up using integrated graphics.

— Reply to this email directly or view it on GitHub.

systemswizard avatar Oct 18 '15 18:10 systemswizard

I do. I meant a software/firmware solution.

emersonf avatar Oct 18 '15 18:10 emersonf

I doubt there will ever be a non-hardware solution to any of these issues. Better to just have the afflicted machine repaired or replaced at this point, especially seeing as a repair program exists.

codykrieger avatar Oct 18 '15 22:10 codykrieger

Unfortunately some people (or at least me) have been denied repairs under that program if our machines don't pass some kind of test they run at the Apple store even though it clearly exhibits the symptoms. But the machine has been great in conjunction with gfxCardStatus 1.8.1. Maybe I'll have to try again one day but so far I've just been frustrated.

star-szr avatar Oct 19 '15 20:10 star-szr

Do a mail in repair they are more receptive to the issue.

Sent from my iPhone

On Oct 19, 2015, at 2:57 PM, Scott Reeves [email protected] wrote:

Unfortunately some people (or at least me) have been denied repairs under that program if our machines don't pass some kind of test they run at the Apple store even though it clearly exhibits the symptoms. But the machine has been great in conjunction with gfxCardStatus 1.8.1. Maybe I'll have to try again one day but so far I've just been frustrated.

— Reply to this email directly or view it on GitHub.

systemswizard avatar Oct 19 '15 20:10 systemswizard

Do you think with this reverse engineering code secondary/external monitors can be used while using integrated only graphics?

akhats avatar Jan 06 '16 23:01 akhats

Extremely doubtful.

On Jan 6, 2016, at 3:08 PM, akhats [email protected] wrote:

Do you think with this reverse engineering code secondary/external monitors can be used while using integrated only graphics?

— Reply to this email directly or view it on GitHub https://github.com/codykrieger/gfxCardStatus/issues/184#issuecomment-169491023.

codykrieger avatar Jan 07 '16 02:01 codykrieger

Hello, I recently tried gfxCardStatus for a slightly different reason than has been discussed in this thread: I have two MacBook Pros that are from mid-2010 era (yes, 2010 not 2011: MacBookPro6,2) and over the last six months both of them have started having kernel panics that I finally identified as being caused by some design problem related to graphics card switching, for which the repair program has not been active for a while. In my case, I want to pin the graphics mode to 'Discrete' because I want to run the MacBooks with external monitors, and one of the MacBooks is bad enough that during booting it often won't even get to the login prompt before panicking and rebooting. So it would be wonderful if the desired graphics card mode (in my case Discrete) could be retained between reboots. Is it possible for gfxCardStatus to do this? Or does this need a modified EFI (aka flash boot loader)?

gliderjs avatar Jan 19 '16 23:01 gliderjs

@gliderjs Not as far as I'm aware.

codykrieger avatar Jan 19 '16 23:01 codykrieger

@gliderjs I'm in the exactly same case. Did you find out some solution ?

jeremie-olivier avatar Oct 13 '16 15:10 jeremie-olivier

@jeremie-olivier here you can find a working solution to permanently disable the discrete graphics card.

fernandonm avatar Jun 05 '17 21:06 fernandonm