Debian – How to stop the screen from blanking / blacking out

debiankdepower-managementscreensaverx11

I have re-installed Debian 7 (Wheezy) after a while. For the first time, I am using the open-free Nvidia drivers (not nouveau) and vesafb for virtual consoles.

I cannot, for the life of me, stop the screen from blanking. There is no screensaver, nothing, it just goes blank, just after a couple of minutes of inactivity. This is not just during VLC (which has had such an issue in the past) but during anything.

To make it worse, it seems to happen at random. 
Sometimes the screen will not go blank for hours, and sometimes it will.

Steps I have taken so far:

  1. Added a few lines in /etc/X11/xorg.conf to stop dpms:

    Section "ServerLayout"
         Option         "BlankTime"     "0"
         Option         "StandbyTime"   "0"
         Option         "SuspendTime"   "0"
         Option         "OffTime"       "0"
         ...
    Section "Monitor"
      ...
         Option          "DPMS" "false"
    
  2. Added in my .xinitrc file:

    xset s off         # don't activate screensaver
    xset -dpms         # disable DPMS (Energy Star) features.
    xset s noblank     # don't blank the video device
    
  3. Disabled ALL screensavers and power saving modes under KDE settings.

  4. Added the following loop in my /etc/init.d/rc.local:

    for index in $(seq 1 6)
    do
            setterm -blank 0 -powerdown 0 -powersave off > /dev/tty${index}
    done
    
  5. Patched my xdg-screensaver with a patch I found that was forcing VLC to spawn a screensaver. 
    (I have since stopped using VLC and reverted to Dragon player.)

This is turning into a nightmare, and is truly very annoying.
Before I nuke vesafb and setterm (which I have the feeling are somehow responsible for this) I would like to know if anyone has ever run into this problem, and how they managed to solve it.

Best Answer

DPMS can be darn resistant!

Try this command:

xset dpms 0 0 0 && xset s noblank  && xset s off

If it works, add it to whatever autostart file KDE uses.

By the way, VLC has the option Preferences >> Video >> Disable screensaver. If that option is checked, the screen won't blank while VLC plays a video but DPMS will be turned on afterwards (regardless whether it was on before starting VLC). Therefore leave that option unchecked, and VLC shouldn't cause any problems with blanking.

Related Question