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

    Xbox Analog Sticks Cause Controller to Disconnect

    Scheduled Pinned Locked Moved Help and Support
    controller xboxcontroller issurpi3a+
    12 Posts 2 Posters 1.0k 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
      Bishmanrock
      last edited by

      Hello, happy New Year!

      I'm fairly new to this scene and Pi's in general so apologies if I've missed anything obvious as far as troubleshooting goes, still wrapping my head around half the config files. I've been troubleshooting this for a few weeks now, please find my findings below:

      Backstory: Originally running off a Raspberry Pi 1 with no issues as far as could tell (although didn't use the analog sticks in anger). Upgraded to Raspberry Pi 3 mid-December. Went through the configuration same as the previous device. Using the same controller, I notice that the analog sticks can cause the controller to disconnect.

      Bafflingly, it isn't an instant disconnect. I can rotate one of the sticks fully and things are fine, then rotate the other and the controller will lock up. I can reset and then do the same in reverse - rotate the alternate stick, then the other, then it locks up. For me, this confirms that it's not a specific button/trigger that is causing this.

      In some instances, one rotation of the first stick - or even several rotations of both - won't cause lock up immediately, which makes troubleshooting harder as it's not reliable. I also believe sometimes (but much, much rarer) the controller will lock up without having even touched the analog sticks. In one case the other day, the controller had already locked before I even did anything on the RetroPie main menu. This definitely wasn't witnessed on the Pi 1. While this does suggest that the issue isn't analog button specific, most of the lock ups do seem to be related to the sticks being in use. It should be noted that I can sometimes sit and play for over an hour without these issues (not touching the analog sticks).

      I first noticed these issues when trying to configure the controller. The controller would lock up when I reached the analog stick section. Even now that it's configured, I've tried to go through the configuration again and it often keeps trying to lock up at the same section. With it happening since the initial configuration, not sure if it's a dodgy install or what.

      This has happened in multiple emulators, and also on the RetroPie main screen, ruling out a emulator-specific issue. No lightning bolt icon or similar has been witnessed on screen while using. I upgraded to the official Pi power supply just to rule it out - same issue.

      Unfortunately this makes some specific games unplayable due to their reliance on the analog sticks and I'm tearing my hair out trying to figure out what's causing it to drop out.

      Pi Model or other hardware: Raspberry Pi 3 A+

      Power Supply used: Was a mobile phone cable from mains, now upgraded to Raspberry Pi Official 5V 2.5A Power Adapter

      RetroPie Version Used: RetroPie 4.8

      Built From: Brand new SD, using Raspberry Pi Imager

      USB Devices connected: Only controller, HDMI, and power are plugged in

      Controller used: Xbox 360 wired controller, previously working without issue on prior Pi

      Error messages received: No error, controller just locks up. Power light still shows. No power icon on TV. Pi is still running, the Pi itself does not lock up, only the controller itself. Whatever game is on will keep running (if the character is running to the right when the controller locks, they will be locked running to the right as per the last button press during lock up)

      Verbose log (if relevant): Not sure if relevant, if needed let me know and I'll try and go through the guidance to retrieve

      Guide used: N/A

      File: N/A

      Emulator: N/A - Appears to affect all emulators (PSX and Vectrex are two most recently witnessed in), but also happens on RetroPie main screen too

      Attachment of config files: The Read this First doesn't say which ones are relevant, let me know if there's any specific you need. Here's the Microsoft X-Box 360 pad config file from retroarch-joypads:

      input_device = "Microsoft X-Box 360 pad"
      input_driver = "udev"
      input_enable_hotkey_btn = "10"
      input_r3_btn = "12"
      input_r_y_minus_axis = "-3"
      input_l_btn = "4"
      input_l_btn_label = "L1"
      input_load_state_btn = "4"
      input_r_y_plus_axis = "+3"
      input_up_btn = "h0up"
      input_left_btn = "h0left"
      input_state_slot_decrease_btn = "h0left"
      input_select_btn = "8"
      input_select_btn_label = "Select"
      input_r2_btn = "7"
      input_r2_btn_label = "R2"
      input_r_x_minus_axis = "-2"
      input_l_y_plus_axis = "+1"
      input_l_y_plus_axis_label = "Left Analog Down"
      input_l_x_plus_axis = "+0"
      input_l_x_plus_axis_label = "Left Analog Right"
      input_right_btn = "h0right"
      input_state_slot_increase_btn = "h0right"
      input_l2_btn = "6"
      input_l2_btn_label = "L2"
      input_l_x_minus_axis = "-0"
      input_l_x_minus_axis_label = "Left Analog Left"
      input_r_x_plus_axis = "+2"
      input_l3_btn = "11"
      input_r_btn = "5"
      input_r_btn_label = "R1"
      input_save_state_btn = "5"
      input_l_y_minus_axis = "-1"
      input_l_y_minus_axis_label = "Left Analog Up"
      input_y_btn = "2"
      input_x_btn = "3"
      input_menu_toggle_btn = "3"
      input_down_btn = "h0down"
      input_start_btn = "9"
      input_start_btn_label = "Start"
      input_exit_emulator_btn = "9"
      input_b_btn = "0"
      input_reset_btn = "0"
      input_a_btn = "1"
      input_a_btn_label = "Circle"
      

      How to replicate the problem: Use analog sticks until the controller stops working

      Any ideas appreciated, as I'm running out of them!

      Thank you!

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

        Login via SSH and run

        sudo dmesg -c
        dmesg -w
        

        and then reproduce the issue. Post any messages shown by the 2nd command while the issue happens.

        B 1 Reply Last reply Reply Quote 0
        • B
          Bishmanrock @mitu
          last edited by

          Thank you for getting back to me, apologies it hasn't worked - not sure if I'm misunderstanding something as I'm not familiar with any of the commands

          As per the link you shared, I enabled SSH, downloaded MobaXterm, and connected to it from my main PC via IP. Running sudo dmesg -c brings back a bunch of information.

          dmesg -w doesn't seem to do anything though, I enter and it starts a new line but doesn't do anything else, and when I press buttons on the controller/get the controller to lock up, nothing is displayed via the console on my PC. Is this an indication the command hasn't worked?

          Not sure if of any use, but here's a snippet from the first command where it displays picking up the controller plus a few other bits in red:

          [    7.405370] input: Microsoft X-Box 360 pad as /devices/platform/soc/3f980000.usb/usb1/1-1/1-1:1.0/input/input0
          [    7.406134] usbcore: registered new interface driver xpad
          [    7.454047] brcmfmac: F1 signature read @0x18000000=0x15264345
          [    7.471133] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43455-sdio for chip BCM4345/6
          [    7.472289] usbcore: registered new interface driver brcmfmac
          [    7.739910] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43455-sdio for chip BCM4345/6
          [    7.740071] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43455-sdio for chip BCM4345/6
          [    7.750834] brcmfmac: brcmf_c_preinit_dcmds: Firmware: BCM4345/6 wl0: Jan  4 2021 19:56:29 version 7.45.229 (617f1f5 CY) FWID 01-2dbd9d2e
          [    9.754571] random: crng init done
          [    9.754607] random: 7 urandom warning(s) missed due to ratelimiting
          [   10.160851] 8021q: 802.1Q VLAN Support v1.8
          [   10.238912] uart-pl011 3f201000.serial: no DMA platform data
          [   10.305752] Adding 102396k swap on /var/swap.  Priority:-2 extents:1 across:102396k SSFS
          [   10.559554] brcmfmac: brcmf_cfg80211_set_power_mgmt: power save enabled
          

          If I've been daft, let me know where I've gone wrong and I'll fix it

          Thanks again!

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

            @Bishmanrock said in Xbox Analog Sticks Cause Controller to Disconnect:

            dmesg -w doesn't seem to do anything though,...

            This is supposed to show any system log messages as they appear, the intention here was to check if the controller driver logs from something on the Pi. If nothing comes up, then it means nothing is logged. I expected to see an error message about the controller mis-behaving or maybe something else on the system that would give a clue of why this happens.

            dmesg -c shows the current system log so far and then clears it.

            Can you reproduce the issue only by using jstest, without EmulationStation or any emulator running ? Exit EmulationStation and run

            jstest /dev/input/js0
            

            then try to reproduce the issue and see if the buttons/joysticks 'stick' even if they shouldn't.

            B 1 Reply Last reply Reply Quote 0
            • B
              Bishmanrock @mitu
              last edited by Bishmanrock

              @mitu Thank you, I'm presuming it's still running that command via SSH?

              I've done it and started working through. I've managed to replicate the issue.

              Up/down left/right worked fine, buttons 1-6 worked fine, then it's stuck on button 7 (which is the right shoulder button), showing permanently as 'on', controller no longer responding. Pi itself still running. No button presses acknowledged via the jstest command anymore.

              Will continue testing to see if I can establish a theme of when it happens and if it's only certain buttons/axis, but I can at least confirm I can reproduce it from outside EmulationStation using the above steps.

              EDIT: Just to confirm, when the controller dropped out, I didn't get anything on the console to indicate as such. Just the display of the last known button presses when it cut out.

              EDIT 2: Further test, button 7 worked fine. As did thumbsticks. Could only get a lock up by just jamming buttons on the controller. Last log when it froze:

              Axes:  0:-24442  1:-25477  2:  -884  3:   470  4:     0  5:     0 Buttons:  0:on   1:off  2:off  3:off  4:on   5:off  6:on   7:off  8:off  9:off 10:off 11:off 12:off
              

              Test #3 turned out same was as Test #1. Up/down/left/right fine. X/Y/A/B fine. Shoulder buttons fine until button 7, then locked up again.

              Axes:  0:  2354  1:     0  2:     0  3:   470  4:     0  5:     0 Buttons:  0:off  1:off  2:off  3:off  4:off  5:off  6:off  7:on   8:off  9:off 10:off 11:off 12:off
              

              A further test, where I only pressed shoulder buttons/triggers, worked fine for several pressed each per button, before finally freezing on button 6.

              A different test, where I only cycled through pressing the A/B/X/Y buttons, worked fine for a good few cycles of each button, before finally freezing between button pressed (none of the buttons actively pressed down when it cut out).

              Axes:  0:  2036  1: -2364  2:     0  3:   251  4:     0  5:     0 Buttons:  0:off  1:off  2:off  3:off  4:off  5:off  6:off  7:off  8:off  9:off 10:off 11:off 12:off
              

              So far I can't seem to establish a pattern, this is making even less sense to me now XD

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

                This looks like a gamepad issue. I know it worked before on the other Pi system, but if jstest shows the faulty behavior, there's not much that can be done. Can you try the gamepad on a PC and see if it's doing the same ?

                B 1 Reply Last reply Reply Quote 0
                • B
                  Bishmanrock @mitu
                  last edited by

                  @mitu Thank you - I've done a quick test with an online tool on my Windows PC, and the controller remained responsive throughout, even jamming all the buttons down it didn't lock up and continued to acknowledge button presses

                  What I'll do next is grab a spare controller from a friend to see if I can reproduce the issue on the Pi with a different controller. If I can't, then that confirms it's the controller itself

                  Will report back to confirm outcome either way later - thanks so much for your help

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

                    Sorry, it just dawned on me I do actually have a spare at hand presently. I've been able to replicate the issue on the Pi with this spare, so this doesn't appear to be controller specific (either that or I'm just really unlucky and both are on the out...)

                    For confirmation, this is another wired Xbox 360 controller.

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

                      @Bishmanrock if the gamepad works on another PC, then it's not a problem with it.

                      This kind of unexplained flukes are often cause by an inadequate power source - but you've already replaced that. The only thing that I'd check is whether the USB port is faulty - unfortunately the 3A+ has only one.

                      Is this a brand new 3A+ Pi ? Are you over-cloking the Pi ?

                      B 1 Reply Last reply Reply Quote 0
                      • B
                        Bishmanrock @mitu
                        last edited by

                        @mitu Brand new 3A+, purchased 2022/12/18 from one of the approved resellers listed on the official site. Not overclocked or otherwise tinkered with, just installed RetroPie via the imager software, copied across some of the stuff from the old device via network, and that's it.

                        I'll swap over to keyboard for a bit and do some sessions with that, see if I still experience the drop outs or not. If after that we're out of options, so be it. Appreciate all the help!

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

                          I've played a good few sessions with a keyboard instead and not been able to replicate the issue. I've purposely played games that were worse for freezing with the Xbox controllers, and also had sessions where I just went to town pressing every key I could in an attempt to get it to lock up. The keyboard worked fine throughout, no lock ups observed, so best I can tell this rules out the USB port being faulty.

                          In my head I can only think of two things going on here:

                          • Do controllers draw more power than keyboards? I wonder if, in spite of upgrading the power, there is actually a power issue. I'm not sure why the power symbol isn't showing if that is the case though.

                          • Is it possible something I copied over from the previous Pi isn't playing nice? I thought I only copied over saves/emulator specific settings, but in the absence of anything else I wonder if something is getting in the way.

                          I have a spare SD card, I'll see if I can replicate the issue on a fresh install.

                          EDIT: Confirmed can reproduce issue on fresh install, so appears to be either faulty device or still power somehow. Either way, doesn't appear to be a RetroPie issue, so I'll wrap up here. Thanks for your troubleshooting help!

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

                            Do controllers draw more power than keyboards? I wonder if, in spite of upgrading the power, there is actually a power issue. I'm not sure why the power symbol isn't showing if that is the case though.

                            Could be, usually a keyboard/mouse need about 100 mA, while a gamepad may require more.

                            There was a topic a while ago (see here) that surveyed the power usage for various controllers. It has the command to query the power the controller reported as needed, you can run the command and see what's reported by the Xbox controller.

                            At one time, there was a max_usb_current option for the PI (in config.txt) which increased the power offered by the USB port (600 -> 1200 mA), but now it's on by default and so it's not needed anymore.

                            Is it possible something I copied over from the previous Pi isn't playing nice? I thought I only copied over saves/emulator specific settings, but in the absence of anything else I wonder if something is getting in the way.

                            Highly unlikely - flashing a new image showed it's not that.

                            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.