How to Stop Ubuntu from Automatically Suspending the Screen When Watching Videos

The Dark Screen Interruption

Ubuntu is configured out-of-the-box with an aggressive power-saving profile. By default, if the system registers no mouse movement or keyboard input for five minutes, it automatically blanks and locks the screen. While standard media players like VLC are programmed to send “heartbeat” signals to the GNOME desktop environment to prevent this during a movie, many web browsers and lightweight streaming applications fail to send these signals. Consequently, if you are watching a lengthy YouTube video, attending a passive webinar, or streaming a movie in your browser, the screen will infuriatingly turn black every few minutes, forcing you to wiggle the mouse to restore the picture.

Installing the Caffeine Extension

To stop Ubuntu from blindly suspending your screen when you are passively watching content, you need to install a utility that allows you to easily toggle the power management daemon on and off.

The most reliable method for GNOME-based Ubuntu systems is to install the “Caffeine” extension. Open your terminal (Ctrl+Alt+T) and install the extension manager by typing: sudo apt install gnome-shell-extension-manager. Once installed, launch the Extension Manager application from your app drawer. Click on the Browse tab at the top of the window, search for Caffeine, and click the blue “Install” button next to the first result. After installation, a small coffee cup icon will appear in your top-right system tray. Before you start watching a video, simply click the coffee cup icon so that it appears full. This overrides the system idle timer, guaranteeing your screen will remain brightly lit for the duration of the video. Click it again to re-enable normal power saving.

Get the best tech tips delivered straight to your inbox.

Join thousands of readers mastering Apple, Google, Microsoft, and Linux.