Jump to content

DSDT Latitude E7450


acquarius.13
 Share

Recommended Posts

  • Replies 58
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

On 9/9/2018 at 8:06 PM, viking1304 said:

1. Be sure that you can easily revert patched files that you got from Jake Lo

2. Go to preferences and add  http://raw.github.com/viking1304/E7450-DSDT-Patch/master to sources - that way you will not need to copy/paste syntax patch from here that Jake made. Name source as you like.

3. Click on Patch and apply [01][syn] Fix PARSEOP_IF/CLOSE_PAREN Errors from that new source (or manually copy/paste and apply fix)

4. Try to compile

5. If there is an error, click on that error, see lines which are causing the error and try to find appropriate patch from a list of [syn] patches in _RehabMan Laptop "folder"

6. Repeat until you successfully compile

7. Check other [syn] patches and see which one offer to patch something. Using those should be safe, but if anything fails, stick with those that are absolutely needed.

8. Now you are ready to start with real patching

9. Patch ONLY things that you ABSOLUTELY NEED, not everything you seen that can be patched

10. If you are brave enough, try to use your patched files, but be prepared to do what I wrote first

 

To be honest, I also just started researching this topic with similar goal as yours.

 

On 9/9/2018 at 8:31 PM, Hervé said:

Ok, this will be fairly easy...

 

-> 1st error shows: line 11613: syntax error, unexpected '}'

This is due to the line 11612 that contains only "Arg0"; it's incorrect and needs to be deleted

 

Once you've deleted that line, your DSDT should recompile Ok.

 

Hi guys,

 

after applying both your suggests (@viking1304 I applied only the first patch, up to point 3; @Hervé I deleted Arg0) I obtained a lot of warnings but DSDT.aml has been compiled successfully!

 

Some questions:

1. Should I patch and compile ALL the other SSDT-xxxx.aml files or is this one sufficient?

2. How do I rename properly my SSDT-xxxx.aml files in SSDT-0-1-7-8-10-11-PNLF.aml files to have a working SSDT?

 

Thanks,

 

Marco  

 

Link to comment
Share on other sites

4 hours ago, acquarius.13 said:

1. Should I patch and compile ALL the other SSDT-xxxx.aml files or is this one sufficient?

2. How do I rename properly my SSDT-xxxx.aml files in SSDT-0-1-7-8-10-11-PNLF.aml files to have a working SSDT?

 

1. You do not need to patch all SSDTs and you need to compile only those that you actually patched.

2. You do not need to rename any SSDT, but you might need to change your config in some cases. Different names are result of different BIOS and Clover versions. Newer Clover versions dump tables with more descriptive names. Dumps from older versions only had numbers. Tables from different BIOS versions on same machine can be different and can have different numbers.

 

If Drop OEM option is enabled, you need to have proper SortedOrder set, with names that match actual AML files in your Clover/Patched. Dropped tables are not needed here, nor in Clover/Patched. As you can see I am using same names as they were dumped.

 

1606622234_ScreenShot2018-09-25at6_54_14PM.png.c9f4eefcc8a63139b98358179c29d7a7.png

 

Since your laptop and BIOS are almost same as mine, let's cheat a little, but if you really would like to understand what you are doing, read everything you can find about DSDT/SSDT patching that you can find.

 

Backup your origin, so you do not need to dump files again if you mess something up.

 

You were probably got something very similar to this:

DSDT.aml
SSDT-0-SataTabl.aml
SSDT-1-Ther_Rvp.aml
SSDT-2-Cpu0Ist.aml
SSDT-3-CpuSsdt.aml
SSDT-4-LakeTiny.aml
SSDT-5-CppcTabl.aml
SSDT-6-Cpc_Tabl.aml
SSDT-7-SaSsdt.aml
SSDT-8-SgPch.aml
SSDT-9-DptfTabl.aml
SSDT-10-OptTabl.aml

SSDT-x3_0-SgPch.aml
SSDT-x3_1-ApIst.aml
SSDT-x3_2-Cpu0Cst.aml
SSDT-x3_3-ApCst.aml

 

You do not need files with SSDT-x in name, so you can delete those right away. If you have CpuSsdt and Cpu0Ist dropped in your config, you will not need those two tables at the end, but you might need them for proper decompile.

 

Use those refs (I added one by one, until I had 0 unresolved external methods):

External(MDBG, MethodObj, 1)
External(_GPE.MMTB, MethodObj, 0)
External(_SB.PCI0.LPCB.H_EC.ECWT, MethodObj, 2)
External(_SB.PCI0.LPCB.H_EC.ECRD, MethodObj, 1)
External(_SB.PCI0.LPCB.H_EC.ECMD, MethodObj, 1)
External(_SB.PCI0.PEG0.PEGP.SGPO, MethodObj, 2)
External(_SB.PCI0.GFX0.DD02._BCM, MethodObj, 1)
External(_SB.PCI0.SAT0.SDSM, MethodObj, 4)
External(_GPE.VHOV, MethodObj, 3)
External(_SB.PCI0.XHC.RHUB.TPLD, MethodObj, 2)
External(_SB_.PCI0.I2C0.SHUB.PS0X, MethodObj, 0)
External(_SB_.PCI0.I2C0.SHUB.PS3X, MethodObj, 0)
External(_SB_.PCI0.PAUD.PUAM, MethodObj, 0)
External(_SB_.PCI0.XHC_.DUAM, MethodObj, 0)
External(_SB_.TPM_.PTS_, MethodObj, 1)
External(INIR, MethodObj, 0)
External(PS0X, MethodObj, 0)
External(PS2X, MethodObj, 0)
External(PS3X, MethodObj, 0)

Decompile with refs and you will not have some errors that you had anymore.

iasl -da -dl -fe refs.txt DSDT.aml SSDT*.aml

You can add my E7450-DSDT-Patch repo if you want, since it might be easier for you to follow order of patches. Please keep in mind that I made that fork for my personal use and that I can reorder, change or remove some of those patches in the future. If that doesn't bother you, you are more than welcome to use it. Almost all of those patches are already in Reahabman's repo and you should easily find them there. I just slightly modified some of them and sort them as I wanted. But I also added some patches that are not there. 

 

Start patching in this order:

[01][syn] Fix PARSEOP_IF/CLOSE_PAREN Errors
[02][syn] Fix PARSEOP_ZERO Error (aggressive)
[04][syn] Rename _DSM methods to XDSM
[05][sys] Fix _WAK Arg0 v2
[06][sys] HPET Fix
[07][sys] SMBUS Fix
[08][sys] IRQ Fix
[09][sys] RTC Fix
[10][sys] OS Check Fix (Windows 8)
[11][sys] Fix Mutex with non-zero SyncLevel
[12][sys] Fix PNOT/PPNT
[13][sys] Add IMEI
[14][sys] Add MCHC
[15][igpu] Rename GFX0 to IGPU
[16][igpu] Rename B0D3 to HDAU
[17][igpu] HD 5500 graphics
[18][usb] USB3 _PRW 0x6D (instant wake)
[19][audio] Audio Layout 11
[20][misc] SDCard Reader

Apply first one and try to compile. If you didn't add my repo, copy/paste that one from Jakes post.

 

If you do not get any PARSEOP_ZERO errors, skip second one, otherwise apply that one too.This time you should not have that Arg0 error related to ADBG, because of the refs added from file.

 

Now it's time for first real patch [04][syn] Rename _DSM methods to XDSM.

 

I made [17][igpu] HD 5500 graphics and [19][audio] Audio Layout 11 because I am too lazy to apply those manually. First one adds HD 5500 reference to IGPU and second one changes Audio Layout to 11. Please read what Jake told me about those two and decide if you need them or not.

 

Since you do not have nVida, you do not need [21][gfx0] Disable/Enable on _WAK/_PTS (DSDT) nor [23][gfx0] Disable from _INI (SSDT).

 

[22][gfx0] Cleanup/Fix Errors (SSDT) is needed for some SSDT files in order to fix some errors (in my case it is needed for SSDT where nVidia should be disabled).

 

Link to comment
Share on other sites

I would like to check if I am correctly understood hotpatch equivalents of mentioned static patches (even my hotpatch config works fine as far as I can see). 

 

1. Rename _DSM methods to XDSM

Acpi/DSDT/Patches: _DSM -> XDSM - but I guess this one is needed only if some of AML files in patched folder or Clover fixes use _DSM methods (AddDTGP for example)

 

2. Fix _WAK Arg0 v2

Acpi/DSDT/Fixes: FixWAK - but probably not needed since 10.10.2 (based on comment in patch source)

 

3. IRQ Fix

Acpi/DSDT/Fixes: FixHPET

 

4. SMBUS Fix 

Acpi/DSDT/Fixes: FixSBUS - most likely not needed


5. RTC Fix

Acpi/DSDT/Fixes: FixRTC - most likely not needed

 

6. OS Check Fix

Acpi/DSDT/Fixes: FixDarwin

 

7. Fix Mutex with non-zero SyncLevel

Acpi/DSDT/Fixes: FixMutex

 

8. Add IMEI

Acpi/DSDT/Patches: HECI -> IMEI

 

9. Add MCHC

Acpi/DSDT/Fixes: AddMCHC - most likely not needed

 

10. Rename GFX0 to IGPU

Acpi/DSDT/Patches: GFX0 -> IGPU - most likely not needed

 

11. Rename B0D3 to HDAU

Acpi/DSDT/Patches: BD03 -> HDAU- most likely not needed

 

12.  USB3 _PRW 0x6D (instant wake)

Acpi/DSDT/Patches: GPRW->XPRW or UPRW->XPRW + SSDT-GPRW or SSDT-UPRW - but I do not see any of those in related hotpatch configs (nor Jake's nor Rehabman's)

 

13.  Disable/Enable on _WAK/_PTS (DSDT) and Disable from _INI (SSDT)

SSDT-DDGPU - but with  RP05 - to completely disable discrete nVidia

// For disabling the discrete GPU

#ifndef NO_DEFINITIONBLOCK
DefinitionBlock("", "SSDT", 2, "hack", "_DDGPU", 0)
{
#endif
    // Note: The _OFF path should be customized to correspond to your native ACPI
    // the two paths provided here should be considered examples only
    // it is best to edit the code such that only the single _OFF path that your ACPI
    // uses is included.
    External(_SB.PCI0.RP05.PEGP._OFF, MethodObj)
    

    Device(RMD1)
    {
        Name(_HID, "RMD10000")
        Method(_INI)
        {
            // disable discrete graphics (Nvidia/Radeon) if it is present
            If (CondRefOf(\_SB.PCI0.RP05.PEGP._OFF)) { \_SB.PCI0.RP05.PEGP._OFF() }
        }
    }
#ifndef NO_DEFINITIONBLOCK
}
#endif
//EOF

14. SD/MMC Card Reader

Devices/Arbitary - pci14e4,16bc on 01:00:00 (with all required properties from Jakes config)

 

15. Audio Layout 11 

Devices/Properties - layout-id for PciRoot(0x0)/Pci(0x1b,0x0)

 

16. Intel framebuffer patches

Devices/Properties - PciRoot(0x0)/Pci(0x2,0x0) properties in conjunction with WhateverGreen

 

Did I get anything wrong or missed something important?

 

EDIT:

 

Yes, I have AutoMerge enabled and Drop OEM disabled, I only have SSDT-PNLF and SSDT-PNLF in patched folder and I have some additional patches like Enable TRIM for SSD, change F%uT%04x to F%uTxxxx, MSR 0xE2 _xcpm_idle instant reboot, Disable panic kext logging on 10.14 release kernel in my config. That is very clear. I am just interested if there is something that I missed in static to hotpatch transition. 

Link to comment
Share on other sites

  • Moderators

You could take a look at mine here

I had tried #16 but for some reason it doesn't work for me, still getting FB panic, but with Rehabman's kextToPatch works which basically is the same

0x16260006,0x16260004/etc, 32MB BIOS, 19MB framebuffer, 9MB cursor bytes (credit RehabMan)

think I'll just stick with BIOS patch with EFI Shell, more reliable and the prefer way if you're not worry about bricking the system.

 

10 & 11, I think WEG fixes it, I'm not sure, I still enable the renaming for both

As for 12, I have created USB kext with FBPatcher.app

Link to comment
Share on other sites

Framebuffer patch works just fine here, but I do not have Inject Intel nor ig-platform-id as advised in WEG Intel FAQ:

 

Quote

 

Turn off all graphics injections in Clover:
- config.plist/Graphics/Inject/ATI=NO
- config.plist/Graphics/Inject/Intel=NO
- config.plist/Graphics/Inject/NVidia=NO

- config.plist/Graphics/ig-platform-id=
- config.plist/Devices/FakeID/IntelGFX=

 

 

WEG should fix renames (at least GFX0 -> IGPU), but with next statement in mind, I would left renames in config:

 

Quote

You may need to include Clover GFX0 -> IGPU rename for other kexts or ACPI patching that require it

 

I am not sure that USBPower.kext (renamed to USBPorts.kext in latest FBP versions) is proper replacement for USB3 _PRW 0x6D. I do not see anything related to IOPowerManagement nor power states there.

 

If you check for example this part of info.plist from that kext:

					<key>SSP1</key>
					<dict>
						<key>UsbConnector</key>
						<integer>3</integer>
						<key>port</key>
						<data>
						DAAAAA==
						</data>
					</dict>

you will see that it just sets port to 0x0c (DAAAA== is 0c 00 00 00 in hex, and when you reverse that, you will get 0x0c) and UsbConnector to 3. As far as I know UsbConnector is actually USB type. Basically it just sets SSP1 to be USB 3 on port 0x0c. It is similar for all other ports included in kext. As I mentioned before, if you export this patch from latest version of FBPatcher (1.4.4) it will be named USBPorts.kext, not USBPower.kext like in older versions. I guess they figured out that power in name might be confusing.

 

This looks more appropriate:

 

Quote

SSDT-GPRW.dsl and SSDT-UPRW.dsl This SSDT is used in conjuction with the GPRW->XPRW or UPRW->XPRW patch. Used together this SSDT can fix "instant-wake" by disabling "wake on USB". It overrides the _PRW package return for GPE indexes 0x0d or 0x6d. Potential companion patches are provided in hotpatch/config.plist

 

Based on this part of my DSDT (that is patched with USB3 _PRW 0x6D)

 

    Scope (_SB.PCI0.EHC1)
    {
        Method (_PRW, 0, NotSerialized)  // _PRW: Power Resources for Wake
        {
            Store (UPRW (), Local0)

I guess I should rename UPRW -> XPRW and to compile SSDT-UPRW.dsl.

 

I think I will try this right away.

 

Link to comment
Share on other sites

Hi guys,

 

I used my patched SSDT on a secondary SSD. It actually works, but bluetooth, audio and brightness are gone..

 

Maybe I did something wrong in patching procedure. I can try to do it again following also your suggests in this topic.

 

I will keep you updated 

 

Thanks,

 

Marco

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share


×
×
  • Create New...