Live data from Hacker News

Show HN: Adrafinil – keep a lid-closed Mac awake only while agents work

github.com

51–60 of 98 posts

Re: Show HN: Adrafinil – keep a lid-closed Mac awake only while agents work

#51
At some point, if you closed the lid and didn't have an external monitor plugged in, macos would put the GPU in power save mode, which would tank local llm performance. Is that not the case any more? There were even small singles you could get which would trick the ps into thinking an external monitor was plugged in

Re: Show HN: Adrafinil – keep a lid-closed Mac awake only while agents work

#54
post #23

For MacOS, keep awake with: sudo pmset -a disablesleep 1 Reset back: sudo pmset -a disablesleep 0

This works great. Only downside is display doesn't turn off when you close the lid. Made a little status bar utility to wrap the disablesleep command and address that downside:

https://github.com/narcotic-sh/modafinil

(yes, I know, another *afinil named Mac sleep prevention app? but hey, I was first :P)

Re: Show HN: Adrafinil – keep a lid-closed Mac awake only while agents work

#55
post #50

I have been using the builtin macOS `caffeinate` command for this. For example: caffeinate -dimsu That keeps the Mac awake so I can use Claude remotely from phone. You can also wrap your command as well, but I rarely use it. caffeinate -dimsu your-agent-command

Caffeinate is burned into my muscle memory at this point. I attribute that to the realization that you could repeat opt flags. There's something catchy about

caffeinate -dimsum

Re: Show HN: Adrafinil – keep a lid-closed Mac awake only while agents work

#57

Earlier quoted context omitted.

Everyone dreams about making the next cool AI tool and doesn't bother checking if someone has already made the same thing years ago without the word "AI" in the description

In order to get the same behavior with Amphetamine you’ll need to: 1. Install it from the AppStore (no brew, no GitHub) 2. Not forget to enable lock on lid close 3. If you ever connect/disconnect power while the lid is closed without the optional “Power Protect” system, the MacBook will sleep. The system is a script and a configuration file making sudo pmset -a disablesleep passwordless. 4. Add hooks to Claude Code c…

[deleted]

Re: Show HN: Adrafinil – keep a lid-closed Mac awake only while agents work

#58
post #23

For MacOS, keep awake with: sudo pmset -a disablesleep 1 Reset back: sudo pmset -a disablesleep 0

This works great. Only downside is display doesn't turn off when you close the lid. Made a little status bar utility to wrap the disablesleep command and address that downside: https://github.com/narcotic-sh/modafinil (yes, I know, another *afinil named Mac sleep prevention app? but hey, I was first :P)

Afinils are cool, and your app is cool too~

Re: Show HN: Adrafinil – keep a lid-closed Mac awake only while agents work

#60
post #50

I have been using the builtin macOS `caffeinate` command for this. For example: caffeinate -dimsu That keeps the Mac awake so I can use Claude remotely from phone. You can also wrap your command as well, but I rarely use it. caffeinate -dimsu your-agent-command

Claude Code actually uses caffeinate -i -t 300 during Claude’s turn, restarted automatically until the turn finishes.
Post reply on HN