HOWTO turn Screensavers and Monitor Power Saving on and off
Screensavers or power saving activating when you don't want it to, or not activating when you want, can be annoying. Here's how you configure it the way you like
Disabling screen blanking in text consoles (the "virtual terminal")
Use setterm to disable screen blanking in the text console, type:
|setterm -blank 0|
To make this setting permanent, just add it to your session script(s).
Controlling screenblanking / powersaving in X
Screen blanking and power saving is controlled by the xset command in X.
To view your current settings:
The s option lets you set the screen saver parameters. This option accepts up to two numerical parameters, a 'blank/noblank' flag, an 'expose/noexpose' flag, an 'on/off' flag, an 'activate/reset' flag, or the 'default' flag.
To turn off screen blanking:
|xset s off|
If the X screensaver has blanked the screen on a box without keyboard you can remotely login, then turn off the screensaver and activate the screen with the commands:
export DISPLAY=localhost:0.0 xset s activate xset s off
Use xset +dpms and -dpms to enable/disable DPMS (Energy Star) features (power saving).
You can find more information about xset on the xset manual page.
xscreensaver is a common screen saver program for X. This is used by common window managers. You can add xscreensaver & to your ~/.xinitrc. if you want it to be started when you login.
You can check if xscreensaver is running with the commands
pgrep xscreensaver and
ps -aux | grep xscreens.
You can use it to lock your screen with
xscreensaver can be stopped and terminated with
The settings for KDEs screen saver are found in the KDE Control Center (systemsettings5)