Sign up ×

I have an Ubuntu Linux box (12.04). I can't prevent the screen blanking under X.

I have tried the command xset s off, inserted the command line kernel parameter acpi=off in grub at kernel boot. Changed xorg.conf. Then used the GUI tool in Ubuntu's "Monitor Preferences", the tool "Power Management". I uninstalled gnome-screensaver and xscreensaver. Nothing has worked and I don't know what to do anymore.

How can I disable screen blanking under X?

share|improve this question
Is this a laptop? I can tell you off the bat xset won't help (it controls the 1980s X screensaver, which most recent environments disable to use their own). And you should probably keep ACPI enabled, otherwise you can't control the backlight. –  Alexios May 8 '12 at 9:11
If Ubuntu is GNOME-ish enough, inhibiting the power manager from its work could help, at least worth a try. –  sr_ May 8 '12 at 9:30
I'm a Gentoo user and I'm also interested in this question. I've tried xset DPMS off too (and some variants), with no success. Smplayer correctly override screensaver and screen blanking configurations, but I want to override them myself for flash videos. –  Spidey May 8 '12 at 18:40

3 Answers 3

Regular solution

In principle, the solutions above :

  • setting desktop-provided power management -- or xset -dpms ; xset s off for a one-time test
  • disabling/uninstalling desktop-provided screensaver and checking/killing existing one to be sure (like pgrep screensaver etc.)

...should be enough.

Don't add acpi=off to grub for this, it is off-topic here.

Stronger solution

If all else fails, or you just want to do it once without changing all settings back and forth, you can resort to hacks.

For example, you can install xdotool (on Debian or Ubuntu sudo apt-get install xdotool and you're done). This tool can simulate keypresses that will prevent screensaver and blanking just like normal activity does.

This command line simulates pressing and releasing left shift every 30 seconds:

while sleep 30 ; do xdotool keydown Shift_L keyup Shift_L ; done

I use that from time to time and it works great. It's also efficient at preventing laptop LCD screen backlight from dimming.

(You might want to change the key being simulated if pressing Left-Shift might disturb focused application.)


Don't let it too long for fear of damaging your screen (most screen technologies, when displaying a constant high-constrast image for a long time, eventually strain screen elements permanently. As a result, on flat-coloured areas a residual positive or negative image appears).

share|improve this answer

Screen blanking (which is different from screen savers) is controlled by the dpms setting. You may also have a black screen saver.

xset -dpms
xset s off
share|improve this answer
Have tried this commands but whitout success –  user60665 May 9 '12 at 12:42

Assuming that you're using Unity ....

  1. Click the Setting/Power icon at the top right.
  2. Click "System Settings".
  3. When the window opens, click "Brightness and Lock"
  4. Adjust "Turn screen off when inactive for" to your liking.


share|improve this answer
thanks, but has not worked :-( –  user60665 May 8 '12 at 12:25
Hmm, my first guess would be that you've broken something with all your under-the-hood tinkering? –  ams May 8 '12 at 12:35
Not think.. after every change I brought back the system to its previous state –  user60665 May 9 '12 at 12:44
The problem occurs also in other desktop environments i have installed: xfce, gnome-shell etc. I don't know why, but my display still goes blank after followed your hints my friend's..:-( –  user60665 May 10 '12 at 8:57

Your Answer


