Contribute
Register

Surface Pro 4: Lid sleep/wake, power button and volume buttons

Joined
Jan 30, 2012
Messages
22
Mac
Classic Mac
Mobile Phone
Hi,
I'm hoping for some help with regards to Sierra on the SP4.

Challenges:
Lid and power management
- When the lid is closed the laptop seems to sleep, however when the lid is opened the laptop doesn't wake you have to wake it with the spacebar
-If sleep is entered with the lid and woken with the spacebar the brightness is dim and can't be changed, the screen turns off after 10 seconds of not pressing the keyboard.

(Apple menu sleep works fine)

Volume/Power buttons
Using ACPIDebug I can see they call to q54, q55, q52 and q53 and they call to device vgbi but I'm not sure what to do from there.

Any help would be greatly appreciated.
**Updated with all required files.**

Massive thanks to rehabman and his tools which helped me resolve this.

In the end by using ACPIDebug I was able to find out what ec call wasn't sending the wakeup and patch it. For the volume and power keys I used his excelled acpi keyboard driver and patch the _q events to send keypresses to the acpi keyboard.

Thanks for your help!
 
Last edited:

RehabMan

Moderator
Joined
May 3, 2012
Messages
186,689
Motherboard
Intel DH67BL
CPU
i7-2600K
Graphics
HD 3000
Mac
  1. MacBook Air
Mobile Phone
  1. iOS
Hi,
I'm hoping for some help with regards to Sierra on the SP4.

Challenges:
Lid and power management
- When the lid is closed the laptop seems to sleep, however when the lid is opened the laptop doesn't wake you have to wake it with the spacebar
-If sleep is entered with the lid and woken with the spacebar the brightness is dim and can't be changed, the screen turns off after 10 seconds of not pressing the keyboard.

(Apple menu sleep works fine)

Volume/Power buttons
Using ACPIDebug I can see they call to q54, q55, q52 and q53 and they call to device vgbi but I'm not sure what to do from there.

Any help would be greatly appreciated.

Attached are my dsdt as well as an io reg after the lid sleep issue.

Attach ioreg as ZIP: http://www.tonymacx86.com/audio/58368-guide-how-make-copy-ioreg.html. Please, use the IORegistryExplorer v2.1 attached to the post! DO NOT reply with an ioreg from any other version of IORegistryExplorer.app.

Provide output (in Terminal):
Code:
kextstat|grep -y acpiplat
kextstat|grep -y appleintelcpu
kextstat|grep -y applelpc
kextstat|grep -y applehda

Attach EFI/Clover folder as ZIP (press F4 at main Clover screen before collecting). Please eliminate 'themes' directory. Provide only EFI/Clover, not the entire EFI folder.

Attach output of (in Terminal):
Code:
sudo touch /System/Library/Extensions && sudo kextcache -u /

Compress all files as ZIP. Do not use external links. Attach all files using site attachments only.
 
Joined
Jan 30, 2012
Messages
22
Mac
Classic Mac
Mobile Phone
**Removed to clean up **
 
Last edited:

RehabMan

Moderator
Joined
May 3, 2012
Messages
186,689
Motherboard
Intel DH67BL
CPU
i7-2600K
Graphics
HD 3000
Mac
  1. MacBook Air
Mobile Phone
  1. iOS
Hi,
I'm hoping for some help with regards to Sierra on the SP4.

Challenges:
Lid and power management
- When the lid is closed the laptop seems to sleep, however when the lid is opened the laptop doesn't wake you have to wake it with the spacebar
-If sleep is entered with the lid and woken with the spacebar the brightness is dim and can't be changed, the screen turns off after 10 seconds of not pressing the keyboard.

(Apple menu sleep works fine)

Volume/Power buttons
Using ACPIDebug I can see they call to q54, q55, q52 and q53 and they call to device vgbi but I'm not sure what to do from there.

Any help would be greatly appreciated.
**Updated with all required files.**

KextStat output::
kextstat|grep -y acpiplat
13 2 0xffffff7f827cd000 0x60000 0x60000 com.apple.driver.AppleACPIPlatform (5.0) 867C81BE-EA01-3A65-89F4-06D78E6514CA <12 11 7 6 5 4 3 1>
Craigs-MacBook-Pro:~ craig$ kextstat|grep -y appleintelcpu
Craigs-MacBook-Pro:~ craig$ kextstat|grep -y applelpc
94 0 0xffffff7f81f6e000 0x3000 0x3000 com.apple.driver.AppleLPC (3.1) F51595F0-F9B1-3B85-A1C3-F984DAD4107E <87 12 5 4 3>
Craigs-MacBook-Pro:~ craig$ kextstat|grep -y applehda
103 1 0xffffff7f8248a000 0x1d000 0x1d000 com.apple.driver.AppleHDAController (278.56) CFB0D0AE-F09A-3660-8F95-7A02FD5FBF07 <102 84 27 12 7 6 5 4 3 1>
116 0 0xffffff7f8260c000 0xb4000 0xb4000 com.apple.driver.AppleHDA (9267.0) A4EB06C9-A40A-39EF-9C4A-D7F23DB9A2F9 <115 103 102 101 84 27 12 11 6 5 4 3 1>
Craigs-MacBook-Pro:~ craig$ sudo touch /System/Library/Extensions && sudo kextcache

Sudo touch output:
OKitWaitQuiet() timed out.

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 HDAEnabler.kext
kext-dev-mode allowing invalid signature -67061 0xFFFFFFFFFFFEFA0B for kext AppleIntelCPUPowerManagement.kext
kext-dev-mode allowing invalid signature -67030 0xFFFFFFFFFFFEFA2A for kext AppleHDA_ALC298.kext
kext-dev-mode allowing invalid signature -67030 0xFFFFFFFFFFFEFA2A for kext AppleHDAHardwareConfigDriver.kext
kext-dev-mode allowing invalid signature -67062 0xFFFFFFFFFFFEFA0A for kext ACPIDebug.kext
KernelCache ID: 99B341BE13810914DDC90B7B9D85CEE1
symlink("/System/Library/PrelinkedKernels/prelinkedkernel", "/System/Library/Caches/com.apple.kext.caches/Startup/kernelcache") failed 17 (File exists) <createPrelinkedKernel 2795>

You have some incorrect edits in your patched/DSDT.aml.

For example, you changed:
Code:
            Method (_INI, 0, NotSerialized)  // _INI: Initialize
            {
                Store (LTRF, LTRN)
                Store (PMLF, LMSL)
                Store (PNLF, LNSL)
                Store (OBFF, OBFN)
            }

To:
Code:
            Method (_INI, 0, NotSerialized)  // _INI: Initialize
            {
                Store (LTRF, LTRN)
                Store (PMLF, LMSL)
                Store (OBFF, OBFN)
            }

Why did you remove the line of code 'Store(PNLF,LNSL)'?
I stopped checking after found that one... Clearly, DSDT was not carefully/correctly patched.
 
Joined
Jan 30, 2012
Messages
22
Mac
Classic Mac
Mobile Phone
When adding the brightness patch from your repo , I got
9941, 6058, Invalid type ([Device] found, Store operator requires Integer|String|Buffer|Package|DdbHandle|Reference])
when attempting to compile.
I removed that line which allowed it to compile and brightness to work and the lid to at least do something. Granted it apparently wasn't correct, sometimes it's a bit of trial and error :)

I'm embarrassed that I didn't mention that earlier.
 

RehabMan

Moderator
Joined
May 3, 2012
Messages
186,689
Motherboard
Intel DH67BL
CPU
i7-2600K
Graphics
HD 3000
Mac
  1. MacBook Air
Mobile Phone
  1. iOS
When adding the brightness patch from your repo , I got
9941, 6058, Invalid type ([Device] found, Store operator requires Integer|String|Buffer|Package|DdbHandle|Reference])
when attempting to compile.
I removed that line which allowed it to compile and brightness to work and the lid to at least do something. Granted it apparently wasn't correct, sometimes it's a bit of trial and error :)

I'm embarrassed that I didn't mention that earlier.

Removing the line is the wrong fix. Change the reference from PNLF to \PNLF.
 
Joined
Jan 30, 2012
Messages
22
Mac
Classic Mac
Mobile Phone
Well.. I feel foolish..

OK patched properly, so brightness is working again.
My power management issue with resuming from sleep continues.
 

RehabMan

Moderator
Joined
May 3, 2012
Messages
186,689
Motherboard
Intel DH67BL
CPU
i7-2600K
Graphics
HD 3000
Mac
  1. MacBook Air
Mobile Phone
  1. iOS
Well.. I feel foolish..

OK patched properly, so brightness is working again.
My power management issue with resuming from sleep continues.

What do you mean by "power management issue"?
 
Joined
Jan 30, 2012
Messages
22
Mac
Classic Mac
Mobile Phone
Well.. I feel foolish..

OK patched properly, so brightness is working again.
My power management issue with resuming from sleep continues.


Sigh..

Realized my stupid mistake with SSDT setup there. please don't waste time looking at that. Confirmed after though that lid wake still has an issue.,

Sorry, by power management I was specifically referring to the lid wake issue.
 

RehabMan

Moderator
Joined
May 3, 2012
Messages
186,689
Motherboard
Intel DH67BL
CPU
i7-2600K
Graphics
HD 3000
Mac
  1. MacBook Air
Mobile Phone
  1. iOS
Sigh..

Realized my stupid mistake with SSDT setup there. please don't waste time looking at that. Confirmed after though that lid wake still has an issue.,

Sorry, by power management I was specifically referring to the lid wake issue.

And "lid wake issue" is that "wake does not work via lid". Correct?
If you have made changes, must provide new files...
 
Top