Live data from Hacker News

MacBook Pro Insomnia

manuel.bernhardt.io

81–90 of 238 posts

Re: MacBook Pro Insomnia

#81
post #65

Earlier quoted context omitted.

Hah. Your answer just has more questions. What on earth is requesting so many DHCP leases?

You've never accidentally spun something up that consumes all the leases? It's just been a couple of times, but I've definitely done it (e.g. bridged a couple of networks that shouldn't have been). But mostly, it's the other two things: it provides me with a list of hosts active now, and if the DHCP server is subtly broken I get a sentinel signal of something being wrong earlier (and it tends to be a partial instead…

Excellent answer - new appreciation for low lease times, thank you

Re: MacBook Pro Insomnia

#82
In case this helps anyone, I found that removing a Yubikey (i.e. with that contact sensor) seemed to reduce the number of times I opened my bag to find a Macbook Pro unexpectedly warm and with a drained battery.

Re: MacBook Pro Insomnia

#83

Earlier quoted context omitted.

Or, when apps try to intercept sleep the OS can pop an Allow/Don't allow dialog before the app can actually achieve this

That'd create a lot of interruptions for the user. Some apps use it temporarily in critical sections, web media players enable/disable when play/pause events happen, etc. An indicator and selective overrides is the way, IMHO. Invisible if you don't look, but it's there when you need it.

>Invisible if you don't look, but it's there when you need it.

so, like a white picket fence vs an invisible fence™ for your dog: white picket fence (not to mention two kids) is so unsightly people would never use it as a metaphor for bliss, why not just give the dog his unexpected-can't-see-it-coming-shock collar? let him discover through repeated trial and error what he's allowed and what he is not.

sounds about right, you've help me articulate what I don't like about modern so-called design

Re: MacBook Pro Insomnia

#84

Earlier quoted context omitted.

Edit 2: My bad, I assumed power nap == "wake for network access". This no longer seems to be an option in macOS 26. Mine's set to "Only on Power Adapter", which makes sense. Edit: On an M4 MacBook Air running macOS 26 DB

On Apple Silicon it's not available under the battery settings, but you can still set it. > sudo pmset -a powernap 1 -a is an option to set it for battery and plugged-in. If you want only either you can do -b for battery, -c for charger You can also check the settings with: > pmset -g

you can also use pmset to programmatically enable/disable low power mode (which i do when the battery gets too hot for my liking even before thermal throttling kicks in)

Re: MacBook Pro Insomnia

#85

Earlier quoted context omitted.

Harsh suggestion: log out of iCloud on the device. If that works you can try to isolate it further.

how do you work without iCloud? Yes, I realize alternatives exist, but this works so smoothly on Apple devices.

It’s a debugging technique not a permanent solution.

If logging out of iCloud does NOT fix the problem, you eliminated a bunch of potential issues at once.

Re: MacBook Pro Insomnia

#86

Earlier quoted context omitted.

> This is a macOS bug; it doesn’t need an IP address while it’s asleep. Waking up to renew a DHCP lease is crazy. It's actually not. As a user I'd expect the device to wake up and still have the same IP address via a continuation of the lease. Yes, the correct way would be a longer lived DHCP lease, but el-cheapo ISP routers often lock down such settings.

Interesting, as a different user, I'd expect the opposite: If my computer is "asleep" I don't expect it to do anything, and it shouldn't be able to wake itself up.

The definition of waking itself up is unclear. Surely you expect clicking on your mouse or typing in the keyboard wakes it up? That means USB events or Bluetooth can wake your computer. Still it's user-triggered and doesn't count as waking itself up. And I expect that initiating an SSH connection to that computer causes it to wake up, because I initiated that SSH connection; so it doesn't count as waking itself up. I further configured my computer to back up to my NAS every day at midnight. Since I configured it myself I expect it to wake up on a timer and it still doesn't count as waking itself up.

Re: MacBook Pro Insomnia

#87

This used to happen to my MacBook Pro, although it was a non Apple Silicon one. The issue was that 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 I believe was happening was the MBP was waking up to renew its IP address every 15 minutes and by the time it went to sleep again, it was probably waking back up to repeat the process. Changi…

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

Re: MacBook Pro Insomnia

#88
Apple's definition of "sleep" is unique, to put it mildly. My MBP may be "sleeping" but it will still aggressively connect to any wireless interface. Sometimes when passing by with my Bluetooth headphones, the MBP will often steal my current connection.

When a device goes to sleep, I don't expect it to interact with anything, even if I didn't deliberately turn off all wireless communication.

Apple is the only one doing this. I've had dozens of linux and windows devices by now, and Apple are the only ones to aggressively maintain or connect to wireless while sleeping.

Re: MacBook Pro Insomnia

#89
post #36

Earlier quoted context omitted.

Like, "Intel older"? Those had terrible thermal management for a laptop. An "older" laptop with a dead battery or one misreporting is not uncommon and has no bearing on how modern laptops, be they from Dell, HP, or Apple, perform. You could have 500+ cycles on any laptop and see the behavior you're claiming is terrible power management. https://support.apple.com/en-us/102888 Get a semi-new Apple laptop and then let u…

> Get a semi-new Apple laptop and then let us know how terrible the power management is So your solution to Apple's terrible power management is to give them even more of my money? As I said, it did this since it was brand new. Battery cycles have nothing to do with it. It's a macOS or hardware problem in the SMC.

You should've returned it and gotten a new one. It sounds like a hardware issue. I've used a 2018 MacBook Air as my daily driver for a while (to cut down on weight for my bike commute) and never experienced the problem you described.

Re: MacBook Pro Insomnia

#90

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 would rather have both, and I imagine the chrome one is easier to implement: either it asks for permissions or it doesn’t. Since there are valid reasons to keep the machine awake after closing the lid (close out connections, save files to disk, etc), it’s maybe harder to tell when one is going too long.
Post reply on HN