Skip to main content

Want to switch from the Mole Mac site to the Windows site?

Go to the Windows site
Mole
MacWindows
Features Tested apps Testimonials Pricing FAQ Blog
EnglishEN 简体中文中 繁體中文繁 日本語日 한국어한 FrançaisFR DeutschDE ItalianoIT EspañolES PortuguêsPT NederlandsNL
Buy Download

    Help, documentation, releases, and articles.

    Blog

    Why Won't My Mac Go to Sleep and How to Find the Cause

    Apps & MaintenancePublished November 9, 20265 min read

    If your Mac will not go to sleep, one command usually names the cause. Run pmset -g assertions in Terminal, and look for lines with PreventUserIdleSystemSleep or PreventSystemSleep: each one names a process that is holding the Mac awake. Most of the time it is an app playing media, a remote access tool, a keep-awake utility or a download. Quit that one thing and the Mac sleeps again on its own.

    Find what is keeping it awake

    The quick answer first. This line says which processes are preventing sleep:

    pmset -g | grep -E '^ *sleep'
    

    For example, this Mac printed sleep 1 (sleep prevented by caffeinate, powerd, Amphetamine, ...). For the detail, including how long each has been holding on:

    pmset -g assertions
    

    A real line from the same Mac:

    pid 1321(UURemote): 36:07:42 PreventUserIdleSystemSleep named: "UURemote Disable Idle System Sleep"
    

    The manual page (man pmset) says assertions "may prevent system sleep or display sleep". These are the ones to read:

    Assertion What it blocks What usually holds it
    PreventUserIdleSystemSleep The Mac sleeping when idle Media playback, downloads, remote access, keep-awake tools
    PreventUserIdleDisplaySleep The display turning off when idle Video, presentations, keep-awake tools
    PreventSystemSleep Sleep more broadly A system task or a tool asking for it
    UserIsActive Idle timers, for a short while You just touched the keyboard or trackpad

    Most of these are idle blocks, so choosing Sleep from the Apple menu generally still works. If it does not, read on.

    Go through the usual causes

    Process or sign Why What to do
    coreaudiod Audio is open, sometimes a paused tab Close the tab or the player
    A browser or video app Video is playing Stop it or close the page
    caffeinate, Amphetamine and similar They exist to keep the Mac awake Quit them, or end that session
    UU Remote, screen sharing or other remote tools They keep the Mac reachable Disconnect or quit them
    Backup and sync apps, bird A job is running Let it finish, or pause it
    powerd Its own record, often while the display is on Check the other lines first
    SleepDisabled 1 in pmset -g Sleep is switched off for the whole Mac See below

    Settings also matter. Open System Settings › Battery › Options and check Prevent automatic sleeping on power adapter when the display is off. Wake for network access on the same page decides whether the Mac wakes to serve shared resources. If the Mac wakes soon after you put it to sleep, an accessory is a common suspect, so unplug USB devices and hubs and test again.

    When sleep is switched off completely

    pmset -g lists a SleepDisabled line. When it reads 1, the Mac will not sleep, even from the menu or with the lid closed. Keep-awake tools set it to stay on with the lid shut, and it should go back when they stop. Quit those tools first. If it still reads 1 and nothing needs it:

    sudo pmset -a disablesleep 0
    

    Restart if you are unsure which tool set it.

    Lid closed and still running

    A laptop with an external display, power and a keyboard or mouse can run with its lid closed. That is clamshell mode and it is deliberate, so unplug the display to test. If a MacBook stays warm in a bag, do not leave it there. Open it, run the commands above and find the process, since some tools keep the Mac awake through a closed lid on purpose.

    What not to do

    • Do not reset the SMC or NVRAM first. Nearly all cases are one running process, and the command above takes seconds.
    • Do not use random pmset changes from forums. They persist across restarts and are easy to forget. pmset -g custom shows what is set, and sudo pmset restoredefaults puts them back.
    • Do not delete sleepimage to fix this. That file is not what keeps a Mac awake.
    • Do not ignore a hot MacBook in a bag. Take it out and let it cool first.

    Where Mole fits

    In Mole's Status, Why is this running? in a process's menu reads the same assertions, and when that process holds the Mac awake it says "Process is currently preventing sleep." That helps once you suspect one app. For the full list at once, pmset -g assertions is still quicker. Mole's own Keep Screen On is one of the tools that holds an assertion, on purpose, and in its default mode, which also covers a closed lid, it uses disablesleep, which it undoes when the session ends. If you want the opposite of this page, see keeping a Mac awake without draining the battery. If the battery falls overnight, see why a MacBook battery drains fast.

    FAQ

    Why won't my Mac go to sleep?

    Usually a process is holding a power assertion, such as media, a remote access tool or a keep-awake app. pmset -g assertions names it.

    How do I see what is preventing sleep on my Mac?

    Run pmset -g assertions in Terminal and read the PreventUserIdleSystemSleep and PreventSystemSleep lines, which name each process.

    Why does my Mac wake up right after sleeping?

    Accessories and network wake are the common suspects. Unplug USB devices and check Wake for network access in System Settings › Battery › Options.

    What is coreaudiod preventing sleep?

    Something has audio open, often a browser tab or a music app, even when paused. Close it and the assertion should go away.

    What does SleepDisabled mean?

    Sleep is switched off for the whole Mac, usually by a keep-awake tool. Quit that tool. If it stays at 1, run sudo pmset -a disablesleep 0.

    Mac running low on space or slowing down? Mole can clean out the junk, remove apps completely and keep macOS in shape.

    Try Mole

    Keep reading

    • Apps & MaintenanceDo You Need a Mac Cleaner5 min read
    • Apps & MaintenanceDo You Still Need AlDente Now macOS Has a Charge Limit?5 min read
    • Apps & MaintenanceWhat Are LaunchAgents and LaunchDaemons on Mac and Which Can You Remove5 min read

    Mole · 鼹

    Keep your Mac clean and light.

    v1.20.0 (371) · Release notes

    Product

    Mac Cleaner App Uninstaller Mac Optimizer Disk Analyzer System Monitor

    Support

    Help Documentation Releases Blog

    Legal

    Terms of Service Privacy Policy Refund Policy

    Resources

    For Windows CLI Tool Storage Cost Affiliate Program

    Connect

    Twitter hi@mole.fit

    Mole’s only official website mole.fit, avoid installers from unknown sources

    The CLI stays free for terminal workflows.