Caffeine GNOME Extension: Keep Ubuntu and Fedora Awake
Caffeine is a GNOME Shell extension that adds a coffee-cup toggle to Quick Settings. While it is on, GNOME does not blank the screen, lock or suspend. It has a 15, 30 or 60 minute timer, turns on by itself for fullscreen apps, and can follow chosen apps. How to install it on Ubuntu and Fedora, every setting and its default, command-line control, and what to use without an extension.
On this page
Caffeine is a GNOME Shell extension that keeps a Linux desktop awake. It adds a Caffeine toggle to GNOME's Quick Settings menu; while it is on, GNOME does not blank the screen, lock it or suspend the computer, and a coffee-cup icon shows in the top bar. You can turn it on until you switch it off, or for 15, 30 or 60 minutes. By default it also switches on by itself while a fullscreen app, such as a video or a presentation, is running. On Ubuntu, install it with the Extension Manager app; on Fedora, install the gnome-shell-extension-caffeine package.
The extension is by eonpatapon, listed as extension 517 on extensions.gnome.org, and its current version supports GNOME 45 to 50 (older branches cover GNOME back to 3.4). We installed the Fedora package in a clean Fedora 44 container on 6 October 2026 and read every default with gsettings; the settings table below matches that output.
A note on what Caffeine does not do: it keeps the computer awake, not your chat apps active. Caffeine sends no input, so an awake Linux desktop still shows you away in Slack after 10 minutes without keyboard or mouse use.
How to install Caffeine
Ubuntu (22.04 and newer). Caffeine is not in Ubuntu's apt archive, so install it through Extension Manager:
- Install Extension Manager:
sudo apt install gnome-shell-extension-manager, or from the App Center. - Open Extension Manager, go to Browse, search for Caffeine, and click Install on the one by eonpatapon.
- Open Quick Settings (top-right corner) and click Caffeine.
You can also install it from extensions.gnome.org/extension/517/caffeine in a browser with the GNOME Shell integration add-on.
Fedora. Fedora ships it as a package (version 60 on Fedora 44 and 45 at the time of writing):
# Ubuntu 22.04 and newer
sudo apt install gnome-shell-extension-manager
# Fedora
sudo dnf install gnome-shell-extension-caffeine
gnome-extensions enable caffeine@patapon.info
Log out and back in if the toggle does not appear.
Ubuntu's older "caffeine" package. sudo apt install caffeine installs a different program, caffeine-indicator, an app-indicator that prevents the desktop from becoming idle in full-screen mode. It is older and built for X11 sessions; on current GNOME the extension is the better choice.
We checked Ubuntu 24.04.5 LTS's archive in a clean container on 6 October 2026. The extension package does not exist there, and caffeine is the old indicator:
$ apt-cache policy gnome-shell-extension-caffeine caffeine
caffeine:
Installed: (none)
Candidate: 2.9.12-1
$ apt-cache search --names-only caffeine
caffeine - prevent the desktop becoming idle in full-screen mode
libcaffeine-java - High performance caching library
Caffeine settings and their defaults
Open the settings from Extension Manager (the gear next to Caffeine) or with gnome-extensions prefs caffeine@patapon.info.
This is what a fresh install reported, trimmed to the settings in the table:
$ rpm -q gnome-shell-extension-caffeine
gnome-shell-extension-caffeine-60-2.fc44.noarch
$ gsettings list-recursively org.gnome.shell.extensions.caffeine
org.gnome.shell.extensions.caffeine duration-timer-list [900, 1800, 3600]
org.gnome.shell.extensions.caffeine enable-fullscreen true
org.gnome.shell.extensions.caffeine enable-mpris false
org.gnome.shell.extensions.caffeine inhibit-apps @as []
org.gnome.shell.extensions.caffeine trigger-apps-mode 'on-running'
org.gnome.shell.extensions.caffeine screen-blank 'never'
org.gnome.shell.extensions.caffeine nightlight-control 'never'
org.gnome.shell.extensions.caffeine show-indicator 'only-active'
org.gnome.shell.extensions.caffeine show-notifications true
org.gnome.shell.extensions.caffeine restore-state false
org.gnome.shell.extensions.caffeine toggle-shortcut @as []
org.gnome.shell.extensions.caffeine cli-toggle false
The timer list is in seconds, so 900, 1800 and 3600 are the 15, 30 and 60 minute choices. The package's metadata.json lists GNOME Shell 45 to 50. Caffeine also shows a notification when it turns on or off (show-notifications true).
| Setting | Default | What it does |
|---|---|---|
| Timer durations | 15, 30 and 60 minutes | Choose one from the toggle's menu, and Caffeine switches off when it ends. You can set custom durations |
| Enable when a fullscreen application is running | On | Keeps the desktop awake during fullscreen video, games and slides |
| Enable when an application is playing media | Off | Keeps it awake while an app reports playback through MPRIS, such as a music player |
| Trigger apps | None | Turns Caffeine on while chosen apps are running, focused, or on the active workspace |
| Allow screen blank | Never | Lets the display turn off while the computer stays awake |
| Night Light control | Never | Can pause Night Light while Caffeine is on |
| Show indicator | Only when active | The cup icon in the top bar. Set it to Always to toggle Caffeine by scrolling on the icon |
| Restore state | Off | Remembers whether Caffeine was on after you log out |
| Toggle shortcut | None | A keyboard shortcut to switch Caffeine on and off |
Control Caffeine from the command line
The extension reads a cli-toggle key, so scripts can turn it on and off. For a per-user install from extensions.gnome.org, point gsettings at the extension's schema folder, as its README shows:
# turn Caffeine on or off from a script (installed per user from extensions.gnome.org)
gsettings --schemadir ~/.local/share/gnome-shell/extensions/caffeine@patapon.info/schemas/ \
set org.gnome.shell.extensions.caffeine cli-toggle true
# check the current state
gsettings --schemadir ~/.local/share/gnome-shell/extensions/caffeine@patapon.info/schemas/ \
get org.gnome.shell.extensions.caffeine cli-toggle
If Caffeine came from a distribution package, such as on Fedora, the schema is installed system-wide and you can drop the --schemadir part.
Never appear "away" on Slack again
Cloud-based. No downloads. Works 24/7 even when your laptop is off.
Keep GNOME awake without an extension
For a single long task, GNOME's own gnome-session-inhibit does the job without installing anything. It holds an inhibitor only while the command runs:
# keep GNOME from going idle or suspending while one command runs
gnome-session-inhibit --inhibit idle:suspend --reason "Long download" sleep 3600
Replace sleep 3600 with the command you are waiting on, such as a download or a build, and GNOME stays awake until it finishes. To change the timers permanently instead, use Settings > Power for automatic suspend and screen blank, or gsettings; every lock and blank setting is in how to stop Ubuntu from locking the screen.
Caffeine vs a mouse jiggler on Linux
Caffeine blocks idle and sleep by asking GNOME to wait, which is the method GNOME provides for video players. A mouse jiggler sends fake input instead, which moves your cursor and counts as activity for any app that watches input. If the goal is a screen that stays on, Caffeine is enough. If an app needs to see input, a jiggler is what people use; the xdotool and ydotool scripts are in mouse jiggler for Linux. For Slack on Linux specifically, see keep Slack active on Linux.
The same idea on other systems: Caffeine app for Windows and Caffeine app for Mac.
FAQ
Is there a Caffeine app for Ubuntu? Yes. The GNOME Shell extension Caffeine, installed with Extension Manager, is the current option. The apt package named caffeine is an older indicator app.
Does Caffeine work on Wayland? Yes. It is a GNOME Shell extension, and it works in both Wayland and X11 GNOME sessions.
Does Caffeine stop the screen from locking? Yes. While it is on, GNOME does not go idle, so the screen does not blank or lock and the computer does not suspend.
Does Caffeine keep Slack or Teams active on Linux? No. It stops sleep, not the chat apps' own idle timers.
Stop Jiggling Your Mouse.
Join hundreds of remote workers who never worry about their Slack status. Set it up once, stay green forever.
Related Articles
Slack Bot Scopes: The Scope Each API Method Needs, Measured on 44 Methods
We gave a Slack bot one scope, called 44 common Web API methods, and read the needed field of every missing_scope error. Then we added the scopes and called them again. The table shows which scope clears each method.
Slack File Size Limit: 1 GB Is Exactly 1,073,741,824 Bytes, Tested
We uploaded files of 50 MB, exactly 1 GiB and 1 GiB plus one byte to Slack through its upload API. The limit is 1,073,741,824 bytes, and a failed upload can still leave a broken file behind.
Slack Dark Mode: Where the Setting Is, and Which Custom Emoji Disappear
Slack's dark mode is under Preferences > Appearance > Color Mode, with Light, Dark and System. We switched modes in Slack web with three test emoji and measured which ones vanish.