Contribute
Register

[Guide] Patching LAPTOP DSDT/SSDTs

****

Just a little note here.... Updated MaciASL, iasl, and patchmatic today.
 
Thanks to your guide, I was able to create a DSDT that enables (at least so far) proper sleep on my system.
I used the following patches:
  1. Shutdown Fix v2
  2. Fix _WAK Arg0 v2
  3. Shutdown restart (might not be needed)
  4. USB3 _PRW 0x6D Skylake (instant wake)
  5. Manually copied the patched _PRW method of XHCI to CNVW, since this was listed as wake reason before
My question: Could I put those patches into an add-on SSDT and thus safe myself from having to re-extract the DSDT after a new BIOS?
 
My question: Could I put those patches into an add-on SSDT and thus safe myself from having to re-extract the DSDT after a new BIOS?

Hotpatch is covered in the hotpatch guide, linked from post #1.
 
Hi RehabMan,

I tried to patch my DSDT in order to get sleep working properly, but I always get the following error message when disassembling:

Code:
ACPI Error: ^PEG0.PEGP.LCD0: Path has too many parent prefixes (^) (20180427/nsaccess-568)
ACPI Error: AE_NOT_FOUND, During name lookup/catalog (20180427/psobject-371)
ACPI Error: AE_ALREADY_EXISTS, During name lookup/catalog (20180427/psobject-371)

The first 4 lines of my DSDT.aml look like this:

Code:
// Firmware Error (ACPI): Failure looking up [^PEG0.PEGP.LCD0], AE_NOT_FOUND (20180427/dswload-498)
// // Invalid external declaration at AML offset 0x6f9 (see bz1397).
// Firmware Error (ACPI): Failure looking up [^PEG0.PEGP.LCD0], AE_NOT_FOUND (20180427/dswload2-468)
// // Invalid external declaration at AML offset 0x6f9 (see bz1397).

Full debug information attached, could you please have a look on why I get the LCD0 error, and how to fix it?

Thanks in advance!
 

Attachments

  • debug_25648.zip
    2.3 MB · Views: 67
Hi RehabMan,

I tried to patch my DSDT in order to get sleep working properly, but I always get the following error message when disassembling:

Code:
ACPI Error: ^PEG0.PEGP.LCD0: Path has too many parent prefixes (^) (20180427/nsaccess-568)
ACPI Error: AE_NOT_FOUND, During name lookup/catalog (20180427/psobject-371)
ACPI Error: AE_ALREADY_EXISTS, During name lookup/catalog (20180427/psobject-371)

The first 4 lines of my DSDT.aml look like this:

Code:
// Firmware Error (ACPI): Failure looking up [^PEG0.PEGP.LCD0], AE_NOT_FOUND (20180427/dswload-498)
// // Invalid external declaration at AML offset 0x6f9 (see bz1397).
// Firmware Error (ACPI): Failure looking up [^PEG0.PEGP.LCD0], AE_NOT_FOUND (20180427/dswload2-468)
// // Invalid external declaration at AML offset 0x6f9 (see bz1397).

Full debug information attached, could you please have a look on why I get the LCD0 error, and how to fix it?

Thanks in advance!

Just comment/remove those lines the go about fixing the other problems.
 
Thx for the quick reply.

I tried that before, but when trying to save the file, I get the following error message:

Code:
29270, 6086, Not a control method, cannot invoke (^^^GFX0.DD1F is a Device)

Really don't know what that means, and where to fix it.
 

Attachments

  • maciasl-error.png
    maciasl-error.png
    76.4 KB · Views: 137
Thx for the quick reply.

I tried that before, but when trying to save the file, I get the following error message:

Code:
29270, 6086, Not a control method, cannot invoke (^^^GFX0.DD1F is a Device)

Really don't know what that means, and where to fix it.

Remove the parenthesis. eg. "^^^GFX0.DD1F ()" -> "^^^GFX0.DD1F"
 
Worked out perfectly, now I patched my DSDT, and finally got sleep working on my Clevo.

Can't thank you enough!!!
 
My hack reboot when I wake the system from sleep, I followed the steps you provided to patch my DSDT file but whatever method I use to patch my DSDT SystemMemory never matched with original DSDT extracted through Clover.

Code:
Idriss-iMac-Pro:ACPI eddie$ diff origin/DSDT.dsl patched/DSDT.dsl|grep -y SystemMemory
<         OperationRegion (TBNV, SystemMemory, 0x7888DF98, 0x0003)
>         OperationRegion (TBNV, SystemMemory, 0x7888DF98, 0x03)
<             OperationRegion (PCFG, SystemMemory, Local0, 0x01)
>             OperationRegion (PCFG, SystemMemory, Local0, One)
<             OperationRegion (PCFG, SystemMemory, Local0, 0x01)
>             OperationRegion (PCFG, SystemMemory, Local0, One)
 

Attachments

  • debug_4588.zip
    3.3 MB · Views: 76
Hi i tried to follow this guide for patching DSDT, but cannot have the fils disassembled correctly :

Extracted with Clover F4. Looked for duplicate files but no files have same size.
If i try to disassemble with refs.txt, i get this :

Code:
Jo-MAC:ACPIOrigin jo-mac$ iasl -da -dl -fe refs.txt DSDT.aml SSDT*.aml

Intel ACPI Component Architecture
ASL+ Optimizing Compiler/Disassembler version 20180427(RM)
Copyright (c) 2000 - 2018 Intel Corporation

Input file DSDT.aml, Length 0x411D2 (266706) bytes
ACPI: DSDT 0x0000000000000000 0411D2 (v02 GBT    GBTUACPI 01072009 INTL 20160527)
External object resolution file SSDT-x1_6-HwpLvt.aml
Input file SSDT-x1_6-HwpLvt.aml, Length 0x724 (1828) bytes
ACPI: SSDT 0x0000000000000000 000724 (v02 PmRef  HwpLvt   00003000 INTL 20160527)
Pass 1 parse of [SSDT]
Pass 2 parse of [SSDT]
External object resolution file SSDT-x1_5-ApHwp.aml
Input file SSDT-x1_5-ApHwp.aml, Length 0x317 (791) bytes
ACPI: SSDT 0x0000000000000000 000317 (v02 PmRef  ApHwp    00003000 INTL 20160527)
Pass 1 parse of [SSDT]
Pass 2 parse of [SSDT]
External object resolution file SSDT-x1_4-Cpu0Hwp.aml
Input file SSDT-x1_4-Cpu0Hwp.aml, Length 0x10A (266) bytes
ACPI: SSDT 0x0000000000000000 00010A (v02 PmRef  Cpu0Hwp  00003000 INTL 20160527)
Pass 1 parse of [SSDT]
Pass 2 parse of [SSDT]
External object resolution file SSDT-x1_3-ApCst.aml
Input file SSDT-x1_3-ApCst.aml, Length 0x30A (778) bytes
ACPI: SSDT 0x0000000000000000 00030A (v02 PmRef  ApCst    00003000 INTL 20160527)
Pass 1 parse of [SSDT]
Pass 2 parse of [SSDT]
External object resolution file SSDT-x1_2-Cpu0Cst.aml
Input file SSDT-x1_2-Cpu0Cst.aml, Length 0x400 (1024) bytes
ACPI: SSDT 0x0000000000000000 000400 (v02 PmRef  Cpu0Cst  00003001 INTL 20160527)
Pass 1 parse of [SSDT]
Pass 2 parse of [SSDT]
External object resolution file SSDT-x1_1-ApIst.aml
Input file SSDT-x1_1-ApIst.aml, Length 0xEF1 (3825) bytes
ACPI: SSDT 0x0000000000000000 000EF1 (v02 PmRef  ApIst    00003000 INTL 20160527)
Pass 1 parse of [SSDT]
Pass 2 parse of [SSDT]
External object resolution file SSDT-x1_0-Cpu0Ist.aml
Input file SSDT-x1_0-Cpu0Ist.aml, Length 0x5BE (1470) bytes
ACPI: SSDT 0x0000000000000000 0005BE (v02 PmRef  Cpu0Ist  00003000 INTL 20160527)
Pass 1 parse of [SSDT]
Pass 2 parse of [SSDT]
External object resolution file SSDT-9-OptTabl.aml
Input file SSDT-9-OptTabl.aml, Length 0x1E57 (7767) bytes
ACPI: SSDT 0x0000000000000000 001E57 (v01 OptRef OptTabl  00001000 INTL 20160527)
Pass 1 parse of [SSDT]
Pass 2 parse of [SSDT]
External object resolution file SSDT-8-SgPeg.aml
Input file SSDT-8-SgPeg.aml, Length 0xAE (174) bytes
ACPI: SSDT 0x0000000000000000 0000AE (v02 SgRef  SgPeg    00001000 INTL 20160527)
Pass 1 parse of [SSDT]
Pass 2 parse of [SSDT]
External object resolution file SSDT-7-TbtTypeC.aml
Input file SSDT-7-TbtTypeC.aml, Length 0x1082 (4226) bytes
ACPI: SSDT 0x0000000000000000 001082 (v02 INTEL  TbtTypeC 00000000 INTL 20160527)
Pass 1 parse of [SSDT]
Pass 2 parse of [SSDT]
External object resolution file SSDT-6-PtidDevc.aml
Input file SSDT-6-PtidDevc.aml, Length 0x27DE (10206) bytes
ACPI: SSDT 0x0000000000000000 0027DE (v02 INTEL  PtidDevc 00001000 INTL 20160527)
Pass 1 parse of [SSDT]
Pass 2 parse of [SSDT]
External object resolution file SSDT-5-xh_cfhd4.aml
Input file SSDT-5-xh_cfhd4.aml, Length 0x294C (10572) bytes
ACPI: SSDT 0x0000000000000000 00294C (v02 INTEL  xh_cfhd4 00000000 INTL 20160527)
Pass 1 parse of [SSDT]
Pass 2 parse of [SSDT]
External object resolution file SSDT-4-Ther_Rvp.aml
Input file SSDT-4-Ther_Rvp.aml, Length 0xF9E (3998) bytes
ACPI: SSDT 0x0000000000000000 000F9E (v02 INTEL  Ther_Rvp 00001000 INTL 20160527)
Pass 1 parse of [SSDT]
Pass 2 parse of [SSDT]
External object resolution file SSDT-3-PegSsdt.aml
Input file SSDT-3-PegSsdt.aml, Length 0x1FC7 (8135) bytes
ACPI: SSDT 0x0000000000000000 001FC7 (v02 PegSsd PegSsdt  00001000 INTL 20160527)
Pass 1 parse of [SSDT]
Pass 2 parse of [SSDT]
External object resolution file SSDT-2-SaSsdt.aml
Input file SSDT-2-SaSsdt.aml, Length 0x31C7 (12743) bytes
ACPI: SSDT 0x0000000000000000 0031C7 (v02 SaSsdt SaSsdt   00003000 INTL 20160527)
Pass 1 parse of [SSDT]
Pass 2 parse of [SSDT]
External object resolution file SSDT-1-CpuSsdt.aml
Input file SSDT-1-CpuSsdt.aml, Length 0x17D5 (6101) bytes
ACPI: SSDT 0x0000000000000000 0017D5 (v02 CpuRef CpuSsdt  00003000 INTL 20160527)
Pass 1 parse of [SSDT]
Pass 2 parse of [SSDT]
External object resolution file SSDT-0-SataTabl.aml
Input file SSDT-0-SataTabl.aml, Length 0x334 (820) bytes
ACPI: SSDT 0x0000000000000000 000334 (v01 SataRe SataTabl 00001000 INTL 20160527)
Pass 1 parse of [SSDT]
Pass 2 parse of [SSDT]
refs.txt: Importing method external (1 arguments) MDBG
refs.txt: Importing method external (0 arguments) _GPE.MMTB
refs.txt: Importing method external (2 arguments) _SB.PCI0.LPCB.H_EC.ECWT
refs.txt: Importing method external (1 arguments) _SB.PCI0.LPCB.H_EC.ECRD
refs.txt: Importing method external (1 arguments) _SB.PCI0.LPCB.H_EC.ECMD
refs.txt: Importing method external (2 arguments) _SB.PCI0.PEG0.PEGP.SGPO
refs.txt: Importing method external (1 arguments) _SB.PCI0.GFX0.DD02._BCM
refs.txt: Importing method external (4 arguments) _SB.PCI0.SAT0.SDSM
refs.txt: Importing method external (3 arguments) _GPE.VHOV
refs.txt: Importing method external (2 arguments) _SB.PCI0.XHC.RHUB.TPLD
iASL: Segmentation Fault
iASL: Terminating

If i try to disassemble without refs.txt i get this :

Code:
Jo-MAC:ACPIOrigin jo-mac$ iasl -da -dl DSDT.aml SSDT*.aml

Intel ACPI Component Architecture
ASL+ Optimizing Compiler/Disassembler version 20180427(RM)
Copyright (c) 2000 - 2018 Intel Corporation

Input file DSDT.aml, Length 0x411D2 (266706) bytes
ACPI: DSDT 0x0000000000000000 0411D2 (v02 GBT    GBTUACPI 01072009 INTL 20160527)
External object resolution file SSDT-x1_6-HwpLvt.aml
Input file SSDT-x1_6-HwpLvt.aml, Length 0x724 (1828) bytes
ACPI: SSDT 0x0000000000000000 000724 (v02 PmRef  HwpLvt   00003000 INTL 20160527)
Pass 1 parse of [SSDT]
Pass 2 parse of [SSDT]
External object resolution file SSDT-x1_5-ApHwp.aml
Input file SSDT-x1_5-ApHwp.aml, Length 0x317 (791) bytes
ACPI: SSDT 0x0000000000000000 000317 (v02 PmRef  ApHwp    00003000 INTL 20160527)
Pass 1 parse of [SSDT]
Pass 2 parse of [SSDT]
External object resolution file SSDT-x1_4-Cpu0Hwp.aml
Input file SSDT-x1_4-Cpu0Hwp.aml, Length 0x10A (266) bytes
ACPI: SSDT 0x0000000000000000 00010A (v02 PmRef  Cpu0Hwp  00003000 INTL 20160527)
Pass 1 parse of [SSDT]
Pass 2 parse of [SSDT]
External object resolution file SSDT-x1_3-ApCst.aml
Input file SSDT-x1_3-ApCst.aml, Length 0x30A (778) bytes
ACPI: SSDT 0x0000000000000000 00030A (v02 PmRef  ApCst    00003000 INTL 20160527)
Pass 1 parse of [SSDT]
Pass 2 parse of [SSDT]
External object resolution file SSDT-x1_2-Cpu0Cst.aml
Input file SSDT-x1_2-Cpu0Cst.aml, Length 0x400 (1024) bytes
ACPI: SSDT 0x0000000000000000 000400 (v02 PmRef  Cpu0Cst  00003001 INTL 20160527)
Pass 1 parse of [SSDT]
Pass 2 parse of [SSDT]
External object resolution file SSDT-x1_1-ApIst.aml
Input file SSDT-x1_1-ApIst.aml, Length 0xEF1 (3825) bytes
ACPI: SSDT 0x0000000000000000 000EF1 (v02 PmRef  ApIst    00003000 INTL 20160527)
Pass 1 parse of [SSDT]
Pass 2 parse of [SSDT]
External object resolution file SSDT-x1_0-Cpu0Ist.aml
Input file SSDT-x1_0-Cpu0Ist.aml, Length 0x5BE (1470) bytes
ACPI: SSDT 0x0000000000000000 0005BE (v02 PmRef  Cpu0Ist  00003000 INTL 20160527)
Pass 1 parse of [SSDT]
Pass 2 parse of [SSDT]
External object resolution file SSDT-9-OptTabl.aml
Input file SSDT-9-OptTabl.aml, Length 0x1E57 (7767) bytes
ACPI: SSDT 0x0000000000000000 001E57 (v01 OptRef OptTabl  00001000 INTL 20160527)
Pass 1 parse of [SSDT]
Pass 2 parse of [SSDT]
External object resolution file SSDT-8-SgPeg.aml
Input file SSDT-8-SgPeg.aml, Length 0xAE (174) bytes
ACPI: SSDT 0x0000000000000000 0000AE (v02 SgRef  SgPeg    00001000 INTL 20160527)
Pass 1 parse of [SSDT]
Pass 2 parse of [SSDT]
External object resolution file SSDT-7-TbtTypeC.aml
Input file SSDT-7-TbtTypeC.aml, Length 0x1082 (4226) bytes
ACPI: SSDT 0x0000000000000000 001082 (v02 INTEL  TbtTypeC 00000000 INTL 20160527)
Pass 1 parse of [SSDT]
Pass 2 parse of [SSDT]
External object resolution file SSDT-6-PtidDevc.aml
Input file SSDT-6-PtidDevc.aml, Length 0x27DE (10206) bytes
ACPI: SSDT 0x0000000000000000 0027DE (v02 INTEL  PtidDevc 00001000 INTL 20160527)
Pass 1 parse of [SSDT]
Pass 2 parse of [SSDT]
External object resolution file SSDT-5-xh_cfhd4.aml
Input file SSDT-5-xh_cfhd4.aml, Length 0x294C (10572) bytes
ACPI: SSDT 0x0000000000000000 00294C (v02 INTEL  xh_cfhd4 00000000 INTL 20160527)
Pass 1 parse of [SSDT]
Pass 2 parse of [SSDT]
External object resolution file SSDT-4-Ther_Rvp.aml
Input file SSDT-4-Ther_Rvp.aml, Length 0xF9E (3998) bytes
ACPI: SSDT 0x0000000000000000 000F9E (v02 INTEL  Ther_Rvp 00001000 INTL 20160527)
Pass 1 parse of [SSDT]
Pass 2 parse of [SSDT]
External object resolution file SSDT-3-PegSsdt.aml
Input file SSDT-3-PegSsdt.aml, Length 0x1FC7 (8135) bytes
ACPI: SSDT 0x0000000000000000 001FC7 (v02 PegSsd PegSsdt  00001000 INTL 20160527)
Pass 1 parse of [SSDT]
Pass 2 parse of [SSDT]
External object resolution file SSDT-2-SaSsdt.aml
Input file SSDT-2-SaSsdt.aml, Length 0x31C7 (12743) bytes
ACPI: SSDT 0x0000000000000000 0031C7 (v02 SaSsdt SaSsdt   00003000 INTL 20160527)
Pass 1 parse of [SSDT]
Pass 2 parse of [SSDT]
External object resolution file SSDT-1-CpuSsdt.aml
Input file SSDT-1-CpuSsdt.aml, Length 0x17D5 (6101) bytes
ACPI: SSDT 0x0000000000000000 0017D5 (v02 CpuRef CpuSsdt  00003000 INTL 20160527)
Pass 1 parse of [SSDT]
Pass 2 parse of [SSDT]
External object resolution file SSDT-0-SataTabl.aml
Input file SSDT-0-SataTabl.aml, Length 0x334 (820) bytes
ACPI: SSDT 0x0000000000000000 000334 (v01 SataRe SataTabl 00001000 INTL 20160527)
Pass 1 parse of [SSDT]
Pass 2 parse of [SSDT]
Pass 1 parse of [DSDT]
ACPI Error: AE_ALREADY_EXISTS, During name lookup/catalog (20180427/psobject-371)

I can only disassemble by removing the -da option, but then files are not correctly disassembled, right?
Any idea?
Thanks
 

Attachments

  • ACPI Clover Extract.zip
    70.7 KB · Views: 62
Back
Top