Hot answers tagged sleep-wake
There are multiple answers to the question of how to programmatically enable 'Ask for password after sleep or screensaver' -- the option that appears in the Security preferences panel. Once you've enabled that option, you can use the following command to run an AppleScript to sleep the computer: osascript -e 'tell application "Finder" to sleep'
This sounds implausible, but do you live in a multi-floor building or near a loud street where some kind of heavy walking or loud noise may be physically shaking your desk just enough to move your mouse? It doesn't take much to wake up the mouse, and thereby wake up your computer.
A good first step towards debugging power management-related issues on OS X is: pmset -g assertions It can take a little practice to read the output, but it can lead to finding processes that are erroneously making power management assertions against the kernel. It can also be an iterative process — keep running it at appropriate times, ad see what crops ...
Here is a bash script that when run, without an argument, schedules the system to wake in 20 minutes and then puts it to sleep immediately. Or you can supply, as an argument, the number of minutes you want it to sleep before it wakes the system. Unfortunately the OS X command line utility pmset, which does the wake scheduling and sleeping, requires elevated ...
The problem may be due to SafeSleep, which is enabled by default on Macbooks and causes the laptop to write out the RAM to disk when put to sleep. Try turning off SafeSleep and see if that helps. My 2011 Macbook Pro started hanging occasionally when closing the lid after I upgraded to 8GB RAM, and turning off SafeSleep seems to have stopped it. ...
A friend of mine did it when we saw a movie this weekend. He used my TV as monitor and of course I asked him for a tutorial. He sent me this video https://www.youtube.com/watch?v=zbWQuswykec I will try it tomorrow. I hope it be helpful for you too.
Only top voted, non community-wiki answers of a minimum length are eligible