RetroPie + Attract Mode last nagging issue...
-
Hi all, new to the forum. I've been working on a RetroPie image for a cabinet for a bit, and this is where I am...
RPI3 (3 amp supply) with RetroPie 4.3, Attract mode 2.2.1 installed from source w/SMFL. It's booting completely silently - very clean and well setup for my purposes. The only "Semi-issue" left is text on the console when launching roms. I've done a bazillion searches and read quite a bit of suggestions, but I've yet to find a solution. The closest I've come is compiling a version for windows with LDFLAGS= -mwindows, but this isn't an option in linux and I've been unsuccessful in finding a solution.
It's not a deal breaker, but it's so close to being perfect I'd hate to leave this last bit :-)
-
@mojoatomic Hi. With Linux, sometimes using the
/dev/null 2>&1
at the end of commands in a bash script works to silence things. It basically sends output to a non-existent file. Not sure that this will help you in your situation though.I was wondering whether you could let me know how you achieved the completely silent boot please. (A copy of your config.txt or Attract Mode settings would be brilliant). I'm using Attract Mode too. Thanks.
-
@spud11 said in RetroPie + Attract Mode last nagging issue...:
@mojoatomic Hi. With Linux, sometimes using the
/dev/null 2>&1
at the end of commands in a bash script works to silence things. It basically sends output to a non-existent file. Not sure that this will help you in your situation though.I was wondering whether you could let me know how you achieved the completely silent boot please. (A copy of your config.txt or Attract Mode settings would be brilliant). I'm using Attract Mode too. Thanks.
Truth is, it's not as hard as people make it :-) - you just have to work with what RetroPie is currently doing instead of reinventing the wheel... it just took a bit to figure out how simple it really was.
sudo nano /boot/cmdline.txt - find "tty" - should be tty=1 or tty=2, just change it to tty=3
sudo ~/RetroPie-Setup/retropie_setup.sh
choose "configuration / tools" > x833 "splashscreen" > 5 "manually edit splashscreen list"
change it to /opt/retropie/supplementary/splashscreen/black.png
copy the file I've attached to this post and place it @ /ope/retropie/supplementary/splashscreen/black.pngreboot & Bob's your uncle
This works because the splashscreen is called to focus and the console is in the background on boot - if you remove the splashscreen entirely, you'll get console text during boot.
Also, I know you don't require the detail of this post and could have gone with an abbreviated version, but hopefully this detail will help others with less experience down the road -
-
small error - place the image in /opt, not /ope
-
I thought hiding the text was already done within the image itself...
I have it set to disable the "press any button to configure" screen and then it shows a picture of the game flyer (boxart)
retropie one the main menu > runcommand > lunch menu make disabled > launch menu art make enabled then exit back the ES main menu and launch a game.
-
It hides it for sure in ES, but not in attract mode :-(
-
To be specific, it shows the console text, then the launch image unfortunately
-
@mojoatomic ok I will give this a try tomorrow...
-
@mojoatomic Thanks for the black.png (which I've downloaded) and for the explanation which makes sense. That's very helpful and I will have a go with my Retropie shortly changing the config.txt etc. (It's also great to find someone else who uses Attract Mode too on the forum).
I wonder if something similar could be done with any bash script. With 99% of the emulator configurations I'm using, I'm using runcommand together with a launching.png and the console text hides behind the image automatically. However, I've got 1 or 2 configurations that are bash scripts so don't use runcommand and it's been difficult to find a way to hide all of the console text before a game loads. I'm not sure if that's similar to what you're experiencing. Do you think there might be a way to hide the console text behind black.png when launching games, not just when switching on Retropie?
-
@spud11 That's a great question, and one I've tried as well. So far though, it's been a chicken or the egg thing... have to find a way to do it before the console receives focus. Got to be a way.. but in any case, not a deal breaker.
-
Ok I see your point now. I was able to get mine down to just a brief second but it is there long enough to see it..not sure how to hide it completely.
-
Runcommand.sh is just a bash script and it is basically silent which means there must be some command in that script that silences any text or places it in the background behind the picture which is in the foreground.
I noticed with a few of my Attract Mode bash scripts in Attract Mode Setup that use the echo command heavily that whatever is echoed will show but none of the background command stuff will show at all. Perhaps the echo command could be used to silence text eg echo " " .
Or maybe changing the text colour of any terminal output to black would work.
-
Edit the autostart.sh script found in /opt/retropie/configs/all - comment out the attract command and paste this in the file then save.
setterm -cursor off
stty -echo
clear
attract 2>&1 | grep -o $'\033[2J'Create these two files in the /opt/retropie/configs/all directory:
Then sudo nano runcommand-onstart.sh and paste printf "\033[H\033[2J" into the fileAlso, sudo nano runcommand-onend.sh and paste printf "\033[H\033[2J" into the file
sudo reboot - all text gone. Be warned, this will also remove all console text, even the commands you type on the command line from view - they'll still work, you just won't see any output. I like SSHing into the Pi better anyway.
Problem solved, issue gone
-
@mojoatomic said in RetroPie + Attract Mode last nagging issue...:
printf "\033[H\033[2J"
Hi mojoatomic. Thanks for sticking with this.
I've added the commands to each file. However, it winds up at the terminal with the following error:
grep: Unmatched [ or [^
And as a result doesn't make it into Attract Mode.
I copied and pasted your text so it should work.
autostart.sh
now looks like this:# Original # emulationstation #auto # stty -echo;attract &> /dev/null; stty echo # attract > /dev/null 2>&1 # attract setterm -cursor off stty -echo clear attract 2>&1 | grep -o $'\033[2J'
runcommand-onstart.sh
has this at the start:printf "\033[H\033[2J"
runcommand-onend.sh
now looks like this:#!/bin/sh printf "\033[H\033[2J" sudo killall > /dev/null 2>&1 xboxdrv ### Remove " > /dev/null 2>&1 " from line to see information when xboxdrv ends
-
Sorry, typo on my part...
both the runcommand-onstart.sh and runcommand-onend.sh files should haveprintf "\033\033[2J"
and nothing else in them, then be sure to reboot. My typo was a weird slip of a control character.
-
Here's how it looks now - I'm totally happy with this.
-
@mojoatomic Oddly, I'm still getting the same error using
printf "\033\033[2J"
in both runcommand files. Granted myruncommand-onstart
is fairly long as it's got numerous xboxdrv commands, but I wouldn't have expected any problems.Is the last line of the
autostart.sh
code correct, beingattract 2>&1 | grep -o $'\033[2J'
? -
Best advice here is to make your troubleshooting as simple as possible. I would recommend "sudo cp autostart.sh autostart.sh.original, and the same with the "onstart" and "onend" files - that way you can climb back down the tree if you get into trouble.
Next, clear out those files and populate them per the instructions; there's just not a chance of it not working then. I'll attach my working ones to this post and you can just drop them in for a test if it will help.
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.