Keep your desktop awake with the Caffeine shell extension

The Fedora Workstation has a number of features in the GNOME desktop environment to conserve power and increase security. These are both important considerations for desktop and laptop users. One of these features is the automatic screensaver lock function. By default, if idle for 5 minutes, the screen locks. This causes two things to happen:

  • The display goes into a low power mode. This works for both desktops and laptops, causing most screens to power down.
  • The screen saver and lock dialog covers the active user session. To unlock the session, you must input your password.

These are useful functions in many situations. For example, you might walk away from your computer without locking it yourself. Or you might take your attention away from your laptop for a while even if it’s near you, causing it to use up more battery power. Having a screensaver in these cases is helpful.

But sometimes you might want your screen to stay on even when the computer is idle. GNOME has a built-in detector for turning off the screensaver when you make an app full-screen. Chances are you’re doing that for something like playing videos, when you don’t want the screen to lock.

But what if you’re not running a full-screen app? For instance, you might run several long-term apps in a demonstration. Or you might give a presentation and not touch the keyboard or mouse for long periods. In these cases you don’t want the screen to lock.

There’s a handy GNOME Shell extension for this purpose, called Caffeine. The Caffeine extension allows you to toggle the use of the screensaver, so you don’t need to worry about your display locking.

To install it using the Firefox browser, visit the GNOME extension site and install. You’ll see a small coffee cup icon appear in the top bar to show the extension status.

Caffeine icon in the top bar status area

Using Caffeine is easy. Click the icon to disable the auto-suspend and screensaver function in GNOME. You’ll see the coffee cup full of steaming hot caffeinated beverage, meaning it’s on.

Caffeine extension enabled

To turn off the extension, and re-enable the GNOME functions, click it again.


Image courtesy Mike Kenneally — originally posted to Unsplash here.

Fedora Project community

15 Comments

  1. Interesting Feature…..:-)

  2. Ashwin D

    Useful ! Thanks for sharing 🙂

  3. jurikolo

    Is there a tool to prevent monitor to turn off (go to power saving mode) when PC is locked? It takes about 5 seconds for display to turn on, but I want it immediately.

    • gnodora

      Don’t know but I’d like that too!

    • CFWhitman

      That is generally a function of the “Power” settings for you particular desktop. Some allow more fine-grained control of what happens than others. For example, Ubuntu Studio 14.04 with Xfce only has general settings for what your computer as a whole does, but Ubuntu Studio 16.04 with a newer version of Xfce allows you to specifically define what your display does apart from other power settings. Other distribution and desktop versions have different settings (this is aside from under the hood tinkering which may make more possible than is revealed in your settings screen).

  4. I remember I read about Coffeine a year ago in “How do you Fedora?” article. Since that time, I can’t live without it. It’s simply and great!

  5. Lars Anders

    Could be useful for the pi, where the blanking is super aggressive and a ridiculously mysterious process to disable.

  6. Edwin Brietz

    This app was huge during my last deployment back in 2012. We had all Dell windows machines in our Tactical Operations Center and the authentication had to be put in not only for every login, but for every screen lock also. You didn’t want the screen to lock while watching a streaming video during a mission, so caffeine was a mandatory install. Theater IT guys made the lock timer set @ 15 minutes and made it mandatory because people would not lock their PC’s before they left to go anywhere. With all of the sensitive info floating around, this was a bad habit. Caffeine was our work around to the annoyance.

  7. I used windows and linux distros with same pc.
    The linux come with speed but also has many features.
    Linux users used command line , so this software it’s another gui.

  8. CFWhitman

    Caffeine itself is what keeps the monitor from going to sleep. The Caffeine Gnome extension is a control panel for Caffeine that allows you to control it manually instead of relying entirely on its automatic function. I have used Caffeine in other desktops (LXDE, Xfce) as well.

    • @CFWhitman: Perhaps these were similarly named apps? The Caffeine extension for GNOME Shell is entirely self-contained. You can check in the github repo for more information.

      • Yug

        Its great app. But I am unable to make it work on MATE- desktop. Anyone using it on MATE? Thnx.

  9. TimeSearcher

    Caffeine extension installs on my Fedora 24 Gnome desktop just fine, and I can toggle it on and off OK. “Auto suspend and screensaver disabled'” appears and the coffee cup icon is full and steaming.

    It doesn’t prevent the screensaver mode from kicking in as usual though. I used to use it with KDE and had to configure a list of apps it would control. I can’t seem to find a config panel for the new version though…

  10. TimeSearcher

    Update: To tweak the settings, use “https://extensions.gnome.org/local/”. Still doesn’t work for me though!

Comments are Closed

The opinions expressed on this website are those of each author, not of the author's employer or of Red Hat. Fedora Magazine aspires to publish all content under a Creative Commons license but may not be able to do so in all cases. You are responsible for ensuring that you have the necessary permission to reuse any work on this site. The Fedora logo is a trademark of Red Hat, Inc. Terms and Conditions