Jump to content

CMOS Resets on Restarts after Sleep and Wake in 10.7 (Lion)


  • Please log in to reply
485 replies to this topic

#261
Taruga

Taruga

    Retired

  • Retired Developers
  • 532 posts
  • Gender:Male
  • Location:Portugal

<3 blackosx thanks ;)

Ok after apply this patch all my sleep problems gone -_-

No Cmos reset, and the best thing, my lion wakeup normal from sleep
going test benchmark now to check if all ok with performance

Btw my spec:
Intel Core i7 950@3.2Ghz · Gigabyte GA-X58A-UD3R Rev 2.0 BIOS:FF · XFX HD-687A-ZDBC Radeon HD 6870 aka Dual Fan Black Edition (OC) · 6GB (2x3) DDR3 Corsair 1600MHz · SONY Optiarc DVD RW AD-5260S · Home made BT with original BT module

update: all performance ok


Can you upload your dsdt ?

Thanks

#262
ssds

ssds

    InsanelyMac Protégé

  • Members
  • Pip
  • 35 posts
My extra folder (inc. dsdt)

Attached Files



#263
Bansaku

Bansaku

    InsanelyMac Geek

  • Members
  • PipPipPipPip
  • 177 posts
  • Gender:Male
  • Location:Edmonton
  • Interests:Lots
Heyas folks, here's what's going on after GM install:

- After fresh install of Lion GM, restart worked fine with no CMOS reset.
- Wake from sleep causes the system to restart with CMOS reset.
- Applied RTC patch; No more CMOS reset after sleep, but the system restarts. Have yet to mess around with DSDT, or tried another version of Chameleon.

History thus far:
- DP1-4 (fresh installs when applicable) Sleep worked, no CMOS reset.
- Updated Chameleon and CMOS reset and restart after wake. Applied RTC patch and all was good.
- Updated to DP5, sleep and wake work fine, CMOS reset after restart. Applied RTC patch, no change. CMOS reset after wake and restart.
- Fresh install Lion GM. CMOS reset after wake and restart. Applied new RTC patch, no CMOS reset but restart after wake. :P


:P It would be helpful if people would head over to 'My Controls' and add your system info to your signature. This not only saves you time by not having to add it to your posts, but also gives other members an idea what you have, and thus can better help you.

#264
nexus77777

nexus77777

    InsanelyMac Protégé

  • Members
  • PipPip
  • 77 posts

And it worked before except for CMOS reset?


Had the same trouble on last 11A494 ... still downloading GM now.... will try....

but RTC patch clear CMOS reset on my ep45ds3® but no wake at all... seems lion stay sleeping... must do hard reboot/reset

before patch: wake/CMOS reset immediately seems "opening his eyes"...

strange behavior ? isn't it ?

Heyas folks, here's what's going on after GM install:

- After fresh install of Lion GM, restart worked fine with no CMOS reset.
- Wake from sleep causes the system to restart with CMOS reset.
- Applied RTC patch; No more CMOS reset after sleep, but the system restarts. Have yet to mess around with DSDT, or tried another version of Chameleon.

History thus far:
- DP1-4 (fresh installs when applicable) Sleep worked, no CMOS reset.
- Updated Chameleon and CMOS reset and restart after wake. Applied RTC patch and all was good.
- Updated to DP5, sleep and wake work fine, CMOS reset after restart. Applied RTC patch, no change. CMOS reset after wake and restart.
- Fresh install Lion GM. CMOS reset after wake and restart. Applied new RTC patch, no CMOS reset but restart after wake. :)


:) It would be helpful if people would head over to 'My Controls' and add your system info to your signature. This not only saves you time by not having to add it to your posts, but also gives other members an idea what you have, and thus can better help you.


Had the similar trouble on last 11A494 ... still downloading GM now.... will try....

but RTC patch "clear" CMOS reset on my ep45ds3® and ep45ds3 but no wake at all... seems lion stay sleeping... must do hard reboot/reset (not tested on ep35ds3 /-r/ -l)

before patch: wake/CMOS reset immediately when lion seems "opening his eyes"...

strange behavior ? isn't it ?

Well, still in trouble BUT Thanks for your hard work guys !!!

#265
Rankrotten

Rankrotten

    InsanelyMac Protégé

  • Members
  • PipPip
  • 52 posts
  • Location:UK
My experience with GM build 11A511 is similar.

Before patch the system would deep sleep and wake up fine but each subsequent restart would corrupt the CMOS in the motherboard.

After tseung's GM patch for AppleRTC the system will deep sleep but will not recover from sleep forcing a hard restart.

Tried both 0x2 and 0x4 in the DSDT's RTC section with the same results.

#266
tseug

tseug

    InsanelyMac Sage

  • Members
  • PipPipPipPipPipPip
  • 407 posts
  • Gender:Male

My experience with GM build 11A511 is similar.

Before patch the system would deep sleep and wake up fine but each subsequent restart would corrupt the CMOS in the motherboard.

After tseung's GM patch for AppleRTC the system will deep sleep but will not recover from sleep forcing a hard restart.

Tried both 0x2 and 0x4 in the DSDT's RTC section with the same results.


Interesting. I get the same behavior with and without patch (normal startup instead of hibernate wake). Without patch I get CMOS reset as well.

Deep sleep works for me in SL (although I don't use it).

Does anyone have deep sleep working and can confirm?

How to set deep sleep:

sudo pmset -a hibernatemode 25

How to revert:

sudo pmset -a hibernatemode 0

EDIT: Wait, are you talking about normal sleep and not deep sleep?

#267
Noam AA

Noam AA

    InsanelyMac Sage

  • Members
  • PipPipPipPipPipPip
  • 437 posts
  • Gender:Male
  • Location:IL
Thanks a million times! this patch working flewlesly here!
no CMOS reset here, and also working sleep ;)
(still need to check black screen of death i experiencing with SL the past couple of month, without any pattern sometime it will not wake up... but that's another story ;) )

a bit old but still very good!
P5K-SE

however one more thing, i'm still having this RTC: Only single RAM bank (128 bytes), and need to test other RTC to see if it also work, on SL if it was 0x04 or 0x08 then CMOS Reset, will post results soon :)

#268
blackosx

blackosx

    InsanelyMacaholic

  • Coders
  • 3,085 posts
  • Gender:Male
  • Location:UK

Does anyone have deep sleep working and can confirm?

I use deep sleep sometimes with SL.
set with sudo pmset -a hibernatemode 1
Chameleon correctly finds and loads the sleepimage file from /private/var/vm

As far as my testing went, I couldn't get it to work with Lion. The sleepimage is created but Chameleon didn't load it. I didn't look further in to it.

How to set deep sleep:

sudo pmset -a hibernatemode 25

How to revert:

sudo pmset -a hibernatemode 0

The different hibernatemode options (taken from here) are:
0 - Default Sleep - RAM stays powered.
1 - RAM contents dumped to disk. System shutdown.
3 - RAM stays powered, and is also dumped to disk.
5 - as 1 but for encrypted virtual memory.
7 - as 3 but for encrypted virtual memory.

#269
tseug

tseug

    InsanelyMac Sage

  • Members
  • PipPipPipPipPipPip
  • 407 posts
  • Gender:Male

I use deep sleep sometimes with SL.
set with sudo pmset -a hibernatemode 1
Chameleon correctly finds and loads the sleepimage file from /private/var/vm

As far as my testing went, I couldn't get it to work with Lion. The sleepimage is created but Chameleon didn't load it. I didn't look further in to it.


Chameleon gives me an "incorrect image signature" if I use forcewake. I suspect Rankrotten wasn't talking about deep sleep at all.

The different hibernatemode options (taken from here) are:
0 - Default Sleep - RAM stays powered.
1 - RAM contents dumped to disk. System shutdown.
3 - RAM stays powered, and is also dumped to disk.
5 - as 1 but for encrypted virtual memory.
7 - as 3 but for encrypted virtual memory.


from man pmset (which trumps your documentation ;) )

We do not recommend modifying hibernation settings. Any changes you make     are not supported. If you choose to do so anyway, we recommend using one     of these three settings. For your sake and mine, please don't use any-     thing other 0, 3, or 25.     hibernatemode = 0 (binary 0000) by default on supported desktops. The     system will not back memory up to persistent storage. The system must     wake from the contents of memory; the system will lose context on power     loss. This is, historically, plain old sleep.     hibernatemode = 3 (binary 0011) by default on supported portables. The     system will store a copy of memory to persistent storage (the disk), and     will power memory during sleep. The system will wake from memory, unless     a power loss forces it to restore from disk image.     hibernatemode = 25 (binary 0001 1001) is only settable via pmset. The     system will store a copy of memory to persistent storage (the disk), and     will remove power to memory. The system will restore from disk image. If     you want "hibernation" - slower sleeps, slower wakes, and better battery     life, you should use this setting.


#270
blackosx

blackosx

    InsanelyMacaholic

  • Coders
  • 3,085 posts
  • Gender:Male
  • Location:UK

I suspect Rankrotten wasn't talking about deep sleep at all.

No probably not.

from man pmset (which trumps your documentation ;) )

Lol.. you're right. ;) Thanks

#271
Rankrotten

Rankrotten

    InsanelyMac Protégé

  • Members
  • PipPip
  • 52 posts
  • Location:UK

EDIT: Wait, are you talking about normal sleep and not deep sleep?

Sorry for any confusion, to be clear I meant sleep with the screen, fans and cpu shut down which is normal sleep.

#272
nexus77777

nexus77777

    InsanelyMac Protégé

  • Members
  • PipPip
  • 77 posts
And it worked before except for CMOS reset?

Had the same trouble on last 11A494 ... still downloading GM now.... will try....

but RTC patch clear CMOS reset on my ep45ds3® but no wake at all... seems lion stay sleeping... must do hard reboot/reset

before patch: wake/CMOS reset immediately seems "opening his eyes"...

strange behavior ? isn't it ?

(Bansaku @ Jul 3 2011, 09:43 PM) 
Heyas folks, here's what's going on after GM install:

- After fresh install of Lion GM, restart worked fine with no CMOS reset. 
- Wake from sleep causes the system to restart with CMOS reset.
- Applied RTC patch; No more CMOS reset after sleep, but the system restarts. Have yet to mess around with DSDT, or tried another version of Chameleon.

History thus far:
- DP1-4 (fresh installs when applicable) Sleep worked, no CMOS reset.
- Updated Chameleon and CMOS reset and restart after wake. Applied RTC patch and all was good.
- Updated to DP5, sleep and wake work fine, CMOS reset after restart. Applied RTC patch, no change. CMOS reset after wake and restart.
- Fresh install Lion GM. CMOS reset after wake and restart. Applied new RTC patch, no CMOS reset but restart after wake.  


 It would be helpful if people would head over to 'My Controls' and add your system info to your signature. This not only saves you time by not having to add it to your posts, but also gives other members an idea what you have, and thus can better help you.


Had the similar trouble on last 11A494 ... still downloading GM now.... will try....

but RTC patch "clear" CMOS reset on my ep45ds3® and ep45ds3 but no wake at all... seems lion stay sleeping... must do hard reboot/reset (not tested on ep35ds3 /-r/ -l)


before patch: wake/CMOS reset immediately when lion seems "opening his eyes"...

strange behavior ? isn't it ?

Well, still in trouble BUT Thanks for your hard work guys !!!

Seems I'm in confusion, Normal sleep seems to be my trouble...
With DP4 without patch, Lion had Cmos {censored} on wake...

is there a solution for ???

Thanks...

#273
LatinMcG

LatinMcG

    Insanely digesting DSDT

  • Members
  • PipPipPipPipPipPipPipPipPipPipPip
  • 2,509 posts
  • Gender:Male
  • Location:Tampa, Florida

Chameleon RC5 752 (some of the later ones don't seem to boot)

if u update to chamelleon2 rc5 svn 103x or higher the product vendor changes MANUFACTER - MANUFACTURER.
that could be part of reason for no boot..

btw my RTC is frm MB3,1 ;) no more singe ram bank error.
http://www.insanelym...p...t&p=1706137

#274
plprado

plprado

    InsanelyMac Geek

  • Members
  • PipPipPip
  • 107 posts

if u update to chamelleon2 rc5 svn 103x or higher the product vendor changes MANUFACTER - MANUFACTURER.
that could be part of reason for no boot..

btw my RTC is frm MB3,1 ;) no more singe ram bank error.


are you saying you managed to fix the single bank error? Sorry, I don't understand what you mean by "my RTC is frm MB3,1". Could you please explain better? thanks.


BTW: tseug's patch for GM works here on asus P5K Premium, no more CMOS reset after sleep, but still getting single bank error.

#275
nexus77777

nexus77777

    InsanelyMac Protégé

  • Members
  • PipPip
  • 77 posts
Will try this...

http://www.kexts.com...7.0_latest.html

http://www.insanelym...t=#entry1706306

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

hope and see...



Well seems it's working, but without Lan (must change Ip) = must be "reseted"...

and this error twice during boot:

Jul 4 23:42:07 localhost kernel[0]: 0 0 AppleUSBCDC: start - initDevice failed
Jul 4 23:42:07 localhost kernel[0]: 0 0 AppleUSBCDC: start - initDevice failed

#276
bcc9

bcc9

    InsanelyMac Legend

  • Coders
  • 1,278 posts
  • Gender:Male

Chameleon gives me an "incorrect image signature" if I use forcewake. I suspect Rankrotten wasn't talking about deep sleep at all.

Yes, that would be because /var/vm/sleepimage is encrypted. See: http://www.insanelym...p...t&p=1708631






Post #1 says that the developed patch is "blocking a few jumps and calls". This does not sound very safe/complete -is there a more complete explanation of the patch available somewhere, or is the underlying code still not really understood? Sorry if I missed where the underlying code was determined to really be safe to skip.

#277
tseug

tseug

    InsanelyMac Sage

  • Members
  • PipPipPipPipPipPip
  • 407 posts
  • Gender:Male

Yes, that would be because /var/vm/sleepimage is encrypted. See: http://www.insanelym...p...t&p=1708631


Makes sense. :)


Post #1 says that the developed patch is "blocking a few jumps and calls". This does not sound very safe/complete -is there a more complete explanation of the patch available somewhere, or is the underlying code still not really understood? Sorry if I missed where the underlying code was determined to really be safe to skip.


AFAIK there isn't any other way (yet) to fix the CMOS reset without using a binary patch. The latest patch change one jump to be unconditional which is about as unobtrusive as you can get with binary patching, but not having to patch at all would be nicer of course. The underlying code is not well understood, at least not by me.

With regards to safety: It's a hackintosh. It's unsafe by definition. ;)

#278
bcc9

bcc9

    InsanelyMac Legend

  • Coders
  • 1,278 posts
  • Gender:Male

AFAIK there isn't any other way (yet) to fix the CMOS reset without using a binary patch. The latest patch change one jump to be unconditional which is about as unobtrusive as you can get with binary patching, but not having to patch at all would be nicer of course. The underlying code is not well understood, at least not by me.

Well, good job on finding a patch that works for most people. Thanks for the info, even if it wasn't quite what I was hoping to hear :thumbsup_anim: I'd been sitting back hoping that by lion GM this would have been sorted out. Guess I'll be taking a look at those routines too...

With regards to safety: It's a hackintosh. It's unsafe by definition. :)

Sure but we can practice safe coding practices on what we do on top of apple's stuff, and with apple's stuff being pretty well vetted, have a good chance of getting something that works well, and in some cases, working better than what one can buy from apple.

#279
digital_dreamer

digital_dreamer

    InsanelyMac Legend

  • Members
  • PipPipPipPipPipPipPipPip
  • 1,077 posts
  • Gender:Male
  • Location:Missouri USA

<snip>
With regards to safety: It's a hackintosh. It's unsafe by definition. :thumbsup_anim:

LOL! :)

MAJ

#280
pehera

pehera

    InsanelyMac Protégé

  • Members
  • Pip
  • 16 posts
  • Gender:Male
  • Location:Denmark
That script is working om my GA-EP45-DS3L (OSX 10.7 Lion GM)
No more bios reset after sleep
But auto sleep dos´nt work ?
I´ve attached my dsdt.aml

Attached Files







1 user(s) are reading this topic

0 members, 1 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