Homepage › Forums › RetroPie Project › Everything else related to the RetroPie Project › Input Bugs when launched any way other than manual bash command
Tagged: Input RetroPie Emulationstation
- This topic has 18 replies, 2 voices, and was last updated 9 years, 1 month ago by pancakeykakes.
-
AuthorPosts
-
10/09/2015 at 18:11 #107528pancakeykakesParticipant
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
My setup:
-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
-GPU_MEM=320
-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 #107529petrockblogKeymasterPlease 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 #107531pancakeykakesParticipantTest script:
#!/bin/bash
EmulationstationFor testing purposes, I executing via bash by typing
$ ./test.sh
If I launch Emulationstation manually like this:
$ Emulationstation
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:
#!/bin/bash
echo
echo “$(tput setaf 2)Cleaning up…$(tput sgr 0)”
(sleep 1)
sudo killall emulationstation
(sleep 1)
sudo killall -9 retroarch
(sleep 1)
sudo killall -9 kodi.bin
(sleep 1)
sudo killall xboxdrv
(sleep 1)
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
(sleep 1)
fbset -depth 8 && fbset -depth 16
(sleep 1)
echo “$(tput setaf 2)Ready.”
(sleep 1)
echo “Launching Emulationstation. Game on.$(tput sgr 0)”
(sleep 1)
emulationstation10/09/2015 at 18:42 #107532pancakeykakesParticipantJust 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 #107536pancakeykakesParticipantWhat code would you say I should use to call it directly?
10/09/2015 at 19:10 #107537petrockblogKeymasterOh 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 #107539petrockblogKeymastercould be related to backgrounding the xboxdrv also – run it with –daemon parameter and remove the ampersand ?
10/09/2015 at 19:40 #107542pancakeykakesParticipantSo then change the line that says
emulationstation
To
emulationstation /dev/tty
Yes?
I tried that just now, and although ES launched, the issue is still there.
10/09/2015 at 19:46 #107545pancakeykakesParticipantWell remember, even if I just run a test script that contains
#!/bin/bash
emulationstationby typing
$ ./testscript.shThis still happens. Effectively eliminating xboxdrv interference.
10/09/2015 at 19:48 #107546petrockblogKeymasteryou probably still have it running in the background – did you check ? Maybe you have multiple copies running now :)
10/09/2015 at 19:49 #107547petrockblogKeymasterAlso – did you try launching the ES binary directly ?
10/09/2015 at 20:25 #107552pancakeykakesParticipantSo 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 #107553pancakeykakesParticipantLaunching directly made no difference.
10/09/2015 at 20:39 #107554pancakeykakesParticipantWait a minute. What if I just launch xboxdrv in /dev/tty ?
10/09/2015 at 20:48 #107555petrockblogKeymasterhave 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 #107556pancakeykakesParticipantOn the machine. I know SSH can cause issues.
I’ll try that next when my son calms down.
10/09/2015 at 23:03 #107560pancakeykakesParticipantDaemon won’t run.
‘internal signalling write failed’ libusbx10/09/2015 at 23:12 #107561pancakeykakesParticipantAlso, 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 #107614pancakeykakesParticipantThis is the behavior when using the scripts I have here: github.com/pancakeykakes/TriPi
-
AuthorPosts
- The forum ‘Everything else related to the RetroPie Project’ is closed to new topics and replies.