Jump to content

[Need Help] Sleep issues


theconnactic
 Share

47 posts in this topic

Recommended Posts

Hello, everybody!!

 

Thanks to this forum and the efforts of RAW X86, Bronzovka, AnV and others, who developed a working (32-bit, but working) lion legacy kernel, i have the latest OsX running on my machine, fine and stable. I installed it using Devout's experimental method.

 

Now there's one last thing to solve, while its not possible to have 64-bit extensions (even Raw's kernel, whic offers support for 64-bit apps, is i386) or iCloud/facetime. What happens is this: when i put my computer to sleep, be by quick pressing once my power switch, be by clicking at the sleep option in the apple menu, the computer sleeps. In fact, it enters a coma, because it doesn't wake anymore, and i'm forced to reboot.

 

Is there a solution? I'm running lion 10.7.4 (32-bit, with RAW's latest kernel) on an ECS A780LM-M2 motherboard and an Athlon II x2 250 (3.0 ghz) CPU. Any help will be much appreciated.

Link to comment
Share on other sites

If it's an issue specific to AMD kernel than I don't know either, but double check bios settings like sleep set to S3, or wake on LAN, USB, PS/2, repost VBIOS, etc.

  • Like 1
Link to comment
Share on other sites

Hi, eeep! Thank you for the answer! I'm not sure if i understand you well, though. I mean, what should the correct bios settings be for each of the parameters you listed?

 

Btw, my mac eeepc is going fairy well: now, i even have touch screen, thanks to touchbase driver (with the limitations of trial mode, since the full driver is quite expensive, but it's cool to know that it can be done if i just pay the hundred-and-some bucks it costs). The sleep issue of the netbook (sleep issues haunting my hackintosh user experience, it seems) is not solved, however: the dsdt adventure is being harder than expected.

Link to comment
Share on other sites

All depends on what options your bios has, but setting sleep/suspend to S3 is the first thing to check, for VBIOS repost on wake, depends on what works for you, gotta try both (if mobo has the option). Other wake options would probably be in the power settings and enabling all except maybe RTC clock should be OK, the RTC wake/power-on sets a time and date for your computer to boot or restart on it's own. All mobo bios tend to be a bit different in terms they use and features they have, but anything that looks sleep pr wake related your not sure of you can prob google for more info.

  • Like 1
Link to comment
Share on other sites

cmos reset is reseting all your bios settings, like you can do by taking out the battery or using the clear cmos jumper pins. Unpatched appleRTC.kext will cause this to happen on some systems. To patch your's, run the following in Terminal.

sudo perl -pi -e 's|\x75\x30\x89\xd8|\xeb\x30\x89\xd8|' /System/Library/Extensions/AppleRTC.kext/Contents/MacOS/AppleRTC

  • Like 1
Link to comment
Share on other sites

Thank you again for the quick answer and the terminal command solution, eep!

 

However, how can i know if this CMOS reset is really happening? For the only one issue i'm experiencing is the comatose sleeping itself. No other situation, indeed. In fact, the system works quite fine considering it's AMD-imposed limitations. It's even my main working system right now. But everytime i put my computer to sleep, it passes out and doesn't come back. It doesn't happen automatically, only when i use the sleep option in the apple menu or by quickly clicking the power switch of my computer.

 

So, if the problem is a CMOS reset, what kind of perceptive effects would it have?

Link to comment
Share on other sites

You should be able to wake from sleep, give it a try.

 

Do you have another PC/MAC running OS X? If so, enable sharing on the AMD based PC. When you wake the PC you should see it re-appear on the network (this proves the PC is waking even if the graphics aren't waking up).

  • Like 1
Link to comment
Share on other sites

Yes, i do! I have an atom netbook running lion, i'll do what you're sugesting. Thank you!

 

As for the appleRTC patch, what i meant was: how i know that the CMOS is reseting? My bios settings look unchanged. I'm afraid to patch this kext unnecesarily and get some unwanted effect in a system that otherwise works like a charm, see?

Link to comment
Share on other sites

I've never heard of patching appleRTC.kext causing a problem, for some it has fixed sleep and wake issues, but in theory should only prevent bios reset's on reboot. that being said I avoid AMD CPU setups like the plague so am not the expert. Anytime to patch or modify a file, you should back it up first. In the case above, the second half of the command is just the file path, so you could copy the extension to your desktop and edit it there first like

sudo perl -pi -e 's|\x75\x30\x89\xd8|\xeb\x30\x89\xd8|' ~/Desktop/AppleRTC.kext/Contents/MacOS/AppleRTC

Also along the lines of what James was saying, having a second mac around with screen sharing is the greatest when it comes to diag graphics issues. If you find that it is a Graphics problem, like I mentioned earlier, look in bios for "repost VBIOS on resume" or something along those lines. Personally on a desktop, unless your running on solar power, I don't see any reason sleep even needs to be enabled. Let the monitor sleep instead. That's just my opinion and I'm sure tons of people wouldn't agree for various reasons. Every desktop I've ever owned over the past 15+ years I've left running 24/7 and aside from maybe 1 or 2 hard drives and a stick of RAM, have never had a hardware failure.

  • Like 1
Link to comment
Share on other sites

yup, can't sleep with it as far as i know, but on amd that may cause you other problems, i don't know anything about native power management on amd cpu or if it's even possible

  • Like 1
Link to comment
Share on other sites

Thank you again, eep!

 

I'm afraid you're right: when i remove the NullPowerCPUManagement, i get a KP when booting, regardless of bootflag i use, tracing to AppleIntelPowerManagement.kext.

 

Is there any known patch at hand for using this kext in an AMD environment? I googled a little, to no avail. If not, i think i'm going to let go of it and focus on enable sleeping where it's really essential: my osx-ed netbook Asus T101 MT.

 

Thanks!

Link to comment
Share on other sites

I've just noticed that the RTC patch eep provided you with only patches for the 64 bit kernel and you mentioned you're running 32bit, this is only used in Mountain Lion.

You will need to use the following patch:

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

 

Out of curiosity, should this driver work also with an Atom N450 CPU? I'm afraid it got's AMD's kernel panic disease and can't stand yet the removal of NullCPUPowerManagement.

 

I use VoodooPowerMini on Atoms, it seems to be slightly better on battery (2 hours on a 3 cell, 4 on a 6 cell).

Sleep enabler should help you with your sleep issues, I have a N270 asleep right next to me using this method. The fans just span up for network access too :wink2:

 

Just move NCPM to your desktop, If you get a panic boot from an installer and move it back with terminal.

If you're not comfortable in the terminal I can link you to a nice bash introduction which will get you off to a good start,

  • Like 2
Link to comment
Share on other sites

Thanks again, James!

 

Tried this one (the RTC patch!), unfortunately it didn't work. Tried it in my atom netbook too, it didn't work either (both of them, and my atom runs 64-bit kernel and extensions). I rather believe now that the problem is related with NullPowerCPUManagement indeed.

 

I think i'll left aside my AMD machine for a while - in the end, it's working great in about everything but power management/sleep - and focus now, as i said, on my netbook, where sleeping is crucial for it's good work. I'm afraid i'm going to try the DSDT way, from which i was running like when cat see dog, because there is no realy good tutorial about it for beginners anywhere. But i'll have to resort to this at last, since other solutions didn't solve the problem (but i'll give Voodoo Power a shot in both machines anyway).

 

BTW, in my Atom netbook i got indeed a CMOS reset related to sleeping issues (that any of the indicated patches solved, bad for me). Now i know what it's like, not that i couldn't live without that...

 

In fact, i'm confortable with unix, but i appreciated the offer. See, i already tried this method of moving NullCPU to desktop, while working with the latest sleepenabler from OsX86.net, only to get a kernel panic at the boot with appleIntel, and no sleeping obviously, having to undo things with terminal. It was exactly what i was talking about. I'll give it a shot with mini voodoo power, though. Tried both of RTC patches, too (in Atom and in my AMD desktop) without any results (and, in atom, there was indeed a CMOS reset!). Tried with an unpatched dsdt.aml extracted using dsdt editor, to no avail.

 

Maybe the solution will be to get rid of NullCPUPower, to replace IntelCPUPower with Mini Voodoo Power, and to use either a dsdt (patched, if i learn how to do it) or the universal sleepenabler from OsX86, or both.

Edited by theconnactic
Link to comment
Share on other sites

Some feedback (sorry i didn't posted before, since i changed focus a little to mountain lion and graphics issues):

 

With my AMD, you're right about the problem being graphics-related (thank you both a lot!), and i discovered using the connected server method that my graphics wasn't waking. Any suggestion of fixes?

 

 

With Atom, i tried a more conservative approach, like suggested by james (thanks!) with various different sleepenablers (using voodoo power mini, so i could get rid of nullpowermanagement), to no avail. The auto sleep doesn't work, pressing the power switch calls a dialog box with four options, sleep among them, but chosing this option only "sleep" the screen and pause iTunes (sleep with quotes, because screen freezes at the last image exihibited), as does the option at the apple menu. Using the hotkey (fn+f2) gives me an outright shutdown, and a header size error when booting after this shutdown (but the system boots fine besides the error). The patched RTC with conti's method (myhack) solved the CMOS reset.

 

So now i'm prepared to follow eep's advice and go catch my patch. That's all!

 

Once again, thank you for the help.

Link to comment
Share on other sites

With my AMD, you're right about the problem being graphics-related (thank you both a lot!), and i discovered using the connected server method that my graphics wasn't waking. Any suggestion of fixes?

What graphics card do you have?

You may need a kext or 2.

 

With Atom, i tried a more conservative approach, like suggested by james (thanks!) with various different sleepenablers (using voodoo power mini, so i could get rid of nullpowermanagement), to no avail.

When using VoodooPowerMini you need to remove AppleIntelCPUPowerManagement which negates the use of NullCPUPowerManagement.

Just remove them both and rely on VoodooPowerMini, use chameleon to generate your c+p states for you (set in your org.chameleon.Boot.plist)

 

The auto sleep doesn't work,

This may be fixed by following my advice on your last problem. Or you may need to patch your DSDT.

 

pressing the power switch calls a dialog box with four options, sleep among them, but chosing this option only "sleep" the screen and pause iTunes (sleep with quotes, because screen freezes at the last image exihibited), as does the option at the apple menu. Using the hotkey (fn+f2) gives me an outright shutdown, and a header size error when booting after this shutdown (but the system boots fine besides the error).

This will be a DSDT edit.

Use DSDT Editor to extract your DSDT then patch the relevant sections.

You can download patches to apply to your DSDT, just use google.

If you get stuck just post in the DSDT sub-forum and I'm sure someone will help you if you ask nicely.

 

 

The patched RTC with conti's method (myhack) solved the CMOS reset.

This is just a perl script. Conti is not the author, he just included an already patched AppleRTC in myhack.

Glad you got it sorted but use the perl script next time. You will need to re-patch after most major updates, i.e. 10.7.5, 6 or any subsequent update.

Link to comment
Share on other sites

Hi, James! Thank you for the answer. My graphics card is a nVidia GeForce G210, 1gb ddr3. Works oob with GraphicsEnabler=Y.

 

As for the Atom sleep issues, i totally overlooked the c and p states options. Worth a try! I'd already removed AppleIntelCPUPowerManagement.

Link to comment
Share on other sites

Try booting with DarkWake=0 or DarkWake=No

DarkWake=0 doesn't seem to be mentioned anywhere in the Chameleon documentation but it works on my system whereas DarkWake=No doesn't.

  • Like 1
Link to comment
Share on other sites

Thank you very much indeed, James! Darkwake worked like a charm in my AMD system.

 

As for Atom, could you please provide a link to the sleepenabler that you use to get sleep working in your netbook? I tried quite a lot of them - i'm on 10.7.4 - and nothing worked. I tried the c and p states, but had no perceptible change. Thank you.

Link to comment
Share on other sites

 Share

×
×
  • Create New...