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

In KDE, there was a system setting where you could specifically set the monitors to never go black.

Now I've switched to dwm and (it might not be related) my screens dim after about 10 minutes. How do I change this setting directly from the command line? I'm guessing this has to do with X?

share|improve this question
Michael's answer is correct, but you might want to investigate why your screen is dimming and address that issue directly. – jasonwryan Aug 17 '11 at 4:59
@jasonwryan, I assume my monitors are going to sleep due to the lack of input (no keyboard or mouse activity). – n0pe Aug 17 '11 at 11:03
up vote 7 down vote accepted

You need to change the DPMS settings, which are controllable with xset. You can disable all DPMS with:

$ xset -dpms

And re-enable them with:

$ xset +dpms

You can also control how long before the monitor switches into each state (standby, suspend, and off; they're explained in this Wikipedia article) by passing 3 integers for the number of seconds before each state should be activated:

# Switch to standby after a minute, suspend after two minutes, and off after three minutes
$ xset dpms 60 120 180

Setting a time of 0 disables the state, so -dpms is equivalent to:

$ xset dpms 0 0 0
share|improve this answer
Awesome, do I need to set that up every time I reboot? – n0pe Aug 17 '11 at 2:54
@Max Yes, but you can put it in a script that runs automatically; for example, ~/.xinitrc is typically run when X starts – Michael Mrozek Aug 17 '11 at 3:05
Actually, I tried and tested this with no results. I ran xset -dpms as my normal user and as root and my screens are still dimming. – n0pe Aug 17 '11 at 11:33

Not only DPMS can turn the screen off. There is also a built-in screensaver in Xorg. You can turn it off with

xset s off

share|improve this answer
This seems like it makes sense, my screensaver could be kicking in (even though I haven't set one). I'll give this a try tonight. – n0pe Aug 17 '11 at 17:01
+1 I had to do this in addition to @michael 's answer – datUser Dec 8 '15 at 14:11

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.