Live data from Hacker News

MacBook Pro Insomnia

manuel.bernhardt.io

201–210 of 238 posts

Re: MacBook Pro Insomnia

#201
post #51

I've worked around this problem on each mac laptop I've owned over the years by configuring "hibernate on lid close." When I open the lid of the mac it takes maybe 20-30 seconds to resume. I consider this a small price to pay in exchange for reliable sleep and less battery drain with the lid closed. If you want to try this, run in the terminal: sudo pmset -a hibernatemode 25 If you don't like it, you can restore defa…

I just got my MacBook Air of the shelf to run this command. But I had to hook it up to a power outlet, because the battery was drained

Re: MacBook Pro Insomnia

#202
I am so happy to learn that I'm not the only one experiencing these issues! For me it was so bad at some times that the MacBook woke up in my backpack and somehow did some really CPU intense tasks, leading to the fan going full speed. When taking it out it was almost too hot to touch, I was scared at times that it would break or set the bag on fire.

Re: MacBook Pro Insomnia

#203

I've spent many hours debugging my Macbook's erratic insomnia and the only thing I know is that WindowServer is the culprit and it'll likely require a full OS reinstall, which has been on my todo list for months. The only thing worse than opening my laptop bag to find a hot, dead laptop a couple times a month is the inevitable response of: "Well, you must be doing it wrong, that doesn't happen to me!"

I was like wtf does the windows server has to it

Re: MacBook Pro Insomnia

#204

Earlier quoted context omitted.

> I'm surprised that Apple's power management doesn't have an alert for this. I'm more surprised that any application can prevent sleep _when you close the lid_. I can understand the utility behind something like stopping sleep via timeout so a media player can tell the system "hey, they're watching a movie don't turn off even if they don't touch you for a bit". I really can't think of many valid use cases for applic…

Actually, I use this all the time now. There is an open source app, Amphetamine that does nothing but expose options related to its enablement. Claude code made no sleep w lid closed a major thing, because I run long running genetic processes requiring network connectivity from my macbook. Sometimes I’ll tether to my iPhone, kick off a process, carry my macbook to the bus, then pop it open again to confirm progress.…

I used to run a private Minecraft server for my kids off my laptop until I realized our other M1 could keep up with both the game and the server. Keeping it awake while closed would have been nice.

Re: MacBook Pro Insomnia

#205
I have the exact model as my work device and I have had this problem since like October 2024. On my personal M4 Pro, none of this. At some point I thought it might be the corporate spyware software. Let me try this solution and see if it fixes it

Re: MacBook Pro Insomnia

#206
One thing to note is that FindMyMac works as the Mac wakes up when asleep and so updates it's location.

If you lose your Mac and power settings are too stringent, location may not show up.

Re: MacBook Pro Insomnia

#207

Earlier quoted context omitted.

So, a dummy hdmi plug will do the job?

No need for dummy monitors, to disable the forced automatic sleeping behaviour when closing the lid just run sudo pmset -a disablesleep 1

I remembered that you used to need a kernel extension for this because the behavior is hardcoded without an option. Glad that they added a proper option so you no longer need to do this.

Re: MacBook Pro Insomnia

#208

Another trick is to open Activity Monitor, switch to the Energy tab, and sort by the "Preventing sleep" column. Some apps prevent macOS from sleeping. In my case, I've discovered that Devonthink (document/notes management app) is responsible. I've been meaning to file a bug report about it. I'm surprised that Apple's power management doesn't have an alert for this. Surely an app that causes my Mac to become glowing h…

Maybe we need an app that’s like this and does it for apps that are in the business of keeping the Mac awake https://objective-see.org/products/knockknock.html

But that would require the app to at least register somewhere in advance to be able to achieve that, if not a full fledged permission.

Re: MacBook Pro Insomnia

#209

> In my case, the “Wake for maintenance” option was disabled, and Sleep Aid helpfully showed in the settings interface that this could lead to frequent wake up events. Did author mean to write "option was enabled" instead?

I thought so, but I installed Sleep Aid, and when I disable "Wake for Maintenance", Sleep Aid gives me a stern warning:

> Disabling "Wake for Maintenance" can lead to this Mac waking every few seconds. Please select "Disable Wi-Fi" to help with this

So it seems like actually Enabling this setting somehow prevents the Macbook from waking up every few seconds... presumably due to Wi-Fi? Enabling it seems like the recommendation by Sleep Aid anyway

Re: MacBook Pro Insomnia

#210

Another trick is to open Activity Monitor, switch to the Energy tab, and sort by the "Preventing sleep" column. Some apps prevent macOS from sleeping. In my case, I've discovered that Devonthink (document/notes management app) is responsible. I've been meaning to file a bug report about it. I'm surprised that Apple's power management doesn't have an alert for this. Surely an app that causes my Mac to become glowing h…

I can't believe the Apple stocks app prevents sleeping. Why? It's not like it's a critical feature to know I'm down 0.25% for the day.
Post reply on HN