[PATCH] Configurable Console Blank Interval

From: Stephen Frost (sfrost@ns.snowman.net)
Date: Wed Jun 14 2000 - 11:34:50 EST


        Here is a patch against 2.2.16 to give an option on how
long till the kernel blanks the console. If set to '0' the console
never blanks. Note that this patch also appears to apply correctly
to 2.4.0-test1ac18.
        I've tested it with 10, 1 and 0 and all seems to work
correctly. If there are any problems please let me know.
        No matter the other console patches and cleanups, personally
I'd like to see this get in sometime and that anything that replaces
the console code also support an option similar to this.

                Stephen

diff -u --new-file --recursive linux-2.2.16/Documentation/Configure.help linux-2.2.16-new/Documentation/Configure.help
--- linux-2.2.16/Documentation/Configure.help Wed Jun 7 17:26:42 2000
+++ linux-2.2.16-new/Documentation/Configure.help Wed Jun 14 11:48:10 2000
@@ -8371,6 +8371,12 @@
   If unsure, say Y, or else you won't be able to do much with your new
   shiny Linux system :-)

+Delay in minutes until screen blank on console
+CONFIG_BLANKINTERVAL_CONSOLE
+ This is the number of minutes of inactivity the kernel will wait for
+ before blanking the screen to avoid burn-in. If this is set to '0'
+ the screen will never be blanked.
+
 Support for console on virtual terminal
 CONFIG_VT_CONSOLE
   The system console is the device which receives all kernel messages
diff -u --new-file --recursive linux-2.2.16/drivers/char/Config.in linux-2.2.16-new/drivers/char/Config.in
--- linux-2.2.16/drivers/char/Config.in Wed Jun 7 17:26:42 2000
+++ linux-2.2.16-new/drivers/char/Config.in Wed Jun 14 10:11:16 2000
@@ -8,6 +8,7 @@
 if [ "$CONFIG_VT" = "y" ]; then
   bool 'Support for console on virtual terminal' CONFIG_VT_CONSOLE
 fi
+int 'Delay in minutes until screen blank on console' CONFIG_BLANKINTERVAL_CONSOLE 10
 tristate 'Standard/generic (dumb) serial support' CONFIG_SERIAL
 if [ "$CONFIG_SERIAL" = "y" ]; then
    bool ' Support for console on serial port' CONFIG_SERIAL_CONSOLE
diff -u --new-file --recursive linux-2.2.16/drivers/char/console.c linux-2.2.16-new/drivers/char/console.c
--- linux-2.2.16/drivers/char/console.c Wed Jun 7 17:26:42 2000
+++ linux-2.2.16-new/drivers/char/console.c Wed Jun 14 10:11:19 2000
@@ -149,7 +149,12 @@
 int console_blanked = 0;
 static int vesa_blank_mode = 0; /* 0:none 1:suspendV 2:suspendH 3:powerdown */
-static int blankinterval = 10*60*HZ;
+#ifdef CONFIG_BLANKINTERVAL_CONSOLE
+#define BLANKINTERVAL_CONSOLE CONFIG_BLANKINTERVAL_CONSOLE
+#else
+#define BLANKINTERVAL_CONSOLE 10
+#endif
+static int blankinterval = BLANKINTERVAL_CONSOLE*60*HZ;
 static int vesa_off_interval = 0;
 /*

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Thu Jun 15 2000 - 21:00:31 EST