Contribute
Register

[Guide] Disabling discrete graphics in dual-GPU laptops

I'm doing it on Lenovo Legion, not MSI.

Your profile must accurately reflect the system you're working on.
No exceptions.

After modification my _OFF looks:

Code:
 Method (_OFF, 0, Serialized)  // _OFF: Power Off
        {
            If (LNotEqual (\_SB.PCI0.PEG0.PEGP.GPRF, One))
            {
                Store (VREG, VGAB)
            }
            HGOF ()
            Return (Zero)
        }

That's ok, but looking closely at your _OFF, it probably needs no modifications as it already checks ECAV.
And ECAV is likely zero before _REG is called, such that leaving that code there is fine as it won't be executed.

]quote]
But now I can't compile DSDT with deleted \_SB.PCI0.LPCB.EC0.ECAV part (EC0). I also don't know hot _INI need to look like and where to put it. Right before _OFF function in SSDT-2?

Adding _INI is covered in post #1. Please read it.

You did not attach your modified DSDT that you can't compile, therefore no possibility on diagnosing your mistake.

But this chunk of code should end up on _REG, such as:
Code:
...

             If (3==Arg0 && 1==Arg1)
             {
                If (LEqual (Acquire (\_SB.PCI0.LPCB.EC0.LFCM, 0xA000), Zero))
                {
                    Store (Zero, \_SB.PCI0.LPCB.EC0.GATY)
                    Sleep (0x0A)
                    Release (\_SB.PCI0.LPCB.EC0.LFCM)
                }
             }
 
Your profile must accurately reflect the system you're working on.
No exceptions.



Adding _INI is covered in post #1. Please read it.

You did not attach your modified DSDT that you can't compile, therefore no possibility on diagnosing your mistake.
What did I missed? I have information about laptop in footer.

I'm not sure about this part:
Method (_REG, 2, NotSerialized) // _REG: Region Availability
...
...
//added to turn nvidia/radeon off
If (LAnd(LEqual(Arg0,3),LEqual(Arg1,1)))
{
\_SB.PCI0.LPCB.EC0.ECAV
}
}
 

Attachments

  • DSDT-new.dsl
    1.4 MB · Views: 127
  • SSDT-2-CB-01.dsl
    81.5 KB · Views: 110
What did I missed? I have information about laptop in footer.

I'm not sure about this part:
Method (_REG, 2, NotSerialized) // _REG: Region Availability
...
...
//added to turn nvidia/radeon off
If (LAnd(LEqual(Arg0,3),LEqual(Arg1,1)))
{
\_SB.PCI0.LPCB.EC0.ECAV
}
}

What you have there is wrong.
Read #2061.

Correct _REG would look like this:
Code:
            Method (_REG, 2, NotSerialized)  // _REG: Region Availability
            {
                If (LEqual (Arg0, 0x03))
                {
                    Store (Arg1, ECAV)
                }

                If (LAnd (LEqual (Arg0, 0x03), LEqual (Arg1, One)))
                {
                    If (LEqual (OSYS, 0x07D6))
                    {
                        Store (One, Local0)
                    }

                    If (LEqual (OSYS, 0x03E8))
                    {
                        Store (0x02, Local0)
                    }

                    If (LEqual (OSYS, 0x07D9))
                    {
                        Store (0x03, Local0)
                    }

                    If (LEqual (OSYS, 0x07DC))
                    {
                        Store (0x04, Local0)
                    }

                    If (LEqual (OSYS, 0x07DD))
                    {
                        Store (0x05, Local0)
                    }

                    If (LEqual (OSYS, 0x07DF))
                    {
                        Store (0x06, Local0)
                    }

                    If (LEqual (Acquire (LFCM, 0xA000), Zero))
                    {
                        Store (Local0, OSTY)
                        If (LEqual (LSTE, Zero))
                        {
                            Store (Zero, ^^^GFX0.CLID)
                        }

                        If (LEqual (LSTE, One))
                        {
                            Store (0x03, ^^^GFX0.CLID)
                        }

                        Store (LSTE, LIDS)
                        Release (LFCM)
                    }
                }
                If (3==Arg0 && 1==Arg1)
                {
                    If (LEqual (Acquire (\_SB.PCI0.LPCB.EC0.LFCM, 0xA000), Zero))
                    {
                        Store (Zero, \_SB.PCI0.LPCB.EC0.GATY)
                        Sleep (0x0A)
                        Release (\_SB.PCI0.LPCB.EC0.LFCM)
                    }
                }
            }
 
What you have there is wrong.
Read #2061.

Correct _REG would look like this:
Code:
            Method (_REG, 2, NotSerialized)  // _REG: Region Availability
            {
                If (LEqual (Arg0, 0x03))
                {
                    Store (Arg1, ECAV)
                }

                If (LAnd (LEqual (Arg0, 0x03), LEqual (Arg1, One)))
                {
                    If (LEqual (OSYS, 0x07D6))
                    {
                        Store (One, Local0)
                    }

                    If (LEqual (OSYS, 0x03E8))
                    {
                        Store (0x02, Local0)
                    }

                    If (LEqual (OSYS, 0x07D9))
                    {
                        Store (0x03, Local0)
                    }

                    If (LEqual (OSYS, 0x07DC))
                    {
                        Store (0x04, Local0)
                    }

                    If (LEqual (OSYS, 0x07DD))
                    {
                        Store (0x05, Local0)
                    }

                    If (LEqual (OSYS, 0x07DF))
                    {
                        Store (0x06, Local0)
                    }

                    If (LEqual (Acquire (LFCM, 0xA000), Zero))
                    {
                        Store (Local0, OSTY)
                        If (LEqual (LSTE, Zero))
                        {
                            Store (Zero, ^^^GFX0.CLID)
                        }

                        If (LEqual (LSTE, One))
                        {
                            Store (0x03, ^^^GFX0.CLID)
                        }

                        Store (LSTE, LIDS)
                        Release (LFCM)
                    }
                }
                If (3==Arg0 && 1==Arg1)
                {
                    If (LEqual (Acquire (\_SB.PCI0.LPCB.EC0.LFCM, 0xA000), Zero))
                    {
                        Store (Zero, \_SB.PCI0.LPCB.EC0.GATY)
                        Sleep (0x0A)
                        Release (\_SB.PCI0.LPCB.EC0.LFCM)
                    }
                }
            }
Thank you so much, now it's working! I see problems with sleep now. Looks a little bit like instant wake, animations also after wake are not smooth. But it's not topic for this issues.
 
You didn't attach any files. Read post #1, "Problem Reporting"

Also, please fix your profile as per FAQ:
https://www.tonymacx86.com/threads/faq-read-first-laptop-frequent-questions.164990/

(before your next reply).

The _INI and _OFF look quite typical. But you need to check HGOF to see if it has EC related code (if present, that code must move to _REG). It is all detailed in post #1.

Ok sorry, my specs are:
Mobo: HP 250 G5 (Clover)
CPU: i5-6200u
Graphics: HD520, 1920x1080

I found EC inside HG0F

Code:
        Method (HGOF, 0, Serialized)
        {
            If (LEqual (CCHK (Zero), Zero))
            {
                Return (Zero)
            }

            Store (Zero, ONOF)
            Store (LCTL, ELCT)
            Store (One, LNKD)
            While (LNotEqual (LNKS, Zero))
            {
                Sleep (One)
            }

            SGPO (HLRS, One)
            Sleep (IHDT)
            SGPO (PWEN, Zero)
            Sleep (APDT)
            Store (Zero, \_SB.PCI0.LPCB.EC0.DGPE)
            Return (Zero)
        }

But I can't understand how to clean the code and compile.

Thanks in advance.
 

Attachments

  • DSDT.dsl
    974.9 KB · Views: 93
  • SSDT-3-INSYDE.dsl
    154.1 KB · Views: 115
  • SSDT-8-INSYDE.dsl
    20.2 KB · Views: 123
  • SSDT-12-INSYDE.dsl
    33.4 KB · Views: 95
Last edited:
Ok sorry, my specs are:
Mobo: HP 250 G5 (Clover)
CPU: i5-6200u
Graphics: HD520, 1920x1080

Please fix your profile as requested.

I found EC inside HG0F

Code:
        Method (HGOF, 0, Serialized)
        {
            If (LEqual (CCHK (Zero), Zero))
            {
                Return (Zero)
            }

            Store (Zero, ONOF)
            Store (LCTL, ELCT)
            Store (One, LNKD)
            While (LNotEqual (LNKS, Zero))
            {
                Sleep (One)
            }

            SGPO (HLRS, One)
            Sleep (IHDT)
            SGPO (PWEN, Zero)
            Sleep (APDT)
            Store (Zero, \_SB.PCI0.LPCB.EC0.DGPE)
            Return (Zero)
        }

But I can't understand how to clean the code and compile.

Thanks in advance.

That one line of EC related code needs to move to _REG.
It is covered in the example in post #1.

Make sure you understand the example before trying to apply to your own.
 
Please fix your profile as requested.



That one line of EC related code needs to move to _REG.
It is covered in the example in post #1.

Make sure you understand the example before trying to apply to your own.

I patched both SSDT-12 and DSDT after 2 days trying to understand this guide. I run DPCI Manager and I can confirm that the Radeon R5 is disabled. Battery duration increased by 40%. Thanks again for the guide.
 
Last edited:
Hi everyone, I got a problem with disabling my AMD radeon card. The problem is that Ioreg shows that AMD support is avalable at PCI0.RP09.GFX0, but as far as I know GFX0 is for integrated graphics, not for the discrete. _INI and _OFF methods are located in SSDT-5 and SSDT-0 aml. But the _REG in DSDT is not kind of attached to any of these devices, any solution from what excatly I should start?
 

Attachments

  • debug_8623.zip
    2.5 MB · Views: 85
Hi everyone, I got a problem with disabling my AMD radeon card. The problem is that Ioreg shows that AMD support is avalable at PCI0.RP09.GFX0, but as far as I know GFX0 is for integrated graphics, not for the discrete. _INI and _OFF methods are located in SSDT-5 and SSDT-0 aml. But the _REG in DSDT is not kind of attached to any of these devices, any solution from what excatly I should start?

Many vendors use the same name for IGPU and DGPU, but at different paths. Nothing unusual there.
_REG is found in EC scope, not expected in discrete device scope.
 
Thanks Rehabman, but how should I know which one to disable, and the paths under the methods quite different than those provided in this guide, can you please give hint where I should start?
 
Back
Top