Does Your Mac Lock When It Sleeps?

It is one of the most common questions about Mac security, and the honest answer is that it depends on a single setting. Putting your Mac to sleep, closing the lid, or letting the screen saver start does not, on its own, lock the screen. Whether your Mac asks for a password when it wakes is decided by one option in System Settings. This guide explains the difference between sleep, the screen saver, and a genuine lock, answers whether closing the lid secures a MacBook, and shows how to make sure your Mac is actually locked rather than just dark.

The short answer

Sleep is not the same as locking. When a Mac sleeps, or its display simply turns off, the screen goes dark to save power, but the session underneath is still yours and still open. macOS only demands a password to return if you have asked it to. With the right setting in place, waking from sleep does ask for your password, which is what most people mean when they say the Mac is "locked". Without that setting, the Mac can be woken straight back to your desktop. So the real question is less "does sleep lock my Mac?" and more "have I told my Mac to require a password on wake?".

Four states people mix up

Part of the confusion is that macOS has several ways for the screen to go dark, and they are easy to run together. They are not the same thing, and only one of them is locking.

Display sleep, system sleep, and the screen saver are all about the screen going dark or the Mac resting. None of them locks anything by itself. Locking is a separate behaviour, and it is governed by the password setting below.

The setting that turns sleep into a lock

One option decides whether any of the states above leads to a password prompt. It is the single most important setting for keeping a Mac secure when the screen goes dark.

Require the password immediately

  1. Open System Settings and go to Lock Screen.
  2. Find "Require password after screen saver begins or display is turned off".
  3. Set it to Immediately.

Why this matters: with this set to Immediately, the moment the screen saver starts or the display turns off, your password is required to get back in. Set to a delay such as five seconds, one minute, or longer, the Mac can be woken without a password for that whole window. For the full walkthrough of this and the related timer settings, see the guide on why a Mac is not locking automatically.

Does closing a MacBook lid lock it?

On a MacBook, closing the lid puts the Mac to sleep. Whether that counts as locking comes down to the same setting. With "Require password" set to Immediately, opening the lid again asks for your password, so closing the lid is an effective way to lock up when you pack away for the day. With a delay set, there is a short window in which the lid can be opened straight to your desktop. Closing the lid is the natural gesture when you finish a session, but it is not instant the way the keyboard shortcut is, and it only secures the Mac if the password requirement is in place. Sleeping the Mac this way is only one of the choices when you step away; the guide on whether to lock, log out, or shut down weighs each option against how long you will be gone.

Does the screen saver lock your Mac?

By itself, no. The screen saver is just an animation that starts when the Mac has been idle for a while. It makes the screen look busy, but the session behind it is still open. What turns the screen saver into a lock is, once again, the "Require password" setting. With it set to Immediately, the password is demanded as soon as the screen saver begins. Without it, the screen saver can be dismissed straight back to your work. So a running screen saver is not proof that your Mac is secure; the setting behind it is what decides that.

The gap that remains even when it is set up right

Once the password requirement is in place, sleep, the lid, and the screen saver all lead to a proper lock. There is still a gap worth understanding. Every native path to a lock is time-based, not presence-based. macOS counts idle seconds; it does not know that you have stood up and walked away. Set the screen saver to start after one minute and your screen stays open for up to a minute after you leave. Set it to ten seconds to feel safer and it blanks every time you pause to read or think. There is no idle interval that is both quick to lock when you go and patient while you stay. For the native timer, Bluetooth proximity, Touch ID, and camera presence side by side, see the guide on ways to auto-lock your Mac in 2026.

Lock the moment you actually leave

Presence detection closes that gap by answering a different question: not "how long has it been idle?" but "is the person still here?". This is the approach Peeku uses to auto-lock the moment you walk away. Peeku combines three local signals to decide you have genuinely left:

When the signals agree you have gone, Peeku locks within a few seconds, and because it waits for genuine absence rather than a fixed timer, it does not lock you out while you sit reading. Detection runs entirely on your Mac, with no account and no cloud face data; the guide on privacy-first, on-device auto-lock explains how that works. Two honest caveats: Peeku still relies on the "Require password: Immediately" setting above, so configure that first either way, and the full locking app ships free outside the Mac App Store, on Gumroad and as a notarised DMG, because the App Store sandbox blocks the system screen-lock calls.

Quick reference

Make sure it is locked, not just dark

Set the password requirement to Immediately for a baseline, then let Peeku lock your Mac the moment you actually walk away. Free, no account, no cloud face data, and all detection stays on your Mac.

Get Peeku on Gumroad (free) See how Peeku works

macOS 14+, Apple Silicon. About 3.1 MB. Developer ID signed and notarised. Pay what you want on Gumroad (₹0 option available).

Free Mac App Store build

Prefer the App Store path?

Install Peeku Presence Coach for eye-rest nudges, walk reminders, optional Desk Health, and private local presence signals. The full walk-away lock still needs the direct Mac build because the App Store sandbox blocks automatic screen-lock commands.