Ubuntu – Please explain the parameters ‘noexpose’ and ‘cycle’ in xset

display-managerpower-managementscreensaverxorgxscreensaver

I have been trying for a long time to prevent my screen from blanking every 20 minutes. I understand there are many interlocking layers of applications that can do this and it is not straightforward at all to achieve this behavior. Here is a good resource for background reading:

Ubuntu 12.10 "Turn screen off when inactive for: Never" still turns off

I do not understand some of the parameters controlled by xset. One is the 'expose' or 'noexpose' setting. The other is the 'cycle' time.

Screen Saver:
  prefer blanking:  no    allow exposures:  no
  timeout:  0    cycle:  0

You can change the value of 'allow exposures' by typing 'xset s expose' or 'xset s noexpose'. Independently, you can control the values of 'timeout' and 'cycle' with 'xset s 0 0'. However I cannot find a decent explanation anywhere of what these parameters do. If you google it, you will just find a bunch of people modifying these parameters to prevent screen blanking without understanding what they do. If you read the 'xset' manpage, you get this:

The 'expose' flag sets the preference to  allow  window
exposures  (the  server  can  freely  discard window contents),
while 'noexpose' sets the preference to  disable  screen  saver
unless  the  server  can regenerate the screens without causing
exposure events.  

I can't understand this. Which value is better to disable blanking?

It goes on to say:

The length  and  period  parameters  for  the
screen  saver  function  determines how long the server must be
inactive for screen saving  to  activate,  and  the  period  to
change  the background pattern to avoid burn in.

I guess by 'period parameter' they mean "the second numerical argument to xset s N N which is described as cycle by xset q"? And this is only relevant to some sort of alternating-pattern mode of xscreensaver? Again, I mainly want to know which value is best for disabling screen blanking.

Best Answer

OK I believe the exposed arguments are related to whether or not windows and there contents are displayed behind the screen saver (this will be relevant to certain screen savers that draw on the screen and the like). So it is in short if your desktop is exposed or not. This is a educated guess, the terminology used is strange I think.

I do how ever understand this xset s N N as you referenced it, works as follows,

xset s 60 10

Will set the screen saver to come on after 60 seconds of in activity as represented by the variable 60, and the 10 will force the background image (your desktop if you use xset s expose) to change every 10 (mins or seconds). This is refrenced as s [Length[Period]] in the manual (length of inactivity and period between refreshing)

Some other interesting commands were s blank / s noblank These are responsible for if you want the screen to fade to black instead of a screensaver.

xset s blank

preinstalled To enable this or

xset s default

To set factory defaults

For you if you want it as off as you can do this, one at a time

sudo -i

xset default

xset s noexpose

xset s noblank

xset s off
Related Question