Jump to content

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


rayap
 Share

474 posts in this topic

Recommended Posts

CSR and broadcom chips are what apple uses in its own bluetooth. There were a couple of patched kexts floating around to make the generics look like apple ones and enable bluetooth sleeping and waking functionality (an otherwise greyed out tick box under bluetooth preference pane advanced options) - however it seems you had to get lucky and get compatible firmware in your generic - i tried 2 csr's and a broad com and didn't get lucky - but I use a big chunky usb trackball and usb split keyboard anyhow. It'd be nice for apple's trackpad or magic mouse tho.

 

*********

 

Just a heads up guys - don't try moving your patched (non-vanilla) applertc.kext to /extra - it make work, but your cpu temps will jump 10 degrees (as I just noticed).

 

Also - if you're using a startup extensions.mkext, rebuild it after patching or you won't see the benefits. I use this command:

 

sudo kextcache -v 2 -a i386 -a x86_64 -m /System/Library/Caches/com.apple.kext.caches/Startup/Extensions.mkext /System/Library/Extensions

 

(There are various flavours of this command floating around, so if anyone has a definitive one, please post it)

 

which speeds the boot up nicely. For some reason chameleon 3 rc5 versions from about 800ish upwards need UseKernelCache=No in your com.apple.boot.plist or org.chameleon.boot.plist (after version 1140ish) for this to boot properly.

 

Fly safe.

Link to comment
Share on other sites

can't say for sure, but i think usb1 hardware is mess for OSX, my microsoft keyboard doing some troubles if i plug it 4-5 times in a row.

and today i discovered something new, i have some problems with sleep, only sometime, i have a black screen issue after sleep, and i always suspect it's a USB problem.

Lion somehow helping me here.

i already replaced my wifi usb with pcie one, now all i need to replace is bluetooth

so toady i woke up, and my pc was already awake because it set to wakeup in 17:00 PM on energy saver setting.

i woke up on 18:00 PM and found my pc was on Black screen, (since i installed lion, if it woke to black screen 5-10 sec later it restart itself. but not this time)

i already discovered since Lion, that only if i plug my iPod when set to Tether wifi to my pc, i will get out of the black screen. and today i found that the Bluetooth (also usb1) wasn't woke up (it have a LED on it), i replug and it worked.

 

right now the blutooth dongle is the only one being usb1, i have here a genuine apple bluetooth module but i need to order DC-DC convertor to see if the problem is the bluetooth

Link to comment
Share on other sites

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

 

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

 

Well, just to be clear (poor english , sorry !)

 

Should I modify the 2 length values in my DSDT too ???

 

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

 

On booting I 've go this error twice too:

 

Jul 11 08:01:22 localhost kernel[0]: 0 0 AppleUSBCDC: start - initDevice failed

Jul 11 08:01:22 localhost kernel[0]: 0 0 AppleUSBCDC: start - initDevice failed

 

Any clue ???

Link to comment
Share on other sites

I get three of those usbcdc error, and I have 3 usb devices plugged in (keyboard, trackball, webcam). All I could find out about usbcdc kext is it's some kind of network-communication-over-usb driver. Those errors don't seem to be a problem so I leave them. Snow leopard had some permanent boot cache .plist errors that meant nothing too, and couldn't be fixed.

 

If you edit your rtc lengths to 8 you will stop getting the warning rtc single bank error. Don't do this for snow leopard as you'll get cmos resets.

 

Guys - has anyone else compared their cpu temps to snow leopard? Mine seem to be higher by up to 5-10 degrees. We know apple have added unidentified functionality to appleintelcpupm and applertc - maybe this is relevant to what that functionality might be, or at least something we need to address for the sake of our cpus?

 

Its higher whether I use chameleon's c and p states or my own dsdt hack, but my own seem somewhat better.

Link to comment
Share on other sites

I get three of those usbcdc error, and I have 3 usb devices plugged in (keyboard, trackball, webcam). All I could find out about usbcdc kext is it's some kind of network-communication-over-usb driver. Those errors don't seem to be a problem so I leave them. Snow leopard had some permanent boot cache .plist errors that meant nothing too, and couldn't be fixed.

 

If you edit your rtc lengths to 8 you will stop getting the warning rtc single bank error. Don't do this for snow leopard as you'll get cmos resets.

 

Guys - has anyone else compared their cpu temps to snow leopard? Mine seem to be higher by up to 5-10 degrees. We know apple have added unidentified functionality to appleintelcpupm and applertc - maybe this is relevant to what that functionality might be, or at least something we need to address for the sake of our cpus?

 

Its higher whether I use chameleon's c and p states or my own dsdt hack, but my own seem somewhat better.

 

Thanks for your reply, I will try changing the 2 lengths to 08 to see so....

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

 

 

For usbcdc errors, the strange thing is I do not have them on booting an other Lion Partition...

(for moment; same DSDT, no RTC hack, missings kexts like Sleepenabler, Apple8169Ethernet,...)

But seems related to USB of course...

Link to comment
Share on other sites

With this patch I've had no issues with resuming from sleep. However, the auto sleep appears to have been broken. Can someone help me out / direct me to a fix for this?

 

Specs:

 

Gigabyte X58A-UD3R

NVIDIA GTS 450

 

Try to set it to standard+Startup after power failure.

Link to comment
Share on other sites

Hey this rollback works. Thanks JUN Ho.

No apparent changes in the console msgs, wonder what these are in a real mac.

 

Where can I find this rollback?

 

Ed

Link to comment
Share on other sites

Sleep / Shutdown / Restart now all work ok with the Lion GM patch for AppleRTC but only if the new setting "Restart automatically if the computer freezes" is selected in Energy Saver system preferences.

 

post-204913-1310720926_thumb.png

 

Not yet tried it with the vanilla Lion GM AppleRTC.kext as I did not keep a fresh one as a backup before bin patching it.

Link to comment
Share on other sites

Patch seems to be working here, sleep already worked fine before.

 

Only issue left is no tablet (usb) function at boot, I have to re-plug and then it will recognize the device. Any ideas?

 

Thx

Link to comment
Share on other sites

Wow that's easy!

I'll try that!

Thanks!

 

Ed icon1.gif

 

AppleRTC fron SL works for me. CMOS reset is gone now but wake up is acting strange.

I need to hit my USB keybaord more than once to wake!

But I'm happy and can live with that!

Cheers!

 

Ed

Link to comment
Share on other sites

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

 

 

I can confirm rayap's alternate patch (from post #340) is working in Lion GM on G31M-ES2C rev 1.x.

 

Thanks rayap.

Link to comment
Share on other sites

With this patch I've had no issues with resuming from sleep. However, the auto sleep appears to have been broken. Can someone help me out / direct me to a fix for this?

 

Specs:

 

Gigabyte X58A-UD3R

NVIDIA GTS 450

 

 

I had to use the script below to fix this. I wish there were a better option but I know of none at this time. Once

you run the script installer auto sleep should work after restart and may even work without restarting.

Some machines may wake and then go right back to sleep, so If this happens to you then you have to keep pushing your keyboard or mouse button until the screen turns on.

Auto_Sleep_Fix__22OSX_Lion_22.zip

Link to comment
Share on other sites

Is this problem still actual, I installed GM to my Sabertooth system today and I haven't seen a CMOS reset yet after sleep & restart/shutdown combo.

Can you send your asus X58 dsdt? Maybe we can find where they fixed this.

Glad to talk to you.

Link to comment
Share on other sites

Can you send your asus X58 dsdt? Maybe we can find where they fixed this.

Glad to talk to you.

 

Hi again, these are vanilla Acpi tables dumped from Windows (not pure vanilla since bios has slic table added to it) :

acpi.zip

 

And this is all that I have in my Extra folder (I use same dedicated Chameleon partition to boot both SL and Lion so both run with same Extra folder) :

Extra.zip

Link to comment
Share on other sites

@mm67 - Glad to see you here.

Guess you do get the log msg - RTC : Only single Ram bank - with the register length at 0x02. Or is 0x08 possible.

 

Yes, I do get that msg. Is it something I should be worried about since everything seems to be working fine with Lion GM.

Link to comment
Share on other sites

 Share

×
×
  • Create New...