3

After GRUB loads the linux image linux-vmdisk or similar, and systemd has loaded, I found the screen displays the systemd boot process steps with a wrong and weird encoding. But after a few seconds and some systemd services have loaded, the screen refreshes, and the display is then correct.

My system is "Arch Linux" with latest update. And systemd version is:

systemd 232 +PAM -AUDIT -SELINUX -IMA -APPARMOR +SMACK -SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD +IDN 

EDIT: here is my dmesg log https://gist.github.com/stardiviner/dfbeb58a7afb2a10dab1e9d51ff34686

I want to know are there related bugs? If I can't find out why, then tell me how to debug this issue?

2
  • Can you identify the part in the dmesg where the encoding gets messed up? Commented May 31, 2017 at 8:56
  • It messed up after GRUB, and loading initramfs, until a specific systemd unit started. It is quick so I can't remember it. I will updated here after reboot to take a clearly look. Commented May 31, 2017 at 10:17

2 Answers 2

2

The strange characters at boot might be due to a wrong GRUB configuration. Try these solutions that involve changes to /etc/default/grub. After each change, remember to update GRUB (grub-mkconfig -o /boot/grub/grub.cfg or update-grub) and then reboot to test the change.

1) Add these lines:

GRUB_GFXMODE=<mode>,1024x768x32,auto GRUB_GFXPAYLOAD_LINUX=keep 

where <mode> is the resolution of your screen as <width>x<height>x<depth>, see line above for an example.
Note that this mode must be supported by your graphic card; to get a list of supported modes, run

sudo hwinfo --framebuffer 

More info here.

2) If this still doesn't work, try to add a parameter vga= (note: deprecated) to the line GRUB_CMDLINE_LINUX_DEFAULT:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash vga=792" 

3) If still these solutions doesn't work, try this (taken from this previous answer):

Comment out the line with GRUB_CMDLINE_LINUX_DEFAULT.

Add the lines

GRUB_GFXMODE=<width>x<height> GRUB_TERMINAL=console 

where <width>x<height> is the native resolution of your monitor.

6
  • This answer is very detailed. can you describe the reason of why caused wrong characters? Commented May 29, 2017 at 2:53
  • I tried all of your methods. none of them works. But thanks still. Commented May 29, 2017 at 4:29
  • Have you tried changing the settings in /etc/vconsole.conf? Commented May 29, 2017 at 8:32
  • No, have not touched it. Commented May 29, 2017 at 8:34
  • Try to change the vconsole.font= parameter in it. (I don't know how you find the available fonts in Arch Linux; I'll try to find this info and add it to the post later). Commented May 30, 2017 at 7:05
0

If by wrong or weird encoding you mean something that looks like this:

Text in terminal appear like symbols

Then it may be a result of some startup scripts or command outputting binary data to your console, and...

In such scenario some particular byte sequences may be interpreted by your terminal emulator as control sequences or so, they will affect its later behavior.

as described here.

Since the issue sounds like it resolves itself, if there is still a desire to try and determine what may be causing the issue, you may want to check any startup configurations you have set (i.e. in cron or rc.local) in addition to checking systemd

For posterity, systemd related processes reviews can be checked using (with sudo)

systemctl status # or alternatively systemctl --failed # or to check all the services available systemctl list-unit-files --type=service 

Whereas possibly related directories may include (as reference for both Arch & non-Arch users):

  • /usr/lib/systemd/system/
  • /etc/systemd/system/
  • /etc/rc.local/
  • (As aforementioned for cron) running crontab -e
  • /etc/profile
  • ~/.bash_profile
  • ~/.bash_login
  • ~/.profile

For ease of reference:

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.