How to display a screensaver at a torizon module hdmi display

Hello everyone,

How can I display a simple screensaver / logo on a connected display?

Best
Gerald

Hi, I’m the Toradex AI Assistant. The Toradex Support team will follow up with you shortly!

Did you like my answer?

:+1: :-1:


Hello Gerald,

To display a simple screensaver or logo on a connected HDMI display using a Torizon module, you can follow these steps:

  1. Prepare the Image:

    • Ensure you have the image file (e.g., a logo or screensaver image) in a format supported by the display software (e.g., PNG, JPEG).
  2. Set Up Weston:

    • Torizon uses the Weston Wayland compositor for display management. You need to have the Weston container running on your module.
    • If you haven’t already, pull and start the Weston container:
      docker pull torizon/weston
      docker run -d --rm --name=weston --net=host --cap-add CAP_SYS_TTY_CONFIG -v /dev:/dev -v /tmp:/tmp -v /run/udev:/run/udev torizon/weston
      
  3. Display the Image:

    • You can use a simple image viewer like feh to display the image. First, you need to install feh in a container. You can use a Debian container for this purpose:
      docker run -it --rm --name=debian --net=host -v /tmp:/tmp torizon/debian:latest-std bash
      apt-get update
      apt-get install -y feh
      
  4. Run the Image Viewer:

    • Once feh is installed, you can use it to display your image. Assuming your image is located at /path/to/your/image.png, you can run:
      feh --fullscreen /path/to/your/image.png
      
  5. Automate the Screensaver:

    • If you want to automate the display of the screensaver, you can create a script that runs the feh command and set it to execute at startup or after a certain period of inactivity.
  6. Optional - Use a Screensaver Application:

    • Alternatively, you can use a dedicated screensaver application like xscreensaver. Install it in a similar manner and configure it to display your desired screensaver.

By following these steps, you should be able to display a simple screensaver or logo on your connected HDMI display using a Torizon module.

Best regards,
[Your Name]

Please, also check if these links can help you solve your problem:

Colibri iMX6ULL: Torizon with containers not coming up.

Hello @gerko,

Under what context do you want to display this screensaver/logo?

If you simply want to customize the splash screen, you can use TorizonCore Builder: Splash Screen on Torizon OS | Toradex Developer Center

Otherwise, this can be implemented in an application, depending on what is the expected behavior of such screensaver.

Best Regards,
Bruno

Thank you,

The splash image isn’t quite what I want.
I actually want a screensaver.
I use an Apalis imx8qm so (I should have specified)…
As described here, a splash screen is not possible here.

For the time being, only a logo should be displayed.
The display should then switch off after a certain time and switch on again when a defined activity occurs.

How can I do that?

I tried feh… I always get the error message:
feh ERROR: Can't open X display. It *is* running, yeah?

and I’ve tried weston-image /tmp/img.jpg … The result is not satisfactory.

Best
Gerald

Hello @gerko,

Thanks for the clarification.

The suggestion from the @ToradexAI is missing some important configuration for the weston initilization.
Regardless, I think that a better approach would be to implement the splash screen logic in your application.
After a certain period of time the application could change to another view with the logo, or enable a widget which covers the screen with the logo.
Would this be an option for you?

Best Regards,
Bruno

If you can use it on an apalis imx8 module, that would be a viable option.

We use a Smartphone display connected via hdmi.
By the way, the Toradex logo is displayed briefly after a reboot command before reboot.

Maybe I should just deploy my own logo? But what can I do to make it appear on an imx8 module?

Best
Gerald

@ToradexAI: How do I configure weston so that feh starts without errors?

Hello @gerko,

This is the splash screen, it also appears briefly before the system turns off.
To change it, you can follow the steps here: Splash Screen on Torizon OS | Toradex Developer Center


It would certainly be possible to implement this in an application running on the Apalis iMX8.
How this could be done depends on the GUI framework you are using.


Unfortunately the @ToradexAI is not currently able to have back-and-forth conversations.

To get a working Weston + GUI container, the Qt example would be a good starting point: Qt on Torizon OS | Toradex Developer Center

You may also consider using our VSCode extension for easier development on Torizon OS: Visual Studio Code IDE Extension | Toradex Developer Center
There are many templates that could be useful starting points.

Best Regards,
Bruno