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.