Jump to content

Disabling NVIDIA Optimus card on all laptops


Whit3Spirit
 Share

345 posts in this topic

Recommended Posts

Thanks for clarifying. 

 

I'm going to try just to call just _PS3, never tried it before. 

 

I'll have a look at the original DSDT and SSDT's for my system soon, create patches for it, to automate it. This also makes users with the same model less dependent on my provided DSDT. 

Personally i like to do the edits by hand, instead of using a patcher.

 

Thanks again.

 

EDIT: Just calling _PS3 activates the card again. Any ideas? 

Link to comment
Share on other sites

Thanks for clarifying. 

 

I'm going to try just to call just _PS3, never tried it before. 

 

I'll have a look at the original DSDT and SSDT's for my system soon, create patches for it, to automate it. This also makes users with the same model less dependent on my provided DSDT.

It takes effort to create an automatic patching system, but it pays off the first time you use it yourself after a BIOS upgrade, hardware change, or BIOS settings change. See my u430 and envy repo's for examples: https://github.com/RehabMan/HP-Envy-DSDT-Patch, https://github.com/RehabMan/Lenovo-U430-Touch-DSDT-Patch.

 

Personally i like to do the edits by hand, instead of using a patcher.

So do I... except when I'm the person who made the patching scripts (which is always).

 

EDIT: Just calling _PS3 activates the card again. Any ideas?

Try calling just _OFF.

 

If it still requires both _PS3 and _OFF then in order to find out why would require debugging it. My ACPIDebug.kext is useful for such tasks: https://github.com/RehabMan/OS-X-ACPI-Debug

  • Like 1
Link to comment
Share on other sites

_OFF works from the _INI method, did not work on _REG and _WAK before, strange enough.

I'll have a look when creating the patches, the ACPIDebug.kext did a great job for my brightness FN keys.  

 

I had a look at the examples in the past, learned a lot from it, but still not fully understand it. So it will be trial and error :)

Link to comment
Share on other sites

_OFF works from the _INI method, did not work on _REG and _WAK before, strange enough.

I believe in some cases _REG is called too late... So calling from _INI (any _INI) is better.

 

The only time you need to call from _REG is if the method accesses the EC. The EC cannot be accessed until _REG is called with params that indicate the EC is ready (refer to ACPI spec).

 

I've even seen cases where the code in _OFF had to be split. Moving the code that accesses the EC to be executed from _REG, and keeping the rest of the non-EC code in _OFF to be executed from _INI.

Link to comment
Share on other sites

guys, i'm stuck with this, i cannot shut down that piece of c**p without issue.. I extracted all ssdts and dsdt, find _OFF method in SSDT and call it in _INI method. Not working. Try to patch dsdt with rehabman's _REG patch. It worked but my fan running at full speed all the time. i posted here, clean DSDT, SSDT that contains the _OFF method, also my plist. 

Also trying to call _PS3 method instead _OFF (suggest by RehabMan) but nothing happens, nvidia card still enable.

ssdt dsdt.zip

Link to comment
Share on other sites

guys, i'm stuck with this, i cannot shut down that piece of c**p without issue.. I extracted all ssdts and dsdt, find _OFF method in SSDT and call it in _INI method. Not working. Try to patch dsdt with rehabman's _REG patch. It worked but my fan running at full speed all the time. i posted here, clean DSDT, SSDT that contains the _OFF method, also my plist. 

Also trying to call _PS3 method instead _OFF (suggest by RehabMan) but nothing happens, nvidia card still enable.

Hi,

 

Merged the PEGP device from the SSDT in to the DSDT and added the methods to turn the card off to the _REG/_WAK/_PTS methods. 

 

Not a permanent/easy solution, use the information provided by RehabMan in the other topic to come to a more permanent solution.

DSDT.zip

Link to comment
Share on other sites

Hi,

 

Merged the PEGP device from the SSDT in to the DSDT and added the methods to turn the card off to the _REG/_WAK/_PTS methods. 

 

Not a permanent/easy solution, use the information provided by RehabMan in the other topic to come to a more permanent solution.

your solution also work but the fan problems remains

Link to comment
Share on other sites

How would one do this, is there a documentation or guide that explains it?

Requires ability to code. And knowledge of ACPI spec.

 

_OFF method (SSDT-6.dsl, post #285):

        Method (_OFF, 0, Serialized)  // _OFF: Power Off
        {
            \_SB.PCI0.LPCB.EC0.SPIN (0x09, 0x04, Zero)
            If (LNotEqual (GPRF, One))
            {
                Store (VGAR, VGAB)
                Store (SIDR, SIDB)
            }

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

            Store (0x02, AFES)
            \_SB.PCI0.LPCB.EC0.SGTH (Zero)
            SGPO (HLRS, One)
            SGPO (PWEN, Zero)
            Return (Zero)
        }
Without doing a lot of investigation you can see the parts which depend on EC. Further investigation may be necessary. Although with a quick glance at SGPO, it look s to be "EC free"...

 

Edited _OFF method (commenting parts which are clearly EC related):

        Method (_OFF, 0, Serialized)  // _OFF: Power Off
        {
            /* \_SB.PCI0.LPCB.EC0.SPIN (0x09, 0x04, Zero) */
            If (LNotEqual (GPRF, One))
            {
                Store (VGAR, VGAB)
                Store (SIDR, SIDB)
            }

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

            Store (0x02, AFES)
            /* \_SB.PCI0.LPCB.EC0.SGTH (Zero) */
            SGPO (HLRS, One)
            SGPO (PWEN, Zero)
            Return (Zero)
        }
Add code in _REG (where _OFF was being called):

            \_SB.PCI0.LPCB.EC0.SPIN (0x09, 0x04, Zero)
            \_SB.PCI0.LPCB.EC0.SGTH (Zero)
This stuff gets tricky...
  • Like 1
Link to comment
Share on other sites

tried to follow your guide and this solution but when i edited _OFF method from SSDT and compile, gave me 9 errors

No idea without seeing the resulting file. I'm pretty good at this stuff, but not capable of magic.

  • Like 1
Link to comment
Share on other sites

you're pretty damn good at this stuff, i'm trying to learn.

 

dsdt and ssdt modified

Errors were present in your file before you made the changes.

 

And they are caused by incorrect disassembly. Collect all DSDT/SSDT and place them in a single folder (with .AML extension), then:

iasl -da -dl *.aml
Resolve all errors before making any changes.
Link to comment
Share on other sites

Errors were present in your file before you made the changes.

 

And they are caused by incorrect disassembly. Collect all DSDT/SSDT and place them in a single folder (with .AML extension), then:

iasl -da -dl *.aml
Resolve all errors before making any changes.

 

i notice that all errors are MXMX related. can i delete all MXMX method?

Link to comment
Share on other sites

i notice that all errors are MXMX related. can i delete all MXMX method?

It is best to start with a correct disassembly, then remove/fix code only as required.

Link to comment
Share on other sites

last 2 errors, how can i solve these?

 

Method (WMMX, 3, NotSerialized)

            {
                CreateDWordField (Arg2, Zero, FUNC)
                If (LEqual (FUNC, 0x4D53445F))
                {
                    If (LGreaterEqual (SizeOf (Arg2), 0x1C))
                    {
                        CreateField (Arg2, Zero, 0x80, MUID)
                        CreateDWordField (Arg2, 0x10, REVI)
                        CreateDWordField (Arg2, 0x14, SFNC)
                        CreateField (Arg2, 0xE0, 0x20, XRG0)
                        If (LNotEqual (Arg1, 0x10))
                        {
                            Return (\_SB.PCI0.GFX0._DSM (MUID, REVI, SFNC, XRG0))
                        }
                    }
                }
                Else
                {
                    If (LEqual (FUNC, 0x584D584D))
                    {
                        CreateDWordField (Arg2, 0x08, XRG1)
                        If (LEqual (Arg1, 0x10))
                        {
                            Return (\_SB.PCI0.GFX0.MXMX (XRG1))
                        }
                        Else
                        {
                            Return (\_SB.PCI0.PEG0.PEGP.MXMX (XRG1))
                        }
                    }
 
objects does not exist: \_SB.PCI0.GFX0.MXMX, \_SB.PCI0.PEG0.PEGP.MXMX)
Link to comment
Share on other sites

last 2 errors, how can i solve these?

 

Method (WMMX, 3, NotSerialized)

            {

                CreateDWordField (Arg2, Zero, FUNC)

                If (LEqual (FUNC, 0x4D53445F))

                {

                    If (LGreaterEqual (SizeOf (Arg2), 0x1C))

                    {

                        CreateField (Arg2, Zero, 0x80, MUID)

                        CreateDWordField (Arg2, 0x10, REVI)

                        CreateDWordField (Arg2, 0x14, SFNC)

                        CreateField (Arg2, 0xE0, 0x20, XRG0)

                        If (LNotEqual (Arg1, 0x10))

                        {

                            Return (\_SB.PCI0.GFX0._DSM (MUID, REVI, SFNC, XRG0))

                        }

                    }

                }

                Else

                {

                    If (LEqual (FUNC, 0x584D584D))

                    {

                        CreateDWordField (Arg2, 0x08, XRG1)

                        If (LEqual (Arg1, 0x10))

                        {

                            Return (\_SB.PCI0.GFX0.MXMX (XRG1))

                        }

                        Else

                        {

                            Return (\_SB.PCI0.PEG0.PEGP.MXMX (XRG1))

                        }

                    }

 

objects does not exist: \_SB.PCI0.GFX0.MXMX, \_SB.PCI0.PEG0.PEGP.MXMX)

Well, if you deleted MXMX, now you have to fix or remove all code that references it.

 

If you want me to look at what you have, post all native DSDT/SSDT files extracted from Linux.

Link to comment
Share on other sites

 Share

×
×
  • Create New...