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?

  • 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

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
  • 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

  • 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

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.