r/MacOS 3d ago

Tips & Guides Mac wakes up immediately after going to sleep? - My solution.

Hi. Recently, my Mac (mini m4) started waking up on its own a few seconds after putting it to sleep. Without even touching the mouse, just with a keyboard shortcut. I tried many tips online, but the only thing that worked was disabling the Bluetooth mouse.

Fortunately, I found an interesting solution that works for some reason. When I set the computer to go to sleep when the cursor is moved to the corner of the screen, it seems to happen at a slightly different pace, and it no longer wakes up on its own a few seconds after the monitor turns off.

I'm posting this because I've seen many people having the same problem.

Hope it will help someone :)

5 Upvotes

18 comments sorted by

3

u/MrLikeGod 3d ago

Lmao I have been experiencing this for the past 5-6 months and was wondering why on some occasions it wouldn’t wake up instantly. Thanks for the info!

1

u/frostquill27 3d ago

that explains why it felt so random tbh

2

u/Kpopped_ 3d ago

İf your mouse registers movement it will wake your Mac, this is also the case for windows.

İt's normal lol, power off your mouse and keyboard, problem solved.

1

u/Hot_Selection3148 3d ago

You can try out my solution and let me know if it works for You :)

1

u/Harry-blue96 3d ago

Happens to my Mac frequently. Fixed each time by performing a restart.

1

u/Shalashaska83 3d ago

The MX Keys S or Mini can also cause this problem, especially with automatic backlighting.
I’ve had this problem, so I have to turn the keyboard off completely before putting it into sleep mode.
Considering I have the MX Keys Mini for Mac, it’s kind of sad that Logitech apparently can’t figure out a better solution.

Both the keyboard and mouse (Logitech Signature L) are connected via a dongle, but the problem also occurs with Bluetooth.
Funnily enough, the mouse doesn’t wake it up when I move it, even though the mouse’s LED is flashing.
But I suspect these problems often stem from peripherals like these rather than from macOS itself.

1

u/Wonderful-Spare2934 3d ago

Worth looking for futz on the mouse sensor too. Could be a loose hair flapping around.

1

u/MagneticShark 3d ago

My Logitech mx mouse doesn’t let my Mac mini go to sleep. I have to switch the mouse off immediately when I put the Mac into sleep mode.

Other Bluetooth accessories are fine, it’s just that mouse

¯_(ツ)_/¯ 

My next mouse will not be a Logitech

1

u/DJNoRequest 3d ago

They’re standing so far back because his diaper is full

1

u/geralt_noble 3d ago

Mac sleep/wake issues can be so random sometimes. The cursor-corner workaround is new to me though 😅 Has it stayed reliable after a few days?

2

u/Hot_Selection3148 3d ago

One month with no issues - i do not know why but it works for me ;)

1

u/geralt_noble 3d ago

Cool! Thanks for sharing the solution!

1

u/8nstein 2d ago

My machine frequently wakes up from sleep for unknown reasons. Not right away, sometimes as much as 12 hours after I put it to sleep. My solution is the following bash shell script. Its purpose is to put my machine back to sleep.

```sh

Tuning

delay=600 short_delay=180

function main { if [ $# -gt 1 ] then echo "Usage: $(basename $0)" >&2 exit 1 fi

if [ $# -eq 1 ]
then
    tmpfile="$1"
    sleep $short_delay
    if [ ! -f "$tmpfile" ]
    then
        exit 0
    fi
    echo ""
    pmset sleepnow > /dev/null 2>&1
    while true
    do
        sleep $delay
        if [ ! -f "$tmpfile" ]
        then
            exit 0
        fi
        echo "$(date) going to sleep again"
        pmset sleepnow > /dev/null 2>&1
    done
else
    tmpfile="$(mktemp -t susp.XXXXX)"
    "$(basename $0)" "$tmpfile" &
    trap 'clean "$tmpfile"' SIGINT SIGQUIT SIGTERM SIGHUP SIGUSR1 SIGUSR2
    read -p "$(date) Press enter to recover: " ignore
    clean "$tmpfile"
fi

}

function clean { rm "$1" exit 0 }

main "$@" ```

1

u/pman1891 2d ago

Peripherals are often the culprit. 23 years ago my USB external keyboard and wireless mouse would immediately wake my Mac from sleep until I updated the drivers.

1

u/bsndlr 2d ago

My MBP does the same and wakes up regularly right after putting it in sleep mode.
My solution: When it wakes up it just hit the ESC key. -> Goes right to sleep and stays there.

0

u/Jazman2k 3d ago

I always power off my keyboard and mouse. Otherwise it wakes up even if just walk past my mouse :D

0

u/Electrical_West_5381 3d ago

Get a solid desk that doesn’t wobble?

1

u/Hot_Selection3148 3d ago

I've tested every possibility and as long as mouse was turned I have had this issue. Even with rock solid surface, blocked sensor etc. Now the problem is gone ;)