Contribute
Register

[Guide] Native Power Management for Laptops

RehabMan

Moderator
Joined
May 3, 2012
Messages
191,123
Motherboard
Intel DH67BL
CPU
Core i7-2600K
Graphics
Intel HD 3000
Mac
MacBook Air
Mobile Phone
iOS
Hi Mr. RehabMan

Thank you for responding, specifically the os is not sleeping/waking when closing the lid.

manual sleep using menu and pressing the power button for about 1-2 second is working. waking up using power button or any keypress is working.

been using ACPIPooler and ACPIDebug, but cannot find which EC register triggering the lid event.

also in my booting process i get this :



while the lid is open.

anyway i've been reading for couple of days about this problem, but maybe i just not find any that solved yet.
not sure if i should create thread about this, because i dont know if its related to power management or not, since i got backlight working.

for now i just wondering if my power management is working, because maybe if there is something wrong with it and that could be the key to solve the lid (just thinking )

i'm a bit of newbie about this, though my old laptop (ASUS k43e, i3 sandy-bridge) already running Yosemite with everything (sound, graphics, power management, wifi, lan, and sleep) working nicely for about 6 month. still saving to buy real mac (veeery expensive in indonesia )

Well, i'm blabering :).. sorry about that.
Did you apply the "Remove _PRW from LID" patch?
 
Joined
May 28, 2016
Messages
12
Motherboard
Lenovo G40-70
CPU
Intel® Core™ i7-4500U
Graphics
Intel HD Graphics 4400
Did you apply the "Remove _PRW from LID" patch?
Hi Mr. RehabMan,

Tried using patch and edit manually. Does not have any effect on lid closing or opening.

below is what i already try :
- ssdt generated using ssdtPRGen.sh
- patch disassembled DSDT with basic patch (from your guide)
"Fix _WAK Arg0 v2"
"HPET Fix"
"SMBUS Fix"
"IRQ Fix"
"RTC Fix"
"Fix Mutex with non-zero SyncLevel"
"Add IMEI"
- patch "OS fix"
- patch G50-70 battery
- patch GFX0 to IGPU
- patch _PNLF
- patch "haswell brightness"
- patch debug ( adding related kext)
- patch lid poller ( adding related kext)
- patch brightness key (fn_f11 and fn_F12) this is manual patch after reading solution for HP ( i forgot the thread)
- patch _PRW (no effect, my current DSDT.aml is the one with all above and brightness key)

on each steps i compiled the current file,put in EFI/CLOVER/ACPI/patched, rename as DSDT.aml and restart.
attached picture of almost all my effort, its weekend anyway :)
 

Attachments

Last edited:

RehabMan

Moderator
Joined
May 3, 2012
Messages
191,123
Motherboard
Intel DH67BL
CPU
Core i7-2600K
Graphics
Intel HD 3000
Mac
MacBook Air
Mobile Phone
iOS
Hi Mr. RehabMan,

Tried using patch and edit manually. Does not have any effect on lid closing or opening.

below is what i already try :
- ssdt generated using ssdtPRGen.sh
- patch disassembled DSDT with basic patch (from your guide)
"Fix _WAK Arg0 v2"
"HPET Fix"
"SMBUS Fix"
"IRQ Fix"
"RTC Fix"
"Fix Mutex with non-zero SyncLevel"
"Add IMEI"
- patch "OS fix"
- patch G50-70 battery
- patch GFX0 to IGPU
- patch _PNLF
- patch "haswell brightness"
- patch debug ( adding related kext)
- patch lid poller ( adding related kext)
- patch brightness key (fn_f11 and fn_F12) this is manual patch after reading solution for HP ( i forgot the thread)
- patch _PRW (no effect, my current DSDT.aml is the one with all above and brightness key)

on each steps i compiled the current file,put in EFI/CLOVER/ACPI/patched, rename as DSDT.aml and restart.
attached picture of almost all my effort, its weekend anyway :)
Again... Did you apply the "Remove _PRW from LID" patch?
 
Joined
May 28, 2016
Messages
12
Motherboard
Lenovo G40-70
CPU
Intel® Core™ i7-4500U
Graphics
Intel HD Graphics 4400
Again... Did you apply the "Remove _PRW from LID" patch?
Hi Mr. RehabMan,

I'm very sorry for not writing it clearly. Yes i try to apply remove _prw from lid, that is what i mean with this :
- patch _PRW (no effect, my current DSDT.aml is the one with all above and brightness key)
When patching "remove _prw from lid", i think maybe because LID event keep triggering wake thus my lid closing is not working but even with the patch applied, i try to close the lid but laptop wont sleep (been waiting for over 5 minutes). Also there is no debug messages when i close the lid or opening the lid.

the messages about lid entering and returning i shown before is happening when booting only and while the lid is already open.

what i'm trying to find out for now is why is my lid closing event not triggering the lid event because the debug message never shown when i'm closing/opening the lid.

That is why i'm wondering about my power management working or not.

For now i'm suspecting my lid is tied some ACPI button like my power button, because while power button works for me, there is no debug messages when used for sleep/wake.
 

RehabMan

Moderator
Joined
May 3, 2012
Messages
191,123
Motherboard
Intel DH67BL
CPU
Core i7-2600K
Graphics
Intel HD 3000
Mac
MacBook Air
Mobile Phone
iOS
Hi Mr. RehabMan,

I'm very sorry for not writing it clearly. Yes i try to apply remove _prw from lid, that is what i mean with this :


When patching "remove _prw from lid", i think maybe because LID event keep triggering wake thus my lid closing is not working but even with the patch applied, i try to close the lid but laptop wont sleep (been waiting for over 5 minutes). Also there is no debug messages when i close the lid or opening the lid.
Make sure you're not using the LID poll patch.
 
Joined
May 28, 2016
Messages
12
Motherboard
Lenovo G40-70
CPU
Intel® Core™ i7-4500U
Graphics
Intel HD Graphics 4400
Make sure you're not using the LID poll patch.
Hi Mr. RehabMan,

hmm never tried that before, all my patched dsdt already have poller before i try anything with lid because i want to know why debug never show lid closing/opening.

will try now :)
 
Joined
May 28, 2016
Messages
12
Motherboard
Lenovo G40-70
CPU
Intel® Core™ i7-4500U
Graphics
Intel HD Graphics 4400
Hi Mr. RehabMan,

hmm never tried that before, all my patched dsdt already have poller before i try anything with lid because i want to know why debug never show lid closing/opening.

will try now :)
Hi Mr. RehabMan,

tried without "Poll for LID Changes" patch. Still no luck :(
 

RehabMan

Moderator
Joined
May 3, 2012
Messages
191,123
Motherboard
Intel DH67BL
CPU
Core i7-2600K
Graphics
Intel HD 3000
Mac
MacBook Air
Mobile Phone
iOS
Hi Mr. RehabMan,

tried without "Poll for LID Changes" patch. Still no luck :(
Let's see what you're actually doing...

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
May 28, 2016
Messages
12
Motherboard
Lenovo G40-70
CPU
Intel® Core™ i7-4500U
Graphics
Intel HD Graphics 4400
Let's see what you're actually doing...

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.
Hi Mr. RehabMan,

I put everyting in single zip file. "ioreg" is from IO RegistryExplorer, CLOVER folder, kextstat.txt and kextcache.txt from terminal
 

Attachments

RehabMan

Moderator
Joined
May 3, 2012
Messages
191,123
Motherboard
Intel DH67BL
CPU
Core i7-2600K
Graphics
Intel HD 3000
Mac
MacBook Air
Mobile Phone
iOS
Hi Mr. RehabMan,

I put everyting in single zip file. "ioreg" is from IO RegistryExplorer, CLOVER folder, kextstat.txt and kextcache.txt from terminal
_PRW is not removed from LID.

From your DSDT in ACPI/patched:
Code:
                    Device (LID0)
                    {
                        Name (_HID, EisaId ("PNP0C0D"))  // _HID: Hardware ID
...
                        Name (_PRW, Package (0x02)  // _PRW: Power Resources for Wake
                        {
                            0x0E, 
                            0x03
                        })
Really messy install also...

For example, AppleACPIPlatform.kext is patched and should never be necessary...
VoodooTSCSync is not appropriate for your hardware.

You probably do not need: AHCIPortInjector.kext, ATAPortInjector.kext, DirectHW.kext, SuperVIAATA.kext.
 
Top