How to Stop Ubuntu from Automatically Blanking the Screen During Video Playback

The Inconvenient Power Saving

Ubuntu is configured by default with aggressive power management settings designed to save electricity and prevent screen burn-in. If you do not touch your mouse or keyboard for a set period (usually 5 to 10 minutes), the operating system will automatically blank the screen and eventually suspend the machine. However, the default power management daemon (GNOME Settings Daemon) does not always correctly detect when you are passively watching a video in a web browser or a media player like VLC, leading to the screen abruptly going black right in the middle of a movie.

Inhibiting the Blank Screen

To prevent Ubuntu from shutting off your display while you are actively consuming media, you need to configure the system to recognize video playback as a valid “activity.” While you can manually turn off the blank screen timer entirely in the Power settings, a more elegant solution is to install a utility that automatically suppresses the screensaver only when video or audio is playing.

Open a terminal window (Ctrl+Alt+T) and install the “Caffeine” utility by typing sudo apt install caffeine and pressing Enter. Once the installation is complete, search for “Caffeine Indicator” in your application menu and launch it. A small coffee cup icon will appear in your top system tray. Click the icon and select Enable. Caffeine will automatically monitor your system; whenever a full-screen application or a recognized media player is running, it artificially injects a signal to the power daemon, completely preventing the screen from blanking or locking until the video finishes.

Get the best tech tips delivered straight to your inbox.

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