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

    Ghost controller showing up

    Scheduled Pinned Locked Moved Help and Support
    7 Posts 2 Posters 3.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.
    • Z
      zekkexavior
      last edited by zekkexavior

      Hi!
      New on the forum and also new to RetroPie.

      I have an aftermarket xbox controller that Im using for the raspberry to play emulator games.
      When I enable the xbox360 driver in the retroarch menu it creates a second controller, and says that both are plugged in. When my friend connects his ps3 controller he ends up being player 3 and it wont work.

      How do I remove the first controller? I tried removing it from some config files but It wont disappear. Only solution is to do a fresh reinstall of the entire SD card.

      EDIT: Forgot to mention that im running this on a brand spanking new RPi 3B

      mediamogulM 1 Reply Last reply Reply Quote 0
      • mediamogulM
        mediamogul Global Moderator @zekkexavior
        last edited by mediamogul

        @zekkexavior

        Jinkies! Let's find out a little more about this ghost. Drop to the command line (f4) and type:

        jstest /dev/input/js1
        

        Next to the word "Joystick" on what should be the third line, make a note of the offending controller's name and post it here. I suspect it's a holdover from when you first mapped your XBox controller. If that's the case, there are a few ways to handle it, but you might be better off just rearranging the controller order.

        Edit: to exit jstest, press ctrl-c on your keyboard and then type:

        emulationstation
        

        RetroPie v4.5 • RPi3 Model B • 5.1V 2.5A PSU • 16GB SanDisk microSD • 512GB External Drive

        Z 1 Reply Last reply Reply Quote 0
        • Z
          zekkexavior @mediamogul
          last edited by

          @mediamogul

          Driver version is 2.1.0.
          Joystick (Xbox Gamepad (userspace driver) #2) has 6 axes (X, Y, Rx, Ry, Hat0X, Hat0Y)
          and 13 buttons (BtnX, BtnY, BtnTl, BtnTr, BtnTR2, BtnSelect, BtnStart, BtnMode, BtnThumbL, BtnThumbR, ?, ?, ?).
          Testing ... (interrupt to exit)
          Axes:   0: etc etc etc
          

          When I first plug in my controller is shows up as Afterglow Xbox controller blablabla (as mentioned, aftermarket controller, its seems that the chip identifies as that), and the led in the center just blinks (It doesnt asign a player). It works though.

          I noticed there was a built in driver to be enabled in the retroarch settings, so I went ahead and did that.
          It then identifies the Xbox Gamepad(userspace driver). Works much better in both mapping and with the leds and such, BUT it does not remove the old unwanted Afterglow Xbox controller mapping.

          mediamogulM 1 Reply Last reply Reply Quote 0
          • mediamogulM
            mediamogul Global Moderator @zekkexavior
            last edited by mediamogul

            @zekkexavior said in Ghost controller showing up:

            it does not remove the old unwanted Afterglow Xbox controller mapping.

            OK, if you want to remove that controller mapping from RetroArch, drop to the command line (f4) and type:

            cd /opt/retropie/configs/all/retroarch-joypads/
            

            Press enter and then type:

            ls
            

            Now, look for the config file that has "Afterglow" in the title. Once you know the full name and extension, type:

            mv ./configfilename ./configfilename.bak2
            

            finally, type:

            emulationstation
            

            Press enter an that should be it. RetroArch should now not be able to grab hold of that controller outside of using the xboxdrv userspace entry.

            RetroPie v4.5 • RPi3 Model B • 5.1V 2.5A PSU • 16GB SanDisk microSD • 512GB External Drive

            Z 1 Reply Last reply Reply Quote 0
            • Z
              zekkexavior @mediamogul
              last edited by

              @mediamogul I've tried the above without success now. I even removed the 'Afterglow' config, but it still recognize two controllers when im configuring input.

              1 Reply Last reply Reply Quote 0
              • Z
                zekkexavior
                last edited by zekkexavior

                Sorry for the double post, but I must say that im suprised that there isn't an easier way to enable/disable plugged in controllers. There should be a menu in the GUI for that IMO.

                The 'ghost controller' appears even when no controllers are plugged in, so seemingly it appears as an virtual device. Strange

                1 Reply Last reply Reply Quote 0
                • mediamogulM
                  mediamogul Global Moderator
                  last edited by mediamogul

                  @zekkexavior

                  I've been doing a ton of experimentation with xboxdrv here lately. Unfortunately, none of that experimentation has involved an actual XBox 360 controller. What I too have found is that it seems to universally grab the events from whatever physical controller it's working with and adds a new virtual device. The rub, as you have noticed here, is that it does nothing to remove or even obfuscate the original physical js device entry if one exists. I was working under the assumption that it would remove the entry when using an actual XBox controller, but apparently it does not.

                  I too am actively considering a few possibilities on how to handle this best, but have not settled on what I would consider a perfect solution. I don't do a lot of multi-player gaming sessions, so it's a problem I plan to put more thought into later, but for now, might I suggest invoking the Rgui during your gaming session and rearranging the controller order to where it is assigned past the number of players that you have. It's not ideal, but it will work.

                  Edit: Also, @meleu has developed a great way to rearrange the controller order. His work can be found at:
                  https://github.com/meleu/Retropie-input-selection

                  RetroPie v4.5 • RPi3 Model B • 5.1V 2.5A PSU • 16GB SanDisk microSD • 512GB External Drive

                  1 Reply Last reply Reply Quote 1
                  • 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.