Tagged: Input RetroPie Emulationstation
10/09/2015 at 18:11 #107528
I installed RetroPie/es as a standalone environment on top of a fresh Wheezy install.
As a way to help myself be able to use my Pi without a keyboard, I created a script to launch ES by pressing RB on my controller.
As a way to make sure my controller or xboxdrv werenn’t causing conflicts, I made a separate testing script that was literally just a hashbang with the command “Emulationstation”
When running that test script, All input, be it by controller or keyboard, is extremely glitchy when opening RetroPie Setup from within ES, or launch options for ROMs. The glitchy input is also seen being accepted by the terminal in background, some of which actually bleeds through over the menus.
However, if I manually type “Emulationstation” as a command in terminal to launch it, none of this happens.
Maybe Emulationstation needs to be launched with a more complex argument or parameter when launching via script like that, but I am not sure.
If you would like, I can make a short video showing the behavior and post it here
-Fresh Raspbian Wheezy install (latest version before Jessie release) with RetroPie installed as a standalone environment.
-RPI 2 B
-OC’d using RPI 2 preset in Raapi-config
-Used latest RetroPie-setup script from github.
-Currently, my /root partition is stored on an external HDD, but I had these issues even when working solely on MicroSD.
EDIT: A video of what goes on. https://vid.me/Vo3p
10/09/2015 at 18:31 #107529
- This topic was modified 1 year, 6 months ago by pancakeykakes. Reason: Added video of issue
Please post your scripts, including details on how the script gets launched etc. note that “emulationstation” is a script itself – the executable is in /opt/retropie/supplementary/emulationstation so you should probably call it directly if launching from some custom code.
10/09/2015 at 18:37 #107531
- This reply was modified 1 year, 6 months ago by buzz.
For testing purposes, I executing via bash by typing
If I launch Emulationstation manually like this:
The bug does not exist.
The end-goal is to have it bound to RB on my controller. But for now I need to be able to figure out how to avoid this bug when launching via script.
This is the script I wrote that is executed when pressing RB on the controller:
echo “$(tput setaf 2)Cleaning up…$(tput sgr 0)”
sudo killall emulationstation
sudo killall -9 retroarch
sudo killall -9 kodi.bin
sudo killall xboxdrv
xboxdrv –trigger-as-button –wid 0 –led 3 –detach-kernel-driver –ui-buttonmap RB=exec:/home/pi/emu.sh –ui-buttonmap LB=exec:/home/pi/kodi.sh –ui-buttonmap GUIDE=exec:/home/pi/killswitch.sh –quiet –silent & sleep 1
fbset -depth 8 && fbset -depth 16
echo “$(tput setaf 2)Ready.”
echo “Launching Emulationstation. Game on.$(tput sgr 0)”
emulationstation10/09/2015 at 18:42 #107532
Just noticed your suggestion about calling it directly.
I didn’t realize the “Emulationstation” call was itself a script. That /could/ be it, but the weird part is I have a similar script for Kodi and it is called the same way. In fact the dev of Kodi explicitly states to call using the “startkodi” script he provides and to not call it directly, so I couldn’t say if your suggestion is right until I can test it.10/09/2015 at 18:50 #107536
What code would you say I should use to call it directly?10/09/2015 at 19:10 #107537
Oh your script is not being launched from a tty – so that’s why.
launch emulationstation with /dev/tty on the end ? or run your script with the above from whatever is triggering it.10/09/2015 at 19:27 #107539
could be related to backgrounding the xboxdrv also – run it with –daemon parameter and remove the ampersand ?10/09/2015 at 19:40 #107542
So then change the line that says
I tried that just now, and although ES launched, the issue is still there.10/09/2015 at 19:46 #107545
Well remember, even if I just run a test script that contains
This still happens. Effectively eliminating xboxdrv interference.10/09/2015 at 19:48 #107546
you probably still have it running in the background – did you check ? Maybe you have multiple copies running now 🙂10/09/2015 at 19:49 #107547
Also – did you try launching the ES binary directly ?
10/09/2015 at 20:25 #107552
- This reply was modified 1 year, 6 months ago by buzz.
So if xboxdrv doesn’t run at all, it functions fine, but that removes my ability to attach commands to the controller buttons which is the whole purpose of my script– to be able to send a kill command to ES in order to launch Kodi, effectively eliminating the need for a keyboard.
Sure it squashes the input bug, but makes my scripts pointless.10/09/2015 at 20:26 #107553
Launching directly made no difference.10/09/2015 at 20:39 #107554
Wait a minute. What if I just launch xboxdrv in /dev/tty ?10/09/2015 at 20:48 #107555
have you tried launching xboxdrv manually with –daemon and then trying the simple script ? are you testing this on the machine itself or via ssh ?10/09/2015 at 20:51 #107556
On the machine. I know SSH can cause issues.
I’ll try that next when my son calms down.10/09/2015 at 23:03 #107560
Daemon won’t run.
‘internal signalling write failed’ libusbx10/09/2015 at 23:12 #107561
Also, I have a hunch about something.
Do you know how to tell it to emulate the press of the “enter” key via bash script?
I feel like that may have something to do with it, based on having to press enter to get a ‘pi@raspberrypi’ prompt to show up after executing a different, unrelated script.10/10/2015 at 19:21 #107614
Forums are currently read only - please visit the new RetroPie forums at https://retropie.org.uk/forums/