Dual stage (suspend->off) VESA monitor patch

infidel+infidelbb.linux.kernel@pitt.edu
Date: Thu, 9 Nov 1995 22:29:54 -0500


hello,

Since I have been unable to contact Christoph Rimek, whose name
appears on vesa_blank.c, I thought I'd just post my patch for general
approval from the list.

I have a patch to vesa_blank.c and console.c (and setterm.c) that
enhances the VESA monitor blanking support in the kernel. It implements the
following features (these are the new setterm options):

-powersave [on|vsync|hsync|powerdown|off]

This implements the first stage power saving, giving the user more
choices on how to blank the screen. The default value is 'off', meaning
that the VESA features are not enabled. 'on' is synonymous with 'vsync',
which is the same as the old 'powersave on', i.e. the vsync signal is
removed to suspend. 'hsync' is offered (since the VESA spec apparently
permits it) for users whose monitors require it. 'powerdown' removes both
sync signals, which should powerdown the monitor.

The duration for this is controlled by -blank.

-powerdown [0-60]

This only has an effect if the -powersave option is [vh]sync. It
specifies, in minutes, how long we wait to completely powerdown the screen
_after_ going into suspend mode. Anyone have an opinion on whether it should
be this way (which is the way my BIOS powersaving does it), or an absolute
time of inactivity (but then does powerdown < blank mean 'disable' or the
same thing as -powersave powerdown?). It seems prettty arbitrary and it's
not hard to change if this really bugs someone. The default value for this
is zero, which serves to disable it.

Some examples (note that the behaviour stays the same as always if you don't
use the switches as per the principle of least surprise)

setterm -blank x: same as always, blank after x min, no VESA stuff.
setterm -blank x -powersave on: VESA suspend after x min.
setterm -blank x -powersave powerdown: VESA powerdown after x min.
setterm -blank x -powersave on -powerdown y:
VESA suspend after x minutes, powerdown after x+y minutes.

Very little code was changed to implement this, most of the changes to
vesa_blank.c involved indentation changes. Since it's a small but useful
change I'd like to see it make the kernel before 1.4. Some friends and I
have been using it for about a month with no problems.

The patches can be found at ftp://ftp.pitt.edu/users/i/n/infidel/linux:

vesa.kernel.38.patch: patch against 1.3.38
vesa.setterm.patch: patch against setterm from util-linux-2.4

please try them out, and let me know if there are any problems.

thanks,

todd.