Splashscreen Stopped Working - GPi 2
-
I'm using a GPI 2 build from about a year ago and just recently updated the setup script at the splashscreen no longer shows. It just goes straight into the ES loading screen.
I've adjusted the time for the image to show. I've tried custom images along with default, still doesn't show up.
I'm just using a simple .png or .jpg image.
Any idea why it has stopped appearing after updating the setup script?
-
Probably same issue as https://github.com/RetroPie/RetroPie-Setup/issues/4086 -
vlc
doesn't support the GPI display. -
@mitu said in Splashscreen Stopped Working - GPi 2:
Probably same issue as https://github.com/RetroPie/RetroPie-Setup/issues/4086 -
vlc
doesn't support the GPI display.Ahh! I did see that but I thought maybe that issue was just for videos. It doesn't look like there is a fix for this even for static images?
-
@mitu said in Splashscreen Stopped Working - GPi 2:
Probably same issue as https://github.com/RetroPie/RetroPie-Setup/issues/4086 -
vlc
doesn't support the GPI display.I did this part:
Create a file in /etc/systemd/system/omxplayer.service (needs root) and add to it:
Description=Show custom splashscreen
DefaultDependencies=no
After=dbus.service
ConditionPathExists=/home/pi/RetroPie/splash-omxplayer.sh[Service]
Type=oneshot
User=pi
ExecStart=/home/pi/RetroPie/splash-omxplayer.sh
RemainAfterExit=yes[Install]
WantedBy=sysinit.targetthen run sudo systemctl daemon-reload && sudo systemctl enable omxplayer.service to make it available.
But this part here is giving me trouble. What exactly do I need to do?
Create the splashscreen script in /home/pi/RetroPie/splash-omxplayer.sh (no root needed here) from where you can call omxplayer .... to play your splashscreen.
What script exactly am I creating there?
I currently have a file called splash-omxplayer.sh in /home/pi/RetroPie that contains the following:
#!/bin/sh ROOTDIR="" DATADIR="" REGEX_VIDEO="" REGEX_IMAGE="" CMD="vlc --intf dummy --quiet --no-video-title-show --play-and-exit" CMD_OPTS="" # VLC doesn't detect the connected HDMI port, defaulting to output on the 1st port # do the detection ourselves and pass the HDMI port as a parameter case "$CMD_OPTS" in *mmal*) HDMI_PORT="$(tvservice -l | grep -o -P -m1 "HDMI \K(.*)")" [ -n "$HDMI_PORT" ] && CMD_OPTS="$CMD_OPTS --mmal-display hdmi-$(($HDMI_PORT+1))" ;; esac # Load user settings . /opt/retropie/configs/all/splashscreen.cfg do_start () { local config="/etc/splashscreen.list" local line local re="$REGEX_VIDEO\|$REGEX_IMAGE" local cmd="$CMD $CMD_OPTS" case "$RANDOMIZE" in retropie) line="$(find "$ROOTDIR/supplementary/splashscreen" -type f | grep "$re" | shuf -n1)" ;; custom) line="$(find "$DATADIR/splashscreens" -type f | grep "$re" | shuf -n1)" ;; all) line="$(find "$ROOTDIR/supplementary/splashscreen" "$DATADIR/splashscreens" -type f | grep "$re" | shuf -n1)" ;; list) line="$(cat "$config" | shuf -n1)" ;; esac if [ "$RANDOMIZE" = "disabled" ]; then local count=$(wc -l <"$config") else local count=1 fi [ $count -eq 0 ] && count=1 [ $count -gt 12 ] && count=12 # Default duration is 12 seconds, check if configured otherwise [ -z "$DURATION" ] && DURATION=12 local delay=$((DURATION/count)) cmd="$cmd --image-duration $delay" local pid if [ "$RANDOMIZE" = "disabled" ]; then tr "\n" "\0" <"$config" | xargs -0 $cmd & 2>/dev/null # get cmd pid (child of xargs) pid=`pgrep -P $!` else $cmd "$line" & 2>/dev/null pid=$! fi echo "$pid" >/dev/shm/rp-splashscreen.pid exit 0 } case "$1" in start|"") do_start ;; restart|reload|force-reload) echo "Error: argument '$1' not supported" >&2 exit 3 ;; stop) # No-op ;; status) exit 0 ;; *) echo "Usage: asplashscreen [start|stop]" >&2 exit 3 ;; esac
But nothing still shows up. And yes, I am still on buster.
-
@mitu I think I got it figured out. I was using the wrong splashscreen.sh script. I took the contents of asplashscreen.sh from /opt/retropie/supplementary/splashscreen and created splash-omxplayer.sh in /home/pi/RetroPie and now it seems to work. Here's what I have in that updated script file:
#!/bin/sh ROOTDIR="/opt/retropie" DATADIR="/home/pi/RetroPie" REGEX_VIDEO="\.avi\|\.mov\|\.mp4\|\.mkv\|\.3gp\|\.mpg\|\.mp3\|\.wav\|\.m4a\|\.aac\|\.ogg\|\.flac" REGEX_IMAGE="\.bmp\|\.jpg\|\.jpeg\|\.gif\|\.png\|\.ppm\|\.tiff\|\.webp" # Load user settings . /opt/retropie/configs/all/splashscreen.cfg is_fkms() { if grep -q okay /proc/device-tree/soc/v3d@7ec00000/status 2> /dev/null || grep -q okay /proc/device-tree/soc/firmwarekms@7e600000/status 2> /dev/null ; then return 0 else return 1 fi } do_start () { local config="/etc/splashscreen.list" local line local re="$REGEX_VIDEO\|$REGEX_IMAGE" local omxiv="/opt/retropie/supplementary/omxiv/omxiv" case "$RANDOMIZE" in disabled) line="$(head -1 "$config")" ;; retropie) line="$(find "$ROOTDIR/supplementary/splashscreen" -type f | grep "$re" | shuf -n1)" ;; custom) line="$(find "$DATADIR/splashscreens" -type f | grep "$re" | shuf -n1)" ;; all) line="$(find "$ROOTDIR/supplementary/splashscreen" "$DATADIR/splashscreens" -type f | grep "$re" | shuf -n1)" ;; list) line="$(cat "$config" | shuf -n1)" ;; esac if $(echo "$line" | grep -q "$REGEX_VIDEO"); then # wait for dbus while ! pgrep "dbus" >/dev/null; do sleep 1 done omxplayer --no-osd -o both -b --layer 10001 "$line" elif $(echo "$line" | grep -q "$REGEX_IMAGE"); then if [ "$RANDOMIZE" = "disabled" ]; then local count=$(wc -l <"$config") else local count=1 fi [ $count -eq 0 ] && count=1 [ $count -gt 12 ] && count=12 # Default duration is 12 seconds, check if configured otherwise [ -z "$DURATION" ] && DURATION=12 local delay=$((DURATION/count)) if [ "$RANDOMIZE" = "disabled" ]; then "$omxiv" --once -t $delay -b --layer 10001 -f "$config" >/dev/null 2>&1 else "$omxiv" --once -t $delay -b --layer 10001 -r "$line" >/dev/null 2>&1 fi fi exit 0 } case "$1" in start|"") do_start & ;; restart|reload|force-reload) echo "Error: argument '$1' not supported" >&2 exit 3 ;; stop) # No-op ;; status) exit 0 ;; *) echo "Usage: asplashscreen [start|stop]" >&2 exit 3 ;; esac
Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.
Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.