3

Environment: Ubuntu 24.04, kernel Linux 6.10.9-1-t2-noble, wayland, amdgpu, AMD Radeon™ Pro 580X, mesa driver, MacPro 7,1.

At shutdown if I want to show the non-quiet splash and select "Esc" key I see corrupted text in every line similar to:

Font characters displayed as squares in Ubuntu 18.04

Trying to reset font cache next.

That didn't work.

1 Answers1

2

I see this too. Here is a screen shot.enter image description here

Plymouth is somehow causing this.

The best workaround in my opinion is to change the plymouth theme to to a text theme.

sudo update-alternatives --install /usr/share/plymouth/themes/default.plymouth default.plymouth /usr/share/plymouth/themes/ubuntu-text/ubuntu-text.plymouth 100

sudo update-alternatives --set default.plymouth /usr/share/plymouth/themes/ubuntu-text/ubuntu-text.plymouth

sudo update-initramfs -u

this makes the login process not too ugly and I don't get the systemd rendering errors.

*** UPDATE ***

I think this is a race condition. At some point in the shutdown, the file system disappears, and resources must be in RAM.

This was discovered by the Ubuntu developers a few years ago. The fix was to display a blank message before the file system disappears, so that the font resources are loaded into ram. But this display message is a async command sent to the plymouth background daemon and perhaps it is not executed in time on all hardware. So I experimented with adding a delay. 1s worked most of the time but not all of the time, so I'm using 2s now. This is obviously ridiculous, how can it take so long, but anyway.

You can try this:

sudo vi /usr/lib/systemd/system/plymouth-switch-root-initramfs.service 

I made a change to add a 2s sleep:

[Unit]
Description=Tell Plymouth To Jump To initramfs
DefaultDependencies=no
# dracut-shutdown.service restores the initramfs when it is _stopped_
# use Conflicts to make sure its ExecStop has run before we do
Conflicts=dracut-shutdown.service
After=plymouth-halt.service plymouth-reboot.service plymouth-poweroff.service plymouth-kexec.service dracut-shutdown.service mkinitcpio-generate-shutdown-ramfs.service
ConditionPathExists=|/run/initramfs/bin/sh
ConditionPathExists=|/run/initramfs/shutdown

[Service] Type=oneshot RemainAfterExit=yes

Emit a blank message to force a dynamic load of all graphics libraries

required for rendering text since it's a non-trivially large set, too large

to manage manually in the initramfs. This will allow casper to render text

like the live media ejection message after the jump...

ExecStart=-/usr/bin/plymouth message --text="Preload graphics libraries..." ExecStart=-/bin/sleep 2 ExecStart=-/usr/bin/plymouth update-root-fs --new-root-dir=/run/initramfs

Type=oneshot RemainAfterExit=yes

check the theme:

sudo update-alternatives --config default.plymouth

the bgrt.plymouth is the default theme