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

#241
cartri

cartri

    Just a Cone

  • Donators
  • 407 posts
  • Location:Brazil

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)

#242
nexus77777

nexus77777

    InsanelyMac Protégé

  • Members
  • PipPip
  • 79 posts

Hi, blackosx ! I test your trminal script, but it doesn't work.


Hi, could someone upload the different AppleRTC.kext or at least the last one ?

11A459e ? patched or not...


Thanks...

#243
JUN Ho

JUN Ho

    InsanelyMac Protégé

  • Members
  • Pip
  • 42 posts
Here is the one. It's from 11A494a. I attach both, original and patched one.

Attached Files

  • Attached File  RTC.zip   92.05KB   244 downloads


#244
Vlada.

Vlada.

    InsanelyMac Protégé

  • Members
  • PipPip
  • 76 posts
  • Gender:Male
  • Location:Serbia
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...

#245
nexus77777

nexus77777

    InsanelyMac Protégé

  • Members
  • PipPip
  • 79 posts

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)
						}
					}
				}


#246
tseug

tseug

    InsanelyMac Sage

  • Members
  • PipPipPipPipPipPip
  • 411 posts
  • Gender:Male
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


#247
bmas

bmas

    InsanelyMac Geek

  • Members
  • PipPipPip
  • 161 posts
  • Gender:Male

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).

#248
tseug

tseug

    InsanelyMac Sage

  • Members
  • PipPipPipPipPipPip
  • 411 posts
  • Gender:Male

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


And it worked before except for CMOS reset?

#249
LatinMcG

LatinMcG

    Insanely digesting DSDT

  • Members
  • PipPipPipPipPipPipPipPipPipPipPip
  • 2,509 posts
  • Gender:Male
  • Location:Tampa, Florida
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.insanelym...p...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.

#250
blackosx

blackosx

    InsanelyMacaholic

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

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

#251
Crna Brada

Crna Brada

    InsanelyMac Protégé

  • Members
  • PipPip
  • 81 posts

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?

#252
tseug

tseug

    InsanelyMac Sage

  • Members
  • PipPipPipPipPipPip
  • 411 posts
  • Gender:Male

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 :)

#253
bebop68

bebop68

    InsanelyMac Protégé

  • Members
  • Pip
  • 23 posts
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

#254
ApexDE

ApexDE

    InsanelyMac Geek

  • Members
  • PipPipPipPip
  • 217 posts
@ bebop

did you use tseugs patch for the AppleRTC.kext to fix the cmos reset after sleep?

#255
ssds

ssds

    InsanelyMac Protégé

  • Members
  • Pip
  • 41 posts
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:

#256
blackosx

blackosx

    InsanelyMacaholic

  • Coders
  • 3,166 posts
  • Gender:Male
  • Location:UK
@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


#257
stevekicks

stevekicks

    InsanelyMac Protégé

  • Members
  • Pip
  • 35 posts
i tried that patch but it only prevents the cmos corruption.

rather than sleep -> cmos corruption

its

sleep -> reboot

#258
Javimdq

Javimdq

    InsanelyMac Protégé

  • Members
  • Pip
  • 45 posts
Just to confirm that patch also is working here.

#259
blackosx

blackosx

    InsanelyMacaholic

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

i tried that patch but it only prevents the cmos corruption.

That's correct. That's all the patch is designed to do, as described in the OP.

#260
ssds

ssds

    InsanelyMac Protégé

  • Members
  • Pip
  • 41 posts
<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





0 user(s) are reading this topic

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