Jump to content

NEW: SleepEnablerNG for 10.6.8 and Lion


  • Please log in to reply
37 replies to this topic

#21
BugsB

BugsB

    InsanelyMac Deity

  • Members
  • PipPipPipPipPipPipPipPipPipPip
  • 1,513 posts
  • Gender:Male
  • Location:Kauai, Hawai'i

I have Lion DP4 [..] where does it say what number to use.

--> http://blog.nawcom.com/?p=806

Not working! Lion (11A494a) throws KP on pmVersions from 20 and beyond. Without pmVersion, kext does not load. This is not ready for prime time.

try Nawcom's compile from above link - no guarantee but worth a try.

I don't think I've ever seen an explanation for what SleepEnabler does. What exactly does it do?

--> this is how it started :(

#22
meklort

meklort

    InsanelyMac Geek

  • Developers
  • 139 posts
  • Gender:Male

I don't think I've ever seen an explanation for what SleepEnabler does. What exactly does it do?

For the record the versions I've tried have never been able to fix the only problem that my Abit IP35 board has - waking from sleep. The system does sleep, but it does not wake up properly, instead you get a blank screen and probably a jammed computer because you can't launch anything via keyboard.


The one and *only* think that sleep enabler does is tell XNU 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 return 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. In other words, it won't hep you out. You have a different issue (which can probably be fixed with some dsdt tweeks).

That's pretty much it.

#23
RSN

RSN

    InsanelyMac Geek

  • Members
  • PipPipPip
  • 119 posts
  • Gender:Male
nawcom´s version worked perfectly :P

Thanks...

#24
TIMMAYOSX

TIMMAYOSX

    InsanelyMac Protégé

  • Members
  • PipPip
  • 93 posts
SleepEnablerNG 1.0.1 has been released with full Lion, and fixed 10.6.7 support.

#25
TIMMAYOSX

TIMMAYOSX

    InsanelyMac Protégé

  • Members
  • PipPip
  • 93 posts
And another release was made, v1.0.2

Code rewrite, but otherwise functionally identical to 1.0.1. This is the last release for the day, honest.

You can download it in the OP.

#26
Kasakka

Kasakka

    InsanelyMac Geek

  • Members
  • PipPipPip
  • 148 posts

The one and *only* think that sleep enabler does is tell XNU that it can *try* to sleep.

*snip*

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. In other words, it won't hep you out. You have a different issue (which can probably be fixed with some dsdt tweeks).

That's pretty much it.


Thanks for the informative post. Been trying to figure out the sleep thing without much luck.

#27
BugsB

BugsB

    InsanelyMac Deity

  • Members
  • PipPipPipPipPipPipPipPipPipPip
  • 1,513 posts
  • Gender:Male
  • Location:Kauai, Hawai'i

Thanks for the informative post. Been trying to figure out the sleep thing without much luck.

Disable in the DSDT what you can until you find the culprit. Look here. Please don't continue this discussion here in this thread because from now on it would be OT. Instead you can post to the thread I linked to, after fiddling with your DSDT. Good luck, fingers crossed.

This is the last release for the day, honest.

-_- .. but 3 - is the magic number .. :)

#28
fumoboy007

fumoboy007

    InsanelyMac Protégé

  • Members
  • Pip
  • 14 posts
Sleep still does not work with my Asus M2N68-LA (NARRA2) motherboard even with SleepEnablerNG 1.0.2. :D

My DSDT is attached if somebody wants to help me.

Attached Files



#29
TIMMAYOSX

TIMMAYOSX

    InsanelyMac Protégé

  • Members
  • PipPip
  • 93 posts
To use SleepEnablerNG, you must first disable anything that is already handling PM (not needed if it does not work anyhow). What you need to do is simply put NullCPUPowerManagement.kext in /Extra/Extensions along with SleepEnablerNG.kext, and you should be sleep-able.

Also look at pmset (terminal app) which lets you tune your PM settings, but this should not be nessesary.

#30
fumoboy007

fumoboy007

    InsanelyMac Protégé

  • Members
  • Pip
  • 14 posts

To use SleepEnablerNG, you must first disable anything that is already handling PM (not needed if it does not work anyhow). What you need to do is simply put NullCPUPowerManagement.kext in /Extra/Extensions along with SleepEnablerNG.kext, and you should be sleep-able.

Also look at pmset (terminal app) which lets you tune your PM settings, but this should not be nessesary.


Not for me. The kernel I am using already has built-in power management disabling, and I even used NullCPUPowerManagement.kext to be sure. My computer seems to go into an S1 sleeping state because the power button light turns yellow, the hard drive spins down, and the video feed turns off, but the fan is still running, which means something is still powered (the only thing left is the CPU and the RAM). I need it to go into S3. In addition, I am unable to power back up; I have to do a hard reboot.

#31
TIMMAYOSX

TIMMAYOSX

    InsanelyMac Protégé

  • Members
  • PipPip
  • 93 posts
The PM resides in external kexts, and not internal to the kernel unless your custom kernel offers more functionality than the vanilla varients.

One thing you can do is look at the boot up log, and ensure SleepEnabler is loaded (will be near the top). You may also try a vanilla kernel, which may prove to work better in this case (unless you are an AMD user of course).

When you put your system to sleep, does it show anything in the kernel log (dmesg under the Terminal)?

#32
fumoboy007

fumoboy007

    InsanelyMac Protégé

  • Members
  • Pip
  • 14 posts

custom kernel offers more functionality than the vanilla varients.

Yep.

One thing you can do is look at the boot up log, and ensure SleepEnabler is loaded (will be near the top).

Yep, it's loaded.

(unless you are an AMD user of course).

Yep.

When you put your system to sleep, does it show anything in the kernel log (dmesg under the Terminal)?

Nope.

#33
unimatrix725

unimatrix725

    InsanelyMac Protégé

  • Members
  • Pip
  • 47 posts
  • Gender:Male
  • Location:Big Stoner Gap, VA

SleepEnablerNG 1.0.2 (i386 & x64) - July 2, 2011

:) v1.0.1+ has full Lion GM support.

SleepEnablerNG is based on SleepEnabler by Meklort, but updated for full Snow Leopard (10.6.0 - 10.6.8), and Lion.
This version differs in that it takes care of buffer overflow issues present in the existing SleepEnabler that can, for some users present issues such as random KPs, specifically in Lion and newer, untested kernels.

I am now part of the SleepEnabler project, and as such this will be one of my last release of SleepEnablerNG. Future updates will be on the official SleepEnabler project. (makes things much easier for users)

This version will auto detect the pmVersion on Snow Leopard (up to 10.6.8), and Lion (10.7.0). If you are using a release outside of this, you will need to specify a pmVersion parameter.

Version 1.0.2 (did a much needed rewrite, but otherwise functionally identical to 1.0.1)
kext source
Version 1.0.1
kext source


I appreciate your work, but there are allot of Kernel Dev's working to put the "PMVersion" detect/override into the newer kernels. There are 2 major SleepEnabler.kexts out there all ready. One for 10.6.8 and Lower ( http://blog.nawcom.c...kext.10.6.8.zip ) and then there is one that is 10.7 and above, which by the way works on all snow editions.( http://blog.nawcom.c...kext.10.7.x.zip ).
I kinda agree with NawCom in the fact that you are just wanting to make a contribution using others work (Meklort?) just to get your name "Out There" on the scene. I know allot of others that have done similar, like PyStar and GeoHot (aka Geo Douche the oh so infamous PS3/iPhone Hacker... please). This is NOT A Flame, but an observation. I MAY MISUNDERSTAND and if so PLEASE CLEARLY STATE WHAT YOU ARE DOING IN DETAIL.

The only detail is "This version will auto detect the pmVersion on Snow Leopard (up to 10.6.8), and Lion (10.7.0). If you are using a release outside of this, you will need to specify a pmVersion parameter."

I am believe if someone is going to install a new OS version, that they will at least Google what version powermanagement is needed/used and most use Chameleon, some Chimera and it is all to easy to pass the pm=# in the boot. When one has the right # in there just add it to the com.apple.Boot.plist . I really don't get it, I have enough KEXTs to last till im reincarnated.

#34
buoo

buoo

    The Prodigal Son

  • Moderators
  • 4,541 posts
  • Gender:Male
  • Location:Italy
I say excuse to the users for the unpleasant situation that was been created.
I'm sorry.

#35
radishs

radishs

    InsanelyMac Protégé

  • Members
  • Pip
  • 12 posts
Any idea for 10.7.1? In 1.0.2 can't fully sleep and wake for sleep.

#36
karloz61

karloz61

    InsanelyMac Protégé

  • Members
  • Pip
  • 1 posts
this work very well on GA-z77-d3h and snow 10.6.8 ivy bridge i7 3770k (whit pmversion=23)
very very thanks
the next question is... work on same mother and mountain lion? whats pmversion we need to put ?

#37
Slice

Slice

    InsanelyMacaholic

  • Local Moderators
  • 3,202 posts
  • Gender:Male
  • Location:Moscow

this work very well on GA-z77-d3h and snow 10.6.8 ivy bridge i7 3770k (whit pmversion=23)
very very thanks
the next question is... work on same mother and mountain lion? whats pmversion we need to put ?

For 10.8.2 pmversion=102 if it helps.
Have no sources 10.8.3 yet to check new version.

#38
nawcom

nawcom

    InsanelyMac Protégé

  • Retired Developers
  • 69 posts
  • Gender:Male
  • Location:localhost
  • Interests:Mind {censored}. Telephony.
Latest from the google code page should work just fine.

https://code.google....-sleep-enabler/

It's been 102 since 10.7. There's no need to manually enter it in as it defaults to it if the version is 10.7+ and not coded in as being changed. If anything the kext may need to be updated with new headers in 10.8.3 but probably not.

EDIT

The version on googlecode that I last updated in July 2012 still works perfectly in 10.8.3. Just did a test run on my laptop, and it slept and woke without issues.

nawcom$ kextstat|grep [SN][lu][el]
12 0 0xffffff7f807f9000 0x2000 0x2000 org.tgwbd.driver.NullCPUPowerManagement (1.0.0d2) <7 4 3>
17 0 0xffffff7f80870000 0x2000 0x2000 sk.triaxis.kext.SleepEnabler (1.0.0) <7 4 3>

You also do not need to enter in pmVersion=102 as like i said, it assumes that's the default version for any Darwin version equal or newer than 11 (OS 10.7).

I don't know what this whole SleepEnablerNG thing was about but whatever. The vanilla kext works fine with 10.7/10.8. Grab it from the googlecode link above.

Also it's important to understand that if your system isn't sleeping, it's not the fault of the SleepEnabler kext. It's ACPI related in your firmware, which you can fix up via modding your DSDT.





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

© 2014 InsanelyMac  |   News  |   Forum  |   Downloads  |   OSx86 Wiki  |   Mac Netbook  |   PHP hosting by CatN  |   Designed by Ed Gain  |   Logo by irfan  |   Privacy Policy