Live data from Hacker News

MacBook Pro Insomnia

manuel.bernhardt.io

161–170 of 238 posts

Re: MacBook Pro Insomnia

#161
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 haven't seen this hill before. What's the problem with permissions?

Re: MacBook Pro Insomnia

#162
post #75
post #60

Earlier quoted context omitted.

that's called "off".

i suppose we have come to expect 4 states: - off: no power, no activity - hibernate: no power, no activity session state saved to non-volatile storage - sleep: Minimal power, RAM remains powered with the session state, can be resumed quickly - on now we essentially have sleep++ and no option to set it back to vanilla sleep.

You do have that option, it's just not the defaut.

For most people these days the primary device is their phone, and so that is the model that modern laptops are trying to follow, as that is what most users will expect.

Re: MacBook Pro Insomnia

#163

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…

   pmset -g assertions
in the shell will also tell you which processes are preventing sleep, and it'll tell you the exact power assertions that are being held.

(`pmset` has some other undocumented commands, you can discovery some of these in its source code Apple releases. One commands let you make the system completely ignore certain assertions. If you disable the "UserIsActive" assertion though you might struggle to wake it up)

Re: MacBook Pro Insomnia

#164
post #6
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.

It's Find My. No great solution. I turn my iPad off now when not actively using it.

Another solution is just to fully turn off Wi-Fi and Bluetooth. (Not "disable new connections" but fully turn them off). I have a Shortcut on my iPad's homescreen that does this. Just keeping Bluetooh off definitely greatly improves idle battery life. And you can use Shortcut automations to automatically turn it back on when you take certain actions. And if you don't care about Find My at all, you can disable it deep in system settings.

This is all far from ideal.

Re: MacBook Pro Insomnia

#167

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…

Wow.

1. I had no idea you could do this, thanks.

2. Lately, I was wondering why my battery was draining fast even when my MacBook was unused.

3. Turns out, Firefox is preventing sleep. Something about videos auto-playing, apparently. Not great, but it can be fixed.

Re: MacBook Pro Insomnia

#168

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.

Can confirm that Yubikey-like devices prevent the M1 MBP from fully sleeping, which eventually depletes the battery. My company's (big tech) IT department reached out to Apple's corp support and eventually got confirmation from Apple that they decided to close the issue w/o fix. Something to do with their USB controller's firmware, if memory serves.

Removing Yubikey before (or after) closing the lid completely prevents total battery drain for me.

Re: MacBook Pro Insomnia

#169

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

You don’t need that application that sounds like a narcotic.

That’s built in, “man caffeinate”.

Post reply on HN