Gnome3 has the annoying habbit of turning off the monitor after a while, even if you are watching a video. Unfortunately, if you go toSystem Settings > Screen
you will be surprised that if offers you the possibility to change the time the system has to be idle for the monitor to be turned off from 1 minute to 1 hour. But what is missing is an option to turn this function off entirely.
Fortunately, it is possible to do that, just not in System Settings and you can either do that from command line or with a GUI.
I will not explain GSettings here, but just in case you don’t know: GSettings (which replaces GConf) is used to store the configuration of the GNOME desktops. Don’t worry, you don’t need to know GSettings to follow the instructions below. But GSettings is also used to store the information about when to turn off the display. The keys that are important here are the following:
org.gnome.settings-daemon.plugins.power sleep-display-ac org.gnome.settings-daemon.plugins.power sleep-display-battery org.gnome.desktop.session idle-delay
Those are the keys that the System Settings GUI is changing when you use it.
The first two determine when the display is turned off (on a desktop system that is always plugged in the first value is the important one. The second key is used in case the system is running on a battery, which is important for portable devices like notebooks and tablets).
The third key is important, because it is used to determine when to start the screensaver and lock the screen, although there are additional values that target those two in org.gnome.desktop.session.
The values of all three keys are in seconds (so a value of 600 stands for 600s = 10min).
But because the System Settings GUI does change these three keys altogether and there is a connection between these three, it is probably a good idea for most people to change all three to the same value by hand as well.
Using Command Line
You can use the gsettings command to change the values of the keys.
First, let’s see what the values of these keys are. You can do that by running the following three commands.
gsettings get org.gnome.settings-daemon.plugins.power sleep-display-ac gsettings get org.gnome.settings-daemon.plugins.power sleep-display-battery gsettings get org.gnome.desktop.session idle-delay
Each command will print the value of the given key. You will notice (most likely) that all three values are equal and that they reflect the value that is displayed in System Settings. If you change the value in System Settings, you will notice that these three keys do change accordingly.
To set these by hand you can use the following three commands:
gsettings set org.gnome.settings-daemon.plugins.power sleep-display-ac <value> gsettings set org.gnome.settings-daemon.plugins.power sleep-display-battery <value> gsettings set org.gnome.desktop.session idle-delay <value>
Just replace <value> with the number of seconds you want the system to wait before turning off the display (and potentially locking the screen). To tell the system that it should let the display turned on forever, you can use the value 0:
gsettings set org.gnome.settings-daemon.plugins.power sleep-display-ac 0 gsettings set org.gnome.settings-daemon.plugins.power sleep-display-battery 0 gsettings set org.gnome.desktop.session idle-delay 0
Using A GUI
To change the keys you can use “dconf Editor “. You can start the program by one of the following ways:
- go to Applications and either
- search for dconf or
- look for it under “System Tools” or
- press Alt+F2 and enter: dconf-editor or
- open a terminal and run “dconf-editor”
Once dconf Editor starts, you will see the following window:
On the left side you now need to navigate to “org.gnome.settings-daemon.plugins.power” (that means: open “org”, then – within “org” – open “gnome” and so on until you reach “power”). Then, you need to find the keys “sleep-display-ac” and “sleep-display-battery” on the right side:
Change both numbers to 0 to prevent the system from turning off the display.
After that you should navigate to “org.gnome.desktop.session” on the left side and change the key “idle-delay” (on the right side) to 0 as well.
After that, just quit the editor (the changes are automatically saved).