Homepage Forums RetroPie Project Everything else related to the RetroPie Project Input Bugs when launched any way other than manual bash command

Viewing 19 posts - 1 through 19 (of 19 total)
  • Author
    Posts
  • #107528
    pancakeykakes
    Participant

    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

    #107529
    petrockblog
    Keymaster

    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.

    #107531
    pancakeykakes
    Participant

    Test script:

    #!/bin/bash
    Emulationstation

    For 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)
    emulationstation

    #107532
    pancakeykakes
    Participant

    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.

    #107536
    pancakeykakes
    Participant

    What code would you say I should use to call it directly?

    #107537
    petrockblog
    Keymaster

    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.

    #107539
    petrockblog
    Keymaster

    could be related to backgrounding the xboxdrv also – run it with –daemon parameter and remove the ampersand ?

    #107542
    pancakeykakes
    Participant

    So 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.

    #107545
    pancakeykakes
    Participant

    Well remember, even if I just run a test script that contains

    #!/bin/bash
    emulationstation

    by typing
    $ ./testscript.sh

    This still happens. Effectively eliminating xboxdrv interference.

    #107546
    petrockblog
    Keymaster

    you probably still have it running in the background – did you check ? Maybe you have multiple copies running now :)

    #107547
    petrockblog
    Keymaster

    Also – did you try launching the ES binary directly ?

    #107552
    pancakeykakes
    Participant

    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.

    #107553
    pancakeykakes
    Participant

    Launching directly made no difference.

    #107554
    pancakeykakes
    Participant

    Wait a minute. What if I just launch xboxdrv in /dev/tty ?

    #107555
    petrockblog
    Keymaster

    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 ?

    #107556
    pancakeykakes
    Participant

    On the machine. I know SSH can cause issues.

    I’ll try that next when my son calms down.

    #107560
    pancakeykakes
    Participant

    Daemon won’t run.
    ‘internal signalling write failed’ libusbx

    #107561
    pancakeykakes
    Participant

    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.

    #107614
    pancakeykakes
    Participant

    https://vid.me/Vo3pp

    This is the behavior when using the scripts I have here: github.com/pancakeykakes/TriPi

Viewing 19 posts - 1 through 19 (of 19 total)
  • The forum ‘Everything else related to the RetroPie Project’ is closed to new topics and replies.