Live data from Hacker News

MacBook Pro Insomnia

manuel.bernhardt.io

141–150 of 238 posts

Re: MacBook Pro Insomnia

#141
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…

Does hibernate play nice with FDE? I know in Linux there are varying caveats around committing memory to disk wrt disk encryption

When resuming from hibernation I’m not prompted for credentials until the system has resumed, so I have to imagine the disk remains decrypted, i.e. same behavior as sleep.

Re: MacBook Pro Insomnia

#142

Earlier quoted context omitted.

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.…

> Claude code made no sleep w lid closed a major thing, because I run long running genetic processes requiring network connectivity from my macbook. I have no idea what this means. Could you say more about it?

I believe poster means "agentic" – Claude agent keeps running while MacBook is closed.

Re: MacBook Pro Insomnia

#143
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…

This is the simplest solution that enables the behavior that I think most people who care enough to comment here want

Thanks! I hope it helps folks as much as it has helped me.

Re: MacBook Pro Insomnia

#144
post #8

Earlier quoted context omitted.

I had the same thought, and while this is a complete guess, it passes my sniff test personally. It’s possible that when this setting is not enabled, those wake events are not coalesced into hourly wakeups, but instead happen arbitrarily throughout the night. That would immediately lead to the behavior described.

It took me a while and a couple of re-reads to parse out the same conclusion. Basically they're batched instead of happening continuously.

Batching isn't mentioned anywhere. Do you have a positive reason to think this, or is it just the easiest hypothesis (besides a typo) explain what the author wrote?

Re: MacBook Pro Insomnia

#145

Earlier quoted context omitted.

> I had changed the DHCP lease time on my router from the default to a really low value. I believe I had set it to 15 minutes. What were you hoping to achieve by doing that?

I was trying to determine if a lease expired, if my router would immediately try to lease that same IP out to another machine on the network. It felt like it cached an expired lease mapping and would try to keep that old IP un-leased in case the original machine to which it was mapped came back online. I was just trying to better understand the behaviour.

Did you want certain IPs to be fixed to certain devices or do you prefer they be randomly allocated?

Re: MacBook Pro Insomnia

#146
post #142

Earlier quoted context omitted.

> Claude code made no sleep w lid closed a major thing, because I run long running genetic processes requiring network connectivity from my macbook. I have no idea what this means. Could you say more about it?

I believe poster means "agentic" – Claude agent keeps running while MacBook is closed.

This.

Re: MacBook Pro Insomnia

#147
post #42

In my case the culprit is always all the security spyware/crapware that my employer has installed on the macbook.

100% my experience too. The crapware also slows down the machine considerably.

Re: MacBook Pro Insomnia

#149
I killed an intel macbook air as I closed the lid and placed it in my backpack.

For some reason (i suspect iTerm) it didn't go sleep, it overheated. When i opened the backpack hours later I i found the insides like a sauna.

Re: MacBook Pro Insomnia

#150

Earlier quoted context omitted.

I was trying to determine if a lease expired, if my router would immediately try to lease that same IP out to another machine on the network. It felt like it cached an expired lease mapping and would try to keep that old IP un-leased in case the original machine to which it was mapped came back online. I was just trying to better understand the behaviour.

Did you want certain IPs to be fixed to certain devices or do you prefer they be randomly allocated?

Neither really, though my ISP's router would allow me to assign IPs by MAC address so they're effectively reserved to a device. The router's web UI displayed a list of devices. I wanted to see if devices would start dropping off this list as soon as the DHCP lease time expired. When they did drop off this list, I had thought they reappeared with the same IP without me explicitly using the reservation functionality. So how was this happening? I figured the web UI might not be showing the full picture of all the data about devices; that the router held records of formerly connected devices beyond the DHCP lease time for some unknown reason.
Post reply on HN