Contribute
Register

[Guide] Using Clover to "hotpatch" ACPI

hi sir RehabMan
my Laptop Acer Aspire ES1-572-321G 7th gen i3 7100U

Question about Sleep are not working.

a few days ago I put one question for my laptop. my laptop sleep not working. Rehab sir I try again extract my dsdt and ssdt with patchmatics and refs.txt, and my dsdt and ssdt errors self removed and no need to fixing errors. sleep awake are fully working no graphics glitches. and I also use your kabylake config.plist download from GitHub, Already 10.12.6 are native supported. Thanks for these,

sir now I do it any Supplementary changes in my dsdt and ssdt or not ?

Off-topic.
This thread is specific to ACPI hotpatch.

Open a separate thread, attach problem reporting files as per FAQ.
 
Hi!

I'm trying to fix an instant wake problem by removing _PRW. It seems to work after removing _PRW for GLAN, XDCHI and HDAS, but I can no longer wake the machine using the keyboard/mouse (which, as far as I understand, is very much expected). With _PRW removed/disabled, could the machine only be woken with the power button?

Thanks
 
Hi!

I'm trying to fix an instant wake problem by removing _PRW. It seems to work after removing _PRW for GLAN, XDCHI and HDAS, but I can no longer wake the machine using the keyboard/mouse (which, as far as I understand, is very much expected). With _PRW removed/disabled, could the machine only be woken with the power button?

Thanks

Typically after patching _PRW, you can wake via power button or the PS2 keyboard only.
 
There is no SSDT-DGPU.aml in the files you attached (check for yourself).


SSDT-4 is poorly named. As mentioned, it should be SSDT.aml.



With pure hotpatch the AutoMerge setting doesn't matter... both true and false will have the same result. Because with hotpatch there are no *patched* ACPI files in ACPI/patched (only add-on SSDTs are present). AutoMerge=true has an effect only when there are patched SSDTs in ACPI/patched.



Must use File Save As, format: ACPI Machine Language Binary. You should not expect renaming a .dsl file (text file) to .aml to work. An .aml file must be in AML format.
Thank You Rehabman sir, that worked beautifully well
 
Would it help if we break the EC code in _OFF then add it to _REG? That way we wouldn't have to replace the whole _OFF method. Is that possible? For example we can rename the relevant EC0 to EX0 or so...

EDIT: Sorry this was supposed to go to the hotpatch thread.
 
Last edited:
Would it help if we break the EC code in _OFF then add it to _REG? That way we wouldn't have to replace the whole _OFF method. Is that possible? For example we can rename the relevant EC0 to EX0 or so...

EDIT: Sorry this was supposed to go to the hotpatch thread.

I don't know what you mean by "break the EC code in _OFF".
 
I don't know what you mean by "break the EC code in _OFF".
Well the problem is that _OFF is being called before EC is initialized, right? I was thinking if it's possible to rename the relevant EC code to something arbitrary such that the renamed EC is never reachable?

For example, we can change this in the _OFF method:
Code:
Method (_OFF, 0, Serialized)
{
...
    If (\ECON)
    {
        Store (Zero, \_SB.PCI0.LPCB.EC0.GATY)
    }
...
}

To:

Code:
Method (_OFF, 0, Serialized)
{
...
    If (\ECON)
    {
        Store (Zero, \_SB.PCI0.LPCB.EX0.GATY)
    }
...
}

Is this possible?
 
Well the problem is that _OFF is being called before EC is initialized, right?

Normally, _OFF is not called at all.
But when we patch _INI to call _OFF it is called at the time all _INI methods are executed.
Which is *before* EC._REG is called, which means that any EC access must be removed from _OFF or anything _OFF calls. Such code is then moved to _REG where it is safe to execute.

I was thinking if it's possible to rename the relevant EC code to something arbitrary such that the renamed EC is never reachable?

You could replace all the EC related code with Noop op-codes, but the patching for that would be rather unwieldy.
Better to replace the _OFF method entirely (using "rename/replace" pattern).

For example, we can change this in the _OFF method:
Code:
Method (_OFF, 0, Serialized)
{
...
    If (\ECON)
    {
        Store (Zero, \_SB.PCI0.LPCB.EC0.GATY)
    }
...
}

To:

Code:
Method (_OFF, 0, Serialized)
{
...
    If (\ECON)
    {
        Store (Zero, \_SB.PCI0.LPCB.EX0.GATY)
    }
...
}

Is this possible?

Well... if the code was actually coded with the ECON conditional, assuming ECON is *not* in the EC, nothing need be patched in the _OFF as the EC related code will not execute (it is being protected with the If (ECON) conditional).

And if the Store-op to GATY that you meantion was actually being executed (for some reason ECON is non-zero), changing it to EX0.GATY will not work. It would cause ACPI abort, as the EX0.GATY will not be found in ACPI namespace. The execution of the _OFF method would stop at that point and further code after it will not be executed.
 
Back
Top