Contribute
Register

[Guide] Disabling discrete graphics in dual-GPU laptops

RehabMan

Moderator
Joined
May 3, 2012
Messages
191,028
Motherboard
Intel DH67BL
CPU
i7-2600K
Graphics
HD 3000
Mac
MacBook Air
Mobile Phone
iOS
please check if I've correctly disabled my AMD graphics
Looks good...
No sign of it in ioreg.
And the set of files in ACPI/patched is good, with correct settings regarding DropOem and SortedOrder in config.plist.
 
Joined
Jul 23, 2013
Messages
41
Motherboard
Asus S46CM (Clover)
CPU
i5 3317U + HM76
Graphics
HD4000/GT635M(disable) 1366x768
Mac
MacBook Air
Classic Mac
Apple
Mobile Phone
Android
Your ioreg shows the device is not disabled (so does System Information).
Your _OFF method has EC related code that must move to _REG.
Really see the topic I do not understand to apply to my case, so I tried calling _DOFF in PINI method. Please check my help again and if possible please give me more specific suggestion in this case. Thanks you so much!
p / s: how to check nvidia disable in ioreg?
 

Attachments

RehabMan

Moderator
Joined
May 3, 2012
Messages
191,028
Motherboard
Intel DH67BL
CPU
i7-2600K
Graphics
HD 3000
Mac
MacBook Air
Mobile Phone
iOS
Really see the topic I do not understand to apply to my case, so I tried calling _DOFF in PINI method.
I think you mean DOFF (_DOFF is 5 characters, therefore not a valid ACPI identifier).
DOFF just calls _OFF, so you could have just called _OFF.
But beware that your _OFF method has EC references, so calling _OFF (or DOFF, which calls _OFF) from _INI may not be expected to work well.

In your particular case, the calls are to EC0.WRAM. And WRAM checks ECAV() before doing anything. Because _REG has not been called yet, ECAV will return 0, and the WRAM calls will do nothing. This EC related code is likely used to communicate to the EC that the discrete device is powered down, such that it can modify fan/temperature monitoring as appropriate. Since this code will not be in effect, the EC will believe your discrete card to be powered, which may result in unpredictable behavior (because it is actually powered down without the EC's awareness).

This is why post #1 calls to move EC related code to _REG.

Note also that calling _PS3 and _OFF (via DOFF) is not needed as _PS3 just calls DOFF, then does some extra things.
If you are to use _PS3, then call only _PS3, not _OFF/DOFF.

Please check my help again and if possible please give me more specific suggestion in this case. Thanks you so much!
p / s: how to check nvidia disable in ioreg?
This ioreg shows it disabled:
Screen Shot 2017-10-06 at 6.48.46 PM.png


Compare to previous ioreg:
Screen Shot 2017-10-06 at 6.48.38 PM.png
 
Joined
Jul 23, 2013
Messages
41
Motherboard
Asus S46CM (Clover)
CPU
i5 3317U + HM76
Graphics
HD4000/GT635M(disable) 1366x768
Mac
MacBook Air
Classic Mac
Apple
Mobile Phone
Android
I think you mean DOFF (_DOFF is 5 characters, therefore not a valid ACPI identifier).
DOFF just calls _OFF, so you could have just called _OFF.
But beware that your _OFF method has EC references, so calling _OFF (or DOFF, which calls _OFF) from _INI may not be expected to work well.

In your particular case, the calls are to EC0.WRAM. And WRAM checks ECAV() before doing anything. Because _REG has not been called yet, ECAV will return 0, and the WRAM calls will do nothing. This EC related code is likely used to communicate to the EC that the discrete device is powered down, such that it can modify fan/temperature monitoring as appropriate. Since this code will not be in effect, the EC will believe your discrete card to be powered, which may result in unpredictable behavior (because it is actually powered down without the EC's awareness).

This is why post #1 calls to move EC related code to _REG.

Note also that calling _PS3 and _OFF (via DOFF) is not needed as _PS3 just calls DOFF, then does some extra things.
If you are to use _PS3, then call only _PS3, not _OFF/DOFF.
I followed instructions with WRAM, but failed, I also tried removing EC in OFF but the results did not change. When test DSDT my PC seemed hotter than usual. Can you give me some further advice on this issue? thank you
 

Attachments

RehabMan

Moderator
Joined
May 3, 2012
Messages
191,028
Motherboard
Intel DH67BL
CPU
i7-2600K
Graphics
HD 3000
Mac
MacBook Air
Mobile Phone
iOS
I followed instructions with WRAM, but failed, I also tried removing EC in OFF but the results did not change. When test DSDT my PC seemed hotter than usual. Can you give me some further advice on this issue? thank you
You did not follow the guide correctly.

EC related code in _OFF:
Code:
            Store (^^^LPCB.EC0.RRAM (0x0521), Local0)
            And (Local0, 0xCF, Local0)
            ^^^LPCB.EC0.WRAM (0x0521, Local0)
            ^^^LPCB.EC0.WRAM (0x0520, 0x95)
            ^^^LPCB.EC0.WRAM (0x03A4, Zero)
            ^^^LPCB.EC0.WRAM (0x03A5, Zero)
That code must move to _REG.
Resulting _REG should be:
Code:
            Method (_REG, 2, NotSerialized)  // _REG: Region Availability
            {
                If (LEqual (Arg0, 0x03))
                {
                    Store (Arg1, ECFL)
                }

                If (LAnd (LEqual (Arg0, 0x03), LEqual (Arg1, One)))
                {
                     Store (^^^LPCB.EC0.RRAM (0x0521), Local0)
                     And (Local0, 0xCF, Local0)
                     ^^^LPCB.EC0.WRAM (0x0521, Local0)
                     ^^^LPCB.EC0.WRAM (0x0520, 0x95)
                     ^^^LPCB.EC0.WRAM (0x03A4, Zero)
                     ^^^LPCB.EC0.WRAM (0x03A5, Zero)
                }
            }
Note that the compiler will optimize:
Code:
            Method (_REG, 2, NotSerialized)  // _REG: Region Availability
            {
                If (LEqual (Arg0, 0x03))
                {
                    Store (Arg1, ECFL)
                }

                If (LAnd (LEqual (Arg0, 0x03), LEqual (Arg1, One)))
                {
                    Store (RRAM (0x0521), Local0)
                    And (Local0, 0xCF, Local0)
                    WRAM (0x0521, Local0)
                    WRAM (0x0520, 0x95)
                    WRAM (0x03A4, Zero)
                    WRAM (0x03A5, Zero)
                }
            }
What you wrote: "^WRAM._OFF ()" is complete nonsense.

Resulting _OFF with EC related code removed:
Code:
        Method (_OFF, 0, NotSerialized)  // _OFF: Power Off
        {
            If (LEqual (SVID, 0xFFFFFFFF))
            {
                Return (Zero)
            }

            ^^^GFX0.SAVO ()
            Store (One, LNKD)
            While (LNotEqual (LNKS, Zero))
            {
                Sleep (One)
            }

            Store (Zero, AFE4)
            Store (One, AFE5)
            Store (One, LDPS)
            SGPL (0x32, One, Zero)
            Sleep (0x0A)
            SGPL (0x36, One, Zero)
            Store (Zero, ^^^GFX0.HPWR)
            Return (Zero)
        }
Note: I don't know why you removed the GFX0.SAVO call!

Correct _INI, calling _PS3:
Code:
        Method (_INI, 0, NotSerialized)  // _INI: Initialize
        {
            If (LNotEqual (SVID, 0xFFFFFFFF))
            {
                Store (Zero, NHDA)
                Sleep (0x32)
            }
            _PS3()
        }
Make sure those are the *only* changes you make related to _OFF/_PS3/etc.
 
Joined
Nov 28, 2011
Messages
42
Motherboard
Asus K401UB (Clover)
CPU
i7-6500U
Graphics
Nvidia Geforce 940M + HD520
Mac
MacBook Pro
Classic Mac
iBook, Power Mac, PowerBook
Mobile Phone
iOS
Hey Rehabman I'd like you to help me check my DSDT, SSDT, Patchmatic extracted files, Grep from Terminal and IOReg to ensure that I have successfully disabled my discrete graphics. Thanks to your guide I have managed to successfully boot into my laptop after a couple of try. But my system is different from the one in your guide. Here's a brief explanation of what I did: Firstly I searched for the _OFF method and it wasn't explicitly written EC0. It was the method HGOF. So I searched it and it was in SSDT-12 which is home to the _INI method too. So instead of delecting the EC0 related code, I commented it as I need it as a reference to copy it to _REG. Then I called _OFF from _INI by making a few changes to your _INI patch. Then I copied the entire block of HGOF code (I tried copying the EC related code only into _REG but the system stuck at ioconsoleuser same as it was in the begining) but that leads to a couple of error. So I copied a few methods that HGOF requires from SSDT_12 to EC0 and also to the start of the DSDT which I labeled as from opcode. Thank you for helping the laptop community by helping us, creating guides, config.plist files and kexts!
 

Attachments

RehabMan

Moderator
Joined
May 3, 2012
Messages
191,028
Motherboard
Intel DH67BL
CPU
i7-2600K
Graphics
HD 3000
Mac
MacBook Air
Mobile Phone
iOS
Hey Rehabman I'd like you to help me check my DSDT, SSDT, Patchmatic extracted files, Grep from Terminal and IOReg to ensure that I have successfully disabled my discrete graphics. Thanks to your guide I have managed to successfully boot into my laptop after a couple of try. But my system is different from the one in your guide. Here's a brief explanation of what I did: Firstly I searched for the _OFF method and it wasn't explicitly written EC0. It was the method HGOF. So I searched it and it was in SSDT-12 which is home to the _INI method too. So instead of delecting the EC0 related code, I commented it as I need it as a reference to copy it to _REG. Then I called _OFF from _INI by making a few changes to your _INI patch. Then I copied the entire block of HGOF code (I tried copying the EC related code only into _REG but the system stuck at ioconsoleuser same as it was in the begining) but that leads to a couple of error. So I copied a few methods that HGOF requires from SSDT_12 to EC0 and also to the start of the DSDT which I labeled as from opcode. Thank you for helping the laptop community by helping us, creating guides, config.plist files and kexts!
"Problem Reporting" files are incomplete/wrong (ioreg is corrupt).
Read FAQ, "Problem Reporting" again. Carefully. Attach all requested files/output.
https://www.tonymacx86.com/threads/faq-read-first-laptop-frequent-questions.164990/
 
Joined
Nov 28, 2011
Messages
42
Motherboard
Asus K401UB (Clover)
CPU
i7-6500U
Graphics
Nvidia Geforce 940M + HD520
Mac
MacBook Pro
Classic Mac
iBook, Power Mac, PowerBook
Mobile Phone
iOS

Attachments

RehabMan

Moderator
Joined
May 3, 2012
Messages
191,028
Motherboard
Intel DH67BL
CPU
i7-2600K
Graphics
HD 3000
Mac
MacBook Air
Mobile Phone
iOS
Hi Rehabman sorry as I used the new Ioreg hence the corruption. Attached is all requested files and output. Thank you.
What you have here is not correct.
What you should do:
- remove *only* the EC related code from HGOF
- call _OFF from _INI (that you did correctly)
- copy the EC related code from HGOF (and only the EC related code) and code it such that it only runs when Arg0==3 and Arg1==1 (EC ready)
 
Joined
Jun 24, 2011
Messages
35
Motherboard
DX58sO
CPU
990x
Graphics
2x GTS 250
Rehabman

having issues upgrading to High Sierra on my E6530 Dell

Attached is the Zip file that you request in this thread

Don't quite know how to disable nvidia video which seems to be the issue.
 

Attachments

Top