Jump to content

SSDT_EC patching edge case?


Dr. Monkey
 Share

5 posts in this topic

Recommended Posts

Hi All,   
I have been working on getting my machine to boot with OpenCore. The machine details are:  


HP EliteDesk 800 G3 SFF

Intel i5-7500 Kaby Lake processor  
Intel HD 630 graphics(disabled)  
AMD RX550 4g LP GPU (enabled, made by Yeston)  
Intel Q270 Motherboard

​

I think I am pretty close to success, but my boot process hangs just after   
apfs\_module\_start:1689 load com.apple.filesystem.apfs v1412.120.2, apfs-1412,120.2,2020/05/26  


After a lot of research I think it may have to do with how I am trying to patch my EC.  The guide asks you to locate PNP0c09 in your DSDT to determine the correct section to patch.  It goes on to say if you have two, then you can identify them by which one has the \_STA method.  My problem is that both of my PNP0c09 entries have this method so Im at a bit of a loss on how to patch it.   


Here is an excerpt from my decompiled DSDT.aml  


            Device (LPCB)
            {
                Name (_ADR, 0x001F0000)  // _ADR: Address
                Method (_DSM, 4, Serialized)  // _DSM: Device-Specific Method
                {
                    If (PCIC (Arg0))
                    {
                        Return (PCID (Arg0, Arg1, Arg2, Arg3))
                    }
    
                    Return (Buffer (One)
                    {
                         0x00                                           
                    })
                }
    
                Device (H_EC)
                {
                    Name (_HID, EisaId ("PNP0C09"))  // _HID: Hardware ID
                    Name (_UID, One)  // _UID: Unique ID
                    Method (_STA, 0, NotSerialized)  // _STA: Status
                    {
                        Store (0x03, ^^^GFX0.CLID)
                        Return (Zero)
                    }
                }
    
                Device (EC0)
                {
                    Name (_HID, EisaId ("PNP0C09"))  // _HID: Hardware ID
                    Name (_UID, One)  // _UID: Unique ID
                    Name (_GPE, 0x6E)  // _GPE: General Purpose Events
                    Method (_STA, 0, NotSerialized)  // _STA: Status
                    {
                        Return (0x0F)
                    }
    
             ...
    and here is how I have tried to patch it. 

    DefinitionBlock ("", "SSDT", 2, "ACDT", "SsdtEC", 0x00001000)
    {
        External (_SB_.PCI0.LPCB, DeviceObj)    // (from opcode)
        External (_SB_.PCI0.LPCB.EC0_, DeviceObj)    // (from opcode)
        External (_SB_.PCI0.LPCB.H_EC, DeviceObj)    // (from opcode)
    
        Scope (\_SB.PCI0.LPCB.EC0)
        {
            Method (_STA, 0, NotSerialized)  // _STA: Status
            {
                If (_OSI ("Darwin"))
                {
                    Return (Zero)
                }
                Else
                {
                    Return (0x0F)
                }
            }
        }
    
        Scope (\_SB.PCI0.LPCB.H_EC)
        {
            Method (_STA, 0, NotSerialized)  // _STA: Status
            {
                If (_OSI ("Darwin"))
                {
                    Return (Zero)
                }
                Else
                {
                    Return (0x0F)
                }
            }
        }
    
        Scope (\_SB)
        {
            Device (USBX)
            {
                Name (_ADR, Zero)  // _ADR: Address
                Method (_DSM, 4, NotSerialized)  // _DSM: Device-Specific Method
                {
                    If (LEqual (Arg2, Zero))
                    {
                        Return (Buffer (One)
                        {
                             0x03                                           
                        })
                    }
    
                    Return (Package (0x08)
                    {
                        "kUSBSleepPowerSupply", 
                        0x13EC, 
                        "kUSBSleepPortCurrentLimit", 
                        0x0834, 
                        "kUSBWakePowerSupply", 
                        0x13EC, 
                        "kUSBWakePortCurrentLimit", 
                        0x0834
                    })
                }
            }
    
            Scope (\_SB.PCI0.LPCB)
            {
                Device (EC)
                {
                    Name (_HID, "ACID0001")  // _HID: Hardware ID
                    Method (_STA, 0, NotSerialized)  // _STA: Status
                    {
                        If (_OSI ("Darwin"))
                        {
                            Return (0x0F)
                        }
                        Else
                        {
                            Return (Zero)
                        }
                    }
                }
            }
        }
    }

I have also tried it without the entry for H\_EC and found no further success.  The attached photo shows where I am getting stuck.  Does anyone have any idea how to best patch this EC,  or if this looks correct, any idea what else I should be looking at?

Link to comment
Share on other sites

Thanks for the reply.  I tested that,  and I get the same behavior as I did with my SSDT-EC patch.  This leads me to believe that there is something else in play. 
I’ve tried to use the debug version of OpenCore, but when I do, I get a fatal error before I even reach the boot device selection screen.  
To maybe give me somewhere else to look, do you happen to know what should be the next lines after [pci configuration end]?

 

SPL is the ZFS driver, and I don’t think is part of the problem since I can boot in clover with the same kexts loaded

7CFC3801-1F0B-46A0-99A0-936D7BC9556D.jpeg

Link to comment
Share on other sites

I wanted to come back to close the loop in case anyone stumbles across this thread.  I could not get any SSDT-EC with any combination of H_EC and EC0 rewrites to work, whether using SSDTTime or doing it manually.  What I ended up having to do in the end was use a patch to rename EC0 to EC and turn off any EC patching.  It seems that in my case, something about providing the streamlined EC that the custom SSDT provides was causing an issue.  Though I don't see the replies any more for some reason, thanks to anyone that replied with suggestions.

Link to comment
Share on other sites

  • 1 month later...
  • 2 months later...

@Dr. Monkey - long time no talk.  we haven't spoken since my Latitude E6410 Mojave solution (still perfectly running Catalina 10.15.7.03).  I am installing Catalina on an HP EliteDesk 800 G3 Mini (hoping to duplicate my success with the 800 G4 Mini).  I'm not ready to post my G3 Mini solution yet (only have to resolve wake), but I did find something that fixed a boot problem I was having.  Do a web search for "FIX for boot hangs after BIOS update (ACPI PATCH)".  Does that ACPI patch fix your boot problem?

 

If it does, have you found a fix for wake with your Q270 / Kabylake rig?  My G3 Mini has Q270 / i7-7700T.   It appears to sleep fine (flashing power light), but it wakes to a dark screen with no disk activity and I can't remote into it.  Only way to recover from wake is to force shutdown with the power button.

Edited by tonyx86
Link to comment
Share on other sites

 Share

×
×
  • Create New...