@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 ;; esacBut nothing still shows up. And yes, I am still on buster.