Blinking Cursor on Splash Screen During Shutdown Only

Hello!

I am working with a Verdin iMX8M Plus SoM with a Dahlia carrier board and video over HDMI. I have a custom Yocto build based off of the Toradex Minimal Reference Image and have implemented a splash screen in the kernel. The splash screen works great on boot up with no issues. However, when powering off, the splash screen appears again but has blinking cursor in the top left corner.

If I execute the following command before shutdown, the blinking cursor disappears.

echo 0 > /sys/class/vtconsole/vtcon1/bind

Is there a way to build this into the u-boot args?

Currently, my u-boot setup variable looks like:

setup=setenv setupargs console=${console},${baudrate} consoleblank=0 earlycon vt.global_cursor_default=0

I had tried using the same arguments as this post, but had no luck.

Any help is appreciated! Thanks!

If echo 0 > /sys/class/vtconsole/vtcon1/bind does the trick, you can automate this, by executing this command every time the system shuts down. One way to do this is to use a systemd service that runs at shutdown.

  • Create a script that will run when the service is invoked. For instance, create a script /usr/local/bin/remove-cursor.sh with the following content:

#!/bin/bash
echo 0 > /sys/class/vtconsole/vtcon1/bind

  • Make sure the script is executable by running:

chmod +x /usr/local/bin/remove-cursor.sh

  • Create a systemd service for this script. For instance, create a service file at /etc/systemd/system/remove-cursor.service with the following content:

[Unit]
Description=Remove blinking cursor
DefaultDependencies=no
Before=shutdown.target reboot.target halt.target

[Service]
Type=oneshot
ExecStart=/usr/local/bin/remove-cursor.sh

[Install]
WantedBy=halt.target reboot.target shutdown.target

  • Enable the service:

systemctl enable remove-cursor.service

This service is set up to run the script just before the system halts, reboots, or shuts down. Please replace the paths and filenames to suit your project’s standards. If you want to bake this into your Yocto image, you will need to create a recipe for this service and add it to your image.