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

    Wireless Xbox 360 controller issues in Kodi 16.1 on RetroPie 4.0.1

    Scheduled Pinned Locked Moved Help and Support
    kodixbox360xpad
    16 Posts 5 Posters 16.7k 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.
    • B
      backstander
      last edited by backstander

      Pi Model: 3 B
      Built From: SD Image

      I was using RetroPie 3.8.1, 4.0-rc1 then rc2 and Kodi was working great with my Xbox 360 controller. Then I did a fresh SD image for RetroPie 4.0 then updated to 4.0.1. I installed Kodi and the first time I load it up it will show the screen and make the boot chime then it immediately went to a black screen for about 2 seconds then goes back to EmulationStation. The 2nd time and after when I start Kodi it just starts moving to the far left and right dpad goes down, left dpad goes up and up and down dpads do nothing.

      The left analog stick does nothing except if you press it in, it will wrap around to the far right but it just keeps going until it stop at the far left again. Pressing in the right analog stick makes it move to the right but then goes back to the far left again.

      It just sound like it is mapped incorrectly but the move to the far left is very odd. I'm not sure which .xml file it uses or I would edit it myself.

      This guy has the same issue as me:
      http://raspberrypi.stackexchange.com/questions/53757/microsoft-xbox-360-pad-and-kodi-mapping-issues-retropie-4-0

      My Xbox controller works just fine everywhere else in RetroPie.

      I also tried removing ~/.kodi directory and it does the 2 second black screen thing like the first time and the 2nd time same as above. Also tried uninstalling Kodi, removing ~/.kodi directory, updating RetroPie Setup script and then reinstalling Kodi but also does the same as above.

      Updated

      To get this working with an Xbox 360 controller, try using my custom joystick.Microsoft.Xbox.360.Controller.xml file and put it into the /usr/share/kodi/system/keymaps/ directory but make sure to make a backup of the original joystick.Microsoft.Xbox.360.Controller.xml file first!

      Please note that the left analog stick is used for navigation because if I used the dpad it moves 2 spots for some reason so now the dpad is for volume up and down.

      herb_fargusH 1 Reply Last reply Reply Quote 0
      • RascasR
        Rascas
        last edited by

        What's the driver you are using ? xpad or xboxdrv ? If you dont know, please post some logs, like runcommand and the kodi.log.

        1 Reply Last reply Reply Quote 0
        • herb_fargusH
          herb_fargus administrators @backstander
          last edited by

          @backstander xboxdrv doesn't work with the latest kernel and the xpad driver with our trigger patches don't work on kodi. So pick your poison.

          In theory kodi 17 should fix it with its swanky new joypad config tool once that's compiled and updated for RetroPie (whenever @Rascas decides to do a new build)

          If you read the documentation it will answer 99% of your questions: https://retropie.org.uk/docs/

          Also if you want a solution to your problems read this first: https://retropie.org.uk/forum/topic/3/read-this-first

          1 Reply Last reply Reply Quote 0
          • B
            backstander
            last edited by backstander

            @Rascas
            I'm using xpad and before on older versions of RetroPie when Kodi worked I was using xboxdrv with downgraded kernel.

            @herb_fargus
            Okay, I guess I'll just have to wait until Kodi 17 is built and working. I was hoping not to downgrade the kernel to use xboxdrv.

            Kodi 16.1 works fine with my little wireless keyboard and from my Android phone using Kore. I just have to turn off my Xbox controller or it will move to the far left on every menu.

            herb_fargusH 1 Reply Last reply Reply Quote 0
            • herb_fargusH
              herb_fargus administrators @backstander
              last edited by

              @backstander if you do want it to work with the current kodi there is probably a way to edit the existing Xbox xml config to change the triggers to button values but it would require changing the whole xml as the button codes changed for most buttons compared to the last default config for the xbox

              If you read the documentation it will answer 99% of your questions: https://retropie.org.uk/docs/

              Also if you want a solution to your problems read this first: https://retropie.org.uk/forum/topic/3/read-this-first

              1 Reply Last reply Reply Quote 0
              • B
                backstander
                last edited by

                @herb_fargus I tried making changes to these 2 files but didn't seam to make any difference in Kodi
                /usr/share/kodi/system/keymaps/joystick.Microsoft.Xbox.360.Controller.xml
                ~/.kodi/userdata/keymaps/joystick.xml

                If anyone out there knows how to tell which file Kodi uses for the Xbox 360 controllers, I'd be glad to hack away at it and if I get something to work I'll post my finding here.

                herb_fargusH 1 Reply Last reply Reply Quote 0
                • herb_fargusH
                  herb_fargus administrators @backstander
                  last edited by herb_fargus

                  @backstander make a backup file of /usr/share/kodi/system/keymaps/joystick.Microsoft.Xbox.360.Controller.xml and then delete the file and start from scratch based on https://github.com/retropie/retropie-setup/wiki/KODI#joypad-support

                  Might give you a better idea which buttons do what rather than slogging through the conflicts of the default xml

                  If you read the documentation it will answer 99% of your questions: https://retropie.org.uk/docs/

                  Also if you want a solution to your problems read this first: https://retropie.org.uk/forum/topic/3/read-this-first

                  1 Reply Last reply Reply Quote 0
                  • B
                    backstander
                    last edited by backstander

                    After some playing around with the joystick.Microsoft.Xbox.360.Controller.xml file and running jstest /dev/input/js0 I discovered that what the jstest number is you have to add 1 to it for the xml file. For example if the jstest says button A = 0 then button A = 1 in the xml file.

                    Here is my mapping for my setup (if I redo the whole file I'll post it to Pastebin because it will probably be big):

                    <!-- Linux alterations for default Xpad Driver -->
                    
                    <!-- Button Mappings in Windows:               -->
                    <!--                                           -->
                    <!-- ID              Button                    -->
                    <!--                                           -->
                    <!-- 1               A                         -->
                    <!-- 2               B                         -->
                    <!-- 3               X                         -->
                    <!-- 4               Y                         -->
                    <!-- 5               Left Shoulder             -->
                    <!-- 6               Right Shoulder            -->
                    <!-- 7               Left Trigger (linux)      -->
                    <!-- 8               Right Trigger (linux)     -->
                    <!-- 9               Back                      -->
                    <!-- 10              Start                     -->
                    <!-- 11              Guide                     -->
                    <!-- 12              Left Stick Button         -->
                    <!-- 13              Right Stick Button        -->
                    <!-- 14              D-Pad Left                -->
                    <!-- 15              D-Pad Right               -->
                    <!-- 16              D-Pad Up                  -->
                    <!-- 17              D-Pad Down                -->
                    
                    <!-- Axis Mappings:                     -->
                    <!--                                    -->
                    <!-- ID              Button             -->
                    <!--                                    -->
                    <!-- 1 limit +1      Left Stick Right   -->
                    <!-- 1 limit -1      Left Stick Left    -->
                    <!-- 2 limit +1      Left Stick Down    -->
                    <!-- 2 limit -1      Left Stick Up      -->
                    <!-- 3 limit +1      Right Stick Right  -->
                    <!-- 3 limit -1      Right Stick Left   -->
                    <!-- 4 limit +1      Right Stick Down   -->
                    <!-- 4 limit -1      Right Stick Up     -->
                    
                    <!-- Hat Mappings for some drivers:   -->
                    <!--                                  -->
                    <!-- ID  Position    Button           -->
                    <!--                                  -->
                    <!-- 1   up          D-Pad Up         -->
                    <!-- 1   down        D-Pad Down       -->
                    <!-- 1   left        D-Pad Left       -->
                    <!-- 1   right       D-Pad Right      -->
                    
                    1 Reply Last reply Reply Quote 0
                    • B
                      backstander
                      last edited by backstander

                      Here is a work in progress of my joystick.Microsoft.Xbox.360.Controller.xml file:

                      http://pastebin.com/8EdGdawL

                      Edit: I should note that this config uses the left analog stick to move through the menus. I tried setting the dpad but no matter what I tried it would move 2 places in the menu so it was like double tapping all the time.

                      1 Reply Last reply Reply Quote 0
                      • B
                        backstander
                        last edited by backstander

                        Just a heads up!

                        I ran sudo apt-get update && sudo apt-get dist-upgrade yesterday and it updated my xpad driver and now the buttons have changed again. I had to use my keyboard to navigate to the Controller Configurations UI in Emulation Station to reconfigure my Xbox 360 controller. Also Kodi 16.1 was completely messed up again so I uninstalled Kodi from the RetroPie Setup Script and completely deleted everything in /usr/share/kodi/. Then I reinstalled Kodi which give me the original joystick.Microsoft.Xbox.360.Controller.xml configurations. Kodi is working except the dpad will move 2 places like it is being double tapped. This was the same issue as before and is why I setup the left analog stick to navigate and the dpad to volume up and down in my custom joystick.Microsoft.Xbox.360.Controller.xml file above.

                        Does anyone know what could fix the dpad double tap in Kodi? No where else in RetroPie has this issue.

                        1 Reply Last reply Reply Quote 1
                        • B
                          backstander
                          last edited by

                          I actually fixed this by just running the Update All Installed Packages from the RetroPie Setup Script. I now have the trigger patched xpad driver again and my joystick.Microsoft.Xbox.360.Controller.xml file works for Kodi again!

                          1 Reply Last reply Reply Quote 1
                          • B
                            beankid
                            last edited by

                            I've followed your suggestion and copied the file into my directory yet when I launch Kodi, nothing changes. It doesn't seem to load the new keymap. It maybe worked once and had the issue of a double press on d-pad left or right and then when I went to relaunch it, it was back to being issue #1 as you described it. I've looked in the logs for Kodi and it seems to be recognizing the input as the 360 wireless controller but not loading the keymap that I've added to the directory. Any suggestions on where I should look to try and narrow this down?

                            herb_fargusH 1 Reply Last reply Reply Quote 0
                            • herb_fargusH
                              herb_fargus administrators @beankid
                              last edited by

                              @beankid just install the kodi 17 update and it will work (it's on the forum if you search it)

                              If you read the documentation it will answer 99% of your questions: https://retropie.org.uk/docs/

                              Also if you want a solution to your problems read this first: https://retropie.org.uk/forum/topic/3/read-this-first

                              1 Reply Last reply Reply Quote 0
                              • B
                                beankid
                                last edited by

                                great that works out!!!! Finally!

                                1 Reply Last reply Reply Quote 0
                                • 8778
                                  877
                                  last edited by

                                  @backstander I tried using you config but then the controller does not work in kodi at all, I ended up downgrading the kernel and it's working fine now in Kodi. Still having trouble with Amiga emulation though..

                                  1 Reply Last reply Reply Quote 0
                                  • B
                                    backstander
                                    last edited by

                                    @Rascas has posted that "Kodi 17 beta 7 available for RetroPie"
                                    https://retropie.org.uk/forum/topic/6308/testing-kodi-17-beta-7-available-for-retropie

                                    This has a kodi-peripheral-joystick addon that should help you get your controllers working in Kodi.

                                    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.