CMOS Resets on Restarts after Sleep and Wake in 10.7 (Lion)
Started by rayap, Apr 04 2011 06:43 AM
485 replies to this topic
#361
Posted 11 July 2011 - 05:15 PM
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.
*********
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
Posted 11 July 2011 - 05:30 PM
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
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
Posted 11 July 2011 - 05:38 PM
rayap, on Jul 11 2011, 01:16 PM, said:
@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.
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
Posted 11 July 2011 - 06:32 PM
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.
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
Posted 12 July 2011 - 03:49 AM
bebop68, on Jul 11 2011, 08:32 PM, said:
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.
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
Posted 12 July 2011 - 09:56 PM
HI,
I used ElliottForceLegacyRTC.kext to fix CMOS reset after restart on my notebook...
I used ElliottForceLegacyRTC.kext to fix CMOS reset after restart on my notebook...
Attached Files
#367
Posted 13 July 2011 - 11:57 AM
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.
If you find an alternative solution then please share it.
#368
Posted 13 July 2011 - 12:16 PM
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
Posted 14 July 2011 - 12:16 AM
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
Specs:
Gigabyte X58A-UD3R
NVIDIA GTS 450
#370
Posted 14 July 2011 - 03:43 AM
SuperHack, on Jul 14 2011, 02:16 AM, said:
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
Specs:
Gigabyte X58A-UD3R
NVIDIA GTS 450
Try to set it to standard+Startup after power failure.
#371
Posted 14 July 2011 - 07:17 AM
#372
Posted 14 July 2011 - 10:33 AM
#373
Posted 14 July 2011 - 10:34 AM
#374
Posted 15 July 2011 - 09:09 AM
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.
Screen_Shot_2011_07_15_at_10.05.30.png 54.79K
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.
Screen_Shot_2011_07_15_at_10.05.30.png 54.79K
144 downloadsNot 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
Posted 15 July 2011 - 09:32 AM
#376
Posted 15 July 2011 - 12:10 PM
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
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
Posted 15 July 2011 - 01:30 PM
#378
Posted 16 July 2011 - 03:33 PM
rayap, on Jul 10 2011, 02:14 PM, said:
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
Posted 16 July 2011 - 04:49 PM
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
Posted 16 July 2011 - 09:26 PM
SuperHack, on Jul 13 2011, 07:16 PM, said:
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
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



Sign In
Create Account









