43

The Caffeine app for preventing sleep/screen lock is not working on macOS Mojave.

Did I miss a setting to FAQ on making it work with macOS 10.14?

  • Welcome to Ask Different. The way your question is currently written, it could be closed as off-topic. You can help prevent this from happening by editing your question to include the problem you're having and what you've already done to resolve it. For example, what alternatives to Caffeine did you try and why didn't they work for you? – fsb Sep 25 '18 at 17:16
  • Have you tried Caffine app for the Mac? lightheadsw.com/caffeine – jmh Sep 25 '18 at 17:26
  • 2
    @jmh not working on mojave – charlie137 Sep 25 '18 at 17:36
  • 1
    What do you mean by „not working“? Does is it not start, does it not prevent sleep? Did you check the man page tinder whether parameters changed? – nohillside Sep 25 '18 at 17:53
  • Caffinated is a maintained app that was last updated in Sept, 2018 so it may support Mojave. Is $1 at the app store. But i have no idea if it will work. – jmh Sep 25 '18 at 18:24
33

TLDR: Access to the permissions in Mac OSX Mojave have changed. You have two options:

  1. Download updated version of Caffeine that I fixed. See story below.
  2. Update preferences to allow Caffeine access it needs. (via other answer to this question)

While this question wasn't entirely clear on whether the issue was with the caffeinate command built in to macOS or the Caffeine utility written by Tomas Franzén of Lighthead Software, the comments and other answers seem to imply the latter.

After encountering the issue myself, I reached out to Tomas and inquired about taking over the development of Caffeine. He graciously has provided the source code under an MIT license, and I've made a quick updated version available here that will prompt for the needed accessibility permissions when running on Mojave.

I will be bringing additional support for Mojave as well as some improvements in the near future, but wanted to put this here for others who come across this question like I did and would like to continue using Caffeine.

  • @charlie137 I see that following Beau Smith's edit to this answer, you have since removed it as the accepted answer. Was there a problem with the edit? Given that there is now a released version of Caffeine supporting macOS Mojave, this would indeed answer the question at hand. – TuxToaster Dec 5 '18 at 3:26
  • 4
    would you please fix the persistent blue highlight when right clicking on the menu bar icon ? – ronnieonrails Jan 24 at 19:13
  • I am using the new version AND have added it to my Accessibility settings - and still it isn't working. As far as this being open sourced - I tried to look for a github repo to no avail - can you point me to that and maybe I can look into the problem/fix myself? – Justin Pihony Feb 25 at 3:37
  • 1
    for others looking it is here: github.com/tomasf/caffeine – Justin Apr 4 at 2:39
  • 1
    Thanks @Justin, I had missed the earlier comment from Justin Phiony asking about that. That repo is indeed the one that Tomas uploaded when I inquired about Caffeine, and what I based the current version on. I didn't get a chance to post the updated repo with my fixes and new features, but I'll do that soon and add a comment here with the link. – TuxToaster Apr 5 at 13:53
48

Caffeine is still working! However, Apple has upped its security and privacy model a bit and caffeine fell prey to that. What you have to do to get it working properly again is the following:

  • Open the security settings
  • Go to Privacy tab
  • Select Accessibility on the left
  • Unlock your settings
  • Add Caffeine to the list on the right
  • Lock settings
  • Restart caffeine
  • +1 Great fix, this worked for me! Why change to an alternative when the original one still works! – RNickMcCandless Oct 19 '18 at 16:01
15

Here are 2 alternative you can try that do the same as caffeine.

Amphetamine, a full-on Caffeine replacement

and

KeepingYouAwake, an up-to-date Caffeine clone

  • 2
    I have tried both of these, and they work well. I prefer the Amphetamine, for reasons I can't remember now, but I'd definitely recommend checking them both out. – TJ Luoma Sep 25 '18 at 19:09
  • 1
    +1 for KeepingYouAwake. Using since Sierra and just upgraded to Mojave. Works like a charm. – Nimesh Neema Sep 26 '18 at 4:32
8

AFAIK, caffeinate remains in Mojave, and it is certainly in High Sierra. caffeinate is a command line utility; i.e. you invoke it from the terminal. If this is what you mean by "manual entry" then I'll guess you're not keen on doing things from the command line.

However, caffeinate is quite easy to use. It also has the advantage of being supported by Apple, doesn't require cluttering your system with additional apps that will require your time to maintain/upgrade. I could go on, but...

So that's my answer. I mostly just wanted to make it clear that the caffeinate utility has not been deprecated by Apple.

  • Just be sure to spell it correctly. i looked for it earlier and spelled it caffinate which looks ok but is wrong. Seamus spelled it correctly as caffeinate.. – jmh Sep 25 '18 at 20:58
  • No, manual entry would be script/copy-paste one-liner. I was looking for the same app like Caffeine, that wasn't updated since 2009. And it finally just lost its magic on mojave. – charlie137 Sep 26 '18 at 6:43
  • I believe, and could of course be mistaken, that Caffeine is just a GUI wrapper for caffeinate. – Br.Bill Nov 20 '18 at 22:20
  • 1
    I tried caffeinate but it doesn't work for my use-case. I have a malfunctioning Hall effect sensor that spuriously signals clamshell closed at random but even with caffeinate, it still goes to the lock screen. Trying KeepMeAwake. – dhchdhd Feb 2 at 20:48
  • @Barry: Not sure, but lock screen and sleep may be different things?? – Seamus Feb 3 at 0:39
0

Hey there—I’m the creator of an alternative called Theine. Back in 2015 I’ve decided to create my own caffeine-like app because of the lack of support for retina displays.

▶ Download: https://itunes.apple.com/app/theine-2/id955848755

It’s available on the Mac App Store and doesn’t require Accessibility (== admin) privileges at all.

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .