Jump to content
PayPal donations: [email protected] ×

What is SleepEnabler.kext?


meklort

Recommended Posts

The one and *only* thing that SleepEnabler does is tell XNU (the kernel) that it can *try* to sleep.

This is what normally happens...
The user (or a program) tells the computer to sleep.
1) XNU checks to see if it has any power management driver, if not it say "no, not gonna happen."
2) XNU checks to see if the power management driver told xnu that everything was setup. If not, it says no.
3) XNU checks to see if the power management driver told xnu that it has a function to stop the cpu. If not, it says no.
4) XNU calls the cpu stop function. The function returns 0 for success. If not, xnu says no.
5) XNU goes to sleep if all of the above happens.

So... what sleep enabler does is this.
1) It tells the kernel that there is a power management driver. If it tells xnu that it provides the wrong version of power management, XNU will panic and yell at you.
2) It tells the kernel that the power management driver is done initializing everything.
3) it tells the kernel to call the half function it provides.
4) the halt function does absolutely nothing but returns 0.

In other words. SleepEnabler tells XNU that it can go to sleep. It doesn't tell it how to sleep. It doesn't tell it how to wake. If you're machine goes to sleep fine, don't mess with SleepEnabler, if it doesn't wake up properly, *also* don't mess with SleepEnabler, it's not the problems, something else is.

Now, for those of you using any machine that can run a vanilla kernel (read: intel cpu), you should *never* use SleepEnabler. Apple's power management kexts already doe everything listed here, and if you do install SleepEnabler bad things can happen. What that really means is people running any intel processor, even atoms and celerons (they do need a binary kernel patch though) don't need to use this kext.

Link to comment
Share on other sites

Just to clarify one thing, when users are using NullCPUPowerManagement.kext on Intel CPU's they do still need SleepEnabler.kext if they want to be able to sleep the computer. At least that has been the case in all of my own tests. You do bring up a good point though and that is that I should remove it from the generic /Extra in myHack - when I originally included it in myHack 1.x there was no pstate/cstate generation capabilities in Chameleon and the only way to get native power management working was through dsdt editing. Now that that is no longer the case there is little need for SleepEnabler.kext and for the few people that might need it - they can add it separately.

Link to comment
Share on other sites

  • 1 year later...

Ok i might be posting in the wrong topic, but didnt want to open a new one coz i do have a question regarding SleepEnabler.

 

At the moment I still have NullCPUPowerManagement.kext in E/E folder, but i havent loaded SE.kext yet. Reason why I'm asking is that atm, when i select Sleep option the rig goes to sleep (or not, input devices are not responsive) but does not wake up by any interaction.

 

So my question is should i remove Null...kext and load SE.kext into E/E or S/L/E? Also what utility/procedure would be best for this? Asking coz im new to this, and would like to learn any potential problems/solutions coming out of this procedure.

 

Also this is a brandname HP 3010 PC with AMD Phenom II X2 Dual-Core Processors (Intel Core 2 Quad Q9400 Processor (2.66-GHz, 6MB L2 cache, 1333 MHz FSB).

 

Ty in advance for any information.

Link to comment
Share on other sites

The SleepEnabler.kext is intended to be used WITH NullCPUPowerManagement.kext. It will not function without it, and if you have native power management functioning and can boot without a kernel panic without the NullCPUPM kext you will not need SleepEnabler.kext.

 

Given the fact you are running with an AMD processor, you will most likely need to keep the NullCPUPM kext and use SE.kext - but I'm not sure if SE.kext will actually function correctly - you will need to test to find out, I personally have no experience with an AMD hackintosh since about 2005.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...