Re: console bacground color and blanking

Ulrich Windl (Ulrich.Windl@rz.uni-regensburg.de)
Fri, 15 Mar 1996 08:22:38 +0100


On 13 Mar 96 at 21:49, Mika Raento wrote:

> Noticing that the newer kernels support my video card better I switched
> from 80x25 to 132x44 as my console text mode. The smaller letters are
> a bit harder on the eyes so I wrote a short c prog (I can mail it if
> someone wants me to) to change the console background color and used it
> to change the color to a more peaceful dark blue.
>
> To my dismay I noticed that now the console blanking didn't switch to a
> black screen anymore, but to a blue screen (serves me right for changing
> the bg color by using a ioctl :-). I think it might be a more acceptable
> behaviour if blanking the console would change the background to black as
> well.

No! Blanking means filling the screen with background color. If you
type "clear" in xterm, diod you ever have a black background
afterwards (if it was white before, of course)?

>
> The blanking is implemented in drivers/char/console.c . I made a small
> patch to implement the changing of bg color to black and changing it back
> to the one in use when un_blanking. I guess this might count as
> unnecessary bloat, but it should add only a little to memory usage as the
> kernel size only grew ~100 bytes and the routine only permanently
> allocates 3 bytes of memory.

Ok, we must distinguish clearing the screen (for the user) and blanking (for the
monitor). I think just filling the video memory with zeros will do
the latter job unless you have changed the palette registers (0 ist
usually black).

>
> Here's my patch (against 1.3.72) for anyone to try out, I'd be very
> grateful for any comments/input on the subject. Oh, and you should

I think your patch adds even more graphic dependent stuff to the
kernel. Shouldn't be use the blank bit of the VGA to get a dark
screen, or maybe switch to vesa_blank by default? It seems most
monitors have no problem with a missing vsync.

> #define BLACK_BLANK for example in drivers/char/kd_kern.h for this to
> take effect. And I'd more than grateful to here if there already existed
> a way to do this. (by no means is patch graceful, it's just a quick
> implementation of my concept but should be a working example of what I
> had in mind)
[...]

------------
Ulrich Windl Klinikum der Universitaet Regensburg
Rechenzentrum DV-med Franz-Josef-Strauss-Allee 11
Tel: +49 941 944-5879 D-93053 Regensburg
FAX: +49 941 944-5882
Just imagine my mail address were <Ulrich.Windl@rz.uni.r.de>...