Contribute
Register

Can't patch acpi to disable discrete graphics

Status
Not open for further replies.
Joined
Jun 25, 2017
Messages
28
Motherboard
Gigabyte Z390 UD
CPU
i5-9600K
Graphics
UHD 630
Mac
  1. MacBook Pro
Mobile Phone
  1. Android

Attachments

  • origin.zip
    63.5 KB · Views: 119
I'm trying to disable the discrete graphics on my laptop with this guide: https://www.tonymacx86.com/threads/guide-disabling-discrete-graphics-in-dual-gpu-laptops.163772/
If I search for the _INI and the _OFF methods with grep, in the list there are DSDT, SSDT-3 and SSDT-6.
I can't find the _INI method in any of them, I can only find the _OFF method. What should I do?
(Extracted with Clover and used the refs.txt method)

_OFF is in SSDT-6 (no EC references). ACPI path is _SB.PCI0.PEG0.PEGP. _OFF calls PGOF.
PGOF is in SSDT-3 (no EC references).
There is no _INI at _SB.PCI0.PEG0.PEGP.
So, you only need to add an _INI to SSDT-6, just before _OFF, as in:
Code:
        Method(_INI) { _OFF() }
        Method (_OFF, 0, Serialized)  // _OFF: Power Off
        {
...

Then put patched SSDT-6.aml in ACPI/patched (AutoMerge=true, DropOem=false, no SortedOrder).
As per guide:
https://www.tonymacx86.com/threads/guide-patching-laptop-dsdt-ssdts.152573/

This is also the simplest situation for hotpatch. Would require only this SSDT:
Code:
DefinitionBlock("", "SSDT", 2, "hack", "DGPU", 0)
{
    External(_SB.PCI0.PEG0.PEGP._OFF, MethodObj)
    Method(_SB.PCI0.PEG0.PEGP._INI) { _OFF() }
}

Read post #3 in the hotpatch guide for details:
https://www.tonymacx86.com/threads/guide-using-clover-to-hotpatch-acpi.200137/
 
So, you only need to add an _INI to SSDT-6, just before _OFF, as in:
Then put patched SSDT-6.aml in ACPI/patched (AutoMerge=true, DropOem=false, no SortedOrder).
As per guide:
https://www.tonymacx86.com/threads/guide-patching-laptop-dsdt-ssdts.152573/
Didn't worked

This is also the simplest situation for hotpatch. Would require only this SSDT:
Read post #3 in the hotpatch guide for details:
https://www.tonymacx86.com/threads/guide-using-clover-to-hotpatch-acpi.200137/
This one worked, now I can boot the pc. Thanks!
 
For future reference this is how I fixed my GL504GW (2018/19). No matter how I called _SB.PCI0.PEG0.PEGP._OFF, it would always return AE_NOT_FOUND in Console log.
It turns out that PegSsdt wasn't loading, due to duplicate _E4A and _E4B methods - Looking at the logs, there'd be a "[_E4A]...AE_ALRADY_EXISTS line - I patched them out in SSDT-PegSsdt, which allowed it to load, giving me access to the _OFF method which I called from an injected _INI.
 
Status
Not open for further replies.
Back
Top