Contribute
Register

[Guide] Disabling discrete graphics in dual-GPU laptops

Sniki

Moderator
Joined
Jan 5, 2016
Messages
2,316
Motherboard
HP Elite 8300 SFF
CPU
i7-3770
Graphics
HD 3000 | GTX 1650 LP
Mac
  1. MacBook Pro
Mobile Phone
  1. iOS
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 ?
 

the-braveknight

Moderator
Joined
Nov 24, 2015
Messages
1,221
Motherboard
Lenovo Legion Y520 (Clover)
CPU
i7-7700HQ
Graphics
HD 630 (1920x1080) + Nvidia GTX 1060
Mac
  1. MacBook Air
Mobile Phone
  1. iOS
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.
 

Sniki

Moderator
Joined
Jan 5, 2016
Messages
2,316
Motherboard
HP Elite 8300 SFF
CPU
i7-3770
Graphics
HD 3000 | GTX 1650 LP
Mac
  1. MacBook Pro
Mobile Phone
  1. iOS
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 ?
 

RehabMan

Moderator
Joined
May 3, 2012
Messages
184,623
Motherboard
Intel DH67BL
CPU
i7-2600K
Graphics
HD 3000
Mac
  1. MacBook Air
Mobile Phone
  1. iOS
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...
 

Sniki

Moderator
Joined
Jan 5, 2016
Messages
2,316
Motherboard
HP Elite 8300 SFF
CPU
i7-3770
Graphics
HD 3000 | GTX 1650 LP
Mac
  1. MacBook Pro
Mobile Phone
  1. iOS
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.
 

RehabMan

Moderator
Joined
May 3, 2012
Messages
184,623
Motherboard
Intel DH67BL
CPU
i7-2600K
Graphics
HD 3000
Mac
  1. MacBook Air
Mobile Phone
  1. iOS
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.
 
Joined
Jul 17, 2015
Messages
419
Motherboard
MSI GE62-2QC
CPU
5700HQ/HM87
Graphics
Intel HD5600 + GTX960M (1920 x 1080)
Mobile Phone
  1. iOS
I desactivate nvidia graphics, but i have sleep/wake problems. I use your hotpatches. Why i can patch this without my dsdt and ssdt?
 

RehabMan

Moderator
Joined
May 3, 2012
Messages
184,623
Motherboard
Intel DH67BL
CPU
i7-2600K
Graphics
HD 3000
Mac
  1. MacBook Air
Mobile Phone
  1. iOS
Joined
Jul 17, 2015
Messages
419
Motherboard
MSI GE62-2QC
CPU
5700HQ/HM87
Graphics
Intel HD5600 + GTX960M (1920 x 1080)
Mobile Phone
  1. iOS

Attachments

  • EFI.zip
    5.7 MB · Views: 68
Top