Postioning rotating Cursor in splash screen

Hi,

is it possible to show the rotating cursor in splash screen at another positon? We have a screen rotated by 90 degrees and the cursor is shown in the right third just in the text. That looks quite bad.

Apalis iMX8qm
Ixora 1.1
Torizon 5.3.1
weston-vivante-2.2.0

Greetings @rainer9322,

The boot splash screen is controlled by Plymouth in the initramfs. Plymouth has a config file that can be used to control the properties/position of the spinning icon. This is the default configuration we ship with Torizon: meta-toradex-torizon/spinner.plymouth at dunfell-5.x.y ¡ toradex/meta-toradex-torizon ¡ GitHub

The properties HorizontalAlignment and VerticalAlignment are what control the spinner’s position.

Unfortunately at the moment we don’t provide an easy way to customize this configuration file. The only way at the moment would be to re-build the entire TorizonCore image with a new configuration file. This is a bit of an oversight on our side when we added the feature to customize the splash screen image. Let me make a suggestion to the team to allow this configuration file to be customized as easily as the splash image.

Thank you for reporting this limitation to us.

Best Regards,
Jeremias

Hi,
thanks a lot for your good answer. Do you know how long such a change normally takes until it available for the customer?

Best regards,
Rainer

I can’t give you any timeline yet, I only just submitted the request. The request would still need to be analyzed, planned, and scheduled. Also keep in mind this is a “request” meaning there’s no guarantee it will actually be implemented. If it does get accepted it will be more of a long-term solution.

If this is something you’re going to require in the very near immediate short-term you’ll need implement the alternative solution I suggested earlier. Meaning you’ll need to make the customization with the Yocto build system to create a new TorizonCore image.

Best Regards,
Jeremias

Hello @jeremias.tx ,

Has been any new updates on this possible feature? We have same situation, rotated display by 90 degrees, with a custom splash-screen but the cursor appears on the side and it is kind of weird.

Is there anyway to change the rotating cursor position without rebuild torizonCore image?
Maybe editing /usr/share/plymouth/themes/spinner/spinner.plymouth but for this the partition need to be change to write mode, and this way I’m not sure how to replicate with the torizoncore-builder since it will not isolate the changes on the /usr folder.

Hi @peterz,

Is there anyway to change the rotating cursor position without rebuild torizonCore image? Maybe editing /usr/share/plymouth/themes/spinner/spinner.plymouth

At the moment no. Even if you could change this file, I don’t think that would be enough. The splash screen process itself starts during the initramfs before passing onto the kernel. Modifying this file would only affect the kernel side of things. I imagine both sides would need to be modified to have any effect.

That said, may I ask how vital this detail is for your project? To be honest with you as you can see from this thread you’re only the 2nd person to have asked about this in the past 2 years. Therefore it was never see as a high priority topic for our team. Which is why I would like to understand the impact this has on your project.

Best Regards,
Jeremias

Hello @jeremias.tx,

Thanks for the answer.
We don’t need the rotating cursor at all, having it has a low impact on the final solution, it was just an improvement. As you can image If I purchase a laptop and the boot screen was rotated 90 degrees, it will work same way, but will seem a less professional product.
I was just asking, because it is possible to change the splash screen, but not the cursor position or enable or disable the cursor. Because it is possible to change the splash-screen, but on top of it is a rotating cursor, that is not centered, it takes all the credits from the splash-screen feature, because it cannot be used in 90 degrees displays.

Thank you for clarifying. As I said, this isn’t a very high priority task for us so I can’t guarantee it will be looked at anytime in the near future. Modifying the configuration of the Plymouth splash screen in Yocto is always an option, though I do understand this is a level of complexity most do not wish to do.

Best Regards,
Jeremias

Hi all!

I just want to point out that @jeremias.tx is right. I just quickly tested this out of curiosity and no changes happened on the splash screen if only /usr/share/plymouth/themes/spinner/spinner.plymouth is modified. Not even a “glitch” happened.

In my test, I changed the following values to .75:

  • DialogHorizontalAlignment
  • TitleHorizontalAlignment
  • HorizontalAlignment
  • WatermarkHorizontalAlignment

This documentation from ArchLinux about Plymouth also points out that Plymouth needs to be rebuilt: Plymouth - ArchWiki

Best regards,

Note in newer Torizon builds, the system respects the rotation=<> argument on the kernel command line and plymouth rotates accordingly. We have used this successfully for our own needs but requires 6.x

We did also manage to find a way to completely customize the splash screen purely using torizoncore-builder, but you’ll need to have some advanced skills and knowledge such as knowing how to repack initramfs.

General workflow:

  1. Develop your new/modified plymouth theme.
  2. If creating a new theme, you will need to also update the plymouth config to use it.
  3. Take the initramfs image from /usr/lib/modules/… and unpack it.
  4. Install your new theme files into initramfs.
  5. Repack it
  6. use the custom overlay capability of torizoncore to include your theme and modified initramfs in the same location it was originally placed.
  7. Steps 2-6 will need to be re-done any time you change the input TEZI image since this changes the kernel and initramfs images, but it’s very easy to automate via e.g. a CMake or other build script.

Note you need to pack two copies of the theme. The one in initramfs is used at startup, and the one in /usr/share/plymouth/themes is used at shutdown and reboot.

Cheers,
~BW908

Hello @bw908 ,

What do you mean with ? This could be enough for my needs.

Note in newer Torizon builds, the system respects the rotation=<> argument on the kernel command line and plymouth rotates accordingly

Using the torizoncore-builder is possible to change the position (vertical or horizontal) of the loading cursor using the customization > kernel > arguments on the file tcbuild.yaml?
Can you give an example?

Yes, the newer builds of the kernel/torizon/Plymouth properly respect the rotation arguments available in a few places. To clarify - this changes that spinner position by rotating the entire screen so you may need to adapt any custom artwork you are using to account for this. That said, it’s probably what you want to do anyway when e.g. using a landscape display in portrait mode or vice-versa.

You have two options:

  1. Specify it as part of the video = arguments via tcbuild.yml. For example, video=DP-2:1280x800M@60,panel_orientation=left_side_up sets up a 1280x800 landscape display for portrait mode.

Valid options are ‘left_side_up’, ‘right_side_up’, ‘upside_down’

  kernel:
    # >> Custom kernel arguments
     arguments:
       - video=DP-2:1280x800M@60,panel_orientation=left_side_up
  1. Specify it in the device tree as part of the panel properties with rotation = <...>. Value is in degrees, so 90, 180, 270, or 0. Example:
&panel_lvds_mez {
//	status = "disabled";
	status = "okay";
	backlight = <&backlight>;
	data-mapping = "vesa-24";
	width-mm = <217>;
	height-mm = <136>;
	rotation = <270>;
... (other specifications...)

You can check if your build supports this by seeing if it has CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y in the kernel build configuration.

We’ve successfully used both of these pathways in different applications, but it didn’t start working until we were on TorizonCore 6.x, the older builds do not have this parameter enabled.

@bw908, Thank you for sharing your findings here it’s much appreciated. I wasn’t aware that newer versions respect the rotation arguments in Plymouth. Though probably the last time I checked was on Torizon 5.X where it does not work as you said.

Best Reagrds,
Jeremias

1 Like

Most likely that would have been when I was asking about it around this time last year :rofl:

@ bw908
I’m also having trouble with this problem.
Could you please tell me the specific method?

  1. Develop your new/modified plymouth theme.
  2. If creating a new theme, you will need to also update the plymouth config to use it.
  3. Take the initramfs image from /usr/lib/modules/… and unpack it.
  4. Install your new theme files into initramfs.
  5. Repack it
  6. use the custom overlay capability of torizoncore to include your theme and modified initramfs in the same location it was originally placed.
  7. Steps 2-6 will need to be re-done any time you change the input TEZI image since this changes the kernel and initramfs images, but it’s very easy to automate via e.g. a CMake or other build script.

@katsu Sorry for the delay.

Could you clarify what exactly it is you’re asking for or having trouble with? I’m sorry, but I don’t have the time/resources to devote to writing a full step-by-step guide on this process, but I’ll do my best to assist with specific questions you may have or encounter.

Cheers,
~BW908

@bw908
Thank you for contacting us.
I’m currently developing a Qt application on TorizonOS with Dahlia + Verdin-imx8mmDL.
What I am having trouble with is changing the position and design of the spinner within the splash screen.
So we arrived at this ticket.
I thought that @bw908 was able to complete my task using the steps in [General workflow], so I asked a question.
1.Develop your new/modified plymouth theme.
3.Take the initramfs image from /usr/lib/modules/… and unpack it.
I’m fine with just the above two items, but could you please tell me what I should do specifically?
Or please let me know if there are any documents that I can refer to.
We apologize for the inconvenience, but thank you for your understanding.

Develop your new/modified plymouth theme.

There’s not a whole lot here that I can offer you except to have a look at the example themes in /usr/share/plymouth/themes. Documentation on developing one is non-existent and so the only advice I can give is find an existing one that behaves mostly how you want and then change it by customizing images and positioning/behaviours. For this your best reference is the sources for the plugin itself, e.g. https://gitlab.freedesktop.org/plymouth/plymouth/-/blob/main/src/plugins/splash/two-step/plugin.c for the “two-step” splash plugin.
Basic customization can be done by just editing the .theme file to adjust colours/positions etc. and/or adding image files with certain special names as seen in the source code for a given plugin. Sources will also give you information on the different properties available that can be set.

Take the initramfs image from /usr/lib/modules/… and unpack

InitramFS images are generally compressed CPIO archives and need some tricks to modify them and re-compress them. The following steps assume you are using Linux, they may work in WSL but I have not tested/confirmed.

  1. Create a folder to use as a workspace, ex. init_root
  2. Extract contents: zcat [/path/to/initramfs.img] | fakeroot -s init_root.fakeroot cpio -idm -D ./init_root
  3. Now you have the contents of the initramfs inside the fakeroot folder. Make changes as necessary.
  4. Repack the .img: cd init_root && find . | fakeroot -i init_root.fakeroot cpio -v -o -c -R root:root | gzip -9 > ../new_initramfs.img

Of course, what you do in step 2 depends entirely on the changes you make to the theme and what files are required to support those changes.

Hope that helps!

~BW908

1 Like

@bw908
Thank you for the valuable information.
We will look for an existing system that works and try to configure and implement it to meet your wishes.

Thank you very much.