Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 10 Mar 2020 05:14:49 +1000
From:      Andy Farkas <andyf@andyit.com.au>
Cc:        freebsd-bugs@freebsd.org, freebsd-stable stable <freebsd-stable@freebsd.org>
Subject:   Re: vt [was: Re: [Bug 235564] INDEX.keymaps for vt contains "from-" keymaps but the files are missing]
Message-ID:  <8df70772-faee-bd07-612f-696e8a1d477c@andyit.com.au>
In-Reply-To: <20200309150432.GR98340@kib.kiev.ua>
References:  <bug-235564-227@https.bugs.freebsd.org/bugzilla/> <bug-235564-227-XnaZH8PNlD@https.bugs.freebsd.org/bugzilla/> <d8e63de9-0da5-0b02-09b4-01e23e9afdf3@andyit.com.au> <CAPyFy2CJ1-jJx95XhdraRxo4Nk%2BFP3b60ZZtpxjN%2Box3j4jGsg@mail.gmail.com> <20200309150432.GR98340@kib.kiev.ua>

next in thread | previous in thread | raw e-mail | index | archive | help

On 2020-03-10 01:04, Konstantin Belousov wrote:
> Take a look at r334530.


"or the user really hates this feature and can't wait to turn it off"



Excellently explained by Bruce as usual:


"Revision 314641 - (view) (download) (annotate) - [select for diffs]
Modified Sat Mar 4 06:19:12 2017 UTC (3 years ago) by bde
File length: 107771 byte(s)
Diff to previous 312910
Colorize syscons kernel console output according to a table indexed
by the CPU number.

This was originally for debugging near-deadlock conditions where
multiple CPUs either deadlock or scramble each other's output trying
to report the problem, but I found it interesting and sometimes
useful for ordinary kernel messages.  Ordinary kernel messages
shouldn't be interleaved, but if they are then the colorization
makes them readable even if the interleaving is for every character
(provided the CPU printing each message doesn't change).

The default colors are 8-15 starting at 15 (bright white on black)
for CPU 0 and repeating every 8 CPUs.  This works best with 8 CPUs.
Non-bright colors and nonzero background colors need special
configuration to avoid unreadable and ugly combinations so are not
configured by default.  The next bright color after 15 is 8 (bright
black = dark gray) is not very readable but is the only other color
used with 2 CPUs.  After that the next bright color is 9 (bright
blue) which is not much brighter than bright black, but is used with
3+ CPUs.  Other bright colors are brighter.

Colorization is configured by default so that it gets tested.  It can
only be turned off by configuring SC_KERNEL_CONS_ATTR to anything other
than FG_WHITE.  After booting, all colors can be changed using the
syscons.kattr sysctl.  This is a SYSCTL_OPAQUE, and no utility is
provided to change it (sysctl only displays it).

The default colors work in all VGA modes that I could test.  In 2-color
graphics modes, all 8 bright colors are displayed as bright white, so
the colorization has no effect, but anything with a nonzero background
gives white on white unless the foreground is zero.  I don't have an
mono or VGA grayscale hardware to test on.  Support for mono mode seems
to have never worked right in syscons (I think bright white gives white
underline with either bold or bright), but VGA grayscale should work
better than 2-color graphics."



RIP


https://photos.app.goo.gl/YiVmFtWiK8Niy3Fw6


-andyf





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?8df70772-faee-bd07-612f-696e8a1d477c>