Trouble setting up Ps2 controller

This topic contains 3 replies, has 1 voice, and was last updated by  brocko 3 years, 4 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
  • #48440


    Hi all,

    I’ve spent a while looking through this forum trying to find out how to set up a PS2 controller (via a usb adaptor) to work with RetroPie.

    I’ve ran

    sudo chown pi /opt/retropie/configs/all/retroarch.cfg
    cd /opt/retropie/emulators/RetroArch/installdir/bin
    sudo ./retroarch-joyconfig -j * >> /opt/retropie/configs/all/retroarch.cfg

    And that let me configure the controller, which was nice, however when I came to play a couple of games, it turns out the button mapping is all wrong.

    So I plan on manually editing the config file. To do that, I need to know what each button press results in, I’ve seen that jstest /dev/input/js0 will let me do this.

    However, when I try to run jstest /dev/input/js0 I just get “-bash: jstest: command not found”

    So how do you run jstest?

    I’m extremely new to all this, so I realise I might be being incredibly stupid, so please treat me as if you are explaining this to your dog!

    Cheers in advance




    So I managed to install jstest (Sudo apt-get install joystick)

    Then I went through sudo ./retroarch-joyconfig -j * >> /opt/retropie/configs/all/retroarch.cfg again

    Now the controller works properly, which is nice – however, When I look in the retroarch.cfg folder (located in /opt/retropie/configs/all) the entire “Joypad buttons” section does not have anything assigned to it, it looks like this:

    # Joypad buttons.
    # Figure these out by using RetroArch-Phoenix or retroarch-Joyconfig.
    # You can use joypad hats with hnxx, where n is the hat, and xx is a string representing direction.
    # E.g. “h0up”
    # input_player1_a_btn =
    # input_player1_b_btn =
    # input_player1_y_btn =
    # input_player1_x_btn =
    # input_player1_start_btn =
    # input_player1_select_btn =
    # input_player1_l_btn =
    # input_player1_r_btn =
    # input_player1_left_btn =
    # input_player1_right_btn =
    # input_player1_up_btn =
    # input_player1_down_btn =
    # input_player1_l2_btn =
    # input_player1_r2_btn =
    # input_player1_l3_btn =
    # input_player1_r3_btn =

    So if thats blank, then where is the actual config file?

    Also, when I try to save the retroarch.cfg file after I’ve edited it (I’m trying to change the exit game/return to emulationstation function from the esc key on the keyboard to a controller button press) I get the message “Can’t open file to write” – how do I edit the cfg file?




    You’ll have to use sudo to edit the retroarch.cfg file. If you scroll down a little further you’ll see further bindings for input_player1 that are uncommented.




    How do I open the retroarch.cfg file with sudo? – I’m still new to this, so I’m a bit stumped!

Viewing 4 posts - 1 through 4 (of 4 total)

Forums are currently read only - please visit the new RetroPie forums at

PLEASE NOTE: All orders that are placed between January 14th and January 28th will be shipped on January 29th. Dismiss