Possible to output text on LibreELEC boot screen?

  • I am running LibreELEC 9.95.2 on RPi4.


    Have setup autostart.sh to load some scripts upon boot.

    It would take about 30 to 45 seconds to complete.

    Thought it might be good to display the status on TV.


    Wondering if it is possible to output text on LibreELEC boot screen.

  • Do you mean you r stuck on boot for 45 seconds for your script to run?

    Is it necessary for your script to run before kodi UI?


    Wondering if it is possible to output text on LibreELEC boot screen.

    I doubt it...but don't think so..but you ll never know..maybe someone comes up with a solution..notifications only show when kodi starts..

    Edited once, last by Mario77: Merged a post created by Mario77 into this post. ().

  • You can simply write to /dev/console. eg try this as autostart.sh:


    Code
    ( 
    echo -n "waiting"
    for i in `seq 1 10` ; do
      echo -n "."
      sleep 1
    done
    echo "done"
    ) > /dev/console

    so long,


    Hias

    • Official Post

    The problem with autostart is, it runs right at the start of userspace boot which is typically before everything else (including your scripts) ever gets touched. Best is to add some "logging" to your scripts (sending to /dev/console as described above) but schedule the scripts via systemd so they are ordered correctly in the startup sequence.

  • You can simply write to /dev/console. eg try this as autostart.sh:


    Code
    ( 
    echo -n "waiting"
    for i in `seq 1 10` ; do
      echo -n "."
      sleep 1
    done
    echo "done"
    ) > /dev/console

    so long,


    Hias


    Hi Hias,


    Sorry to trouble you again.


    I have tried the above script on another setup with RPi3B+ running LE 9.2.6, but it is not working.

    Is there something which I need to do or enable first?

  • What exactly is not working?


    BTW: also check the journal (run "journalctl -a"), if there's an error in the script or if one of the programs prints to stderr you should see it there.


    so long,


    Hias

  • You can simply write to /dev/console. eg try this as autostart.sh:


    Code
    ( 
    echo -n "waiting"
    for i in `seq 1 10` ; do
      echo -n "."
      sleep 1
    done
    echo "done"
    ) > /dev/console

    so long,


    Hias


    Hi Hias, I did a fresh installation of LE 9.2.6 for my other RPi 3B+ setup.

    Applied the above same script, as what I have tested previously for RPi 4.

    Oddly, it is not showing on the LibreELEC boot screen.


    Is there something I have missed?

  • Check the journal or stop kodi ("systemctl stop kodi"), run the script manually and watch out for errors.


    so long,


    Hias

  • Have tried running the script manually, but did not observe any output or error.

    The script took about 10 sec to run, due to the "for" loop.


    Also checked the journal and paste it in the link below. Can't seem to identify the error either.


    External Content pastebin.com
    Content embedded from external sources will not be displayed without your consent.
    Through the activation of external content, you agree that personal data may be transferred to third party platforms. We have provided more information on this in our privacy policy.

  • Nothing unusual in the logs, no idea what's going wrong.


    The script worked fine when I tested it on my LE 9.2.6 RPi4.


    I'd suggest testing with a direct echo to the console with kodi stopped. eg "echo hello > /dev/console"


    so long,


    Hias


  • Tried that on RPi3. Does not work either.


    Have fresh installed LE 9.2.6 on RPi3 and RPi4. Configured the same "for loop" script in autostart.sh on both setups.

    Oddly, it only worked on RPi4.


    Or output to a file instead of console for testing script..

    Hahahaha.. This might sound silly...


    I am running LibreELEC and RetroPie on a single SD card with a customised PINN setup.

    It is configured to run LibreELEC by default, where I can toggle to RetroPie upon reboot.


    At initial boot, a script will resize RetroPie partition to the maximum available space.

    It would take about 30 seconds to complete, depending on the card.

    Thought it would be cool to display the progress, than to see a "frozen" screen. 8o

    Edited 2 times, last by darkblaster77: Merged a post created by darkblaster77 into this post. ().

  • Have fresh installed LE 9.2.6 on RPi3 and RPi4. Configured the same "for loop" script in autostart.sh on both setups.

    Oddly, it only worked on RPi4.

    I just had a look and, yes, it won't work on LE 9.2/RPi0-3 which uses the legacy graphics driver.


    In order to save a bit of memory the console is unbound and the framebuffer reconfigured to 1 pixel size (via an ugly hack in kodi). This was added in ancient times and I completely forgot we had that in LE...


    RPi4 on LE9 and also RPi2-4 on LE10 don't use the legacy graphics stack so /dev/console will work fine there.


    so long,


    Hias

  • Hi Hias,


    Sorry for the unusual request, and thank you for your time and help.


    Good to know that this feature will be supported in LE10 for RPi2 to 4.