Jump to content
  • Announcements

    • Allan

      Forum Rules   04/13/2018

      Hello folks! As some things are being fixed, we'll keep you updated. Per hour the Forum Rules don't have a dedicated "Tab", so here is the place that we have our Rules back. New Users Lounge > [READ] - InsanelyMac Forum Rules - The InsanelyMac Staff Team. 
TIMMAYOSX

NEW: SleepEnablerNG for 10.6.8 and Lion

38 posts in this topic

Recommended Posts

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

 

:D 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 SleepEnablerNG1.0.2.zipsource SleepEnablerNG1.0.2_src.zip

Version 1.0.1

kext SleepEnablerNG1.0.1.zipsource SleepEnablerNG1.0.1_src.zip

Share this post


Link to post
Share on other sites
I do not have Lion DP4 installed at the moment
?

 

quoting your sig: Lion (DP4) installed ???

Share this post


Link to post
Share on other sites
I have maintained compatibility with the pmVersion kernel parameter.
unclear - does that mean your mod REQUIRES pmVersion to be set in com.apple.Boot.plist? --> for 10.6.8:

<key>Kernel Flags</key>

<string>-v pmVersion=23</string>

if so, then saying

Simply put it in /Extra/Extensions, fix permissions & caches, and reboot. Don't forget to remove SleepEnabler.kext first.
would be misleaing, not mentioning that the pmVersion parameter MUST be set.

 

Please improve your manual a bit, TIMMAYOS - Thanks :blink:

 

I had been using DP4, however xcode is not compatible with Lion yet, so I was forced to reinstall Snow Leopard for the development.
LOL Ok thanks for the clarification. Xcode Lion should come with the DVD, shouldn't it.

Share this post


Link to post
Share on other sites

No, the pmVersion is optional, and only needs to be set if you are using a kernel > 10.8.0 (OS X 10.6.8)

 

xcode 3 is only for SL

xcode 4 (beta) is also only for SL at this time. I am sure they will release a Lion compatible version when Lion is released. Also, this is a paid version, at least during it's beta cycle.

Share this post


Link to post
Share on other sites
The extension will detect any SL release between 10.6.0 and 10.6.8.
wow, you were able to code pmVersion auto-detect, respect my friend!

Share this post


Link to post
Share on other sites
xcode 4 (beta) is also only for SL at this time. I am sure they will release a Lion compatible version when Lion is released. Also, this is a paid version, at least during it's beta cycle.

XCode 4.1 is for Lion. You can get it if you have a Developer account.

Share this post


Link to post
Share on other sites

Apart from the not very interesting XCode issue raised here: Did anyone give this kext a try?

Share this post


Link to post
Share on other sites
Apart from the not very interesting XCode issue raised here: Did anyone give this kext a try?

 

I did.

And it's working fine for me.

No key strings needed, no issues.

 

Thnx TIMMAYOSX.

 

My rig is built arround GA-EP35-DS4 with SL 10.6.8. 64-bit

Share this post


Link to post
Share on other sites

YES!! It work! Incredible!))

Thank's dude!!!

[snow Leo 10.6.8 Native Bootloader Chimera, i3 540 4Gb RAM, P7H55-M]

Share this post


Link to post
Share on other sites
XCode 4.1 is for Lion. You can get it if you have a Developer account.

 

I was thinking about it. $99 bucks / year is not all that bad. I will probably go that route once Lion is officially released. For the time being, I am able to develop Lion extensions with xcode 3.2.6 under Snow Leopard, so not too bad. (though I will have to convert my desktop to OS X next, to simplify testing).

Share this post


Link to post
Share on other sites

I got a link to this thread from meklort; he was sorta pissed - I'm not really sure what your goal is with this. You essentially took the code from the open source project, renamed it, and closed it up. As of now you haven't added anything. This isn't a branch of the code - it's just a direct copy of it.

 

Feel free to contribute to SleepEnabler, meklort and I helped improve simek's code via permission, and you are welcome to contribute as well. By the way, It's been updated for Lion - feel free to take a look for those who are in search for it, source code is available. The purpose of the kext will soon get moved to the bootloader, as it's on our list of things to cover.

 

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

Share this post


Link to post
Share on other sites

I mean in no way to step on anybody's toes. From everything I have read, seen, and heard I honestly thought the code was abandoned as it was not updated any longer (well, not until today), and had some serious issues for those with > 10.6.6 releases. I was in a bind, as were thousands of others with no other options available.

 

Seeing the code is MIT licensed, I decided at that time to fork the code, and modernize it. I am however very pleased to see SleepEnabler has just been updated, and I would not mind joining or contributing to the project. This would save me from setting up a google code account.

 

Cheers, and thanks again.

Share this post


Link to post
Share on other sites

TIMMAYOSX, I had a couple of issues with the way you released this.

 

1) You didn't include the source. I have nothing agains you continuing sleep enabler, however, if you make changes, please include the source. I see that you have recently updated your first post to include them.

 

2) The way the post was written, it sounded like you added something new, while in reality, the only thing you did was as the pm versions for 10.6.7 and for 10.6.8. Also note that the values in the source for 10.6.7 is incorrect. You have it at 22, while it should be 21. If a user on 10.6.7 uses this, they will get a kernel panic.

 

If you would like to be added to the google code project so that you can make changes, send me a PM.

Share this post


Link to post
Share on other sites

Thank you, I will send you a PM.

 

If you look in pmCPUSkel.h, you will notice something slightly different, and with my explanation in sleepenabler.c, you will understand why the change was made.

Share this post


Link to post
Share on other sites

Thanks for your effort.

 

In my case it didnt work, panic.

 

I have Lion DP4 in an Intel dp55kg with i7. I tried without pmVersion and states its registered but disabled. pmVersion=23 panics and I cannt see where does it say what number to use. Can u help.

 

Regards.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

Great work, my backup hackinthosh now sleeps and wakes using Apple bluetooth module.

Share this post


Link to post
Share on other sites
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 :(

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


  • Recently Browsing   0 members

    No registered users viewing this page.

×