Contribute
Register

[Guide] Disabling discrete graphics in dual-GPU laptops

@the-braveknight & @RehabMan
in case the laptop needs it Enabled on _PTS & Disabled on _WAK:
In my case the Original WAK is renamed to ZWAK and copied as patched for Battery Status on lets say SSDT-BAT and PTS to ZPTS so i have it on SSDT-PTS with:
Code:
// Overriding _PTS

DefinitionBlock("", "SSDT", 2, "T440P", "PTS", 0)
{
    External(ZPTS, MethodObj)
    External(_SB.PCI0.XHC.PMEE, FieldUnitObj)
    // In DSDT, native _PTS is renamed to ZPTS
    // As a result, calls to this method land here.
    Method(_PTS, 1)
    {
        ZPTS(Arg0)
        If (5 == Arg0)
        {
            // fix "auto start after shutdown if a USB Device is Plugged In"
            \_SB.PCI0.XHC.PMEE = 0
        }
    }
}
//EOF
Is it ok to have the _PTS / _WAK on separate SSDTs, will that cause problems for Discrete GPU or its fine like this:
Code:
// Overriding _PTS

DefinitionBlock("", "SSDT", 2, "T440P", "PTS", 0)
{
    External(ZPTS, MethodObj)
    External(_SB.PCI0.XHC.PMEE, FieldUnitObj)
    External(\_SB.PCI0.PEG.VID._ON, MethodObj)
    // In DSDT, native _PTS is renamed to ZPTS
    // As a result, calls to this method land here.
    Method(_PTS, 1)
    {
        If (CondRefOf(\_SB.PCI0.PEG.VID._ON)) { \_SB.PCI0.PEG.VID._ON() }
        ZPTS(Arg0)
        If (5 == Arg0)
        {
            // fix "auto start after shutdown if a USB Device is Plugged In"
            \_SB.PCI0.XHC.PMEE = 0
        }
    }
}
//EOF
And the same with _OFF on WAK on SSDT-BAT

You can only have one \_PTS and one \_WAK in the entire ACPI set.
If you want _PTS/_WAK to do multiple things, you'll need to have all the code you need in a single place.

You will notice my SSDT-PTSWAK.dsl in my hotpatch example repo does a variety of things, optionally, based on SSDT-Config.dsl settings.
 
Last edited:
You can only have one \_PTS and one \_WAK in the entire ACPI set.
If you want _PTS/_WAK to do multiple things, you'll need to have all the code you need in a single place.

You will notice my SSDT-PTSWAK.dsl in my hotpatch example repo does a variety of things, optionally, based on SSDT-Config.dsl settings.
Yes, i mean ofc i would have one PTS & One WAK, but i just wanted to know if this SSDT-PTS is correct like this if i need the Enable _PTS and disable on _WAK patching "just in case laptop does have problems with sleep"
Code:
// Overriding _PTS

DefinitionBlock("", "SSDT", 2, "T440P", "PTS", 0)
{
    External(ZPTS, MethodObj)
    External(_SB.PCI0.XHC.PMEE, FieldUnitObj)
    External(\_SB.PCI0.PEG.VID._ON, MethodObj)
    // In DSDT, native _PTS is renamed to ZPTS
    // As a result, calls to this method land here.
    Method(_PTS, 1)
    {
        If (CondRefOf(\_SB.PCI0.PEG.VID._ON)) { \_SB.PCI0.PEG.VID._ON() }
        ZPTS(Arg0)
        If (5 == Arg0)
        {
            // fix "auto start after shutdown if a USB Device is Plugged In"
            \_SB.PCI0.XHC.PMEE = 0
        }
    }
}
//EOF
Is this SSDT-PTS correct with the added DiscreteGPU code ?
 
Yes, i mean ofc i would have one PTS & One WAK, but i just wanted to know if this SSDT-PTS is correct like this if i need the Enable _PTS and disable on _WAK patching "just in case laptop does have problems with sleep"
Code:
// Overriding _PTS

DefinitionBlock("", "SSDT", 2, "T440P", "PTS", 0)
{
    External(ZPTS, MethodObj)
    External(_SB.PCI0.XHC.PMEE, FieldUnitObj)
    External(\_SB.PCI0.PEG.VID._ON, MethodObj)
    // In DSDT, native _PTS is renamed to ZPTS
    // As a result, calls to this method land here.
    Method(_PTS, 1)
    {
        If (CondRefOf(\_SB.PCI0.PEG.VID._ON)) { \_SB.PCI0.PEG.VID._ON() }
        ZPTS(Arg0)
        If (5 == Arg0)
        {
            // fix "auto start after shutdown if a USB Device is Plugged In"
            \_SB.PCI0.XHC.PMEE = 0
        }
    }
}
//EOF
Is this SSDT-PTS correct with the added DiscreteGPU code ?
This looks OK. But you should at least verify that you do need the PEG device enabled at _PTS and disabled at _WAK before doing that.
 
This looks OK. But you should at least verify that you do need the PEG device enabled at _PTS and disabled at _WAK before doing that.
The only reason im saying this is because if i recall correctly, with another guy on my T440P guide i think i tried to disable his DGPU and he had problems when his laptop screen was staying black and then if im correct i remember Rehabman replied with:
you might need to enable on _PTS and Disable _WAK to avoid sleep problems.

So just in case i will upload for him two version and if the first causes him sleep problems, pts / wak version shouldn't.

Also just a verification question before proceeding:
if im correct having it enabled on _PTS & disabled on _WAK doesn't also require a rename/replace pattern since its on PTS/WAK and they are already renamed & replaced, correct ?
 
Yes, i mean ofc i would have one PTS & One WAK, but i just wanted to know if this SSDT-PTS is correct like this if i need the Enable _PTS and disable on _WAK patching "just in case laptop does have problems with sleep"
Code:
// Overriding _PTS

DefinitionBlock("", "SSDT", 2, "T440P", "PTS", 0)
{
    External(ZPTS, MethodObj)
    External(_SB.PCI0.XHC.PMEE, FieldUnitObj)
    External(\_SB.PCI0.PEG.VID._ON, MethodObj)
    // In DSDT, native _PTS is renamed to ZPTS
    // As a result, calls to this method land here.
    Method(_PTS, 1)
    {
        If (CondRefOf(\_SB.PCI0.PEG.VID._ON)) { \_SB.PCI0.PEG.VID._ON() }
        ZPTS(Arg0)
        If (5 == Arg0)
        {
            // fix "auto start after shutdown if a USB Device is Plugged In"
            \_SB.PCI0.XHC.PMEE = 0
        }
    }
}
//EOF
Is this SSDT-PTS correct with the added DiscreteGPU code ?

It looks ok, but you will need a _WAK replacement also to call _OFF.
Since one requires the other, you might as well put _PTS and _WAK in the same file.

Also just a verification question before proceeding:
if im correct having it enabled on _PTS & disabled on _WAK doesn't also require a rename/replace pattern since its on PTS/WAK and they are already renamed & replaced, correct ?

To do any sort of "Rename/Replace" scenario, you need the "Rename" part of the pattern, of course.

--

Note: I should probably move these off-topic posts to the hotpatch guide...
 
It looks ok, but you will need a _WAK replacement also to call _OFF.
Since one requires the other, you might as well put _PTS and _WAK in the same file.
WAK is replaced on SSDT-BAT as needed for Battery Status Hotpatch, therefore i placed the code to call _OFF on _WAK.
I didn't merge them since they do get merged into SSDT-T440P via hotpatch #include method.
To do any sort of "Rename/Replace" scenario, you need the "Rename" part of the pattern, of course.
Yes, _WAK is renamed to ZWAK since i put the patched _WAK into SSDT-BAT as it was needed to be patched for Battery Status via Hotpatch (which i also added the _OFF call there).
Same goes for PTS, it's renamed to ZPTS which i use for XPMEE & the _ON call for DiscreteGPU on _PTS.
 
WAK is replaced on SSDT-BAT as needed for Battery Status Hotpatch, therefore i placed the code to call _OFF on _WAK.
I didn't merge them since they do get merged into SSDT-T440P via hotpatch #include method.

Good idea to add the _PTS code to the same SSDT.
 
I desactivate nvidia graphics, but i have sleep/wake problems. I use your hotpatches. Why i can patch this without my dsdt and ssdt?
 

Attachments

  • EFI.zip
    5.7 MB · Views: 100
Back
Top