FreeBSD 12.0-RELEASE and the Red Cursor on Console

I don't like the red cursor on the Console Display and it's there with vt() and sc(). Nowhere in vidcontrol() can I find an option to set the color, only the shape. I even dug deep into the source in /usr/src/sys/dev/fb/vga.c and vesa.c and couldn't find anything there.

So where is this color set? The cursor was not colored before 12.0.

My /boot/loader.conf
Code:
autoboot_delay="5"
beastie_disable="YES"
kern.vty="sc"
vesa_load="YES"
boot_multicons="YES"
boot_serial="YES"
comconsole_speed="115200"
console="comconsole,vidconsole"

I also have
Code:
allscreens_flags="MODE_322"

In /etc/rc.conf
 
Thank you for bringing this up here. I also wondered about that and still wondering if this comes from some warning?

I see the red color first in early booting keeping its color for ever.
IMG_2496.JPG

I hope someone can explain this (undocumented?) behavior as this leaves room for speculations.
 
Thanks for finding that, Vlad!

After some experimenting, I changed /etc/rc.conf to this:

Code:
allscreens_flags="-c charcolors,base=15 MODE_322"

The red cursor is still there during startup, but it is white at the login prompt.

Can a KERNCONF device sc option be modified for this?
 
I don't think it has anything to do with sc(4) or vt(4) itself. It looks like an easy/simple identification mechanism to show which of the two is being loaded/initialized.
 
I'm kind of happy with setting the allscreens_flags in /etc/rc.conf to:

Code:
allscreens_flags="-c blink -c noblock -c height=2 -c charcolors,base=15 MODE_322"

But, on the ESXi VM, when the system boots up, as soon as kern.vty="sc" gets loaded from /boot/loader.conf, the console text scrolls by and randomly changes text colors. As an extra bonus, I can duplicate this on bare metal machines too.

I don't really want to change /sys/dev/syscons/syscons.c on that line with FG_RED to FG_LIGHTGREY, but might have to and then go through the time of rebuilding world.

What really sucks is in this snip from https://lists.freebsd.org/pipermail/svn-src-head/2017-August/103730.html

Code:
" Advertise this by changing the defaults to mostly red.  If you don't like
  this, change them (almost) back using:
     vidcontrol -c charcolors,base=7,height=0
     vidcontrol -c mousecolors,base=0[,height=15]"

We Don't Need No Stinking Advertisements!
 
It's always green on my system. I reckon it was configured in tmux. I like it though. But it vanishes after a few minutes. I will try the rc.conf setting someday with the hope that it would no longer vanish.
 
i access my servers over ssh only and i don't bother to change the console. The only time that i access the console is over ILO remote terminal to install the server. I think that this change in syscons.c can be expand to include all 8 colors for selection so we can choose what background color we want and not only those 3 and maybe this is some kind of bug because selecting lightgrey don't work.

Code:
    sc->dflt_curs_attr.base = 0;
    sc->dflt_curs_attr.height = howmany(scp->font_size, 8);
    sc->dflt_curs_attr.flags = 0;
    sc->dflt_curs_attr.bg[0] = FG_RED;
    sc->dflt_curs_attr.bg[1] = FG_LIGHTGREY;
    sc->dflt_curs_attr.bg[2] = FG_BLUE;
    sc->dflt_curs_attr.mouse_ba = FG_WHITE;
    sc->dflt_curs_attr.mouse_ia = FG_RED;
    sc->curs_attr = sc->dflt_curs_attr;
    scp->base_curs_attr = scp->dflt_curs_attr = sc->curs_attr;
    scp->curs_attr = scp->base_curs_attr;
 
Hello VladiBG.
That reference of your is great, but not all of the story which gets even more mysterious... I actually was studying how to change text cursor settings and came across a webpage from 2007 in which the author discusses cursors and colors, amongst other configs... Since back then, there is this mysterious appearance of red cursor and I thought I would link these stories together... There is plenty reason to believe that the Red Cursor is actually a Default Cursor for some hardware. Since at least 1999, there is mention of Red Cursor at the kernel VGA-softcursor.txt..

PS: Also, I think I remember seeing the Red Cursor at Android OS
 
Back
Top