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

#341
nexus77777

nexus77777

    InsanelyMac Protégé

  • Members
  • PipPip
  • 77 posts

Can anybody explain to me how I can patch AppleRTC.kext or upload one ready to go?

Thanks


just run the command (copy/paste texte) into terminal app

perhaps just repair permissions (with disk utility optional I think)

and recreate cache to be sure...

sudo chown -R 0:0 /System/Library/Extensions
sudo chmod -R 755 /System/Library/Extensions
sudo kextcache -v 1 -a i386 -a x86_64 -m /System/Library/Caches/com.apple.kext.caches/Startup/Extensions.mkext /System/Library/Extensions



#342
iWire

iWire

    InsanelyMac Protégé

  • Members
  • Pip
  • 23 posts
  • Gender:Male
  • Location:BFE, Earth

Can anybody explain to me how I can patch AppleRTC.kext or upload one ready to go?

Thanks


1. Open terminal then paste this

2. sudo perl -pi -e 's|\x75\x30\x44\x89\xf8|\xeb\x30\x44\x89\xf8|; s|\x75\x3d\x8b\x75\x08|\xeb\x3d\x8b\x75\x08|' /System/Library/Extensions/AppleRTC.kext/Contents/MacOS/AppleRTC

3. type exit

4. reboot

#343
Rackers

Rackers

    InsanelyMac Protégé

  • Members
  • PipPip
  • 67 posts
Thanks guys. This is just to fix the CMOS from resetting right?

Does anybody know or is able to point me to a post were I can get some help for the sleep issues I'm having. If I manually sleep the computer it works fine if I wake it after a few minutes but say if I leave it 10 minutes it goes into a (deep?) sleep and will not resume correctly (fans power back on but no screen).

Thankjs

#344
kmare

kmare

    InsanelyMac Geek

  • Members
  • PipPipPip
  • 120 posts
  • Gender:Male
  • Location:Toronto

This is an alternate patch for Vanilla AppleRTC.kext of Lion GM. An unconditional jump over the rtcWrites() in updateChecksum() to prevent CMOS Resets.

sudo perl -pi -e 's|\x75\x30\x44\x89\xf8|\xeb\x30\x44\x89\xf8|; s|\x75\x3d\x8b\x75\x08|\xeb\x3d\x8b\x75\x08|' /System/Library/Extensions/AppleRTC.kext/Contents/MacOS/AppleRTC


Thanks -- perfect fix for EP45-UD3P

#345
rvxtm

rvxtm

    InsanelyMac Protégé

  • Members
  • PipPip
  • 92 posts
  • Gender:Male
  • Location:Timisoara, Romania
  • Interests:Tech, Science, Biology, OSX86 stuff
Hey guys, i just took the two tests for posting here, great idea ! :)
So, here is my question, i've been a long time reader of this area of the forum, my interest in osx porting to pc is a long time interest.

But you say here you have the CMOS reset problem, i'm using a Gigabyte EP45-Extreme MB, and just upgraded to Lion from SL.

In Snow leppy i used ElliottForceLegacyRTC to fix the problem, i've installed it to Lion too in the /extra folder and it works, no CMOS reset.

What improvements does the patching of the native AppleRTC bring ?

I'm on the GM with arch=x86_64 version of lion btw.

Thx in advance .

#346
stellarola

stellarola

    InsanelyMac Legend

  • Members
  • PipPipPipPipPipPipPip
  • 682 posts
  • Gender:Male
  • Location:Lextown, KY

Hey guys, i just took the two tests for posting here, great idea ! :P
So, here is my question, i've been a long time reader of this area of the forum, my interest in osx porting to pc is a long time interest.

But you say here you have the CMOS reset problem, i'm using a Gigabyte EP45-Extreme MB, and just upgraded to Lion from SL.

In Snow leppy i used ElliottForceLegacyRTC to fix the problem, i've installed it to Lion too in the /extra folder and it works, no CMOS reset.

What improvements does the patching of the native AppleRTC bring ?

I'm on the GM with arch=x86_64 version of lion btw.

Thx in advance .


When you attempt sleep in Lion does it wake properly or does it reset the cmos/restart the computer?

-Stell

#347
antic

antic

    InsanelyMac Geek

  • Members
  • PipPipPipPip
  • 226 posts

This is an alternate patch for Vanilla AppleRTC.kext of Lion GM. An unconditional jump over the rtcWrites() in updateChecksum() to prevent CMOS Resets.

sudo perl -pi -e 's|\x75\x30\x44\x89\xf8|\xeb\x30\x44\x89\xf8|; s|\x75\x3d\x8b\x75\x08|\xeb\x3d\x8b\x75\x08|' /System/Library/Extensions/AppleRTC.kext/Contents/MacOS/AppleRTC


And repair permissions in Terminal

sudo chown -R 0:0 /System/Library/Extensions
sudo chmod -R 755 /System/Library/Extensions
sudo kextcache -v 1 -a i386 -a x86_64 -m /System/Library/Caches/com.apple.kext.caches/Startup/Extensions.mkext /System/Library/Extensions


Thanks. This worked great.

Also found out that can now wake from power button if i'm using a bluetooth keyboard instead of a USB keyboard

#348
nissefar

nissefar

    InsanelyMac Protégé

  • Members
  • PipPip
  • 73 posts

Also found out that can now wake from power button if i'm using a bluetooth keyboard instead of a USB keyboard


What happened before?

I'm still desperate to find a solution to Power Button wake / Wake on LAN not waking the system completely. Black screen, goes back to sleep again after a few secs. USB wake works fine.

Getting Kernel log - "Wake Reason: ?"

I've tried downloading the XNU kernel sources and searched for where it determines Wake Reason, but I've not been able to find it. It seems like if the kernel can't determine the wake reason, it goes back to sleep after some time. I guess it is missing what is called "HID Tickle" (found the log for USB wakes), whatever that means.

#349
rvxtm

rvxtm

    InsanelyMac Protégé

  • Members
  • PipPip
  • 92 posts
  • Gender:Male
  • Location:Timisoara, Romania
  • Interests:Tech, Science, Biology, OSX86 stuff
If i try to put it to sleep, it turns off the video output, but remains on, does not wake up, after hard reset, the cmos is still untouched.

#350
longtom

longtom

    InsanelyMac Sage

  • Members
  • PipPipPipPipPip
  • 265 posts
Try to wakeup with keyboard and click mouse after some seconds!

#351
rvxtm

rvxtm

    InsanelyMac Protégé

  • Members
  • PipPip
  • 92 posts
  • Gender:Male
  • Location:Timisoara, Romania
  • Interests:Tech, Science, Biology, OSX86 stuff
I was thinking to remove cpunull kext and add pstates and cstates to boot.plist for native power management

#352
antic

antic

    InsanelyMac Geek

  • Members
  • PipPipPipPip
  • 226 posts

What happened before?

I'm still desperate to find a solution to Power Button wake / Wake on LAN not waking the system completely. Black screen, goes back to sleep again after a few secs. USB wake works fine.

Getting Kernel log - "Wake Reason: ?"

I've tried downloading the XNU kernel sources and searched for where it determines Wake Reason, but I've not been able to find it. It seems like if the kernel can't determine the wake reason, it goes back to sleep after some time. I guess it is missing what is called "HID Tickle" (found the log for USB wakes), whatever that means.


When pressing the power button the system would appear to wake but there was no output to the screen. The only way i could get output to the screen was to activate the USB keyboard or mouse.

I replaced the USB keyboard with a bluetooth keyboard. This on its own wouldn't wake the system but i found the power button now worked.

#353
longtom

longtom

    InsanelyMac Sage

  • Members
  • PipPipPipPipPip
  • 265 posts

When pressing the power button the system would appear to wake but there was no output to the screen. The only way i could get output to the screen was to activate the USB keyboard or mouse.

I replaced the USB keyboard with a bluetooth keyboard. This on its own wouldn't wake the system but i found the power button now worked.


So, only power button, and screen is OK?

#354
rayap

rayap

    InsanelyMac Geek

  • Members
  • PipPipPip
  • 161 posts
  • Gender:Male
@nexus77777
Re the pmlog, do have occasionally the 'slow response' message. Mainly puzzled by the following that appears at every boot if the RTC register length is set to 0x04 or 0x08 but not as 0x02, even without the patch in SL or Lion.

* Domain: wake
- Message: Wake: Loginwindow Authorization Failure - AC
- Time: 7/2/11 2:51:22 PM GMT+0
- Signature: Loginwindow Authorization Failure
- Result: Failure

Just wandering about in search of a dsdt solution for CMOS Resets.

#355
nissefar

nissefar

    InsanelyMac Protégé

  • Members
  • PipPip
  • 73 posts

When pressing the power button the system would appear to wake but there was no output to the screen. The only way i could get output to the screen was to activate the USB keyboard or mouse.

I replaced the USB keyboard with a bluetooth keyboard. This on its own wouldn't wake the system but i found the power button now worked.


{censored}, that's weird. So you're saying you removed your USB keyboard, and the power button started working correctly? Can you confirm if WoL works? Do you still have your mouse plugged in? Does the problem come back if you replug the USB keyboard? What kind of keyboard do you have?

Sorry for the 10 questions, but I need to know ;)

#356
antic

antic

    InsanelyMac Geek

  • Members
  • PipPipPipPip
  • 226 posts

{censored}, that's weird. So you're saying you removed your USB keyboard, and the power button started working correctly? Can you confirm if WoL works? Do you still have your mouse plugged in? Does the problem come back if you replug the USB keyboard? What kind of keyboard do you have?

Sorry for the 10 questions, but I need to know ;)


When a mouse is plugged in do not touch and wakes from power button.
When no mouse plugged wakes from power button
Problem returns if I plug the keyboard back in.

Using standard Dell USB keyboard to select boot drive
Product ID: 0x2003
Vendor ID: 0x413c (Dell Inc.)

Apple BT keyboard
Apple BT Mouse & Trackpad

Wake on Lan not working. Might be due to using RealtekR1000SL.kext for LAN access

#357
longtom

longtom

    InsanelyMac Sage

  • Members
  • PipPipPipPipPip
  • 265 posts

When a mouse is plugged in do not touch and wakes from power button.
When no mouse plugged wakes from power button
Problem returns if I plug the keyboard back in.

Using standard Dell USB keyboard to select boot drive
Product ID: 0x2003
Vendor ID: 0x413c (Dell Inc.)

Apple BT keyboard
Apple BT Mouse & Trackpad

Wake on Lan not working. Might be due to using RealtekR1000SL.kext for LAN access


So, with BT keyboard and USB mouse and wakup from Power button, screen wakes up normally, w/o pressing anything on keyboard/mouse?

#358
antic

antic

    InsanelyMac Geek

  • Members
  • PipPipPipPip
  • 226 posts

So, with BT keyboard and USB mouse and wakup from Power button, screen wakes up normally, w/o pressing anything on keyboard/mouse?


Yes

In addition I have tried using RTL8169.kext for LAN instead of RealtekR1000SL.kext. It didn't make any difference and I also
didn't have WOL

#359
longtom

longtom

    InsanelyMac Sage

  • Members
  • PipPipPipPipPip
  • 265 posts
Thanks!

Wich Bluetoot adapter do you use?

#360
antic

antic

    InsanelyMac Geek

  • Members
  • PipPipPipPip
  • 226 posts

Thanks!

Wich Bluetoot adapter do you use?


Not really sure. Its some generic thing i picked up years ago.

Manufacturer: Cambridge Silicon Radio
Name:
Firmware Version: 373
Bluetooth Power: On
Discoverable: Yes
Vendor ID: 0
Product ID: 0x1
HCI Version: 1 (0x1)
HCI Revision: 373 (0x175)
LMP Version: 1 (0x1)
LMP Subversion: 373 (0x175)
Device Type (Major): Computer
Device Type (Complete): Macintosh Desktop
Composite Class Of Device: 3670276 (0x380104)
Device Class (Major): 1 (0x1)
Device Class (Minor): 1 (0x1)
Service Class: 448 (0x1c0)





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

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