Hide boot on-screen errors, or get TV-out working on ATI Radeon X300

John Hupp ubuntu at prpcompany.com
Mon Dec 8 20:22:01 UTC 2014


On 12/8/2014 2:45 AM, Marius Gedminas wrote:
> On Sun, Dec 07, 2014 at 02:33:47PM -0500, John Hupp wrote:
>> Victory!
>>
>> I created /etc/sysctl.d/20-quiet-printk.conf with content:
>> kernel.printk = 3 3 3 3
> ...
>> Though I was curious to know a bit more about the mechanisms in
>> play, I didn't dig much further than that.  I wondered, for
>> instance, what behavior the default '4 4 1 7' specified, but never
>> did find out.  The files in sysctl.d are installed by procps (see
>> the List of Files link at
>> http://packages.ubuntu.com/trusty/admin/procps). And these, in turn,
>> are part of the kernel configuration governed by sysctl (see
>> http://manpages.ubuntu.com/manpages/trusty/en/man8/sysctl.8.html).
>>
>> Still looking for the meaning of '4 4 1 7' vs '3 3 3 3' I came to
>> https://www.kernel.org/doc/Documentation/printk-formats.txt, but my
>> eyes glazed over just skimming that, and I stopped there.
> This is a bit unobvious, but you can find the description of the
> kernel.printk sysctl setting in
> http://manpages.ubuntu.com/manpages/trusty/en/man5/proc.5.html:
>
>      /proc/sys/kernel/printk
>          The four values in this file are console_loglevel,  default_mes‐
>          sage_loglevel,     minimum_console_level,    and    default_con‐
>          sole_loglevel.  These values influence  printk()  behavior  when
>          printing or logging error messages.  See syslog(2) for more info
>          on the different loglevels.  Messages  with  a  higher  priority
>          than  console_loglevel will be printed to the console.  Messages
>          without an explicit  priority  will  be  printed  with  priority
>          default_message_level.   minimum_console_loglevel is the minimum
>          (highest)  value  to  which   console_loglevel   can   be   set.
>          default_console_loglevel   is   the   default   value  for  con‐
>          sole_loglevel.
>
> (/proc/sys is one of the possible ways of changing systcl settings,
> which I guess explain why this is documented in proc(5).)
>
> Marius Gedminas

Thanks Marius, and also Tom H, for the helpful documentation and also a 
caution against fiddling with the default settings more than is needed.

If I understand correctly, the 7 in 4 4 1 7 means that console_loglevel 
is initially set to 7, but "is set to 10 if the kernel command line 
contains the word "debug", and to 15 in case of  a  kernel  fault (the  
10 and 15 are just silly, and equivalent to 8)."  With console_loglevel 
set to 8 in those conditions, console messages would become as verbose 
as possible.

The 1 in 4 4 1 7 means that any mechanism that attempts to set 
console_loglevel to 0 would be thwarted.  This assures that 
system-is-unusable kernel emergency messages would print to console.

The second 4 in 4 4 1 7 means that any line of a message that does not 
have a priority level already assigned to it will be assigned level 4 
and treated accordingly.

The first 4 in 4 4 1 7 means that only messages with a priority of 3 or 
lower (error conditions, but not warnings) will print to console.

So if I want to stop erroneous error (!!) messages from printing to 
console, the most conservative change would be to 4 4 1 7 --> 3 4 1 7 
(not 3 3 3 3).

This I have now done, and 3 4 1 7 still achieves suppression of the 
unwanted messages.



More information about the ubuntu-users mailing list