I am trying decrease the amount of DSDT pacthes and use your guide for patching external GPU. I followed your guide but some parts of your guide didn't work for me. I will appreciate if you can comment.
For SSDT-0.dsl:
"Remove _PSS placeholders" (new patch)
I tried this but when I apply this patch I get an error. Before the patch I have below
Code:
Method (PSDD, 0, NotSerialized)
{
Name (PWRV, Package (0x06)
{
0x80000000,
0x80000000,
0x80000000,
0x80000000,
0x80000000,
0x80000000
})
If (\ECON) {}
Return (PWRV)
}
After the patch I have
Code:
Name (PWRV, )
If (\ECON) {}
Return (PWRV)
Which doesn’t compile.
Therefore I skipped this patch.
I checked which files has codes that needs to be patched
$ grep -B3 _ADR.*0x00020000 *.dsl
Code:
DSDT.dsl-
DSDT.dsl- Device (GFX0)
DSDT.dsl- {
DSDT.dsl: Name (_ADR, 0x00020000) // _ADR: Address
$ grep -l GFX0 *.dsl
$ grep -l Method.*_DSM *.dsl
Code:
DSDT.dsl
SSDT-7.dsl
SSDT-8.dsl
SSDT-8.dsl is managing TPM device. It is Trusted Platform Module I think it is not related to Mac so I will not include it as well.
SSD-7.dsl has GPU code
I applied
"Rename _DSM methods to XDSM"
"Rename GFX0 to IGPU"
"Cleanup/Fix Errors (SSDT)"
$ grep -l Method.*_OFF *.dsl
SSDT-7.dsl
So off method is SSDT-7.dsl
$ grep -l Method.*_INI *.dsl
DSDT.dsl
SSDT-7.dsl
So ini methods are in DSDT and SSDT-7
Code:
Method (_INI, 0, NotSerialized) // _INI: Initialize
{
Store (Zero, \_SB.PCI0.PEG0.PEGP._ADR)
}
Here is the off method from SSDT-7
Code:
Method (_OFF, 0, Serialized) // _OFF: Power Off
{
Store (LCTL, ELCT)
Store (SVID, HVID)
Store (SDID, HDID)
Store (One, LNKD)
While (LLess (LNKS, Zero))
{
Sleep (One)
}
\_SB.PCI0.PEG0.PEGP.PWRD ()
Notify (\_SB.PCI0.PEG0, Zero)
}
There doesn’t seem to have any EC access. I also checked
Code:
\_SB.PCI0.PEG0.PEGP.PWRD ()
Method (PWRD, 0, Serialized)
{
Store (Zero, \_SB.PCI0.PEG0.PEGP.PO17)
Store (Zero, \_SB.PCI0.PEG0.PEGP.PO35)
}
It also doesn’t have any EC access. So I added _OFF to _INI of PEGP
Code:
Method (_INI, 0, NotSerialized) // _INI: Initialize
{
Store (Zero, \_SB.PCI0.PEG0.PEGP._ADR)
_OFF()
}
I saved this file and passed to DSDT. After necessary patches I did following patches to disable external GPU
I added a method to my DSDT
Code:
Method (POFF, 0, NotSerialized)
{
External(\_SB.PCI0.PEG0.PEGP._OFF, MethodObj)
\_SB.PCI0.PEG0.PEGP._OFF ()
}
Added following patches to _INI of IGPU, _WAK and _PTS
Code:
//Patched IGPU
Device (IGPU)
{
Name (_ADR, 0x00020000) // _ADR: Address
Method (_INI, 0, NotSerialized) // _INI: Initialize
{
POFF ()
ISTP (0x0A, Zero)
Store (ISTP (0x07, Zero), Local0)
Or (Local0, 0x80000000, BCLP)
}
Patched WAK
Method (_WAK, 1, Serialized) // _WAK: Wake
{
POFF()
If (LOr(LLess(Arg0,1),LGreater(Arg0,5))) { Store(3,Arg0) }
My DSDT also has following patches applied
"IRQ Fix"
"SMBUS Fix"
"OS Check Fix (Windows 7)"
"Add IMEI"
"Add MCHC"
"RTC Fix"
"Fix _WAK Arg0 v2"
"Rename GFX0 to IGPU"
"Audio Layout 3"
"Battery Patches"
"EDID Patch"
"Brightness Fix"
"HPET Fix"
"Shutdown Fix"
"6-Series USB"
Could you comment whether my DSDT and SSDT files are patched correctly or whether I am missing any patches? According to your comments, I will write a guide for Sony S Series laptop. Thanks to your help on batteries and function keys, I think Sony S series laptops will have very stable macOS support.
Code:
$ kextstat|grep -y acpiplat
13 2 0xffffff7f82b58000 0x66000 0x66000 com.apple.driver.AppleACPIPlatform (5.0) 867C81BE-EA01-3A65-89F4-06D78E6514CA <12 11 7 6 5 4 3 1>
$ kextstat|grep -y appleintelcpu
24 0 0xffffff7f82764000 0x2b000 0x2b000 com.apple.driver.AppleIntelCPUPowerManagement (219.0.0) 9E383328-0713-3AD3-BC4A-3A2A5646FEE5 <7 6 5 4 3 1>
33 0 0xffffff7f8275f000 0x3000 0x3000 com.apple.driver.AppleIntelCPUPowerManagementClient (219.0.0) B802638B-251C-3602-BA8C-001F87228765 <7 6 5 4 3 1>
I also attached my Clover folder and IORegistryExplorer file.