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

#361
bebop68

bebop68

    InsanelyMac Protégé

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

#362
Noam AA

Noam AA

    InsanelyMac Sage

  • Members
  • PipPipPipPipPipPip
  • 437 posts
  • Gender:Male
  • Location:IL
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

#363
nexus77777

nexus77777

    InsanelyMac Protégé

  • Members
  • PipPip
  • 79 posts

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

#364
bebop68

bebop68

    InsanelyMac Protégé

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

#365
nexus77777

nexus77777

    InsanelyMac Protégé

  • Members
  • PipPip
  • 79 posts

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

#366
Mela quadrata

Mela quadrata

    InsanelyMac Legend

  • Members
  • PipPipPipPipPipPipPip
  • 858 posts
HI,
I used ElliottForceLegacyRTC.kext to fix CMOS reset after restart on my notebook...

Attached Files



#367
blackosx

blackosx

    InsanelyMacaholic

  • Coders
  • 3,161 posts
  • Gender:Male
  • Location:UK
Yes we know that patching the AppleRTC binary isn't the most desirable option, but it's the best we have right now.
If you find an alternative solution then please share it.

#368
tseug

tseug

    InsanelyMac Sage

  • Members
  • PipPipPipPipPipPip
  • 411 posts
  • Gender:Male
I doubt that a DSDT solution is even possible. A kext to revert changes/recalculate cmos checksums on sleep/wake/restart would be more feasible.

#369
SuperHack

SuperHack

    InsanelyMac Protégé

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

#370
longtom

longtom

    InsanelyMac Sage

  • Members
  • PipPipPipPipPip
  • 265 posts

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.

#371
Edkroket

Edkroket

    InsanelyMac Geek

  • Members
  • PipPipPip
  • 165 posts
  • Gender:Male
  • Location:Amsterdam
  • Interests:Music, I'm a bass player

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

#372
rayap

rayap

    InsanelyMac Geek

  • Members
  • PipPipPip
  • 164 posts
  • Gender:Male

Where can I find this rollback?

Ed

Use AppleRTC.kext from SnowLeopard. That's rolling back!

#373
longtom

longtom

    InsanelyMac Sage

  • Members
  • PipPipPipPipPip
  • 265 posts
:)

#374
Rankrotten

Rankrotten

    InsanelyMac Protégé

  • Members
  • PipPip
  • 57 posts
  • Location:UK
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.

Attached File  Screen_Shot_2011_07_15_at_10.05.30.png   54.79KB   144 downloads

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.

#375
Edkroket

Edkroket

    InsanelyMac Geek

  • Members
  • PipPipPip
  • 165 posts
  • Gender:Male
  • Location:Amsterdam
  • Interests:Music, I'm a bass player

Use AppleRTC.kext from SnowLeopard. That's rolling back!


Wow that's easy!
I'll try that!
Thanks!

Ed Posted Image

#376
Snow

Snow

    InsanelyMac Sage

  • Members
  • PipPipPipPipPip
  • 364 posts
  • Gender:Male
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

#377
Edkroket

Edkroket

    InsanelyMac Geek

  • Members
  • PipPipPip
  • 165 posts
  • Gender:Male
  • Location:Amsterdam
  • Interests:Music, I'm a bass player

Wow that's easy!
I'll try that!
Thanks!

Ed Posted Image


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

#378
poch333

poch333

    InsanelyMac Protégé

  • Members
  • Pip
  • 2 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



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

Thanks rayap.

#379
D-an-W

D-an-W

    InsanelyMac Sage

  • Members
  • PipPipPipPipPipPip
  • 452 posts
It worked great for my hardware too, now I have to figure out what this double tap on the trackpad or magic mouse to fully wake is all about!

#380
chad3000

chad3000

    InsanelyMac Protégé

  • Members
  • Pip
  • 38 posts

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.

Attached Files







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