Disable Screen Blanking In Linux Console A Setterm Command

Screen showing code
JOSBORNE_ / Pixabay
computer_screen_1515297015-300x200 Disable Screen Blanking In Linux Console A Setterm Command How To Linux Tips
Felix_Broennimann / Pixabay

I often run network monitoring programs on my Ubuntu powered server from the console (click for the article:  Six Free Linux Network Monitoring Tools For Your Home Network). Having the screen blank every 5 minutes on my Ubuntu server as it enters a power-saving mode is more than a bit annoying.  I also don’t want to permanently disable the power saving feature in Ubuntu, because there are also times I am not running any software on the console, and the power saving feature is welcome.  Here is a solution using the setterm command that will temporarily (it will function until you reboot the computer) disable the screen blanking function for the console text mode, assuming you are not logged in as root:

     sudo setterm -powersave off -blank 0

The setterm command should work on the console for all Debian derivatives (Ubuntu, Mint, etc.). I have not tested the setterm command on other distributions, but…..the setterm command might be a place to start.  Also, there are some “permanent” options to disable screen blanking at the console, but after testing one using “console-tools”, which pretty much “borked” the start-up process on my Ubuntu 13.04 Server, I decided the temporary fix using the setterm command above was an excellent solution (Note: I installed console-tools for the test, and an uninstall solved the problem with the Ubuntu server).


By prometheus

Husband. Father. Grandfather. World class Geek.


    1. When you enter the command, you return to the original prompt. The only thing that should happen is that your computer’s screen blanking program has been temporarily disabled, and the screen will no longer blank (when you reboot your computer, the screen blanking program is enabled again). If you mis-entered the command, you should receive an error message of some sort. So…..after you enter the command, did you receive an error message? Is the screen still blanking? If the answer is no on the later question, then I need a little more info: What distro of Linux are you using, and what version is it? If you are still having the problem, this info will help me dig a little a hopefully find a solution for you.


  1. Hello Larry,
    thank for the reply. the Ubuntu version is 12.04 precise and the command I am running is:
    setterm -blank 0 -powersave off

    the problem is the the screen is falling a sleep after couple of minutes and its seems that the command is not influencing anything.
    any idea?


    1. First, from the terminal, type: sudo setterm -poweroff -blank 0
      You will be prompted for your login password to your computer, after you hit “Enter”, everything should work (a few elements in the command string as shown in your most recent email are either missing, or in the wrong order).
      I am running a server, with Debian installed, but without a graphic interface. In your case, if you are using KDE or Gnome, the graphic interface may be interfering with the command line string. So, in case this is the case, I did a little research, and this link, from an Ubuntu forum might help: http://ubuntuforums.org/showthread.php?t=1313227
      Look at the Dec 2nd post from “Baki No Kami” (you just can’t make these names up……….., in any event…….). Here, he talks about creating a an xorg.conf file in etc/x11. Pretty straight forward, he supplies a command line string for an editor, where you an paste in his “code”, and it will save to the appropriate location.
      Hopefully, one of these options will solve your problem.


  2. thanks larry but it was a different issue with the GNOME. I needed to set different values with the gsettings command:

    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

Leave a comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.