

In this instance, iTunes was playing a song. This shows us that coreaudiod is the culprit. Using the ps command as: ps -ax | grep 173 In this case it’s showing process ID 173 as keeping the Mac from sleeping. It’s helpful to have a guide to decipher these arguments and their value indicators, so check out Apple’s Manual Page for pmset. This command will display in the Terminal window all the pmset arguments currently in use and their value. Track Down What’s Preventing Your Mac from Sleeping If your Mac isn’t sleeping like it should, you can run the following command to get information about all your power settings and track down the culprit that’s preventing your Mac from getting its beauty rest: pmset -g Once you’re ready to change back to default behavior, press Ctrl-C.

With this command running in the Terminal, the Mac will never fall asleep no matter how long the machine is left idle. To keep your Mac awake even if you leave the computer idle, use the following command: pmset noidle Prevent Your Mac from Sleeping Due to Idleness You can prevent this with the following terminal command: sudo pmset acwake 0 Prevent Your Portable Mac from Waking When the Power Source Changesįor Mac laptops, plugging or unplugging an AC Adapter can wake the computer. You can prevent this behavior with the following terminal command: sudo pmset powerbutton 0 Pressing a Mac’s power button once will, by default, put the Mac to sleep (for Lion laptops, it brings up the power options menu). Have a Choice When Your Mac’s Power Button is Pressed Prevent Your Mac from Sleeping When the Power Button is Pressed You can prevent this behavior and choose to wake the Mac on your own terms by entering the following terminal command: sudo pmset lidwake 0Ĭonversely, add the following flag to prevent the Mac from going to sleep when the lid is closed: sudo pmset -a lidwake 0 Set Your Portable Mac to Stay Asleep When the Lid is Openedīy default, Mac laptops will wake up if a sleeping machine’s lid is opened. For commands that have a zero at the end, simply replace the 0 with a 1 and re-execute the command to restore default behavior. This article will highlight a few of the more useful pmset commands. With this command, users can change a multitude of settings relating to their Mac’s response to certain power-related conditions, as well as troubleshoot power-related issues.

Pmset is a command line utility that is used to manipulate the power management settings in Mac OS X.
