7 ms·
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 ca
by atombender 1y ago
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 hot while sitting in my backpack, not to mention slowly running out of battery, is a pretty important thing to intercept. Meanwhile, I keep being asked if Chrome should be allowed to find devices on my network, which doesn't seem nearly as important.
- ryandrake 1y agoI 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...?
- bayindirh 1y agoAny website and app can do it. Zoom / Google Meet / YouTube / Bandcamp / Spotify already does this. I don't think it needs to be hidden behind walls. Maybe a user override can be added. In Linux, KDE's power manager PowerDevil shows if something is blocking device or display sleep for example. I don't think it's hard to add an indicator in macOS, too.
- triknomeister 1y agoIn KDE, user can also override this.
- bayindirh 1y agoYes, you can. I forgot to add that, thanks.
- ryandrake 1y agoVisibility isn't the problem. As OP mentioned, you can go into Activity Monitor to easily see what application is doing this. The user just doesn't seem to have any control over it or any way to stop a particular application from doing it.
- bayindirh 1y agoIt's buried too deep. Clicking on battery and seeing a line saying "There are apps preventing sleep >" and hovering on it to see a list is way better than digging activity monitor. Another option might be another section for apps preventing sleep, like power hungry applications.
- foobarian 1y agoOr, when apps try to intercept sleep the OS can pop an Allow/Don't allow dialog before the app can actually achieve this
- bayindirh 1y agoThat'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.
- fsckboy 1y ago>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
- odux 1y agoUntil recently a rando app could prevent a Mac from shutting down or logging out. I think it was changed in Sonoma.
- al_borland 1y agoWhat I find interesting is that system services, like Time Machine, don’t prevent sleep… even when Sleep Aid showed at setting where it will wake to back up. About half the time when I wake my MBP there is a notification waiting for me about Time Machine failing to finish because the system went to sleep. My TM drive is a SSD connected with USB-C. First initial backup took maybe 3-5 minutes. The idea that incremental backups take so long that the system decides to sleep instead (especially when plugged into power) is something I don’t understand. Now that I’m typing this, I wonder if I have a different issue going on. I moved the drive so it’s plugged into my display. The display powers my laptop and acts as a USB hub. I wonder if the monitor going to sleep is killing power to the drive… but I’d expect an improper ejection notice if that was the case.
- bogeholm 1y agoI have a similar issue with Time Machine backups. I’ll plug in wall power and a USB drive, do `caffeinate -u -t 7200` or so - and still Time Machine often fails to complete.
- mvdtnz 1y ago> 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?
- arijun 1y agoI 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.
- arijun 1y agoActually, thinking about it, it wouldn’t be that hard to implement for both that and background processes that eat up cpu.
- nucleardog 1y ago> 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.
- x0x0 1y agoI see a lot of people plug their macs into an external monitor and keyboard and work with them shut. fwiw.
- mmis1000 1y agoSo, a dummy hdmi plug will do the job?
- jaggederest 1y agoDummy might not do it. You could need a full fake display adapter - cutting the end off an HDMI won't do the bidirectional stuff monitors do these days, I believe.
- sgerenser 1y agoA dummy plug isn't just the end cut off of an HDMI cable, it actually simulates a monitor with EDID.
- freehorse 1y ago
- posix86 1y agoMeanwhile, Safari asks you if you want to close Netflix, while you're watching Netflix, because it uses too much power.
- teekert 1y ago“ Meanwhile, I keep being asked if Chrome should be allowed to find devices on my network, which doesn't seem nearly as important.” … Not for you, but someone finds it important.
- atombender 1y agoMore than once for the same app? Multiple times a month? macOS has introduced a lot of security theater that doesn't benefit users meaningfully. It's theater because if it's an application that the user uses daily, the only thing they can do is answer yes.
- varenc 1y agopmset -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)
- isolli 1y agoWow. 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.
- mgoetzke 1y agoYes Chromecast at work. One would think answering it once would shut it up for a long time, but alas that is not to be.
- xucian 1y agodidn't know about the "Preventing sleep" column. thanks! useful stuff
- m463 1y agoI wish ios had insights (and controls) like this. So many apps have telemetry and data collection and notifications that eat up your battery and bandwidth for business (no good) reasons.
- t-sauer 1y agoCan't you effectively check that through the background activity time in the battery usage overview?
- m463 1y agoI don't think that tells you anything except gross offenders. I ran this app call Adblock which creates an on-device VPN (checks dns request) Found for example the kindle (or audible?) app still does telemetry even if cellular data is turned off (to a2z.com)
- ijidak 1y ago> I keep being asked if Chrome should be allowed to find devices on my network God in heaven, how can I say yes once and for all!?! Recently switched to macos and ios. There are so many of these permissions I can't seem to permanently accept! Is this a feature or a bug? I want a button that says yes and don't ask me again. Or, no and don't ask me again. It's like Apple doesn't trust the user.
- crossroadsguy 1y agoMaybe we need an app that’s like this and does it for apps that are in the business of keeping the Mac awake https://objective-see.org/products/knockknock.html https://objective-see.org/products/knockknock.html But that would require the app to at least register somewhere in advance to be able to achieve that, if not a full fledged permission.
- 0xbrayo 1y agoI can't believe the Apple stocks app prevents sleeping. Why? It's not like it's a critical feature to know I'm down 0.25% for the day.
- ubermonkey 1y agoExcellent tip, and one I rediscovered earlier this week when I realized my Mac wasn't sleeping (the culprit: I'd left Powerpoint open and in slide-show mode). I used to use DevonThink, but I quit long ago. I'd be interested in hearing how you use it, especially if you're not an academic.