4

I am on Ubuntu 20.04 LTS and I want to suppress all kernel messages of the form

[0.342652] Blah blah ...

during boot, while keeping the splash screen. The default grub setting quiet splash does not work. I added fsck.mode=skip and loglevel=0 to suppress some kernel messages for disk checking and old hardware. However, I still get an empty line like

[4.568562] 

before the splash screen shows up. I found this post that redirects everything to console=ttyS0 so the kernel messages are gone but so is the splash screen. Below is my grub setting in /etc/defaults/grub.

# If you change this file, run 'update-grub' afterwards to update
# /boot/grub/grub.cfg.
# For full documentation of the options in this file, see:
# info -f grub -n 'Simple configuration'

GRUB_DEFAULT=0 GRUB_TIMEOUT_STYLE=menu GRUB_TIMEOUT=120 GRUB_DISTRIBUTOR=lsb_release -i -s 2> /dev/null || echo Debian

Don't show Ubuntu bootup text

GRUB_CMDLINE_LINUX_DEFAULT="fsck.mode=skip quiet loglevel=0 splash" GRUB_CMDLINE_LINUX=""

Detect other operating systems

GRUB_DISABLE_OS_PROBER=false

The resolution used on graphical terminal

note that you can use only modes which your graphic card supports via VBE

you can see them in real GRUB with the command `videoinfo'

GRUB_GFXMODE=1280x1024

I noticed that when I switch to my intel graphic card sudo prime-select intel then the empty line disappears and the current grub setting works fine. However, when I am using the nvidia graphic card sudo prime-select nvidia, the following appears before the splash screen

enter image description here

and here is the result of sudo dmesg around the time [4.568562] that appeared in the previous picture.

[    4.553719] nvidia: module verification failed: signature and/or required key missing - tainting kernel
[    4.568556] nvidia-nvlink: Nvlink Core is being initialized, major device number 511

[ 4.569341] nvidia 0000:01:00.0: enabling device (0006 -> 0007)

The empty line shown in the above log exists and is not a typo.

3 Answers3

1
GRUB_CMDLINE_LINUX_DEFAULT="fsck.mode=skip quiet loglevel=3 splash"

works for me without a print of any character and it shows the splash screen without anything related to fcheck.

This seems to work as intended and as you are expecting it to work. The parameters ...

loglevel=2
loglevel=1
loglevel=0

instead of loglevel=3 make no difference.

The [4.568562] might not be from Grub but something else. Do a sudo dmesg |grep -i '4.568562' -A 2 -B 2 and it will show 2 lines above and below of the messages.

Tested on Ubuntu Cinnamon 23.04 and 23.10

Rinzwind
  • 309,379
0

As suggested by @Rinzwind, I checked the kernel messages before and after the time corresponding to the empty line. Surprisingly, the time corresponding to the empty line did not appear in sudo dmesg. Moreover, when I did sudo dmesg --level=err, the empty line appeared without the corresponding time being displayed! I found the messages before and after that time manually. It turned out that this empty line error has something to do with the nvidia driver as messages before and after the empty line suggest. Consequently, I downgraded my driver from nvidia-driver-535 to nvidia-driver-390 and the empty line was gone while using the nvidia graphic card. My notebook graphic card is NVIDIA GTX 1050.

0

putting in kernel command line the arguments below,

quiet loglevel=5

will keep increase a little bit the logs from kernel but permits the kernel log, in kernel the below condition will be bypassed in fbcon.c:1040 in (kernel v5.15)

if (logo_shown < 0 && console_loglevel <= CONSOLE_LOGLEVEL_QUIET)
        logo_shown = FBCON_LOGO_DONTSHOW;

the default loglevel on quiet is 4.

visibog
  • 1
  • 1