Linux – How to permanently disable Linux’s console screen saver, system-wide

consoleelectrical-powerlinuxUbuntu

I've got an Ubuntu server that boots up in text mode. It rarely has a screen or keyboard attached to it, but when I do attach a screen, I usually have to attach a keyboard too, because the darn console mode screen saver will be on and I'll need to hit a key to see what's going on.

I'm aware that the setterm command can disable this, but it's a per-session thing. How can I make it so the machine never ever blanks the screen in text mode, even when it's first booted up and sitting at the login prompt?

Best Answer

In Ubuntu 12.10 and earlier the console-tools package allows console options to be controlled.

To turn off screen blanking and powerdown, set BLANK_TIME and POWERDOWN_TIME to 0 in /etc/console-tools/config. If you'd prefer not to modify the config file, the same effect can be achieved by creating a new file in /etc/console-tools/config.d containing the following:

BLANK_TIME=0
POWERDOWN_TIME=0

The name of the file in config.d must consist entirely of upper and lower case letters, digits, underscores, and hyphens.