Ubuntu – Hide kernel messages in plymouth


I am running Ubuntu 14.04 server for Kiosk application.
The problem is when kiosk is starting , kernel shows some debug messages about stuff like USB port error and such things, and those ugly messages are being displayed over our plymouth splash screen.
Is there anyway to prevent such messages from showing during startup ? I already have "quiet splash" in my grub config file.

Best Answer

If you just want to suppress those messages, rather than fix them, you can try adjusting the kernel.printk sysctl, as outlined in man 2 syslog.

/proc/sys/kernel/printk is a writable file containing four integer values that influence kernel printk() behavior when printing or logging error messages. The four values are:


Only messages with a log level lower than this value will be printed to the console. The default value for this field is DEFAULT_CONSOLE_LOGLEVEL (7), but it is set to 4 if the kernel command line contains the word "quiet", 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). The value of console_loglevel can be set (to a value in the range 1-8) by a syslog() call with a type of 8.


This value will be used as the log level for printk() messages that do not have an explicit level. Up to and including Linux 2.6.38, the hard-coded default value for this field was 4 (KERN_WARNING); since Linux 2.6.39, the default value is a defined by the kernel configuration option CONFIG_DEFAULT_MESSAGE_LOGLEVEL, which defaults to 4.


The value in this field is the minimum value to which console_loglevel can be set.


This is the default value for console_loglevel.

The numbers are outlined thusly in kern_levels.h.

#define KERN_EMERG    "<0>"  /* system is unusable               */
#define KERN_ALERT    "<1>"  /* action must be taken immediately */
#define KERN_CRIT     "<2>"  /* critical conditions              */
#define KERN_ERR      "<3>"  /* error conditions                 */
#define KERN_WARNING  "<4>"  /* warning conditions               */
#define KERN_NOTICE   "<5>"  /* normal but significant condition */
#define KERN_INFO     "<6>"  /* informational                    */
#define KERN_DEBUG    "<7>"  /* debug-level messages             */

You probably want to show CRITICAL, ALERT, and EMERGENCY messages, so setting everything to kernel.printk = 3 3 3 3 in sysctl.conf should only give you messages that require someone to do something to get the kiosk/machine to operate properly.