If the monitors both turn off at once and come back on with keyboard or mouse movement, this is probably not random, but the idle time screen saver kicking in, which is separate from the rest of the power saving settings and not related to auto suspend.
At the low level, this is controlled by the DPMS settings in X11 which can be viewed with xset -q
and the timings set with xset dpms
or it can be disabled entirely with xset -dpms
.
In ubuntu, using gnome, in the power menu, this is labeled as blank screen
after ...minutes.
However, the settings in the power menu may not be relevant, as multiple applications seem to mess with the DPMS settings and change them. (For example, the built in screen lock, games, video players, gnome-shell apps like caffeine, etc., and of course xset)
You may be able to use something like caffeine to configure DPMS to be disabled when certain apps run.
If you want to change the settings with xset, look at the DPMS section of the output of xset -q
: (excerpt)
DPMS (Energy Star):
Standby: 300 Suspend: 400 Off: 600
DPMS is Enabled
Monitor is On
- This means after 300 seconds, it will tell your screen to enter the first level power saving, after 400 seconds, it will enter second level power saving, and after 600 seconds, it will shut the monitor off completely. This was more meaningful in the days of tube monitors, where first level could be reversed instantly, and deeper levels took longer. Now probably all three levels are the same on LCD screens.
- You can disable it with
xset -DPMS
and then it should say "DPMS Disabled"
- You can change the timings (or set them to the above) with
xset DPMS 300 400 600
- You can turn the monitor off instantly with
xset dpms force off