How to prevent the screens from dimming (going black) from the command line

command linedwmpower-management

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?

Best Answer

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
Related Question