FIX: MacOS Ventura Freeze When Entering/Exiting Sleep Mode

Installing, configuring, maintaining and designing operating systems
Santeri
Posts: 310
Joined: 2017-7-5 09:58

Unread post by Santeri » 2024-3-31 18:18

A MacBook running MacOS ventura was freezing often when entering sleep or waking up. I noticed the freeze from keyboard lights which stayed on. When the laptop entered properly sleep mode, keyboard lights went off. The only way to wake up frozen laptop was to force reboot by pressing the power button for 10 seconds.
FIX: MacOS Ventura Freeze When Entering And Exiting Sleep Mode Sometimes the laptop woke up from sleep mode by itself, drained tbe battery completely and failed to return to sleep. Once it happened in the middle of the night and in the morning the laptop was burning hot and frozen. I managed to fix the issue by adjusting power management settings. I have had no sleep issues in the past 2 weeks.

You can check your current power management settings by opening a console and typing the following command

Code: Select all

pmset -g
The settings that were enabled by default and apparently froze the laptop were:
  • powernap
  • networkoversleep
  • tcpkeepalive
To fix the issue, I disabled the settings issuing the following commands:

Code: Select all

sudo pmset -a powernap 0
sudo pmset -a networkoversleep 0
sudo pmset -a tcpkeepalive 0
Sudo runs the command using root privileges, -a means the setting is applied to all power plans, 0 means disabled and 1 means enabled.

Without powernap apps do not update during sleep (for example checking new emails). Not allowing networkoversleep will stop shared network services during sleep. Disabling tcpkeepalive will disable some services like 'Find My Mac' during sleep.

Thanks to this change, the battery drain decreased significantly, laptop stopped waking up magically and the system will no longer freeze during sleep.

You can read the pmset manual page by typing command

Code: Select all

man pmset
Sleep well,

Santeri



Macuser

Unread post by Macuser » 2024-4-7 05:23

This is not 100% fool proof but reduced freezes 90%. Thanks.

MacuserX

Unread post by MacuserX » 2024-4-14 04:00

I have noticed that my MacBook does not freeze if I put it to sleep by pressing power button shortly. It enters sleep later by itself and that does not freeze it. If I select sleep from menu, the probability of freeze is some 15%. I tried your fix and it was not fool proof.