Contribute
Register

Lid sleep issue | apple menu sleep or scheduled sleep works fine

Joined
Oct 20, 2015
Messages
232
Motherboard
Xiaomi Air 13
CPU
Intel i5-6200u
Graphics
Intel HD 520
Whenever I try to sleep when closing the lid, the laptop screen goes off but it does not go into sleep mode (no blinking LED). When I wake the laptop by opening the lid, all USB devices stop working until a reboot.

Sleep from Apple menu or scheduled sleep works fine.

Problem reporting
Code:
MBP-van-Mattias:~ mattiaspelgrims$ kextstat|grep -y acpiplat
   13    2 0xffffff7f82d8d000 0x60000    0x60000    com.apple.driver.AppleACPIPlatform (5.0) 867C81BE-EA01-3A65-89F4-06D78E6514CA <12 11 7 6 5 4 3 1>
MBP-van-Mattias:~ mattiaspelgrims$ kextstat|grep -y appleintelcpu
MBP-van-Mattias:~ mattiaspelgrims$ kextstat|grep -y applelpc
MBP-van-Mattias:~ mattiaspelgrims$ kextstat|grep -y applehda
   89    1 0xffffff7f8111a000 0x1d000    0x1d000    com.apple.driver.AppleHDAController (278.56) CFB0D0AE-F09A-3660-8F95-7A02FD5FBF07 <88 87 67 12 7 6 5 4 3 1>
  113    0 0xffffff7f812bc000 0xb4000    0xb4000    com.apple.driver.AppleHDA (999.1.1fc1) A4EB06C9-A40A-39EF-9C4A-D7F23DB9A2F9 <112 89 88 87 72 67 6 5 4 3 1>
Code:
MBP-van-Mattias:~ mattiaspelgrims$ sudo touch /System/Library/Extensions && sudo kextcache -u /
Password:
Password:
kext-dev-mode allowing invalid signature -67062 0xFFFFFFFFFFFEFA0A for kext USBInjectAll.kext
kext-dev-mode allowing invalid signature -67062 0xFFFFFFFFFFFEFA0A for kext SATA-100-series-unsupported.kext
kext-dev-mode allowing invalid signature -67062 0xFFFFFFFFFFFEFA0A for kext NullEthernet.kext
kext-dev-mode allowing invalid signature -67062 0xFFFFFFFFFFFEFA0A for kext IntelBacklight.kext
kext-dev-mode allowing invalid signature -67062 0xFFFFFFFFFFFEFA0A for kext FakeSMC.kext
kext-dev-mode allowing invalid signature -67062 0xFFFFFFFFFFFEFA0A for kext FakePCIID_Intel_HD_Graphics.kext
kext-dev-mode allowing invalid signature -67062 0xFFFFFFFFFFFEFA0A for kext FakePCIID.kext
kext-dev-mode allowing invalid signature -67062 0xFFFFFFFFFFFEFA0A for kext CodecCommander.kext
kext-dev-mode allowing invalid signature -67062 0xFFFFFFFFFFFEFA0A for kext ApplePS2Keyboard.kext
kext-dev-mode allowing invalid signature -67062 0xFFFFFFFFFFFEFA0A for kext ApplePS2Controller.kext
kext-dev-mode allowing invalid signature -67062 0xFFFFFFFFFFFEFA0A for kext ApplePS2SmartTouchPad.kext
kext-dev-mode allowing invalid signature -67030 0xFFFFFFFFFFFEFA2A for kext aDummyHDA.kext
kext-dev-mode allowing invalid signature -67062 0xFFFFFFFFFFFEFA0A for kext ACPIBatteryManager.kext
kext-dev-mode allowing invalid signature -67013 0xFFFFFFFFFFFEFA3B for kext AppleMobileDevice.kext
KernelCache ID: 7875F89FFFEC0609DC08082547C17F63
symlink("/System/Library/PrelinkedKernels/prelinkedkernel", "/System/Library/Caches/com.apple.kext.caches/Startup/kernelcache") failed 17 (File exists) <createPrelinkedKernel 2795>
 

Attachments

RehabMan

Moderator
Joined
May 3, 2012
Messages
188,929
Motherboard
Intel DH67BL
CPU
i7-2600K
Graphics
HD 3000
Mac
MacBook Air
Mobile Phone
iOS
Whenever I try to sleep when closing the lid, the laptop screen goes off but it does not go into sleep mode (no blinking LED). When I wake the laptop by opening the lid, all USB devices stop working until a reboot.

Sleep from Apple menu or scheduled sleep works fine.

Problem reporting
Code:
MBP-van-Mattias:~ mattiaspelgrims$ kextstat|grep -y acpiplat
   13    2 0xffffff7f82d8d000 0x60000    0x60000    com.apple.driver.AppleACPIPlatform (5.0) 867C81BE-EA01-3A65-89F4-06D78E6514CA <12 11 7 6 5 4 3 1>
MBP-van-Mattias:~ mattiaspelgrims$ kextstat|grep -y appleintelcpu
MBP-van-Mattias:~ mattiaspelgrims$ kextstat|grep -y applelpc
MBP-van-Mattias:~ mattiaspelgrims$ kextstat|grep -y applehda
   89    1 0xffffff7f8111a000 0x1d000    0x1d000    com.apple.driver.AppleHDAController (278.56) CFB0D0AE-F09A-3660-8F95-7A02FD5FBF07 <88 87 67 12 7 6 5 4 3 1>
  113    0 0xffffff7f812bc000 0xb4000    0xb4000    com.apple.driver.AppleHDA (999.1.1fc1) A4EB06C9-A40A-39EF-9C4A-D7F23DB9A2F9 <112 89 88 87 72 67 6 5 4 3 1>
Code:
MBP-van-Mattias:~ mattiaspelgrims$ sudo touch /System/Library/Extensions && sudo kextcache -u /
Password:
Password:
kext-dev-mode allowing invalid signature -67062 0xFFFFFFFFFFFEFA0A for kext USBInjectAll.kext
kext-dev-mode allowing invalid signature -67062 0xFFFFFFFFFFFEFA0A for kext SATA-100-series-unsupported.kext
kext-dev-mode allowing invalid signature -67062 0xFFFFFFFFFFFEFA0A for kext NullEthernet.kext
kext-dev-mode allowing invalid signature -67062 0xFFFFFFFFFFFEFA0A for kext IntelBacklight.kext
kext-dev-mode allowing invalid signature -67062 0xFFFFFFFFFFFEFA0A for kext FakeSMC.kext
kext-dev-mode allowing invalid signature -67062 0xFFFFFFFFFFFEFA0A for kext FakePCIID_Intel_HD_Graphics.kext
kext-dev-mode allowing invalid signature -67062 0xFFFFFFFFFFFEFA0A for kext FakePCIID.kext
kext-dev-mode allowing invalid signature -67062 0xFFFFFFFFFFFEFA0A for kext CodecCommander.kext
kext-dev-mode allowing invalid signature -67062 0xFFFFFFFFFFFEFA0A for kext ApplePS2Keyboard.kext
kext-dev-mode allowing invalid signature -67062 0xFFFFFFFFFFFEFA0A for kext ApplePS2Controller.kext
kext-dev-mode allowing invalid signature -67062 0xFFFFFFFFFFFEFA0A for kext ApplePS2SmartTouchPad.kext
kext-dev-mode allowing invalid signature -67030 0xFFFFFFFFFFFEFA2A for kext aDummyHDA.kext
kext-dev-mode allowing invalid signature -67062 0xFFFFFFFFFFFEFA0A for kext ACPIBatteryManager.kext
kext-dev-mode allowing invalid signature -67013 0xFFFFFFFFFFFEFA3B for kext AppleMobileDevice.kext
KernelCache ID: 7875F89FFFEC0609DC08082547C17F63
symlink("/System/Library/PrelinkedKernels/prelinkedkernel", "/System/Library/Caches/com.apple.kext.caches/Startup/kernelcache") failed 17 (File exists) <createPrelinkedKernel 2795>
Need clarification:

What is the result if you sleep with Apple->Sleep. Wait for sleep to happen. Then close lid. Then open lid to wake?
I assume Apple->Sleep, wait... followed by power button press, everything working ok?

You should use ACPIDebug.kext to debug your _LID method to be certain it is working correctly...
 
Joined
Oct 20, 2015
Messages
232
Motherboard
Xiaomi Air 13
CPU
Intel i5-6200u
Graphics
Intel HD 520
Need clarification:

What is the result if you sleep with Apple->Sleep. Wait for sleep to happen. Then close lid. Then open lid to wake?
I assume Apple->Sleep, wait... followed by power button press, everything working ok?
Forgot to mention that this particular scenario also works fine (apple menu->sleep->wait for sleep->close lid->wakeup).
 

RehabMan

Moderator
Joined
May 3, 2012
Messages
188,929
Motherboard
Intel DH67BL
CPU
i7-2600K
Graphics
HD 3000
Mac
MacBook Air
Mobile Phone
iOS
Forgot to mention that this particular scenario also works fine (apple menu->sleep->wait for sleep->close lid->wakeup).
How are you doing "->wakup" in that scenario?
It is not clear from what you wrote, therefore does not answer my question.
 
Joined
Oct 20, 2015
Messages
232
Motherboard
Xiaomi Air 13
CPU
Intel i5-6200u
Graphics
Intel HD 520
How are you doing "->wakup" in that scenario?
It is not clear from what you wrote, therefore does not answer my question.
Sorry you are right, forget to include that it wakes up by opening the lid.
 

RehabMan

Moderator
Joined
May 3, 2012
Messages
188,929
Motherboard
Intel DH67BL
CPU
i7-2600K
Graphics
HD 3000
Mac
MacBook Air
Mobile Phone
iOS
Sorry you are right, forget to include that it wakes up by opening the lid.
Seems like you may have a _LID method that is not working.
 
Joined
Oct 20, 2015
Messages
232
Motherboard
Xiaomi Air 13
CPU
Intel i5-6200u
Graphics
Intel HD 520
Seems like you may have a _LID method that is not working.
Code:
Device (LID0)
        {
            Name (_HID, EisaId ("PNP0C0D"))  // _HID: Hardware ID
            Method (_STA, 0, NotSerialized)  // _STA: Status
            {
                If (LEqual (LIDE, Zero))
                {
                    Return (Zero)
                }
                Else
                {
                    Return (0x0F)
                }
            }

            Method (_LID, 0, NotSerialized)  // _LID: Lid Status
            {
                Store (^^PCI0.LPCB.EC0.MLID, Local0)
                If (Local0)
                {
                    Return (One)
                }
                Else
                {
                    Return (Zero)
                }
            }
        }
Maybe you notice something off with a quick glance at it?
 

RehabMan

Moderator
Joined
May 3, 2012
Messages
188,929
Motherboard
Intel DH67BL
CPU
i7-2600K
Graphics
HD 3000
Mac
MacBook Air
Mobile Phone
iOS
Code:
Device (LID0)
        {
            Name (_HID, EisaId ("PNP0C0D"))  // _HID: Hardware ID
            Method (_STA, 0, NotSerialized)  // _STA: Status
            {
                If (LEqual (LIDE, Zero))
                {
                    Return (Zero)
                }
                Else
                {
                    Return (0x0F)
                }
            }

            Method (_LID, 0, NotSerialized)  // _LID: Lid Status
            {
                Store (^^PCI0.LPCB.EC0.MLID, Local0)
                If (Local0)
                {
                    Return (One)
                }
                Else
                {
                    Return (Zero)
                }
            }
        }
Maybe you notice something off with a quick glance at it?
Not really. Looks pretty simple. You should debug it with ACPIDebug.kext.
 
Joined
Oct 20, 2015
Messages
232
Motherboard
Xiaomi Air 13
CPU
Intel i5-6200u
Graphics
Intel HD 520
I have installed ACPIDebug.kext and applied these two DSDT patches:
https://github.com/RehabMan/OS-X-ACPI-Debug/blob/master/debug.txt
https://github.com/RehabMan/OS-X-ACPI-Debug/blob/master/instrument_LID.txt

I'm a bit lost how to proceed now.

edit: console output
Code:
standaard    21:15:12.007462 +0100    kernel    ACPIDebug: "LID0._LID enter"
standaard    21:15:12.007832 +0100    kernel    ACPIDebug: { "LID0._LID returning", 0x1, }
standaard    21:15:22.916193 +0100    kernel    ACPIDebug: "LID0._LID enter"
standaard    21:15:22.916584 +0100    kernel    ACPIDebug: { "LID0._LID returning", 0x0, }
21:15:25 LID CLOSED
standaard    21:15:26.509199 +0100    kernel    ACPIBatteryManager: WARNING! fMaxCapacity > fDesignCapacity. adjusted fMaxCapacity from 5305, to 5230
21:15:41 SLEEP? USB DEAD
standaard    21:15:41.760263 +0100    kernel    ACPI SLEEP
standaard    21:15:41.823940 +0100    kernel    ACPI S3 WAKE
standaard    21:15:41.828058 +0100    kernel    ACPIBatteryManager: WARNING! fMaxCapacity > fDesignCapacity. adjusted fMaxCapacity from 5305, to 5230
standaard    21:15:41.835097 +0100    kernel    ACPIDebug: "LID0._LID enter"
standaard    21:15:41.835321 +0100    kernel    ACPIDebug: { "LID0._LID returning", 0x1, }
standaard    21:15:41.836120 +0100    kernel    ACPIDebug: "LID0._LID enter"
standaard    21:15:41.836345 +0100    kernel    ACPIDebug: { "LID0._LID returning", 0x1, }
standaard    21:15:41.840403 +0100    kernel    Wake reason: power-button (User)
standaard    21:15:41.840404 +0100    kernel    Wake reason: power-button (User)
21:16:04 LID OPEN
standaard    21:16:04.652289 +0100    kernel    ACPIDebug: "LID0._LID enter"
standaard    21:16:04.652610 +0100    kernel    ACPIDebug: { "LID0._LID returning", 0x1, }
standaard    21:16:04.654095 +0100    kernel    ACPIDebug: "LID0._LID enter"
standaard    21:16:04.654430 +0100    kernel    ACPIDebug: { "LID0._LID returning", 0x1, }
standaard    21:16:04.655631 +0100    kernel    ACPIBatteryManager: WARNING! fMaxCapacity > fDesignCapacity. adjusted fMaxCapacity from 5305, to 5230
standaard    21:16:14.697661 +0100    kernel    ACPIDebug: "LID0._LID enter"
standaard    21:16:14.698014 +0100    kernel    ACPIDebug: { "LID0._LID returning", 0x1, }
Shutdown does not work after this cycle, also a second cycle results in a black screen...
 
Last edited:
Top