Viewing 19 posts - 1 through 19 (of 19 total)
  • Author
    Posts
  • pancakeykakes
    Participant
    Post count: 14

    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

    petrockblog
    Keymaster
    Post count: 1827

    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.

    pancakeykakes
    Participant
    Post count: 14

    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

    pancakeykakes
    Participant
    Post count: 14

    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.

    pancakeykakes
    Participant
    Post count: 14

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

    petrockblog
    Keymaster
    Post count: 1827

    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.

    petrockblog
    Keymaster
    Post count: 1827

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

    pancakeykakes
    Participant
    Post count: 14

    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.

    pancakeykakes
    Participant
    Post count: 14

    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.

    petrockblog
    Keymaster
    Post count: 1827

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

    petrockblog
    Keymaster
    Post count: 1827

    Also – did you try launching the ES binary directly ?

    pancakeykakes
    Participant
    Post count: 14

    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.

    pancakeykakes
    Participant
    Post count: 14

    Launching directly made no difference.

    pancakeykakes
    Participant
    Post count: 14

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

    petrockblog
    Keymaster
    Post count: 1827

    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 ?

    pancakeykakes
    Participant
    Post count: 14

    On the machine. I know SSH can cause issues.

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

    pancakeykakes
    Participant
    Post count: 14

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

    pancakeykakes
    Participant
    Post count: 14

    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.

    pancakeykakes
    Participant
    Post count: 14

    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.