Skip to main content
added 98 characters in body
Source Link

To improve on @L29Ah's answer, there is a program on Github to print how long X has gone without input events: https://github.com/g0hl1n/xprintidle

So to isolate whether an X input is preventing the monitor from suspending you do:

$ xset dpms 103 103 103 # Set your monitor to turn off after 10 seconds: $ while true; do sleep 1 && xprintidle; done 

If the time keeps increasing even after 103 seconds then it's not X input that's preventing the monitor going off.

In my case it was a stray SMPlayer window that must've thought it was focused when it really wasn't. So keep closing windows until you find the one that's preventing suspend.

To improve on @L29Ah's answer, there is a program on Github to print how long X has gone without input events: https://github.com/g0hl1n/xprintidle

So to isolate whether an X input is preventing the monitor from suspending you do:

$ xset dpms 10 10 10 # Set your monitor to turn off after 10 seconds: $ while true; do sleep 1 && xprintidle; done 

If the time keeps increasing even after 10 seconds then it's not X input that's preventing the monitor going off.

To improve on @L29Ah's answer, there is a program on Github to print how long X has gone without input events: https://github.com/g0hl1n/xprintidle

So to isolate whether an X input is preventing the monitor from suspending you do:

$ xset dpms 3 3 3 # Set your monitor to turn off after 10 seconds: $ while true; do sleep 1 && xprintidle; done 

If the time keeps increasing even after 3 seconds then it's not X input that's preventing the monitor going off.

In my case it was a stray SMPlayer window that must've thought it was focused when it really wasn't. So keep closing windows until you find the one that's preventing suspend.

Source Link

To improve on @L29Ah's answer, there is a program on Github to print how long X has gone without input events: https://github.com/g0hl1n/xprintidle

So to isolate whether an X input is preventing the monitor from suspending you do:

$ xset dpms 10 10 10 # Set your monitor to turn off after 10 seconds: $ while true; do sleep 1 && xprintidle; done 

If the time keeps increasing even after 10 seconds then it's not X input that's preventing the monitor going off.