Jump to content
rayap

CMOS Resets by AppleRTC.kext

71 posts in this topic

Recommended Posts

With the new AppleRTC kext version 1.5, got rid of CMOS Resets on my setup with this perl script [Edit: for arch=x86_64].Basically jumps over the checksum updates.

 

sudo perl -pi -e 's|\x75\x30\x89\xd8|\xeb\x30\x89\xd8|' /Extra/Extensions/AppleRTC.kext/Contents/MacOS/AppleRTC

 

AppleRTC.kext v1.5 does not jive with Lion when in E/E (multi boot); leave it in S/L/E .

Share this post


Link to post
Share on other sites
Advertisement

Hi rayap - We meet again :)

 

Well done with your quick work here, though to be honest I haven't tried it yet as I don't even have ML installed. But at least I know where to come if and when I need it.

 

Regards

blackosx

 

EDIT:

This does the job nicely. Thanks rayap.

Share this post


Link to post
Share on other sites

Hi rayap! you're fix works perfectly here on asus p5q MB, i've patched a copy of the original ML appleRTC.kext and just placed it into /E/E of the usb pendrive that i use to boot the OS leaving the original in S/L/E.

Tnx and cheers

Share this post


Link to post
Share on other sites

I'll need to check this out, but I believe rayap's edit allows for auto sleep and the original from Riley Freeman's post does not.

 

-Stell

 

EDIT: Auto-sleep works before patching AppleRTC in 10.8 DP1. However CMOS reset still occurs without patching. I'd like to see a KEXT that can override this edit altogether, but I'll save that for smarter men.

Share this post


Link to post
Share on other sites

I'll need to check this out, but I believe rayap's edit allows for auto sleep and the original from Riley Freeman's post does not.

 

-Stell

 

LOL Stell we meet every time there's a new topic about sleep and applertc :P

Share this post


Link to post
Share on other sites

I applied this old Lion fix to mine and it seems to have worked too. Yours is a bit more compact though.

 

Thanks for testing it (so I won't have to) :)

 

It actually isn't less compact. The reason it is longer is to avoid matching on some relative address jumps that tend to change if the source code is changed so it's not completely accidental that it works :) In addition it patches both the 32-bit and 64-bit kernel.

Share this post


Link to post
Share on other sites

Ah, thanks for the info tseug. I usually run in 64-bit mode so didn't notice that the other patch only works on the 64-bit kernel. I'll have to test yours for sleep as I don't use it. I only wanted the CMOS reset fix.

Share this post


Link to post
Share on other sites

Ah, thanks for the info tseug. I usually run in 64-bit mode so didn't notice that the other patch only works on the 64-bit kernel. I'll have to test yours for sleep as I don't use it. I only wanted the CMOS reset fix.

 

None of the patches are designed to do anything to sleep. They only fix the CMOS reset.

Share this post


Link to post
Share on other sites

Funny that it's not supposed to fix sleep but it does, for me also. I think it must fix somehow how the RTC works when it sleeps (the machine periodically uses the RTC to wake itself up and keep network services running i.e. bonjour sleep proxy).

Share this post


Link to post
Share on other sites

Hi,

Strangley none of these fix CMOS reset after sleep for me.

I patched the AppleRTC in place on the seperate drive I've installed 10.8 onto. rebuilt caches etc, but still get a cmos reset.

These patches have worked fine for me in Lion. Hmm.

Jon

Share this post


Link to post
Share on other sites

Hi,

Strangley none of these fix CMOS reset after sleep for me.

I patched the AppleRTC in place on the seperate drive I've installed 10.8 onto. rebuilt caches etc, but still get a cmos reset.

These patches have worked fine for me in Lion. Hmm.

Jon

works now, I don't think I rebuilt the caches properly first time.

Thanks

Jon

Share this post


Link to post
Share on other sites

Seems like the patch in the Opening Post is working for AppleRTC.kext in DP2 and further the kext is now half-weight as it appears purged of 32-bit code.

Share this post


Link to post
Share on other sites
A few days ago when I installed DP-2 I spent some time trying to get the Opening Post patch to work reliably with the DP-2 kext but it never worked for more than one sleep/awake cycle. I gave up and used the patched DP-1 kext. After reading your post I tried again several times but no joy...

 

Cycled thro 'Total Sleep/Wakes since boot:4' and rebooted without problems.

Share this post


Link to post
Share on other sites

Patch works fine in ML dp2 p5k plain.

Before patching, when restart in lion, cmos reset. because fsb went up ridiculously.

This time in ML, it didn't make cmos reset. but it lowered the fsb from 333 to 280.

Share this post


Link to post
Share on other sites

Again, it seems like the patch in the Opening Post is working for AppleRTC.kext in DP3. The size of the AppleRTC exec file remains at 66,320 bytes and probably not changed.

Rgds

Share this post


Link to post
Share on other sites

Again, it seems like the patch in the Opening Post is working for AppleRTC.kext in DP3.

Unless I'm mistaken, or have forgotten about some other patch I've applied somewhere, I no longer need to patch the AppleRTC binary for 10.8 DP3. Rebooting after a sleep/wake cycle now performs normally without any CMOS error.

 

Can somebody else check this on their setup?

Share this post


Link to post
Share on other sites

New "Tool" to hopefully eliminate this bug.

CloverRTCTool

run rc.local from CloverRTCTool folder and it will:

Install rc.local to /etc/rc.local and /etc/rc.shutdown.local

Install cmosDumperForOsx to /usr/local/bin to do RTC cmos dumps at logon and shutdown.

One size fits all

 

In my effort to finally track down the cmos reset bug this tool WILL come in handy.

Already these values get changed

RTC len 2

Probable CMOS RESET: Check offsets: 46 61 83 88 89 95 125

and for RTC len 4

Probable CMOS RESET: Check offsets: 46 61 83 88 89 95 125 141

These offsets are for MY motherboard GigaByte P35C-DS3R

Your offsets may be different.

 

To Test:

1.

run rc.local from CloverRTCTool folder and you will get the cmos dump in CloverRTCTool/CloverRTCTool

named RTCDump_0816_07-05-2012_rc.local_128.txt

0816=HourMin

07-05-2012=DMY

rc.local=will change to rc.shutdown.local

128=len 2 128 bytes, will cjhange to 256 ( or 512 eventually)

len 2 is automatically determined but doesn't seem to work properly at moment.

Particularly when run from /etc/rc.local ( run at startup), len 4 is detected as len 2.

When run from CloverRTCTool len 2/4 are correct.

 

2.

To Test Sleep:

Put Mac to sleep, wake it and run 1 again.

Do a compare of the two files and check if offsets above match.

 

3.

If you run with len 2 in RTC, try len 4 and re-run Test,

 

4.

This tip from RevoGirl (hi Sam)

put in kernel args rtc=7 and you also get RTC dump in kernel log.

 

Lets finally crack this bug

Share this post


Link to post
Share on other sites

Maybe is the wrong place, sorry please.

Unless I'm mistaken, or have forgotten about some other patch I've applied somewhere, I no longer need to patch the AppleRTC binary for 10.8 DP3. Rebooting after a sleep/wake cycle now performs normally without any CMOS error.

+1. But here now in 10.7.4 (11E52) on sandy bridge laptop. Vanilla AppleRTC (1.5), and I just have the fix IRQ8 out of Device:


               Device (RTC)
               {
                   Name (_HID, EisaId ("PNP0B00"))
                   Name (_CRS, ResourceTemplate ()
                   {
                       IO (Decode16,
                           0x0070,             // Range Minimum
                           0x0070,             // Range Maximum
                           0x01,               // Alignment
                           0x08,               // Length
                           )
/*
                       IRQNoFlags ()
                           {8}
*/
                   })
               }

Share this post


Link to post
Share on other sites

Unless I'm mistaken, or have forgotten about some other patch I've applied somewhere, I no longer need to patch the AppleRTC binary for 10.8 DP3. Rebooting after a sleep/wake cycle now performs normally without any CMOS error.

 

Can somebody else check this on their setup?

 

Same here, and I acctually don't need it in 10.7.3 either. Got a Asus P8Z68-V LX and the 3k version of the UEFI-BIOSes for Asus z68-boards seems like made for hacks.

Share this post


Link to post
Share on other sites

Would be 'nice' if somebody with a Mac can give me some CloverRTCTool dumps to have a look at.

Particularly a normal boot dump, after sleep dump and after wake dump.

Thanks

Share this post


Link to post
Share on other sites

Unless I'm mistaken, or have forgotten about some other patch I've applied somewhere, I no longer need to patch the AppleRTC binary for 10.8 DP3. Rebooting after a sleep/wake cycle now performs normally without any CMOS error.

 

Can somebody else check this on their setup?

 

Have you changed AHCi to ESB2?

Have changed ICH10 to ESB2, I don't need patch AppleRTC.kext anymore, both 10.7 and 10.8

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.

  • Similar Content

    • By sameh0
      i managed to install os x el capitan yesterday and since then almost everything worked except the AppleRTC patch so i get a cmos reset every time i sleep or wake the device . 
       
      back on Mountain lion , Maverick and Yosemite i used this patch 
      sudo perl -pi -e 's|\x75\x2e\x0f\xb6|\xeb\x2e\x0f\xb6|' /System/Library/Extensions/AppleRTC.kext/Contents/MacOS/AppleRTC sudo touch /System/Library/Extensions the patch isn't working anymore , anyone patched it yet ? 
    • By stylisch
      Hi everyone,
      I am happy with my hackintosh since two years. I just recently upgraded to OSX Yosemite, starting with 10.10.3.
      I did a complete reinstall on a new SSD and I have the problem that I have random CMOS setting resets since than.
      It occurs about once a day and it never happened before.
      In Clover.config, there is
      <key>KernelAndKextPatches</key> <dict> <key>AppleRTC</key> <true/> <key>AsusAICPUPM</key> <true/> <key>KextsToPatch</key> <array> <dict> <key>Comment</key> <string>Trim Patch</string> <key>Find</key> <data> AEFQUExFIFNTRAA= </data> <key>Name</key> <string>IOAHCIBlockStorage</string> <key>Replace</key> <data> AAAAAAAAAAAAAAA= </data> </dict> </array> </dict> which should prevent the reset with patching of AppleRTC.
      Any help is appreciated.
    • By todesto
      My system didn't have problem sleep/wake until Maverick but I have a problem with sleep with Yosemite.
      System sleeps fine but when it wakes, it doesn't turn on and goes into reboot mode and keeps going.
       
      It seems like AppleRTC problem but it still does same thing even with Clover AppleRTC patch.
       
      Is this appleRTC problem?
    • By Marchrius
      sudo perl -pi -e 's|\x75\x2e\x0f\xb6|\xeb\x2e\x0f\xb6|' /System/Library/Extensions/AppleRTC.kext/Contents/MacOS/AppleRTC sudo touch /System/Library/Extensions  It is the same of Mountain Lion and Mavericks, but at different location:
       
      10.9
      < 0000000000000d3e jne 0xd6e --- > 0000000000000d3e jmp 0xd6e 10.10
      < 0000000000001cb3 jne 0x1ce3 --- > 0000000000001cb3 jmp 0x1ce3 Thanks to:
      http://www.insanelymac.com/forum/topic/289798-applertc-patch-cmos-reset-after-sleepwake
       
    • By ErmaC
      Already patched AppleRTC.kext
      Replace it in /System/Library/Extensions/
       
      Followed rayap topic here: CMOS Resets by AppleRTC.kext

      sudo perl -pi -e 's|\x75\x30\x89\xd8|\xeb\x30\x89\xd8|' AppleRTC All credits to rayap
×