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)
            setterm -blank 0 -powerdown 0 -powersave off > /dev/tty${index}
  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.

  • Try to move out all power* files from ~/.kde/share/config/ and then enable all power management on all tabs (applying it as you go through them), then disable it again.
    – kirill-a
    Jan 21 '15 at 7:55
  • 1
    To narrow down the problem, run xscreensaver-command -watch in an xterm somewhere. After an unwanted-screen-blank event, look to see if it output the BLANK event. If it did, then it's definitely being blanked by action of the X server. Otherwise, it's lower in the stack and you can focus on the video drivers.
    – aecolley
    Jan 23 '15 at 21:05
  • @aecolley thank you for your suggestion. No output in the terminal after the unwanted screen blanking. I'm running the nvidia proprietary video driver, I saw no setting concerning power saving in the graphic settings tool. By the way, the blanking occurred when there were only a bunch of browser windows and Mendeley open, not VLC.
    – rumtscho
    Jan 24 '15 at 21:02
  • See my update: unix.stackexchange.com/a/440648/3285 Apr 28 '18 at 20:39

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.

  • I'm not sure this solves the whole problem (my screen blanks at irregular intervals, so I'll have to leave my computer untouched for 2 hours per test). But the part about VLC turning DPMS on by itself is a very interesting lead, so I decided to give you the bounty.
    – rumtscho
    Jan 25 '15 at 17:17
  • 1
    Be sure to let us know if it turns out to be persistent. I use Debian with openbox, and this is the only way I've managed to get DPMS off my back. Btw DPMS is only active when no other screensaver is installed, so if all else fails you could try (re)instaling xscreensaver and configure that to disable blanking. Jan 26 '15 at 23:47
  • @MajorBriggs: I also use Debian with Openbox. Do you recommend adding this line to ~/.xinitrc just before exec openbox-session? Thanks.
    – user001
    Apr 9 '16 at 21:12
  • I've just added the command to Openbox' autostart: ~/.config/openbox/autostart.sh and that works well. Apr 11 '16 at 6:16
  • For LXDE, I add these commands in ~/.config/lxsession/LXDE/autostart Aug 23 '19 at 21:16

In order to reproduce this problem we need to know what xdg-screensaver is doing.

Getting the root window Id

  1. Update xdg-screensaver again.
  2. Open a terminal
  3. Run xwininfo -root
  4. Copy the window id, in this case it's 0x131

    xwininfo: Window id: 0x131 (the root window) (has no name)

Disabling the screen saver

Now run

    xdg-screensaver suspend <window id>

You can confirm that worked by running xdg-screensaver status


To renable run

    xdg-screensaver resume <window id>

You can confirm that worked by running xdg-screensaver status

Did it the screen saver blank/black out when you suspend (inhibited) the screen saver? If so, that's a bug with xdg-screensaver.

Other notes

If you ever want to turn DPMS off, though I would never do this -- unless the monitor failed to wake back up something erratic with the hardward -- you can simply run

xset -dpms;

That will stop it from ever blanking with power-down. Generally speaking you don't want to disabling blanking (clearing the screen) or disable power management. You want to figure out what's causing it to blank or power down when you don't want it to, and you want to fix that.


The Section should be "ServerFlags", not "ServerLayout".

Section "ServerFlags"
     Option         "BlankTime"     "0"
     Option         "StandbyTime"   "0"
     Option         "SuspendTime"   "0"
     Option         "OffTime"       "0"

More information can be found in Configuration File for Xorg


Try running this script heartbeat.sh that will reset X idle time each 55sec.


while sleep 55
    #xscreensaver-command -deactivate
    #xdg-screensaver reset
    xset s reset

I am posting an answer, as I have somewhat managed to resolve the issue. I say somewhat because I still have problems.

Wheezy appears to have a need to use a screensaver. I disabled all options I could find, even patched xscreensaver, but to no avail. The above fixes I tried in my question, sometimes generate issues when I log in, some times they do not!

What however seems to have solved the issue is two things:

  1. I stopped used VLC. I love it, used it for many years, but it is the culprit that spawns those xscreensaver sessions. I am now using dragon-player, and I can watch videos without the xscreensaver coming up.

  2. I forced KDE to use a screen saver I chose. This appears to override the default xscreensaver sometimes.

Sometimes the screen goes blank on its own, without displaying the screensaver I chose. This is not my monitors (I use a dual setup so it would be weird for both to power-off). This appears to be at random, as sometimes the screen stays on for hours without powering off.

I even tried patching xscreensaver, but nothing worked. I hope this is fixed in the next stable Debian.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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