Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm running linux clusters, mostly on SLES10. The servers are mostly blades, accessed via remote console. There is a real console in the server room, but switched off.

I would like to disable the screen blanking as it serves no purpose and is a nuisance. You have to press key to see if you are connected which is a pain. We are running in runlevel 3, so the console is in text mode, no X11 involved.

share|improve this question
SLES10 uses SysV init. Many distributions use systemd, here's a possible solution for Arch. Debian 6 and 7 systems use kbd by default, click here. – basic6 Jul 3 '15 at 9:45

You can verify what timeout the kernel uses for virtual console blanking via:

$ cat /sys/module/kernel/parameters/consoleblank

This file is read-only and the timeout is specified in seconds. The current default seems to be 10 minutes.

You can change that value with entering the following command on a virtual console (if you are inside an xterm you have to change to a virtual console via hitting e.g. Ctrl+Alt+F1).

$ setterm -blank VALUE

Where the new VALUE is specified in minutes. A value of 0 disables blanking:

$ cat /sys/module/kernel/parameters/consoleblank
$ setterm -blank 0
$ cat /sys/module/kernel/parameters/consoleblank

setterm has other powersaving related options, the must useful combination seems to be:

$ setterm -blank 0 -powersave off

Thus to permanently/automatically disable virtual console blanking on startup you can either:

  1. add consoleblank=0 to the kernel parameters (edit grub configuration)
  2. add the setterm -blank 0 command to an rc-local or equivalent startup script
  3. add the setterm output to /etc/issue since /etc/issue is output on every virtual console:

    # setterm -blank 0 >> /etc/issue

Choose one alternative from the above.

share|improve this answer
PS: On a Ubuntu 11.10 system (Thinkpad X200) I noticed a bug where the console blanking by the kernel interferes with a running X11 session. That means that exactly 10 minutes after the last key press the X11 display blanks and you have to cycle to a virtual console to get the X11 screen back (very annoying during e.g. video playback). This is independent of DPMS/screensaver related settings under X11 (think xset etc.). Thus, disabling the virutal console blanking like described above is a quick workaround for affected systems. – maxschlepzig Feb 18 '12 at 21:13
hmmm. For some reason, I don't see /sys/module/kernel/parameters/consoleblank on my CentOS 5.x server. Could it be set under a different name? – Mike B Jul 15 '14 at 21:14
On RHEL 5 and 6, I found that putting /bin/setterm -blank 0 -powerdown 0 -powersave off in /etc/rc.local would work great. On RHEL 7, however it would fail. Adding consoleblank=0 to te kernel parameters works on that platform. – David C. Nov 24 '15 at 17:07

Try using this:

setterm -blank
share|improve this answer
I want this to be in effect automatically after boot, without logging in. There is nobody who will type the command ! Sometimes the screen blanks even during boot, for example if there is a SAN timeout. – markus_b Feb 25 '11 at 0:28
@markus_b: So add this command to an init script (something like /etc/init/markus-console.conf if you use Upstart, or /etc/init.d/markus-console.sh plus symlinks in /etc/rd?.d for SysVinit, I don't know the actual SuSE locations). – Gilles Feb 25 '11 at 0:35
File that under "things you can't do with systemd". – mattdm Feb 25 '11 at 0:57
@mattdm, not true - systemd usually comes with a rc-local compatibility service - or you can easily add custom services ... – maxschlepzig Feb 18 '12 at 12:46
@mattdm Why wouldn't you be able to just write a unit that runs that command? – kyrias Mar 4 '13 at 12:39
up vote 10 down vote accepted

I've implemented and tested the following configuration, which works fine on sles10, my workhorse at the moment.




setterm -blank

it looks like that is all it takes. Thanks for Uku Loskit and Gilles for the push in the right direction.

share|improve this answer
I have edited your Answer mercilessly, so don't hesitate to rollback if you don't like it. Also, please Accept your answer because it's the actual solution. You should not Accept an Answer just because you are grateful it led you to the actual answer, if there is actually a better Answer. – Tshepang Mar 1 '11 at 5:39
Sorry, like the original version better. – markus_b Mar 2 '11 at 19:07
I had to add the top voted answers -powersave off as the ipmi on my systemboard got stupid if it didn't have both parts of this. sadily enough it doesen't keep settings between uses and when these features kick in the window pops to the foreground and starts cycling the window through about 4 different sizes once every second or 2 making it near impossible to catch the window and manually resize it/kick the term out of power save :( – Kendrick Aug 10 '15 at 14:36

According to : https://wiki.archlinux.org/index.php/Display_Power_Management_Signaling#DPMS_Interaction_in_a_console_with_setterm

Prevent screen from turning off (in console)

$ setterm -blank 0 -powerdown 0

Alternatively you can disable console blanking permanently using the following command:

# echo -ne "\033[9;0]" >> /etc/issue

share|improve this answer
second solution works like a charm on Marvell ARM Debian. All other solutions do nothing. – Alexey Sviridov Oct 22 '12 at 12:04

The only permanent solution is to add consoleblank=0 to the kernel command-line. You can view the value (which defaults to 600 seconds) in:


(note that the file is read-only). The only way to change the value of consoleblank is to reboot with the new kernel command-line option.

share|improve this answer
The last sentence is wrong - you don't need to reboot to change the value of consoleblank. See my answer. – maxschlepzig Feb 18 '12 at 13:10
I have not found setterm -blank to work reliably. It sometimes seems to get reset after logout or switching to other virtual terminals. – amcnabb Mar 13 '12 at 18:10
To add this permanent setting with grub, edit /boot/grub/grub.conf and append consoleblank=0 to the lines starting with "kernel /boot/vmlinuz...". Then reboot. – Hoylen Jul 3 '14 at 4:00
"only" seems like a string word here... – stephelton Jan 15 at 19:08

/usr/bin/setterm -powerdown 0 might help also

share|improve this answer

If you only want to prevent screen blank out after user login, then just need to append setterm -powersave off -blank 0 to $HOME/.bash_profile of respective users.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.