Contribute
Register

Internal display won't come back from sleep in => 10.12.4

Status
Not open for further replies.
Some days playing with things and now I implemented CPU PM.
But, instead of come in and out among reboots, now the audio has completely gone. I used it for several weeks in the same form. I've patched and even not showing in "kextcache" and injected in DSDT (that's why it was disabled in CLOVER).

I don't know if it proves something, but here it is both kextcache output, before kext load and after kextload:
BEFORE:
bash-3.2# kextcache -i /
kext-dev-mode allowing invalid signature -67062 0xFFFFFFFFFFFEFA0A for kext AppleBacklightInjector.kext
kext-dev-mode allowing invalid signature -67062 0xFFFFFFFFFFFEFA0A for kext VoodooPS2Trackpad.kext
kext-dev-mode allowing invalid signature -67062 0xFFFFFFFFFFFEFA0A for kext VoodooPS2Mouse.kext
kext-dev-mode allowing invalid signature -67062 0xFFFFFFFFFFFEFA0A for kext VoodooPS2Keyboard.kext
kext-dev-mode allowing invalid signature -67062 0xFFFFFFFFFFFEFA0A for kext VoodooPS2Controller.kext
kext-dev-mode allowing invalid signature -67062 0xFFFFFFFFFFFEFA0A for kext RealtekRTL8111.kext
kext-dev-mode allowing invalid signature -67062 0xFFFFFFFFFFFEFA0A for kext CodecCommander.kext
kext-dev-mode allowing invalid signature -67013 0xFFFFFFFFFFFEFA3B for kext AppleMobileDevice.kext
kext-dev-mode allowing invalid signature -67062 0xFFFFFFFFFFFEFA0A for kext ACPIBatteryManager.kext
KernelCache ID: 0CF7F2C4D0EF22FC00FB610F2DD33A41

AFTER:
bash-3.2# kextload /System/Library/Extensions/AppleHDA.kext/
bash-3.2# kextcache -i /
kext-dev-mode allowing invalid signature -67062 0xFFFFFFFFFFFEFA0A for kext AppleBacklightInjector.kext
kext-dev-mode allowing invalid signature -67062 0xFFFFFFFFFFFEFA0A for kext VoodooPS2Trackpad.kext
kext-dev-mode allowing invalid signature -67062 0xFFFFFFFFFFFEFA0A for kext VoodooPS2Mouse.kext
kext-dev-mode allowing invalid signature -67062 0xFFFFFFFFFFFEFA0A for kext VoodooPS2Keyboard.kext
kext-dev-mode allowing invalid signature -67062 0xFFFFFFFFFFFEFA0A for kext VoodooPS2Controller.kext
kext-dev-mode allowing invalid signature -67062 0xFFFFFFFFFFFEFA0A for kext RealtekRTL8111.kext
kext-dev-mode allowing invalid signature -67062 0xFFFFFFFFFFFEFA0A for kext CodecCommander.kext
kext-dev-mode allowing invalid signature -67013 0xFFFFFFFFFFFEFA3B for kext AppleMobileDevice.kext
kext-dev-mode allowing invalid signature -67061 0xFFFFFFFFFFFEFA0B for kext AppleHDA.kext
kext-dev-mode allowing invalid signature -67062 0xFFFFFFFFFFFEFA0A for kext ACPIBatteryManager.kext
KernelCache ID: C2516E64A6C41CF5AF47D57BEC5E14F6

Do you see the AppleHDA is patched? But for some reason it is not loading anymore... and I tried removing DSDT patch and hotpatching via Clover...

Yes I did try to remove CPU PM to the previous state when Audio used to work, but no go anymore

The attached file if *before* I run kextload applehda, (or right after boot).

Your DSDT does not have "IRQ Fix" patch.
And your files in ACPI/origin are too old to compare against ACPI/patched.
 
That's great, the AppleHDA is loading again after patching "IRQ Fix".
I have update the extracted DSDTs and repatched it again - files attached.
Now I have CPU PM, Brightness control, Sound and everything else. The only problem stills being the original one: internal display shutdown (and don't return) after sleeping via LID (via menu the display wakes up normally).
 

Attachments

  • RehabMan.zip
    2.3 MB · Views: 76
That's great, the AppleHDA is loading again after patching "IRQ Fix".
I have update the extracted DSDTs and repatched it again - files attached.
Now I have CPU PM, Brightness control, Sound and everything else. The only problem stills being the original one: internal display shutdown (and don't return) after sleeping via LID (via menu the display wakes up normally).

ACPI not patched correctly... no accommodation for _OSI("Darwin") [OS Check Fix patch].
You might look at _WAK to see if there is any LID dependent code and try removing it (I notice it calls CHKL, as one example, and CHKL looks to be lid related).
In macOS we don't want DSDT doing anything special in the case of LID triggered sleep... it should only notify the system of LID events and let the system deal with in normally.
Also, make sure you implement backlight control so you can see if it a backlight issue.
Also, try to connect via remote desktop, or plug an external monitor so you can see if the system is entirely dead, or if it is just an internal display issue.
 
After several weeks, your tips helped me to solve the problem.
Actually it may be a native DSDT problem: I instrumented DSDT to debug with your ACPIDebug.kext... So I was able to see when I put to sleep via menu, LID return value was 1 for open and 0 for close, but when I put to sleep closing LID, the return value was always 0. So I decided to try re-run the routine to check lid, before returning the value to WAK
Original:
Device (LID0)
{
Name (_HID, EisaId ("PNP0C0D")) // _HID: Hardware ID
Name (LDRT, Zero)
Method (_LID, 0, NotSerialized) // _LID: Lid Status
{
If (ECOK)
{
UPDL ()
Store (Zero, LDRT)
}

Return (LIDS)
}
}
Change I did:

Device (LID0)
{
Name (_HID, EisaId ("PNP0C0D")) // _HID: Hardware ID
Name (LDRT, Zero)
Method (_LID, 0, NotSerialized) // _LID: Lid Status
{
If (ECOK)
{
UPDL ()
Store (Zero, LDRT)
}

UPDL ()
Return (LIDS)
}
}

Using the second "UPDL ()" solved completely the problem.

Thank you very much for you time and help.
 
After several weeks, your tips helped me to solve the problem.
Actually it may be a native DSDT problem: I instrumented DSDT to debug with your ACPIDebug.kext... So I was able to see when I put to sleep via menu, LID return value was 1 for open and 0 for close, but when I put to sleep closing LID, the return value was always 0. So I decided to try re-run the routine to check lid, before returning the value to WAK
Original:
Device (LID0)
{
Name (_HID, EisaId ("PNP0C0D")) // _HID: Hardware ID
Name (LDRT, Zero)
Method (_LID, 0, NotSerialized) // _LID: Lid Status
{
If (ECOK)
{
UPDL ()
Store (Zero, LDRT)
}

Return (LIDS)
}
}
Change I did:

Device (LID0)
{
Name (_HID, EisaId ("PNP0C0D")) // _HID: Hardware ID
Name (LDRT, Zero)
Method (_LID, 0, NotSerialized) // _LID: Lid Status
{
If (ECOK)
{
UPDL ()
Store (Zero, LDRT)
}

UPDL ()
Return (LIDS)
}
}

Using the second "UPDL ()" solved completely the problem.

Thank you very much for you time and help.

ECOK should be set (usually in _REG). Seems like the root of your problem (ECOK not being set) is somewhere else...
 
I forgot to mention I put some debug messages inside that "if" and ECOK was set all times.
 
I forgot to mention I put some debug messages inside that "if" and ECOK was set all times.

So, you're saying that calling UPDL twice is fixing the problem??
 
Yes, definitely.

I must mention if I have no external display, I would report the laptop never wakes from sleep... because it tries some seconds and see it does not have any display and goes back to sleep.
 
Yes, definitely.

I must mention if I have no external display, I would report the laptop never wakes from sleep... because it tries some seconds and see it does not have any display and goes back to sleep.

You should probably investigate a bit more about what UPDL does...
 
Status
Not open for further replies.
Back
Top