Mac – Sleep/wake Mac mini by pressing power button

mac-minipowerpower-managementsleep-wake

I have a Mac mini that is on my network but not connected to any displays or input devices. It's running El Capitan.

I want to be able to put the Mac to sleep and awake it as easily as possible (i.e. not using VNC). My main machine is Windows, so ideally I just want to press the power button to toggle the Mac between sleeping and awake.

Is this possible? From what I've read, it seems like this used to be possible but now it isn't? Are there any workarounds that would enable this?

Best Answer

You can no longer just tap the Power Button on a Mac to put it to Sleep. On any Mac running Mavericks or newer the Power Button should function as follows:

Power Button:
1~2 second hold = Sleep
3~5 second hold = Options Dialog
8~12 second hold = Force Shut Down

Alternatively, if you have a keyboard hooked into the Mac you should be able to hit:
Control+Shift+(Power Button on the Mac or Media Eject on Mac keyboard) to put your Mac to sleep.

To wake it up just hit the Power Button, or enable Wake On Network if you want to remotely wake the system.

EDIT:
If you need to sleep your system across the network (with no physical access), and have access to the command line you can do one of the following.

  1. Using AppleScript from the command line.
    osascript -e 'tell application "Finder" to sleep'
  2. From any command line connection you can also try.
    pmset sleep now

ADDITION:
Network traffic (active network connection allowing file sharing for example) can stop the standard Sleep action on a Mac when hitting the power button. You need to make sure that there are no active network connections, especially if you have "Wake on Network" enabled.

On some system you will need to make sure that the System Preferences... -> Energy Saver settings are set properly to allow the power button to sleep the system. Depending on the Mac hardware you are running on (Mac Mini vs MacBook) some settings will or won't be on the Energy Saver panel.

Mac Mini Energy Saver Screen

For a complete list of Energy Saving info, and to learn more about Apple Power Setting for El Capitan head over to Apple's website.