Add dGPU disabling guide

This commit is contained in:
Mykola Grymalyuk
2020-04-02 13:47:54 -06:00
parent 4f02652cf0
commit 8acedca403
13 changed files with 175 additions and 3 deletions

View File

@@ -9,5 +9,8 @@ DefinitionBlock("", "SSDT", 2, "Slav", "GPI0", 0)
{
GPEN = One
}
Else
{
}
}
}

Binary file not shown.

Binary file not shown.

View File

@@ -35,7 +35,6 @@ DefinitionBlock ("", "SSDT", 2, "Slav", "AMDGPU", 0x00001000)
}
Else
{
Return (Zero)
}
}
}

Binary file not shown.

View File

@@ -0,0 +1,50 @@
/*
* Disable discrete graphics (c) Bumblebee-Project
* >> https://github.com/Bumblebee-Project/Bumblebee/wiki/ACPI-for-Developers#acpi-and-the-nvidia-card
* ---
* Important: Change all ACPI paths accordingly.
* Credit to Maemo for original idea and midi1996 for the SSDT
*/
DefinitionBlock ("", "SSDT", 2, "MAEMO", "NoHybGfx", 0x00000000)
{
External (_SB_.PCI0.PEG0.PEGP._DSM, MethodObj) // dGPU ACPI Path
External (_SB_.PCI0.PEG0.PEGP._PS3, MethodObj) // dGPU ACPI Path
Device (NHG1)
{
Name (_HID, "NHG10000") // _HID: Hardware ID
Method (_STA, 0, NotSerialized) // _STA: Status
{
If (_OSI ("Darwin"))
{
Return (0x0F)
}
Else
{
Return (Zero)
}
}
Method (_INI, 0, NotSerialized) // _INI: Initialize
{
If (_OSI ("Darwin"))
{
// If conditional methods reference creation successful
If ((CondRefOf (\_SB.PCI0.PEG0.PEGP._DSM) && CondRefOf (\_SB.PCI0.PEG0.PEGP._PS3)))
{
// Card Off Request
\_SB.PCI0.PEG0.PEGP._DSM (ToUUID ("a486d8f8-0bda-471b-a72b-6042a6b5bee0"), 0x0100, 0x1A, Buffer (0x04)
{
0x01, 0x00, 0x00, 0x03
})
// Card Off
\_SB.PCI0.PEG0.PEGP._PS3 ()
}
}
Else
{
}
}
}
}

Binary file not shown.

View File

@@ -0,0 +1,35 @@
/* Based off of Rebaman's work:
* https://github.com/RehabMan/OS-X-Clover-Laptop-Config/blob/master/hotpatch/SSDT-DDGPU.dsl
*/
DefinitionBlock("", "SSDT", 2, "Slav", "dGPU-Off", 0)
{
External(_SB.PCI0.PEG0.PEGP._OFF, MethodObj) // ACPI Path of dGPU
Device(RMD1)
{
Name(_HID, "RMD10000") // _HID: Hardware ID
Method (_STA, 0, NotSerialized) // _STA: Status
{
If (_OSI ("Darwin"))
{
Return (0x0F)
}
Else
{
Return (Zero)
}
}
Method(_INI)
{
If (_OSI ("Darwin"))
{
// disable discrete graphics (Nvidia/Radeon) if it is present
If (CondRefOf(\_SB.PCI0.PEG0.PEGP._OFF)) { \_SB.PCI0.PEG0.PEGP._OFF() }
}
Else
{
}
}
}
}

Binary file not shown.