Live data from Hacker News

MacBook Pro Insomnia

manuel.bernhardt.io

231–238 of 238 posts

Re: MacBook Pro Insomnia

#231
Combined with disable wake for maintenance, I also disable wifi and bluetooth on sleep using sleepwatcher. The tradeoff is a couple of seconds for wifi to start up and find my Mac not being tracked before waking the machine again. But battery lasts forever in sleep, so I find it well worth it.

Install sleepwatcher and blueutil using brew, add these two files:

~/.sleep

  #!/bin/sh
  networksetup -setairportpower en0 off 2>&1 | tee /tmp/sleep_logs
  /run/current-system/sw/bin/blueutil -p off 2>&1 | tee /tmp/sleep_logs
~/.wakeup

    #!/bin/sh
    networksetup -setairportpower en0 on 2>&1 | tee /tmp/sleep_logs
    /run/current-system/sw/bin/blueutil -p on 2>&1 | tee /tmp/sleep_logs

Re: MacBook Pro Insomnia

#232

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…

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

Yeah, I'd be fine making an exception or separate option for "while hooked up to an external display". I think the user's intent could be reasonably construed there. Also if you're hooked up to an external display you often have external power.

Don't have a macbook, but on KDE that's already the default anyway it looks like--it's an opt-in to also sleep on lid close when there's an external display connected.

Re: MacBook Pro Insomnia

#233
My solution to prevent Macbook Pro M1 insomnia was to create a Keyboard Maestro Macro that disables Wi-Fi and Bluetooth with the Trigger "At System Sleep" (and re-enables them at wake.)

Worked perfectly... no more issues since.

Re: MacBook Pro Insomnia

#234
I've been using Sleep Aid for last couple of days and this finally helped me fix this issue: turning off wifi and bt automatically on macbook lid close. It's not ideal, but I finally don't have to worry about leaving my macbook in a backpack.

Re: MacBook Pro Insomnia

#235

I've been using Sleep Aid for last couple of days and this finally helped me fix this issue: turning off wifi and bt automatically on macbook lid close. It's not ideal, but I finally don't have to worry about leaving my macbook in a backpack.

Same.

Fyi, you may want to use Keyboard Maestro to do that automatically...

Re: MacBook Pro Insomnia

#236
post #228

Earlier quoted context omitted.

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?

> "With the setting disabled, the Mac got into a kind of wake-up frenzy, instead of waking up and processing events in batch every hour"

Thanks!

Re: MacBook Pro Insomnia

#237

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

By the way, an amphetamine is not a narcotic. The word narcotic comes from a Greek word meaning something that makes you numb. It’s used to refer to opioids. Amphetamine is a stimulant, and not an opioid.

Re: MacBook Pro Insomnia

#238
post #211

Earlier quoted context omitted.

Maybe you really needed the dome light. Same as in this case.

The far more likely scenario is that you forgot. Just because it's useful in strained, rare scenarios to have a hole in your foot doesn't mean it's not a better design choice to add a safety to prevent a device from shooting itself in the foot.

More ridiculous is that a dome light should be able to drain an entire car battery in the first place. I have 18650s powered handhelds that can do days.
Post reply on HN