Jump to content

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


rayap
 Share

474 posts in this topic

Recommended Posts

I'm experiencing some strange behavior. With my old Asus P5K Deluxe board, the RTC patch and changing the RTC length to 4 worked. With this EP45-UD3R, the RTC patch works (no change in behavior as far as booting goes), but, as soon as I change the RTC length to 4 in the DSDT, I get a CMOS reset every reboot. I even checked with a vanilla RTC kext, if the length of the RTC is 4, I get the CMOS reset every reboot. Change it back to 2, no problems (don't know about sleep). Any ideas?

Hi og-phantom

Ever since Stellarola found the fix for Snow Leopard, I have the Device (RTC) length set to 2 and still do now. Just use what works for you.

 

Hi blackosx, so the patch above is preferred to this one below?

Hi KariNeko

 

It doesn't really matter which patch you use, but the second patch uses less changes so I though that would be favourable. But the more feedback we can get about the patches, the better.

 

With that one I could wake correctly my Asus P6T Deluxe V2 that was working correctly on Snow Leopard with a DSDT.aml file and wasn't anymore in Lion. Should I re patch the AppleRTC kext with the first quoted code?

In that case, yes, use the first patch. But if you've already applied the second patch then you will need to go back to your original (backed up) unpatched AppleRTC.kext and apply the first patch to that.

Link to comment
Share on other sites

Hello blackosx!

 

I applied the latest patch ( the one with less modifications that starts with xBC\x00\x74\x10 ) to AppleRTC kext on a Lion DP4 install with a Gigabyte H67N-USB3-B3 with the corresponding DSDT.aml. Now sleeps works correctly, it resumes without rebooting and failing to CMOS error. :P

 

I'll re patch AppleRTC on my Asus P6T Deluxe V2 mobo and report back

 

Added:

OK, applying the latest bin patch ( xBC\x00\x74\x10 ) continues to make sleep work without problems on Asus P6T Deluxe V2 mobo.

 

 

So summing it up:

 

Gigabyte H67N-USB3-B3 + DSDT.aml on Snow Leopard -> Sleep working.

 

Gigabyte H67N-USB3-B3 + DSDT.aml on Lion -> Not working: automatically reboots after resume and CMOS gets reseted. Workaround: Applying AppleRTC.kext bin patch resolves the issue.

 

Asus P6T Deluxe V2 + DSDT.aml on Snow Leopard -> Sleep working.

 

Asus P6T Deluxe V2 + DSDT.aml on Lion -> Not working: hangs after resume. Workaround: Applying AppleRTC.kext bin patch resolves the issue.

 

 

Hopefully there's another option to bin patch in the future, for now this at least works. :D

Link to comment
Share on other sites

With this EP45-UD3R, the RTC patch works (no change in behavior as far as booting goes), but, as soon as I change the RTC length to 4 in the DSDT, I get a CMOS reset every reboot. I even checked with a vanilla RTC kext, if the length of the RTC is 4, I get the CMOS reset every reboot. Change it back to 2, no problems (don't know about sleep). Any ideas?

 

Hi og-phantom

Ever since Stellarola found the fix for Snow Leopard, I have the Device (RTC) length set to 2 and still do now. Just use what works for you.

 

I know this is slightly off topic, but this has been puzzling me for the past week. For Snow Leopard, right from the early days, CMOS reset was a factor upon shutdown/restart, regardless of sleep. It is soon discovered that the cause of the CMOS reset was the RTC, and simply changing the length from 4 to 2 remedied the problem. Both above quotes show this to be true. HOWEVER, as I posted earlier, my DSDT (the same I use for SL and Lion) no longer contains ANY RTC fixes, pure vanilla from extraction, meaning the RTC length is unchanged, and un-edited. SO....why am I not getting any CMOS resets in SL? Why is it that others (using Gigabyte boards) need the length changed to 2, yet I do not? Did Gigabyte do all Hackintoshers a favour and changed/ updated their BIOS for their new boards to no longer need the DSDT RTC fix?

Link to comment
Share on other sites

I know this is slightly off topic, but this has been puzzling me for the past week. For Snow Leopard, right from the early days, CMOS reset was a factor upon shutdown/restart, regardless of sleep. It is soon discovered that the cause of the CMOS reset was the RTC, and simply changing the length from 4 to 2 remedied the problem. Both above quotes show this to be true. HOWEVER, as I posted earlier, my DSDT (the same I use for SL and Lion) no longer contains ANY RTC fixes, pure vanilla from extraction, meaning the RTC length is unchanged, and un-edited. SO....why am I not getting any CMOS resets in SL? Why is it that others (using Gigabyte boards) need the length changed to 2, yet I do not? Did Gigabyte do all Hackintoshers a favour and changed/ updated their BIOS for their new boards to no longer need the DSDT RTC fix?

 

I agree, unfortunately I am in a middle-of-nowhere installation, finally got Led Cinema Display 27" to work via display port by using 10.6.7 framebuffers with 10.7 OpenGL Drivers...

 

I am just without my data, my 10.6.7 is a carbon copy cloned 10.4.3/10.4.4 updated at each update until today in an almost full 1.5TB drive so you can imagine how organized it is (not)... resuming, as i can not download and decompile your bios, could you please post your actual DSDT? searched around the thread and only found your FACP, its an usual p55 gigabyte fact with chameleon patch...

 

ICH10 and P55 are not that similar, If possible, are you able to post your whole ACPI in a zip? If not, just the dsdt would be appreciated.

 

We must find a way to send our full length RTC (4) without corruption: if we need to patch a next, lets full-patch.

Also, is your bios 16Mbit? Award is using what they call "hybrid efi-bios" (does this remember you anything, black?) for the 16Mbit (2MB) chips with recent updates, I have to check the pdfs, but i guess in this case RTC length would be 8, gotta check.

 

sorry everybody for the absence, but when i get rid of organizing my data into a new installation i'll have more attention, for now i'm using the iPhone to read the mail updates from this topic, very limited.

This is intriguing me as well, we should use dual bank rtc and have both updated... and just to think that this is about date....

 

Also, do your P55 has a TPM/TCPA chip? a lot of code is used with the same address as the RTC in systems like this.

By the way, I am totally against this chip

Link to comment
Share on other sites

Heyas Cartri,

 

First off, I finally applied the patch to the AppleRTC.kext from the update; I get the CMOS reset after wake->restart. The patch no longer works for me, regardless if the RTC length is set to 2 or 4 in my DSDT. Before the update the patch worked. At least I no longer get instant restart and CMOS reset after wake.

Here is my findings thus far:

- Had sleep with no CMOS reset DP1-4, then something changed....

- Had instant system restart and CMOS reset upon wake, not upon restart, then applied AppleRTC fix

- Had working wake and no CMOS reset upon restart

- Updated Lion, no more system restart upon wake, however now I have CMOS reset when I restart after wake

- Applied AppleRTC fix, still have CMOS reset after wake and restart

- No CMOS reset after wake and restart in Snow Leopard (after 10.6.8 update) with RTC length 4, Gigabyte default

** I have been reading, and cannot confirm this, but it has been reported that the 10.6.8 update is virtually the same build as 10.7 Lion, minus the cool new "Lion" features. If this can be confirmed, why are we not getting CMOS resets in 10.6.8? I hate to throw a wrench into the gears, but sometimes it gets heads scratching. NVM, just checked out AppleRTC from 10.6.8 and it seems unchanged :)

 

Anyway, I have posted my DSDT, along with text file with my extracted APIC. My BIOS is 2x16MBIT, but contains no (eeeeevil) TPM/TCPA chip.If there is anything else I can provide, just say the word. :)

GA_P55_UD3R.zip

Link to comment
Share on other sites

Heyas Cartri,

 

First off, I finally applied the patch to the AppleRTC.kext from the update; I get the CMOS reset after wake->restart. The patch no longer works for me, regardless if the RTC length is set to 2 or 4 in my DSDT. Before the update the patch worked. At least I no longer get instant restart and CMOS reset after wake.

Here is my findings thus far:

- Had sleep with no CMOS reset DP1-4, then something changed....

- Had instant system restart and CMOS reset upon wake, not upon restart, then applied AppleRTC fix

- Had working wake and no CMOS reset upon restart

- Updated Lion, no more system restart upon wake, however now I have CMOS reset when I restart after wake

- Applied AppleRTC fix, still have CMOS reset after wake and restart

- No CMOS reset after wake and restart in Snow Leopard (after 10.6.8 update) with RTC length 4, Gigabyte default

** I have been reading, and cannot confirm this, but it has been reported that the 10.6.8 update is virtually the same build as 10.7 Lion, minus the cool new "Lion" features. If this can be confirmed, why are we not getting CMOS resets in 10.6.8? I hate to throw a wrench into the gears, but sometimes it gets heads scratching. NVM, just checked out AppleRTC from 10.6.8 and it seems unchanged :wacko:

 

Anyway, I have posted my DSDT, along with text file with my extracted APIC. My BIOS is 2x16MBIT, but contains no (eeeeevil) TPM/TCPA chip.If there is anything else I can provide, just say the word. :P

Hi!

 

The only difference i see in your dsdt (did not read it completely, just passed my eyes above it) is that you are using IRQ8 in you RTC device, that is a hook for enabling the STS bit capability. But, Black tested with no differences.

 

I am sorry but I could not understand your situation: your system do has a problem with RTC reset in latest lion AppleRTC vanilla or not? I was understanding that you had a system without the cmos/sleep problems...

As you report different installs etc, i got a lil confused... I was thinking you had a problem-less system, but i guess not? Without patches in the OS files, you do have the same problems as us? (finally I'm a "lion'er", same problem, no wake + cmos reset)

Link to comment
Share on other sites

I was just realized that for my motherboard default values in Device (RTC) for Length is 0x02 but not 0x04 like for Gigabyte boards!

 

And of course beneath that peace of code I have more:

 

IRQNoFlags ()

{8}

 

I was extracted DSDT from 6B3F1P40.ROM and 6B3F1P43.ROM files and in both cases Length is set to 0x02! I’m not sure for other motherboards beside Gigabyte what are the default values, but if I’m correct, this means that most PC motherboards are using actually 0x04 values for Length, but there are some that are using 0x02, and Mac computers 0x08. Hmm...

Link to comment
Share on other sites

Here is the one. It's from 11A494a. I attach both, original and patched one.

 

Ok, thanks a lot...JUN Ho, do I need to modify DSDT too ???

 

seems have build 11A459e not yours (last, so !),

strange cause nothing through ASU....

 

Also, do your P55 has a TPM/TCPA chip? a lot of code is used with the same address as the RTC in systems like this.

By the way, I am totally against this chip

 

My Ep45-DS3R have this TPM chip (disabled) but I had to remove these entries in DSDT to get a "clean" one without errors... is this chip causing problems in particular ?

 

in my second mobo EP45-ds3 w/o TPM:

Device (RTC)
			{
				Name (_HID, EisaId ("PNP0B00"))
				Name (ATT0, ResourceTemplate ()
				{
					IO (Decode16,
						0x0070,			 // Range Minimum
						0x0070,			 // Range Maximum
						0x00,			   // Alignment
						0x02,			   // Length
						)
				})
				Name (ATT1, ResourceTemplate ()
				{
					IO (Decode16,
						0x0070,			 // Range Minimum
						0x0070,			 // Range Maximum
						0x00,			   // Alignment
						0x04,			   // Length
						)
				})
				Method (_CRS, 0, NotSerialized)
				{
					If (LGreaterEqual (OSFX, 0x03))
					{
						If (HPTF)
						{
							Return (ATT1)
						}
						Else
						{
							Return (ATT0)
						}
					}
					Else
					{
						Return (ATT0)
					}
				}
			}

Link to comment
Share on other sites

Patch for GM:

 

sudo perl -pi -e 's|\x8b\x45\xc8\x39\x45\xcc\x74\x0b|\x8b\x45\xc8\x39\x45\xcc\xeb\x0b|; s|\x8b\x45\xb4\x39\x45\xb8\x74\x08|\x8b\x45\xb4\x39\x45\xb8\xeb\x08|' /System/Library/Extensions/AppleRTC.kext/Contents/MacOS/AppleRTC

Link to comment
Share on other sites

Patch for GM:

 

perl -pi -e 's|\x8b\x45\xc8\x39\x45\xcc\x74\x0b|\x8b\x45\xc8\x39\x45\xcc\xeb\x0b|; s|\x8b\x45\xb4\x39\x45\xb8\x74\x08|\x8b\x45\xb4\x39\x45\xb8\xeb\x08|' /System/Library/Extensions/AppleRTC.kext/Contents/MacOS/AppleRTC

With this patch, haven`t got CMOS reset, but after wake, just Black Screen .. (VGA - HD4670).

Link to comment
Share on other sites

my 2 pennies.. (cents) my inspiron 1520 10.6.x had the error RTC: only single ram bank . so i copied the mbp3,1 RTC to it and it worked. length 8.

original was almost same. alignment 0x02 lentgh 0x06 for the first 0x70 .. second one said 0x72 lenght 2. i guess combined it into one with bigger length.

http://www.insanelymac.com/forum/index.php...t&p=1706137

 

my alignment on all devices is opposite. 0x10 instead of 0x01 (why?)

also in all the the Device (LNKx) (part of LPC) i saw a line of shiftright.. in macbook said shiftleft. hmm reading backwards whole table ? (ill edit with mode dsdt details soon)

 

also i never had cmos reset. but i did notice after sleep long post like detecting drives on dell screen or rebuilding DMI data.

 

i did get cmos reset with MBP5,1 smbios .. weird. and it shuts of after sleep.. to wake in hibernatemode 3 with secure virtual mem.

 

dunno if that points to anything helpful or brainstorming quality moment.

Link to comment
Share on other sites

Patch for GM:

 

perl -pi -e 's|\x8b\x45\xc8\x39\x45\xcc\x74\x0b|\x8b\x45\xc8\x39\x45\xcc\xeb\x0b|; s|\x8b\x45\xb4\x39\x45\xb8\x74\x08|\x8b\x45\xb4\x39\x45\xb8\xeb\x08|' /System/Library/Extensions/AppleRTC.kext/Contents/MacOS/AppleRTC

Just got back from the beach today :)

Good work tseug - I can confirm this patch works on the GM release (though only tried it with the kernel booted in 64bit mode).

Thanks

Link to comment
Share on other sites

Patch for GM:

 

perl -pi -e 's|\x8b\x45\xc8\x39\x45\xcc\x74\x0b|\x8b\x45\xc8\x39\x45\xcc\xeb\x0b|; s|\x8b\x45\xb4\x39\x45\xb8\x74\x08|\x8b\x45\xb4\x39\x45\xb8\xeb\x08|' /System/Library/Extensions/AppleRTC.kext/Contents/MacOS/AppleRTC

The old Patch works on my UD7 RAID GM setup!

I tried it last night before this one was posted and everything is just fine after some 18 hours.

Haven't tried this one yet. Should I use the new one?

Link to comment
Share on other sites

The old Patch works on my UD7 RAID GM setup!

I tried it last night before this one was posted and everything is just fine after some 18 hours.

Haven't tried this one yet. Should I use the new one?

 

If it ain't broke don't fix it :)

Link to comment
Share on other sites

It's been so long since I posted I had to do the quizzes!

 

The important stuff - the GM patch works for me. My procedure was sudo, then patch, then rebuild kext startup cache.

 

The details:

I got the cmos reset after sleep issue with DP4 and GM. I didn't notice it with previous Lions but it may have been there.

My DSDT is fully patched for vanilla intelcpupm c-states and p-states, and obviously the RTC patch (Length 2 on both counts). I don't have this issue in SL.

 

I get the RTC: Only single Ram Bank log message in both SL and Lion as my RTC length is 2, rather than 8.

 

I'm using a q9550 in a gigabyte GA-ep45-ds4 with F10e beta bios. Yes its definitely e not b. I am only using 2 ram sticks (1 bank out of 2) because 2 breaks windows 7 ahci 1.20 somehow.

 

I'm happy to post my DSDT but I suspect its like everyone else's, so this is just a confirmation of what we already know. Nice work guys, thanks for your hard work, Cartri, it's particularly nice to see you again.

 

I'm using the lnx2mac Realtek kext in S/L/E and Chameleon RC5 752 (some of the later ones don't seem to boot). E/E consists of an old applehda, legachda, fakesmc, intelcpumonitor, nvclockx, superiofamily. My xbench is identical after the patch.

 

Thanks guys

Link to comment
Share on other sites

sry for my ignorance

 

This code

 perl -pi -e 's|\x8b\x45\xc8\x39\x45\xcc\x74\x0b|\x8b\x45\xc8\x39\x45\xcc\xeb\x0b|; s|\x8b\x45\xb4\x39\x45\xb8\x74\x08|\x8b\x45\xb4\x39\x45\xb8\xeb\x08|' /System/Library/Extensions/AppleRTC.kext/Contents/MacOS/AppleRTC

 

its suppose to just copy/past to terminal?

 

I tried it, and gave me some error message, something like "dont have privileges to remove AppleRTC..."

 

Do i have to do something before in terminal?

 

I m admin of my machine

 

Sry again, for this question, its a basic one... i guess

 

:wacko:

Link to comment
Share on other sites

@ssds - Yes you copy and paste the command in to Terminal, but the command needs to be preceded by sudo:

 

sudo perl -pi -e 's|\x8b\x45\xc8\x39\x45\xcc\x74\x0b|\x8b\x45\xc8\x39\x45\xcc\xeb\x0b|; s|\x8b\x45\xb4\x39\x45\xb8\x74\x08|\x8b\x45\xb4\x39\x45\xb8\xeb\x08|' /System/Library/Extensions/AppleRTC.kext/Contents/MacOS/AppleRTC

Link to comment
Share on other sites

<3 blackosx thanks ;)

 

Ok after apply this patch all my sleep problems gone :P

 

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

Link to comment
Share on other sites

 Share

×
×
  • Create New...