Keep lock screen display from going blank in Ubuntu 22.04 | 20.04 | Fedora

Want to lock Linux automatically while preventing from going blank screen when you’re not at the computer?

For Gnome user in Ubuntu 20.04, Ubuntu 22.04, Fedora 35/36, Debian, CentOS, etc., it’s easy to implement the job via an extension.

By default, Gnome turns off computer screen after a few minutes of inactivity. Then it locks the session automatically and later goes suspend if enabled.

With “Unblank lock screen” extension, it will break the ‘Blank Screen’ action you set in Power Settings. Instead, when system reached the idle timeout, it goes to lock screen and keep the screen display. Also, user can set a timeout until screen goes blank.

Install Unblank lock screen Extension:

Install the extension in Ubuntu 22.04+

1. For Ubuntu 22.04, search for and install ‘Extension Manager’ from Ubuntu Software app:

Install Extension Manager from Ubuntu Software app

2. Then, press ‘Windows’ logo key to open overview, search for and open ‘Extension Manager’ tool.

Launch Extension Manager

3. Finally, search for and install ‘Unblank lock screen’ from ‘Browse’ tab:

Install ‘Unblank block screen’ via Extension Manager

Install the Extension in Ubuntu 20.04 & Other Linux with GNOME Desktop

For Ubuntu 20.04 users, you need to first open terminal (Ctrl+Alt+T) and run command to install the package for GNOME Shell extensions integration for web browsers:

sudo apt install chrome-gnome-shell gnome-shell-extension-prefs

Next, go to the extension web page by clicking on the link button below. And turn on the toggle icon to install it:

The extension so far works on all current Gnome versions, including Gnome 43. If you don’t see the slider icon, don’t worry click to install browser extension via “click here to install browser extension” link and REFRESH the web page.

Change the settings:

For Ubuntu 22.04, just go back ‘Installed’ tab in Extension Manager. Click on gear button to configure the new extension. Then, you can configure how long the lock screen persist.

For Ubuntu 20.04 and other Linux, search for and install ‘Gnome Extensions‘ app from Ubuntu Software, Gnome Software, or your system package manager. Then, search for and open it from the ‘Activities’ overview screen:

When it opens, click on the gear button after the extension. Then you’ll see the options to:

  • Only un-blank lock screen when on AC battery.
  • Set a timeout (30, 60, 90, or 120 mins) to automatically blank the screen.
Configure via Gnome Extensions app

In case you want to specify a certain time delay that is not exist in the settings dialog. Search for & install ‘Dconf Editor‘ via Ubuntu Software / Gnome Software.

Then open the tool and navigate to ‘org/gnome/shell/extensions/unblank/time’, then input a custom value in seconds.

That’s all. Enjoy!

Hi, I'm Merilyn Ne, a computer geek working on Ubuntu Linux for many years and would like to write useful tips for beginners. Forgive me for language mistakes. I'm not a native speaker of English.