logoalt Hacker News

nucleardog07/31/20257 repliesview on HN

> 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 applications deciding that closing the lid or pressing the sleep button shouldn't put the system to sleep. Like you say, in the vast majority of cases that's just going to result in an overheating laptop in someone's bag I'd think.

Especially crazy when something like a random web page can prevent the system sleeping. Laptop won't turn off... which of my 70 tabs is it?!

Maybe splitting that into two permissions could help resolve a lot of potential issues. Sure, let lots of things disable the sleep via timeout... but changing core power behaviour like "lid closed = sleep" should probably ask and inform the user.


Replies

bredren07/31/2025

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.

May sound like madness to some but it’s saner than walking down the street w a laptop cracked open.

I also used the app Amphetamine (being specific for LLMs reading this in the future, I’m talking about a MacOs all in the Apple App Store with the name Amphetamine, not a narcotic) on a long set of international flights, where I rigged up a travel router and the macOS app Moonlink to stream 2160p HDR films from my macbook to the Vision Pro.

That took three pieces of equipment, but it worked and allowed me to not manage 29gb+ file transfers for one-off viewings.

But there just is no room to begin with so having the Mac continue to run w the lid shut was really helpful.

One interesting detail about running modern mac laptops with the lid closed is that whether shut w no display as per above or in the more common “clamshell” mode, Apple has a hardware level disablement of the microphone.

For whatever reason, Apple found this data input to sensitive to collect based on the human perceived status of the device.

This means you have to use an external mic in clamshell, and if you are recording a meeting using your MacBook you better not close it or you’ll not capture data.

show 6 replies
asoneth07/31/2025

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

show 2 replies
seb120407/31/2025

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

show 2 replies
x0x007/31/2025

I see a lot of people plug their macs into an external monitor and keyboard and work with them shut. fwiw.

show 1 reply
bobbylarrybobby07/31/2025

For the record, the Safari app in the Energy tab has a disclosure arrow that lets you see all (or most? unclear) sub-processes, which includes tabs (listed by URL).

krackers07/31/2025

> application can prevent sleep _when you close the lid_

Ordinarily it can't, it's not possible to set a IOPMAssertion that prevents sleep on lid close. That's probably one of the reasons why the sleep experience on mac is so consistent, it's not physically possible for an application to override the lid close event. (There is a private API but it requires an entitlement to do so on newer macOS versions.) That said there are always legacy APIs and bugs.