Change the sleep time on a MacBook
- Choose Apple menu > System Settings.
- Click Lock Screen in the sidebar. You may need to scroll down.
- Open the pop-up menu for "Turn display off on battery when inactive" and pick a time.
- Do the same for "Turn display off on power adapter when inactive." Each one only applies to its own power source.
- To keep the MacBook running after the screen goes dark while it's plugged in, click Battery in the sidebar, click Options, and turn on "Prevent automatic sleeping on power adapter when the display is off."
There's no separate "computer sleep" slider any more. The display timer is the one you set, and the system follows it unless step 5 tells it not to.
Change the sleep time on an iMac, Mac mini or Mac Studio
- Choose Apple menu > System Settings.
- Click Lock Screen and set the display-off timer to the time you want.
- Click Energy in the sidebar. Turn on "Prevent automatic sleeping when the display is off" if you want the Mac to keep working with the screen dark.
Change how fast it asks for a password
A lot of people searching for the sleep time want the lock delay. In Lock Screen settings, "Require password after screen saver begins or display is turned off" sets how long after the screen goes dark your Mac asks for a password. It doesn't change when the screen goes dark. Your company may have this one locked.
Check or set the timers in Terminal
pmset -g prints the current values in minutes: displaysleep for the screen and sleep for the system. If an app is holding the Mac awake, the sleep line names it. Our guide to "sleep prevented by powerd" explains that note.
To set them, use sudo pmset with -b for battery, -c for the charger or -a for both. For example, sudo pmset -c displaysleep 20 turns the screen off after 20 minutes on the charger. If your Mac sleeps at the same time every day, pmset -g sched shows scheduled sleep and wake events.
What time to pick
Short timers save battery and keep a screen from sitting lit on an empty desk. Long timers stop the Mac from dozing off while you read, watch a long build or wait on a download. Any single number is a compromise, because it applies all day.
That's the gap Shake It On fills. Leave a short timer in place. Shake It On moves the cursor slightly to keep the Mac awake only when your rules say so: plugged in, a chosen app running, inside your work hours. It pauses for the camera and Focus. The rest of the time your short timer does its job.