Solving Macbook Wake from Sleep issue

My girlfriend's Macbook has been suffering from a wake from sleep issue for around 12 months now. It appeared to go away and then last week with an upgrade to Leopard the issue came back even worse than before. The problem: Macbook automatically wakes from sleep with a log entry stating 'USB caused wake event (EHCI)'.

What follows are the steps I've taken to try to eliminate the problem and also what I hope is the permanent solution.

After scouring many articles, blog posts and forum topics I discovered that Apple recommend deleting some plist (preference) files to reset some of the power management functions to their defaults. The system automatically recreates these files on reboot. Another recommended approach was to reset the SMC and PMU on the Macbook. Neither of these approaches appeared to help at all. In case you want to try (it may solve your particular issue) the files to move to your desktop (or delete) are:

/Library/Preferences/SystemConfiguration/com.apple.PowerManagement.plist
and
/Library/Preferences/SystemConfiguration/com.apple.AutoWake.plist

Now there is a good chance that the com.apple.AutoWake.plist file is missing from your machine. This is not unusual as according to the developer document about the command pmset:

Files
All changes made through pmset are saved in a persistent preferences file
(per-system, not per-user) at
/Library/Preferences/SystemConfiguration/com.apple.PowerManagement.plist

Scheduled power on/off events are stored separately in
/Library/Preferences/SystemConfiguration/com.apple.AutoWake.plist

pmset modifies the same file that System Preferences Energy Saver modifies.
fies.

This made me realise that the missing AutoWake.plist file would be created if I made a scheduled sleep or wake event, which I did through the System Preferences Energy Saver panel. I then disabled the created wake event and double checked the newly created plist file, ensuring that it was empty of any settings. I then tested the sleep issue I was having and it seems to have cured it.

So what I conclude from my little trial and error experiment is that the system requires the com.apple.AutoWake.plist file to be present otherwise some sleep issues can occur. Strange but so far true.

5 comments

Jump to comment form | comments rss

Comments

Anonymous02.09.09 / 14PM

THIS WORKS! My macbook pro also would habitually wake up by itself and this simple procedure above fixed it! All you need to do is go in to the settings and tell it to reboot at a specific time (is set it to 2 minutes later than the time i was making the setting), it booted, i then went in and turned off auto start function in energy saver and now she stays asleep! Thanks!

Anonymous02.09.09 / 6AM

Hello there, I hope you don't mind if I post anonymously I'm not in to handing out my details. Anyhow...

Does any one know how to disable the mouse from waking up my macbook?

I have a USB mouse plugged in and its extremely annoying having to unplug it every time I shut my macbook's lid. If I don't unplug it, the slightest movement will wake the mackbook even when closed. If the macbook is closed when the mouse wakes it from sleep, when I open the lid again the screen is not detected by the display manager. Luckily I have another monitor plugged in which will wake with the macbook (even when the lid is closed) and I can select the "detect displays" option to initialise the macbook's own screen.

There are no options for this with the "pmset" command in the Bash Terminal. And I'm guessing that if there was a way to disable the laptop from waking on USB the laptop would never wake up to anything as most of the stuff (like the keyboard, the lid open/close sensor, etc) is plugged in to a USB buss so I really just need to stop my macbook from waking on mouse movements!!!

Any help?

bessam14.06.09 / 5AM

Hey there - I know this post is pretty ancient but it's still helpful! I've got an original Macbook running 10.5.7 and recently my poor 'book would never stay sleeping... early results with this trick look good!

simon25.12.07 / 10AM

Wow! Looks like you hit the nail on the head.
I have a macbook that refused to stay asleep for more than 30 secs. After I followed your treatment it is sleeping nicely again.
Hope it stays. Thanks for posting it!

Jack10.12.07 / 7AM

My PPC mac has issues when it sleeps with a combination of my USB backup drive and USB printer plugged in, waking is a bear at that point, so now before it sleeps I usually disconnect that hub. Hopefully your solution works better, let me know if it did and I will work similar to that!