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

    PS4 Controller not working on external menus

    Scheduled Pinned Locked Moved Help and Support
    contollercontrolsps4 controllersx86 ubuntu
    16 Posts 2 Posters 2.1k 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.
    • L
      LPG
      last edited by

      Pi Model: N/A, x86 running on Optiplex 5080 Ubuntu 18.04.6 LTS
      Power Supply used: N/A
      RetroPie Version Used: 4.7.19
      Built From: Source
      USB Devices connected: BCM20702A0 Bluetooth 4.0
      Controller used: PS4 (Genuine)
      Error messages received: None
      Verbose log (if relevant):
      Guide used: Official Docs
      File: N/A
      Emulator: N/A
      Attachment of config files: Don't know which files to target
      How to replicate the problem: Pair PS4 controller, map keys using RP menu, using PS4 controller scroll over to 'RetroPie', select RetroPie Setup, Controller is unable to control setup window, cannot scroll or make any selections. Have to use the keyboard on the setup. Also unable to change ROM settings (Press "a" during game launch).

      I have installed RT on an x86 MicroDesktop and running Ubuntu 18.04 LTS. Previously I was running on a Pi4 but quickly outgrew the performance on that so I switched over to something more powerful.
      I got RT installed, configured some OS settings like audio, auto signing, sudoer access, etc. Then came time to add controllers.

      My previous PS3 controller which worked without issues on the Pi4 didn't work at all on either driver so I said screw it, unplugged my PS4 from power, and paired a PS4 controller via Bluetooth (no dsrv4, native BT). After pairing it I mapped the keys in RP and I'm able to scroll through the GUI, select and start a game, even play games and enter the retroarch in-game menu.

      The issue comes in when I want to change a core right after starting a game by pressing a or make any changes in RetroPie-Setup. The PS4 controller won't control any of the "shell" based menus. Things like adding driver packages, pairing Bluetooth, exiting the show IP window, none of those work.

      I feel like this may be caused by a mapping on the underlying OS but I'm not sure where to start looking.

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

        @lpg said in PS4 Controller not working on external menus:

        How to replicate the problem: Pair PS4 controller, map keys using RP menu, using PS4 controller scroll over to 'RetroPie', select RetroPie Setup, Controller is unable to control setup window, cannot scroll or make any selections. Have to use the keyboard on the setup. Also unable to change ROM settings (Press "a" during game launch).

        Can you check if you have installed the joy2key package under the Core packages' section ?

        L 1 Reply Last reply Reply Quote 0
        • L
          LPG @mitu
          last edited by

          @mitu it looks like it is installed.

          80b5fb8e-8512-4b39-b7d2-988b4fdc1c46-image.png

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

            If it's installed, then try running the following command, from the terminal, after exiting EmulationStation:

            python3 /opt/retropie/admin/joy2key/joy2key_sdl.py kcub1 kcuf1 kcuu1 kcud1 0x0a 0x20 0x1b 0x00 kpp knp -d
            

            Try pressing the buttons/d-pad/joystick on the gamepad and see if they get recognized by the joy2key script. If you get any errors during the script execution, then post them here.

            L 2 Replies Last reply Reply Quote 0
            • L
              LPG @mitu
              last edited by

              @mitu Just gave that command a try both on SSH and in the desktop just in case. Both time I got no output when pressing the buttons.

              I did get a message that no joystick devices were found, even though the controller still works fine in games and the RP GUI.
              6ca7ed97-50e5-4f0f-a45b-e6de42f1f88f-image.png

              1 Reply Last reply Reply Quote 0
              • L
                LPG @mitu
                last edited by

                @mitu What's also interesting is that I can see the PS4 controller connected and paired on the Ubuntu BT menu.

                dbf7a4ba-8c0f-4d70-984b-3991e8f29f76-image.png

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

                  @lpg said in PS4 Controller not working on external menus:

                  @mitu What's also interesting is that I can see the PS4 controller connected and paired on the Ubuntu BT menu.

                  That should be normal, the PS4 controller is a regular bluetooth device.

                  I did get a message that no joystick devices were found, even though the controller still works fine in games and the RP GUI.

                  That's the issue I think, though it's weird the controller is not detected by SDL2 (via Python) when it's working in EmulationStation.

                  L 1 Reply Last reply Reply Quote 0
                  • L
                    LPG @mitu
                    last edited by

                    @mitu I had a chance to play around with this some more tonight. I paired my PS3 controller and tried running joy2key_sdl.py with the PS3 controller both wired and using BT.

                    Both yielded the same results or lack of results I should say. I'm digging into the joy2key docs as I'm pretty new to this to see if I can find anything that jumps out at me.

                    L 1 Reply Last reply Reply Quote 0
                    • L
                      LPG @LPG
                      last edited by

                      @lpg After doing some digging I got the controller to work as a keyboard using qjoypad. However, since both qjoypad and RetroPie now have bindings pressing one button is seen as a double press so pressing right once becomes press right twice.

                      I guess that's at least some progress.

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

                        @lpg joy2key functions just like qjoypad. I still can't figure out why it won't work with your setup, but you can use start qjoypad just during the runcommand start screen (and stop it afterwards). See the runcommand scripting support doc page.

                        L 1 Reply Last reply Reply Quote 0
                        • L
                          LPG @mitu
                          last edited by

                          @mitu That seems pretty straightforward. However, how do I get around the issue where both qjoypad and retropie detect the button press so the game thinks the button is being pressed twice?

                          Is it just a matter of not configuring the controller on retropie and only adding it to qjoypad?

                          On a side note, are there any logs I can dig through to try and figure out the original joy2key issue?

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

                            @mitu That seems pretty straightforward. However, how do I get around the issue where both qjoypad and retropie detect the button press so the game thinks the button is being pressed twice?

                            The idea was that you can start qjoypad just during the runcommand launch and then stop it before the game starts from the scripts mentioned on the page I linked, so qjoypad would not active during gameplay.

                            Is it just a matter of not configuring the controller on retropie and only adding it to qjoypad?

                            That's one possibility, but I wouldn't recommend it.

                            On a side note, are there any logs I can dig through to try and figure out the original joy2key issue?

                            The command I've posted in the beginning should log something when the gamepad is detected and active (inputs pressed) or log any errors, other than that there's no other logging involved.
                            Since it seems there's an issue with the pysdl2 module, I'd rather try to upgrade to the latest LTS (20.04) and see if the problem still appears there.

                            L 1 Reply Last reply Reply Quote 0
                            • L
                              LPG @mitu
                              last edited by

                              @mitu I'll swap the HD on my pc and try out 20.04. I didn't know RT would work on it, I was going strictly by what was on the wiki.

                              I'll report back any findings.

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

                                @lpg said in PS4 Controller not working on external menus:

                                I was going strictly by what was on the wiki.

                                The wiki says 18.04 LTS or later in order to emphasise the minimum requirement. You can use a more recent Ubuntu LTS.

                                L 2 Replies Last reply Reply Quote 0
                                • L
                                  LPG @mitu
                                  last edited by

                                  @mitu Welp, that's totally on me. I didn't catch that. That's what I get for skimming for the main things I was looking for.

                                  1 Reply Last reply Reply Quote 0
                                  • L
                                    LPG @mitu
                                    last edited by

                                    @mitu happy to report that after installing 20.04 on another HD I am able to natively use my controllers in the menus. Now to go through the process of redoing all the OS tweaks.

                                    Thanks for all your help @mitu

                                    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.