Date: Mon, 10 Sep 2018 23:12:04 -0400 From: Koro <koro@kzxiv.net> To: freebsd-bugs@freebsd.org Cc: brde@optusnet.com.au Subject: Re: [Bug 230757] [syscons] random wrong color for kernel messages Message-ID: <a2037283-43d8-e1c3-21cd-a767e2acecc6@kzxiv.net> In-Reply-To: <20180820194127.C1023@besplex.bde.org> References: <bug-230757-39@https.bugs.freebsd.org/bugzilla/> <bug-230757-39-iatwKu5zxt@https.bugs.freebsd.org/bugzilla/> <20180820194127.C1023@besplex.bde.org>
next in thread | previous in thread | raw e-mail | index | archive | help
> In FreeBSD-11: > - for boot messages, configure SC_KERNEL_CONS_ATTR to anything except its > default of FG_WHITE (0xf). > - after booting, use the hw.syscons.kattr sysctl to change the array of > MAXCPU kernel attributes to whatever you want (all FG_WHITE to get the > old behaviour). sysctl(8) doesn't handle arrays very well, so it takes > rarely-used options to even print the values in the array. I tried doing this real quick, but it did not change a thing: #include <sys/types.h> #include <sys/sysctl.h> #include <string.h> #include <stdio.h> int main(int argc, char** argv) { char kattr[256]; memset(kattr, 0x0f, 256); if (sysctlbyname("hw.syscons.kattr", NULL, 0, kattr, 256) == -1) { perror("sysctl"); return 1; } return 0; } It doesn't error out, but it does not change a thing, I still kept getting colored messages. Maybe I misunderstood your instructions? This is on 11.2-RELEASE by the way. > But don't turn it off. Try using better colors (don't use dark gray). > Even I like colorized kernel messages, and I stopped using colorized ls > 25 years ago. It's not so bad with only dark gray (though it looks a bit broken), but once you add more CPUs, it starts looking like an xmas tree. I too, like my consoles to be gray and boring and disable colored ls. And also, unless one actively works on the kernel, I fail to see the need to know from which CPU did a specific kernel message originate. - Koro
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?a2037283-43d8-e1c3-21cd-a767e2acecc6>