RetroPie forum home
    • Recent
    • Tags
    • Popular
    • Home
    • Docs
    • Register
    • Login
    Please do not post a support request without first reading and following the advice in https://retropie.org.uk/forum/topic/3/read-this-first

    Retropie on Ubuntu: Controller working in emulationstation but not retroarch

    Scheduled Pinned Locked Moved Help and Support
    controllerubuntu 22.04ubuntu 22.04lts
    16 Posts 3 Posters 879 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • S
      submarine
      last edited by

      Hi everybody,

      I installed Retropie on my regular Ubuntu 22 by following these instructions:

      https://retropie.org.uk/docs/Debian/?h=ubuntu

      Everything installed properly. I inserted a basic USB controller and I configured it in emulationstation without any problem. However, when I start a game, the controller does not work at all and the screen is briefly showing this message:

      USB Gamepad (121/17) not configured

      If I go into the Retropie menu and then Retroarch, the Retroarch GUI starts but the controller does not work and I get the same message as above.

      Any idea about what it going on?

      Thanks for your help!

      W 1 Reply Last reply Reply Quote 0
      • W
        WhiteT982 @submarine
        last edited by

        @submarine
        Those numbers are vendor/product ids and need to be added to the controller config. In the .cfg files for the controllers, located in /opt/retropie/configs/all/retroarch-joypads add the following lines

        input_vendor_id="121”
        input_product_id="17”

        Also check for spaces before and after controller names (disconnecting the controller after starting a game helped me to see spaces easily. Some controllers had two spaces at the end or beginning). These must match the input name inside the config file exactly. It’ll be the name at the very top of the file.

        mituM 1 Reply Last reply Reply Quote 0
        • mituM
          mitu Global Moderator @WhiteT982
          last edited by

          @WhiteT982 said in Retropie on Ubuntu: Controller working in emulationstation but not retroarch:

          Those numbers are vendor/product ids and need to be added to the controller config. In the .cfg files for the controllers, located in /opt/retropie/configs/all/retroarch-joypads add the following lines

          Latest RetroPie-Setup should have added the IDs to the controller profile (.cfg file). @submarine can you post the contents of the configuration file of the controller, from the opt/retropie/configs/all/retroarch-joypads/ folder ?

          S 1 Reply Last reply Reply Quote 0
          • S
            submarine @mitu
            last edited by

            Thanks @mitu ,

            I my /opt/retropie/configs/all/retroarch-joypads directory, there is only file named Twin USB Joystick.cfg. I think that file is not for my current controller but a previous one I tried. The input_vendor_id and input_product_id do not match the USB joypad I am trying to use now.

            My current joypad is clearly configured to run properly in Emulationstation...

            Any idea?

            mituM 1 Reply Last reply Reply Quote 0
            • mituM
              mitu Global Moderator @submarine
              last edited by

              @submarine Did you disable the joystick auto-configuration in EmulationStation, from RetroPie-Setup ?

              W S 2 Replies Last reply Reply Quote 0
              • W
                WhiteT982 @mitu
                last edited by

                @mitu
                I just redid my Ubuntu installation in June and still had problems with the ids. Had they been added since then or should I look into updating my retropie-setup?

                Not a big deal for me since mine is working fine just wondered if maybe I was missing something.

                mituM 1 Reply Last reply Reply Quote 0
                • mituM
                  mitu Global Moderator @WhiteT982
                  last edited by mitu

                  @WhiteT982 said in Retropie on Ubuntu: Controller working in emulationstation but not retroarch:

                  I just redid my Ubuntu installation in June and still had problems with the ids. Had they been added since then or should I look into updating my retropie-setup?

                  The code for EmulationStation was added back in April and RetroPie-Setup was modified about the same time.

                  1 Reply Last reply Reply Quote 0
                  • S
                    submarine @mitu
                    last edited by

                    Hi @mitu ,

                    I certainly didn't do that intentionally... How can I check? I can't see such a menu in RetroPie-Setup...

                    Cheers!

                    mituM 1 Reply Last reply Reply Quote 0
                    • mituM
                      mitu Global Moderator @submarine
                      last edited by

                      @submarine said in Retropie on Ubuntu: Controller working in emulationstation but not retroarch:

                      How can I check? I can't see such a menu in RetroPie-Setup...

                      Go into 'Configuration -> Emulationstation' from RetroPie-Setup. Check if 'Auto Configuration' is enabled.

                      S 1 Reply Last reply Reply Quote 0
                      • S
                        submarine @mitu
                        last edited by

                        All right, thanks @mitu . Yes, it is enabled.

                        mituM S 2 Replies Last reply Reply Quote 0
                        • mituM
                          mitu Global Moderator @submarine
                          last edited by mitu

                          @submarine Then I don't understand why the configuration profile is not correctly created. Can run emulationstation from a terminal with

                          emulationstation --debug
                          

                          then try again to configure your input. If the .cfg file is not created in the aforementioned folder (/opt/retropie/configs/all/retroarch-joypads), then post the contents of $HOME/.emulationstation/es_log.txt on pastebin.com and provide the link.

                          Can you also post the output of the following command:

                          cat /proc/bus/input/devices
                          

                          directly in this topic ?

                          1 Reply Last reply Reply Quote 0
                          • S
                            submarine @submarine
                            last edited by

                            Hi @mitu,

                            I started emulationstation in debug mode and reconfigured the joypad. No new file is created in the /opt/retropie/configs/all/retroarch-joypads directory.

                            Here are the logs from emulationstation: https://pastebin.com/tkzHrZES

                            Here is the output of cat /proc/bus/input/devices: https://pastebin.com/9WwU8ade

                            The last entry is the USB joypad.

                            Any idea?

                            mituM 1 Reply Last reply Reply Quote 0
                            • mituM
                              mitu Global Moderator @submarine
                              last edited by

                              @submarine Can you also post the contents of the $HOME/.emulationstation/es_input.cfg file ?

                              S 1 Reply Last reply Reply Quote 0
                              • S
                                submarine @mitu
                                last edited by mitu

                                Hi @mitu ,

                                Sure:

                                <?xml version="1.0"?>
                                <inputList>
                                	<inputConfig type="joystick" deviceName="Twin USB Joystick" vendorId="2064" productId="1" deviceGUID="03000000100800000100000010010000">
                                		<input name="a" type="button" id="1" value="1" />
                                		<input name="b" type="button" id="2" value="1" />
                                		<input name="down" type="axis" id="1" value="1" />
                                		<input name="hotkeyenable" type="button" id="8" value="1" />
                                		<input name="left" type="axis" id="0" value="-1" />
                                		<input name="leftshoulder" type="button" id="6" value="1" />
                                		<input name="lefttrigger" type="button" id="4" value="1" />
                                		<input name="right" type="axis" id="0" value="1" />
                                		<input name="rightshoulder" type="button" id="7" value="1" />
                                		<input name="righttrigger" type="button" id="5" value="1" />
                                		<input name="select" type="button" id="8" value="1" />
                                		<input name="start" type="button" id="9" value="1" />
                                		<input name="up" type="axis" id="1" value="-1" />
                                		<input name="x" type="button" id="0" value="1" />
                                		<input name="y" type="button" id="3" value="1" />
                                	</inputConfig>
                                	<inputConfig type="joystick" deviceName="USB Gamepad" vendorId="121" productId="17" deviceGUID="03000000790000001100000010010000">
                                		<input name="a" type="button" id="1" value="1" />
                                		<input name="b" type="button" id="2" value="1" />
                                		<input name="down" type="axis" id="1" value="1" />
                                		<input name="hotkeyenable" type="button" id="8" value="1" />
                                		<input name="left" type="axis" id="0" value="-1" />
                                		<input name="leftshoulder" type="button" id="4" value="1" />
                                		<input name="right" type="axis" id="0" value="1" />
                                		<input name="rightshoulder" type="button" id="5" value="1" />
                                		<input name="select" type="button" id="8" value="1" />
                                		<input name="start" type="button" id="9" value="1" />
                                		<input name="up" type="axis" id="1" value="-1" />
                                		<input name="x" type="button" id="0" value="1" />
                                		<input name="y" type="button" id="3" value="1" />
                                	</inputConfig>
                                </inputList>
                                

                                The last entry is my joypad.

                                Thanks a lot for your help!

                                Fabrice

                                S 1 Reply Last reply Reply Quote 0
                                • mituM
                                  mitu Global Moderator
                                  last edited by mitu

                                  It looks to me you've deleted the previous es_input.cfg while trying to remove the previous joystick entry ? The configuration file installed by RetroPie contains an additional set of lines, which is used by EmulationStation to run the utility that configures the joystick for other various emulators - including RetroArch. Since those lines are missing, the configuration for RetroArch is not created/generated.

                                  Add the this file, at the beginning, before the 1st joystick inputConfig entry the lines below:

                                  <?xml version="1.0"?>
                                   <inputAction type="onfinish">
                                      <command>/opt/retropie/supplementary/emulationstation/scripts/inputconfiguration.sh</command>
                                    </inputAction>
                                  	<inputConfig type="joystick" deviceName="Twin USB Joystick" vendorId="2064" productId="1" deviceGUID="03000000100800000100000010010000">
                                  ... 
                                  

                                  and then re-configure your joystick again, this time the .cfg for RetroArch should be generated properly.

                                  1 Reply Last reply Reply Quote 0
                                  • S
                                    submarine @submarine
                                    last edited by

                                    Hi @mitu ,

                                    Yes, that worked! Thank you so much! I remember I renamed this file, I didn't realise those lines were needed.

                                    Thanks a lot!

                                    1 Reply Last reply Reply Quote 0
                                    • First post
                                      Last post

                                    Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.

                                    Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.