Live data from Hacker News

MacBook Pro Insomnia

manuel.bernhardt.io

151–160 of 238 posts

Re: MacBook Pro Insomnia

#151

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

Computer connected to a dock with monitor is a common use case for a close lid for me.

Re: MacBook Pro Insomnia

#152

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

Apple is not the only one doing this. Windows, depending on how its configured and the hardware in it, will keep WiFi and even Bluetooth devices connected even while "asleep". Example: I go out to the park with my Windows laptop. I turn on the computer. I pair my headphones and hop on my phone's wifi tethering. I do some stuff. I close my laptop lid, the system goes to "sleep". My headphones still think they're conne…

There is some reason to the madness, at least for connected Bluetooth devices.

Some people only have a Bluetooth mouse and keyboard (no wired devices), so the computer must maintain a connection to those devices so a mouse or keyboard click will properly wake the computer. But even when my laptop is closed and in my bag, it will turn itself on if I touch a connected Bluetooth devices even though it has no external monitor connected, until the laptop is burning hot with a dead battery.

I would say that requiring an external monitor connected or having the laptop open should be a requirement for turning the laptop on, except that monitors often go into sleep mode that requires the computer to wake them up and wait, and then we have all kinds of weird dependencies and people get really mad when their computer doesn't turn on.

There are just too many contradictory ways that people use their computers now. All wired devices, all wireless devices, clamshell, open but only external monitors, external monitors and laptop monitors, wireless external monitors via Sidecar, only remote access, etc. Apple used to have a "Allow Bluetooth Devices to Wake this Computer" option that addresses this exact use case but it was removed in recent versions of MacOS.

Re: MacBook Pro Insomnia

#153

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…

> I'm more surprised that any application can prevent sleep _when you close the lid_. Absolutely. If my options are 1) halt the process when the lid closes or 2) let the battery die heating up the inside of my bag and then the process halts anyway when the laptop dies then please, please let me choose #1! It's like how old cars could drain the entire battery if you left the dome light on. Why would they allow that?

This shouldn’t be the default option and those Mac users that actually need to run processes while laptop is in the backpack can choose to use amphetamine (the app)

Re: MacBook Pro Insomnia

#154
post #134

Earlier quoted context omitted.

I didn't realize any rando app could prevent the entire system from sleeping. Shouldn't this power be gated behind a user-controllable permission? I assume the developer needs to at least use an entitlement to call whatever API does this...?

> Shouldn't this power be gated behind a user-controllable permission? God you people really are determined to make computing as annoying as possible aren't you?

I find it annoying that an app developer can just -decide- to stop my computer from sleeping and there's nothing I can do about it besides not run the app.

Re: MacBook Pro Insomnia

#155
post #152

Earlier quoted context omitted.

Apple is not the only one doing this. Windows, depending on how its configured and the hardware in it, will keep WiFi and even Bluetooth devices connected even while "asleep". Example: I go out to the park with my Windows laptop. I turn on the computer. I pair my headphones and hop on my phone's wifi tethering. I do some stuff. I close my laptop lid, the system goes to "sleep". My headphones still think they're conne…

There is some reason to the madness, at least for connected Bluetooth devices. Some people only have a Bluetooth mouse and keyboard (no wired devices), so the computer must maintain a connection to those devices so a mouse or keyboard click will properly wake the computer. But even when my laptop is closed and in my bag, it will turn itself on if I touch a connected Bluetooth devices even though it has no external mo…

Don't get me wrong, I don't mind this especially with my devices that handle connected standby fine. I'm happy the moment I open my laptop I'm connected and even things like ssh sessions and what not we're still connected the whole time and my headphones are immediately available.

It's only been a problem with problematic devices that cause it to fully wake and never go back to sleep. Disabling those devices in sleep usually solves this.

Re: MacBook Pro Insomnia

#156
I have similar issues over the years on various devices and it has always been frustrating to determine the cause. Power management in general is so inscrutable. I wish there was a tool which let me go back through recent history, even just since the last 100% charge, and tell me why my machine was not sleeping or idling and what was consuming power. Apple has added some energy tools over the years but has never offered tools to explain system behaviour.

Re: MacBook Pro Insomnia

#157

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…

Woah just found out my router (mikrotik) defaults to 10 minute lease durations.

Mine defaults to 24h on RouterOS 7.16.x.

Re: MacBook Pro Insomnia

#158
post #41

Earlier quoted context omitted.

I like low lease times. DHCP server knows what's really on the network, and if something requests lots and lots of the pool you'll be fine in 15-30 minutes. If things are set to a really long time, >=12 hours, you find out the next day when everything is broken (or you get alerts in the middle of the night). If you set them to a randomized 15-90m span, you get things breaking immediately when you screw up the dhcp se…

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

Modern devices will randomize MAC unless told not to when connecting / reconnecting to a wifi/Ethernet network.

When on a pretty standard /24 network subnet, if there are more than a few dozen devices coming and going, the lease table can fill up until older lease reservations expire.

Re: MacBook Pro Insomnia

#159
post #3

My iPad only lasts a few days even with zero use. I have not been able to figure out what settings to modify so that I can (for example) pick it up a month later and not find the battery dead.

I have the same issue. I've disabled "Find My" feature and uninstalled everything that kept showing up as battery draining apps. My iPad loses about 20-25% of battery every night and there is nothing showing up in battery details anymore.

I'm pretty sure the problem would go away with a factory reset. Just like it with old Windows installations, except you had a better change debugging those...

Re: MacBook Pro Insomnia

#160
I feel like MacOS has been in maintenance mode for a decade. There must have been a lot of work to port it the ARM/Mac silicon. That and the AI update, which is terrible, there haven't been a lot of work done.

I had a Intel Macbook Air, the one with the power button right next to the backspace. I ran a script I found in the Mac forums to make it so you have to hold the power button instead of tapping it. Turns out that script had a trojan in it and they had to factory reset my mac and wipe my iCloud to get rid of it.

It had a GUID in it and apparently that can just download a resource from anywhere. I assumed it was an unlabeled internal variable.

Post reply on HN