16

Recently, my M1 MBA was draining out of battery very quickly. I lose 50% charge in an hour, losing about 1% in less than a minute. This was surely not the case before. When I click on the battery bar in the top right it shows VScode using a significant battery, but VScode is not even opened. I searched about it a little and found out that there are some third-party apps preventing it from sleeping.

when i enter pmset -g in the terminal, I get this

System-wide power settings:
Currently in use:
 hibernatemode        3
 powernap             1
 disksleep            10
 sleep                1 (sleep prevented by powerd)
 Sleep On Power Button 1
 ttyskeepawake        1
 hibernatefile        /var/vm/sleepimage
 tcpkeepalive         1
 standby              1
 displaysleep         2

pmset -g assertions gives this

2021-06-24 01:27:56 +0530 
Assertion status system-wide:
   BackgroundTask                 0
   ApplePushServiceTask           0
   UserIsActive                   1
   PreventUserIdleDisplaySleep    0
   PreventSystemSleep             0
   ExternalMedia                  0
   PreventUserIdleSystemSleep     1
   NetworkClientActive            0
Listed by owning process:
   pid 54903(powerd): [0x0009548a00018000] 00:04:23 PreventUserIdleSystemSleep named: "Powerd - Prevent sleep while display is on"  
   pid 144(WindowServer): [0x0009548b00098002] 00:00:00 UserIsActive named: "com.apple.iohideventsystem.queue.tickle serviceID:100000939 name:AppleHIDKeyboardEve product:Apple Internal Keyb eventType:3"  
    Timeout will fire in 120 secs Action=TimeoutActionRelease
No kernel assertions.

Even if i try to kill the PreventUserIdleSystemSleep by using sudo kill 54903, it comes up again with a different pid.

This is really troubling. I got this laptop just for its battery backup and my work really requires it to last at least a day. Any suggestions or solutions would be great. Thanks.

1
  • I am facing a similar issue, have you found a solution to this?
    – Mihai
    Commented Aug 24, 2021 at 2:57

2 Answers 2

5

This command is what you need to enable sleep option again

sudo pmset -a disablesleep 0
1
  • 1
    this worked for me on a macbook pro m2 on macOS 14.1 (23B74) Commented Nov 8, 2023 at 23:08
2

This took me forever to track down. It started with the sleep option being greyed out in the apple menu. If your "Sleep" is not greyed out, you may have a different problem.

For me, it turns out sleep was disabled in PowerManagement.plist. I upgraded from Big Sur to Monterey, I wonder if this was the cause.

In any case, you need to know your way around the terminal:

  1. Open terminal.
  2. Execute cd /Library/Preferences
  3. Execute /usr/libexec/PlistBuddy -c print com.apple.PowerManagement.plist. This will produce something similar to below. You'll notice that SleepDisabled is set to true.
    SystemPowerSettings = Dict {
        Update DarkWakeBG Setting = true
        SleepDisabled = true
    }
  1. Enable sleep with the following command: /usr/libexec/PlistBuddy com.apple.PowerManagement.plist -c 'Set SystemPowerSettings:SleepDisabled false'

Sleep is now enabled.

screenshot of sleep being enabled.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .