Garbled text after boot

Hello! I’ve found my very same issue in some other forum posts, but unfortunately no recommendation there helped my issue.

Out of the blue, whenever I boot up my Leap 15.6 machine, I get garbled text after the Grub boot process.

What I tried so far:

  • Read this whole thread, not much info applicable to my case.
  • Also followed this Stack Exchange thread, which looks pretty similar to my issue and Changed the terminal assignment in /etc/default/grub to terminal=console (didn’t try the splash screen changes though)
  • Tried setting font on my /etc/default/grub file and ran grub2-mkconfig -o /boot/grub2/grub.cfg
  • Tried setting GRUB_TERMINAL to “console” instead of “gfxterm”
  • Reverted to previous configs with Zypper, still no boot

I ran a diff on /boot/grub2/grub.cfg between my current snap and previous snaps and noticed that the font order on the opensuse theme configuration changed, however reverting back to previous configs makes no difference.

I also made sure all fonts were copied from the theme directory to /boot/grub2/fonts but that made no difference.

My current /boot/grub2/grub.cfg:

#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub2-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#

### BEGIN /etc/grub.d/00_header ###
set btrfs_relative_path="y"
export btrfs_relative_path
if [ -f ${config_directory}/grubenv ]; then
  load_env -f ${config_directory}/grubenv
elif [ -s $prefix/grubenv ]; then
  load_env
fi

if [ "${env_block}" ] ; then
  set env_block="(${root})${env_block}"
  export env_block
  load_env -f "${env_block}"
fi

if [ "${next_entry}" ] ; then
   set default="${next_entry}"
   set next_entry=
   save_env next_entry
   if [ "${env_block}" ] ; then
     save_env -f "${env_block}" next_entry
   fi
   set boot_once=true
else
   set default="${saved_entry}"
fi

if [ x"${feature_menuentry_id}" = xy ]; then
  menuentry_id_option="--id"
else
  menuentry_id_option=""
fi

export menuentry_id_option

if [ "${prev_saved_entry}" ]; then
  set saved_entry="${prev_saved_entry}"
  save_env saved_entry
  set prev_saved_entry=
  save_env prev_saved_entry
  set boot_once=true
fi

function savedefault {
  if [ -z "${boot_once}" ]; then
    saved_entry="${chosen}"
    if [ "${env_block}" ] ; then
      save_env -f "${env_block}" saved_entry
    else
      save_env saved_entry
    fi

  fi
}

function load_video {
  if [ x$feature_all_video_module = xy ]; then
    insmod all_video
  else
    insmod efi_gop
    insmod efi_uga
    insmod ieee1275_fb
    insmod vbe
    insmod vga
    insmod video_bochs
    insmod video_cirrus
  fi
}

if [ x$feature_default_font_path = xy ] ; then
   font=unicode
else
insmod part_gpt
insmod btrfs
set root='hd0,gpt2'
if [ x$feature_platform_search_hint = xy ]; then
  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt2 --hint-efi=hd0,gpt2 --hint-baremetal=ahci0,gpt2  27a43d43-1143-40c8-b782-2ad02bd08516
else
  search --no-floppy --fs-uuid --set=root 27a43d43-1143-40c8-b782-2ad02bd08516
fi
    font="/usr/share/grub2/unicode.pf2"
fi

if loadfont $font ; then
  if [ "${grub_platform}" = "efi" ]; then
    clear
    echo "Please press 't' to show the boot menu on this console"
  fi
  set gfxmode=auto
  load_video
  insmod gfxterm
  set locale_dir=$prefix/locale
  set lang=en_US
  insmod gettext
fi
terminal_input console

for i in gfxterm; do
  if [ x${use_append} = xtrue ]; then
     terminal_output --append $i
  elif terminal_output $i; then
     use_append=true;
  fi
done

insmod part_gpt
insmod btrfs
set root='hd0,gpt2'
if [ x$feature_platform_search_hint = xy ]; then
  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt2 --hint-efi=hd0,gpt2 --hint-baremetal=ahci0,gpt2  27a43d43-1143-40c8-b782-2ad02bd08516
else
  search --no-floppy --fs-uuid --set=root 27a43d43-1143-40c8-b782-2ad02bd08516
fi
insmod gfxmenu
loadfont ($root)/boot/grub2/themes/openSUSE/ascii.pf2
loadfont ($root)/boot/grub2/themes/openSUSE/DejaVuSans-Bold14.pf2
loadfont ($root)/boot/grub2/themes/openSUSE/DejaVuSans10.pf2
loadfont ($root)/boot/grub2/themes/openSUSE/DejaVuSans12.pf2
insmod png
set theme=($root)/boot/grub2/themes/openSUSE/theme.txt
export theme
if [ x${boot_once} = xtrue ]; then
  set timeout=0
elif [ x$feature_timeout_style = xy ] ; then
  set timeout_style=menu
  set timeout=8
# Fallback normal timeout code in case the timeout_style feature is
# unavailable.
else
  set timeout=8
fi
if [ -n "$extra_cmdline" ]; then
  menuentry "Help on bootable snapshot #$snapshot_num" {
    echo "Select the default entry of the snapshot boot menu."
    echo "Examine the snapshot, and if it's OK,"
    echo "   run 'snapper rollback' and reboot."
    echo "See 'System Rollback by Booting from Snapshots'"
    echo "   in the manual for more information."
    echo "  ** Hit Any Key to return to boot menu **  "
    read
  }
fi
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/00_tuned ###
set tuned_params=""
set tuned_initrd=""
### END /etc/grub.d/00_tuned ###

### BEGIN /etc/grub.d/05_crypttab ###
### END /etc/grub.d/05_crypttab ###

### BEGIN /etc/grub.d/10_linux ###
menuentry 'openSUSE Leap 15.6'  --class opensuse --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-27a43d43-1143-40c8-b782-2ad02bd08516' {
	load_video
	set gfxpayload=keep
	insmod gzio
	insmod part_gpt
	insmod btrfs
	set root='hd0,gpt2'
	if [ x$feature_platform_search_hint = xy ]; then
	  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt2 --hint-efi=hd0,gpt2 --hint-baremetal=ahci0,gpt2  27a43d43-1143-40c8-b782-2ad02bd08516
	else
	  search --no-floppy --fs-uuid --set=root 27a43d43-1143-40c8-b782-2ad02bd08516
	fi
	echo	'Loading Linux 6.4.0-150600.23.53-default ...'
	linux	/boot/vmlinuz-6.4.0-150600.23.53-default root=UUID=27a43d43-1143-40c8-b782-2ad02bd08516  ${extra_cmdline} splash=silent preempt=full quiet mitigations=auto security=apparmor
	echo	'Loading initial ramdisk ...'
	initrd	/boot/initrd-6.4.0-150600.23.53-default
}
submenu 'Advanced options for openSUSE Leap 15.6' --hotkey=1 $menuentry_id_option 'gnulinux-advanced-27a43d43-1143-40c8-b782-2ad02bd08516' {
	menuentry 'openSUSE Leap 15.6, with Linux 6.4.0-150600.23.53-default' --hotkey=2 --class opensuse --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-6.4.0-150600.23.53-default-advanced-27a43d43-1143-40c8-b782-2ad02bd08516' {
		load_video
		set gfxpayload=keep
		insmod gzio
		insmod part_gpt
		insmod btrfs
		set root='hd0,gpt2'
		if [ x$feature_platform_search_hint = xy ]; then
		  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt2 --hint-efi=hd0,gpt2 --hint-baremetal=ahci0,gpt2  27a43d43-1143-40c8-b782-2ad02bd08516
		else
		  search --no-floppy --fs-uuid --set=root 27a43d43-1143-40c8-b782-2ad02bd08516
		fi
		echo	'Loading Linux 6.4.0-150600.23.53-default ...'
		linux	/boot/vmlinuz-6.4.0-150600.23.53-default root=UUID=27a43d43-1143-40c8-b782-2ad02bd08516  ${extra_cmdline} splash=silent preempt=full quiet mitigations=auto security=apparmor
		echo	'Loading initial ramdisk ...'
		initrd	/boot/initrd-6.4.0-150600.23.53-default
	}
	menuentry 'openSUSE Leap 15.6, with Linux 6.4.0-150600.23.53-default (recovery mode)' --hotkey=3 --class opensuse --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-6.4.0-150600.23.53-default-recovery-27a43d43-1143-40c8-b782-2ad02bd08516' {
		load_video
		set gfxpayload=keep
		insmod gzio
		insmod part_gpt
		insmod btrfs
		set root='hd0,gpt2'
		if [ x$feature_platform_search_hint = xy ]; then
		  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt2 --hint-efi=hd0,gpt2 --hint-baremetal=ahci0,gpt2  27a43d43-1143-40c8-b782-2ad02bd08516
		else
		  search --no-floppy --fs-uuid --set=root 27a43d43-1143-40c8-b782-2ad02bd08516
		fi
		echo	'Loading Linux 6.4.0-150600.23.53-default ...'
		linux	/boot/vmlinuz-6.4.0-150600.23.53-default root=UUID=27a43d43-1143-40c8-b782-2ad02bd08516 single  ${extra_cmdline}
		echo	'Loading initial ramdisk ...'
		initrd	/boot/initrd-6.4.0-150600.23.53-default
	}
	menuentry 'openSUSE Leap 15.6, with Linux 6.4.0-150600.21-default'  --class opensuse --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-6.4.0-150600.21-default-advanced-27a43d43-1143-40c8-b782-2ad02bd08516' {
		load_video
		set gfxpayload=keep
		insmod gzio
		insmod part_gpt
		insmod btrfs
		set root='hd0,gpt2'
		if [ x$feature_platform_search_hint = xy ]; then
		  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt2 --hint-efi=hd0,gpt2 --hint-baremetal=ahci0,gpt2  27a43d43-1143-40c8-b782-2ad02bd08516
		else
		  search --no-floppy --fs-uuid --set=root 27a43d43-1143-40c8-b782-2ad02bd08516
		fi
		echo	'Loading Linux 6.4.0-150600.21-default ...'
		linux	/boot/vmlinuz-6.4.0-150600.21-default root=UUID=27a43d43-1143-40c8-b782-2ad02bd08516  ${extra_cmdline} splash=silent preempt=full quiet mitigations=auto security=apparmor
		echo	'Loading initial ramdisk ...'
		initrd	/boot/initrd-6.4.0-150600.21-default
	}
	menuentry 'openSUSE Leap 15.6, with Linux 6.4.0-150600.21-default (recovery mode)' --hotkey=1 --class opensuse --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-6.4.0-150600.21-default-recovery-27a43d43-1143-40c8-b782-2ad02bd08516' {
		load_video
		set gfxpayload=keep
		insmod gzio
		insmod part_gpt
		insmod btrfs
		set root='hd0,gpt2'
		if [ x$feature_platform_search_hint = xy ]; then
		  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt2 --hint-efi=hd0,gpt2 --hint-baremetal=ahci0,gpt2  27a43d43-1143-40c8-b782-2ad02bd08516
		else
		  search --no-floppy --fs-uuid --set=root 27a43d43-1143-40c8-b782-2ad02bd08516
		fi
		echo	'Loading Linux 6.4.0-150600.21-default ...'
		linux	/boot/vmlinuz-6.4.0-150600.21-default root=UUID=27a43d43-1143-40c8-b782-2ad02bd08516 single  ${extra_cmdline}
		echo	'Loading initial ramdisk ...'
		initrd	/boot/initrd-6.4.0-150600.21-default
	}
}

### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/20_linux_xen ###

### END /etc/grub.d/20_linux_xen ###

### BEGIN /etc/grub.d/20_memtest86+ ###
### END /etc/grub.d/20_memtest86+ ###

### BEGIN /etc/grub.d/25_bli ###
if [ "$grub_platform" = "efi" ]; then
  insmod bli
fi
### END /etc/grub.d/25_bli ###

### BEGIN /etc/grub.d/30_os-prober ###
### END /etc/grub.d/30_os-prober ###

### BEGIN /etc/grub.d/30_uefi-firmware ###
if [ "$grub_platform" = "efi" ]; then
	menuentry 'UEFI Firmware Settings' $menuentry_id_option 'uefi-firmware' {
                fwsetup --is-supported
                if [ "$?" = 0 ]; then
                        fwsetup
                else
                        echo "Your firmware doesn't support setup menu entry from a boot loader"
                        echo "Press any key to return ..."
                        read
                fi
        }
fi
### END /etc/grub.d/30_uefi-firmware ###

### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.
### END /etc/grub.d/40_custom ###

### BEGIN /etc/grub.d/41_custom ###
if [ -f  ${config_directory}/custom.cfg ]; then
  source ${config_directory}/custom.cfg
elif [ -z "${config_directory}" -a -f  $prefix/custom.cfg ]; then
  source $prefix/custom.cfg
fi
### END /etc/grub.d/41_custom ###

### BEGIN /etc/grub.d/80_suse_btrfs_snapshot ###
btrfs-mount-subvol ($root) /.snapshots @/.snapshots
if [ -f "/.snapshots/grub-snapshot.cfg" ]; then
  source "/.snapshots/grub-snapshot.cfg"
fi
### END /etc/grub.d/80_suse_btrfs_snapshot ###

### BEGIN /etc/grub.d/90_persistent ###
### END /etc/grub.d/90_persistent ###

### BEGIN /etc/grub.d/95_textmode ###
if [ "${grub_platform}" = "efi" ]; then
  # On EFI systems we can only have graphics *or* serial, so allow the user
  # to switch between the two
  hiddenentry 'Text mode' --hotkey 't' {
    set textmode=true
    terminal_output console
  }
fi
### END /etc/grub.d/95_textmode ###

A poor or failing video cable, firmware (BIOS) bug, poor connection of GPU in its socket, or failing video RAM, could lead to such intermittent behavior. IME, a sometimes problem isn’t often caused by a software issue.

Thanks for your input! Though it’s not a sometimes problem, it happened after what I can only guess was a kernel upgrade or some upgrade in Zypper. And it’s always like this.

If I access with the rescue disk (only way I can access now) video works fine:

You may be able to use the rescue media to boot the installed system, then rollback to a working snapshot. I don’t use BTRFS. It may be Grub enables you to select a prior snapshot to boot into without any prior fuss. Did you try booting with all the options available in the Advanced menu.

Are you using Gnome, or do you have an NVidia GPU?

Try booting into Grub, then striking the E key to copy the linu line parameters that follow the UUID we don’t need to know to show us. It could be a change there was made that caused your trouble. If nomodeset is one of them, removing it might be worth trying, or vice versa for troubleshooting further.

Also, the Grub Advanced menu should have at least one old kernel to try. Did you do that yet? If that doesn’t work either, and you have a backup of /boot/ somewhere easy to get, you could replace the rebuilt initrd for the previous kernel with the backup and try again. I make each working initrd immutable so that one that works cannot be overwitten when dracut, firmware, drivers or other updates cause initrd regeneration for non-latest kernels.

1 Like

In my case, I could solve the problem in any other way than replacing gfx card. Then all these problems vanished immediately and have not arrived.

1 Like

I did try reverting to a previous snapshot with no success, there goes my trust in snapper as part of a disaster recovery plan lol.
Also I tried all four of these options, all yielded the same results (garbled text after attempting to boot into what I assume is graphic mode console:

I am not using any GUI, and yes, GeForce GTX 645 OEM.

linux
/boot/vmlinuz-6.4.0-150600.23.53-default root=UUID=27a\
43d43-1143-40c8-b782-2ad02bd08516
$fextra_cmdline} splash=silent preempt=full quiet
t
mitigations=auto security=apparmor

I tried all four as picture shown above. All do the same, get garbled after entering what I assume is graphic console mode.

Unfortunately I don’t have any backup other than the running system, which is fully accessible on rescue mode.

Can you point me to documentation on how to achieve this? So I can avoid this issue in the future.

NOTE: It seems to be some issue with the fonts? I was trying to show you my /boot/ contents and decided to cat a file, it ended up being a binary or something (I think it was some initrd file), so a lot of garbled strings, then when I ctrl-ced the resulting screen was this:

man chattr
chattr +i /boot/initrd-<version>-<name>

For your current problem it’s too late to do any good. Upon any new kernel installation I do this right away out of habit, immediately following, as all kernels here are kept locked, with additions and removals done if and when I choose.

The fonts in this screenshot are a common result of trying to print a binary file to standard output (screen). When this has happened here in the past, usually logging out has fixed it, but I suppose it’s possible kernel changes since scrollback and fbdev went away might have altered this.

1 Like

Thanks for the tip! I will certainly make sure I make a habit out of it from now on, also I will give man chattr a read, thanks again!

Is there any way to avoid any graphical boot at all? Since the first part of the boot process is just fine, I am still convinced something kicks in later in the process that messes up my ability to read the text (garbled). I would really like to save this server because it’s got a lot of testing applications that I’d like to avoid going through the process of re-installing.

Thanks in advance!

Purging plymouth* from your installation may be your solution. I never have it installed on openSUSE. I like to see the scrolling text telling me something is actually happening during boot.

This is how my boot params are to witness output:

 ... plymouth.enable=0 splash=none ... 

No need for either of those with plymouth not installed. Bonus: smaller initrds build faster, load faster, use less disk space. Plus: reduced updates bandwidth, all bonuses for not emulating Windows. :slight_smile: