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 Series X controller wont Pair with RP4

    Scheduled Pinned Locked Moved Help and Support
    xboxcontrollerpairingissues
    38 Posts 19 Posters 23.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.
    • K
      KrazeeTyger
      last edited by

      Just for clarification: did you enter

      Privacy = device
      

      or

      Privacy = device etc
      

      ?

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

        @zdeno84 Try installing the xpadneo driver - https://github.com/atar-axis/xpadneo - and the pair the controller again.

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

          I installed xpadneo and since then the blueetooth behaves a bit weird. Everything works fine with xbox one controller, it connects, works in steamlink. But when I try to pair the xbox series controller, the bluetooth seems to either freeze in some way (the connected xbox one controller dissapears from gui but still works in steamlink) or the xbox series controller connects, but stays in a reconnect loop - on/off/on/off every second.

          I tried to install it through terminal, it pairs, but then terminal freezes and does not accept any keyboard input, so I can not connect/trust.

          I also tried to add privacy = device command to the /etc/bluetooth/main.conf, but terminal tells me permission denied.

          All I need from the raspberry really is to connect through steamlink to my windows pc running games and remote play them plus play some movies from external hdd (or from that same windows pc).

          sorry for all the mistakes, but I just got the raspberry yesterday and not really a linux-versed yet. I would need to connect the xbox series controller(s) for my kids so we can play together some coop. we only have one xbox one controller.

          any advice appreciated

          1 Reply Last reply Reply Quote 0
          • K
            KrazeeTyger
            last edited by

            sudo nano /etc/bluetooth/main.conf

            Z 1 Reply Last reply Reply Quote 0
            • Z
              zdeno84 @KrazeeTyger
              last edited by

              @krazeetyger thanks. I tried everything, but to no avail. fresh installs, retropie, commands you mentioned. xpadneo, etc. in different orders. nope. but at least I learned a lot about pi

              I bought the xbox wireless adapter, installed xow and everything works perfect. 3 controllers, pi, streaming from host pc with both steamlink and parsec.

              L 1 Reply Last reply Reply Quote 0
              • I
                icehousedoo
                last edited by

                Hi All,
                Have similar issue, looks like it's only a problem with the series X controller (has three round buttons just below the xbox power button instead of two). If I use a slightly older controller (two buttons) it connects and works faultlessly.
                Both controllers work fine on a Windows PC.
                I'll keep investigating.

                Cheers

                1 Reply Last reply Reply Quote 0
                • K
                  KrazeeTyger
                  last edited by

                  You'll have to use the newest version of Raspbian from January 2021 and install RetroPie on top of it.
                  Older versions of Raspbian have a bug that prevents the Series X controller from pairing.
                  The pre-made images of RetroPie won't work either as they were made in November 2020.

                  F 1 Reply Last reply Reply Quote 0
                  • F
                    FrozenNL @KrazeeTyger
                    last edited by FrozenNL

                    @krazeetyger thanks mate, I can confirm it works except for LT and RT buttons, at this moment LT and RT buttons do not work it simply does not register in configuration of buttons, anyone have a solution for that or did I do something wrong?


                    LT and RT registration test (jstest):

                    I did

                    jstest /dev/input/js0
                    

                    after installing jstest with:

                    sudo apt-get install -y jstest-gtk
                    

                    and I see some action when pressing LT and RT

                    output jstest (no buttons pressed):

                    Driver version is 2.1.0.
                    Joystick (Xbox Wireless Controller) has 9 axes (X, Y, Z, Rx, Ry, Rz, Hat0X, Hat0Y, (null))
                    and 10 buttons (BtnA, BtnB, BtnX, BtnY, BtnTL, BtnTR, BtnSelect, BtnStart, BtnThumbL, BtnThumbR).
                    Testing ... (interrupt to exit)
                    Axes:  0:     0  1:     0  2:-32767  3:     0  4:     0  5:-32767  6:     0  7:     0  8:     0 Buttons:  0:off  1:off  2:off  3:off  4:off  5:off  6:off  7:off  8:off  9:off
                    

                    Pressing LT registers in jstest as Axes/Axis:

                    Driver version is 2.1.0.
                    Joystick (Xbox Wireless Controller) has 9 axes (X, Y, Z, Rx, Ry, Rz, Hat0X, Hat0Y, (null))
                    and 10 buttons (BtnA, BtnB, BtnX, BtnY, BtnTL, BtnTR, BtnSelect, BtnStart, BtnThumbL, BtnThumbR).
                    Testing ... (interrupt to exit)
                    Axes:  0:     0  1:     0  2: 32767  3:     0  4:     0  5:-32767  6:     0  7:     0  8:-32767 Buttons:  0:off  1:off  2:off  3:off  4:off  5:off  6:off  7:off  8:off  9:off
                    

                    Pressing RT registers in jstest as Axes/Axis:

                    Driver version is 2.1.0.
                    Joystick (Xbox Wireless Controller) has 9 axes (X, Y, Z, Rx, Ry, Rz, Hat0X, Hat0Y, (null))
                    and 10 buttons (BtnA, BtnB, BtnX, BtnY, BtnTL, BtnTR, BtnSelect, BtnStart, BtnThumbL, BtnThumbR).
                    Testing ... (interrupt to exit)
                    Axes:  0:     0  1:     0  2:-32767  3:     0  4:     0  5: 32767  6:     0  7:     0  8: 32767 Buttons:  0:off  1:off  2:off  3:off  4:off  5:off  6:off  7:off  8:off  9:off
                    

                    Axes-8 is shared between LT and RT

                    Axes 2 LT range between -32767 and + 32767 depending of how much pressure is used
                    Axes 5 RT range between -32767 and + 32767 depending of how much pressure is used
                    Axes 8 LT + RT range between -32767 and + 32767 depending of how much pressure is used and which button or combined, it's an balanced axis (default 0)
                    

                    Steps taken to get the controller working so far

                    Installed latest Raspberry Pi OS Desktop or Lite does not matter, just make sure to boot to CLI.
                    Installed RetroPie manual, see: https://retropie.org.uk/docs/Manual-Installation/
                    Installed xpadneo through RetroPie-Setup under Manage packages -> Driver

                    sudo /home/pi/RetroPie-Setup/retropie_setup.sh
                    

                    Add the next line:
                    Privacy = device
                    to /etc/bluetooth/main.conf

                    sudo nano /etc/bluetooth/main.conf
                    

                    Install SDL2 2.0.14:

                    cd ~
                    wget https://www.libsdl.org/release/SDL2-2.0.14.tar.gz
                    tar zxvf SDL2-2.0.14.tar.gz
                    cd SDL2-2.0.14
                    mkdir build
                    cd build
                    ../configure
                    make
                    sudo make install
                    

                    Verify xpadneo is running properly:

                    lsmod | grep hid_xpadneo
                    

                    should output something like:
                    hid_xpadneo 20480 0
                    ff_memless 16384 1 hid_xpadneo

                    if not type in console:

                    sudo modprobe hid_xpadneo
                    

                    verify again.

                    sudo systemctl restart bluetooth
                    
                    sudo bluetoothctl
                    
                    [bluetooth] agent on
                    [bluetooth] default-agent
                    [bluetooth] scan on
                    [bluetooth] pair XX:XX:XX:XX:XX:XX
                    [agent] Accept pairing (yes/no): yes
                    

                    The light on the XBOX controller should now lid constantly which means it's connected, you can configure the buttons in RetroPie except for LT and RT (L2 and R2 equivalent on PSX so to speak).

                    I use a Raspberry Pi 4 with 4GB with the default WLAN/Bluetooth, not an external dongle.

                    Enjoy!

                    M 1 Reply Last reply Reply Quote 1
                    • B
                      billymild
                      last edited by

                      https://retropie.org.uk/forum/topic/6198/xbox-one-controller-via-bluetooth/42?fbclid=IwAR1fkN9puQm2tn0mk_JC8vuh41vpyaGf_yiVPJZvFavZDB5o-pjbSebHp4M

                      F 1 Reply Last reply Reply Quote 0
                      • F
                        FrozenNL @billymild
                        last edited by

                        @billymild Thanks, but there is really no need for this, this is about the Xbox One controller, not the XBOX series X/S controller. Tested it anyways, does not change anything at all. Only problem now is Left Trigger and Right Trigger (LT and RT) is not functional, it's detected by bluetooth, but not in the input configuration in emulationstation.

                        1 Reply Last reply Reply Quote 0
                        • F
                          FrozenNL
                          last edited by FrozenNL

                          Okay, I have added the following to /opt/retropie/configs/all/retroarch-joypads/Xbox Wireless Controller.cfg

                          input_l2_axis = "+2"
                          input_r2_axis = "+5"
                          

                          Now it just works as expected but the controller has some input delay (e.g. input via keyboard is like 200-400ms faster then using the Xbox controller), is there a solution for?

                          If you have disabled ertm ever, just re-enable it:

                          sudo bash -c 'echo 0 > /sys/module/bluetooth/parameters/disable_ertm'
                          

                          to get the default setting, do not touch this setting at all for this controller ( Xbox Series X/S Controller ), it just causes input lag.

                          There is still some minor input lag in comparison to the keyboard (like 50ms), if there is some workaround for which I can try, please let me know (and others ofc.)

                          M 1 Reply Last reply Reply Quote 0
                          • M
                            medwards64 @FrozenNL
                            last edited by

                            @frozennl

                            First - thank you! I finally got the controller working.

                            Now my issue is that I have to run the command "sudo systemctl restart bluetooth" on first boot every time to connect the controller.

                            I've looked into messing with the UDev options, but the it seems ES doesn't see the controller as actually paired.

                            Any thoughts on how to have it auto connect?

                            D 1 Reply Last reply Reply Quote 0
                            • M
                              medwards64 @FrozenNL
                              last edited by

                              @frozennl said in Xbox Series X controller wont Pair with RP4:

                              input_l2_axis = "+2"
                              input_r2_axis = "+5"

                              I've saved those parameters and can't get them to stick through a reboot. What might I be doing wrong?

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

                                @zdeno84 said in Xbox Series X controller wont Pair with RP4:

                                @krazeetyger thanks. I tried everything, but to no avail. fresh installs, retropie, commands you mentioned. xpadneo, etc. in different orders. nope. but at least I learned a lot about pi

                                I bought the xbox wireless adapter, installed xow and everything works perfect. 3 controllers, pi, streaming from host pc with both steamlink and parsec.

                                what bluetooth dongle did you buy?

                                T 1 Reply Last reply Reply Quote 0
                                • T
                                  tinkmaster @luzer
                                  last edited by

                                  @luzer it isn't a Bluetooth dongle, he's talking about the actual Xbox Wireless dongle Microsoft sells for this exact purpose, connecting Xbox controllers to other devices via USB.

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

                                    That is not working for me. I can not pair my xbox series x controller. Light is blinking, not solid and is not working.

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

                                      @FrozenNL I have followed your instructions (using buster build rather than bullseye, as later failed attempting to install RetroPie from the scripts).

                                      I am using Pi3 and inbuilt Bluetooth.

                                      I installed xpadneo and set privacy in conf file as described.

                                      The controller appears to pair, but keeps connecting and disconnecting every second when using bluetoothctl. Seems to be same issue as @zdeno84 had

                                      Do you have any suggestions please?

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

                                        @singingdwarf I got the controller working with USB cable yesterday without any issue, but same problem with Bluetooth connectivity.

                                        1 Reply Last reply Reply Quote 0
                                        • D
                                          defanator @medwards64
                                          last edited by defanator

                                          @medwards64 were you able to avoid restarting bluetooth service after every reboot? I'm having exactly the same issue on retropie and Xbox Wireless Controller (model 1914). The only difference I see in logs is that every first attempt to run bluetooth service includes the following error:

                                          Dec 10 11:11:44 retropie bluetoothd[758]: Failed to set privacy: Rejected (0x0b)

                                          When I restart the service manually, there's no such error, and controller gets connected immediately without any issues.
                                          So far I managed to get the service restarting by including corresponding command into /etc/rc.local, but it definitely is not a solution in long-term.

                                          Just found this one, looks interesting: https://github.com/RPi-Distro/pi-bluetooth/issues/8#issuecomment-467668132

                                          UPDATE: the following solution worked for me: https://github.com/RPi-Distro/pi-bluetooth/issues/8#issuecomment-990936439

                                          Pasting it here just in case:

                                          I decided to proceed with systemd override instead of changing the unit directly, so I did systemctl edit bthelper@ and added the following:

                                          [Unit]
                                          After=hciuart.service bluetooth.service
                                          Before=
                                          
                                          [Service]
                                          ExecStartPre=/bin/sleep 5
                                          

                                          Now everything's good, controller gets connected almost instantly after every reboot without restarting bluetooth service.

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

                                            @KrazeeTyger I know this post is quite old, but I ran into it when trying to pair some 1914 controllers and wanted to post my experience as of 11/30/22 in case anyone comes across this as it's one of the first google results for this issue.

                                            I did this with an RP4 that I installed RetroPie on (not Raspberry Pi OS Lite) from the start.

                                            xpadneo drivers were already installed from when I first set the Pi up with my Xbox One controller.

                                            I removed the xpad driver but that likely has no effect, just wanted to mention it in the off chance that it does make a difference.

                                            These were my steps.....

                                            Update firmware on both controllers out of the box.
                                            Connected one controller to RP4 via USB and configured it.

                                            All commands were done via SSH

                                            This is not necessary I didn't use it.

                                            Sudo bash –c ‘echo 1 > /sys/module/bluetooth/parameters/disable_ertm’ (not sure if this is necessary)
                                            

                                            Added this line to the main.conf file via nano. As of today, this line is actually already there and you don't need to add a line. Just un-comment the line and change the flag to device.

                                            Add Privacy = device to /etc/bluetooth/main.conf under the [General] section - Kudos to the good people at GitHub!
                                            

                                            Restarted the Pi.

                                            sudo systemctl restart bluetooth
                                            

                                            Paired X-Box Series X controller using bluetoothctl command.

                                            The configuration from when I plugged in the controller via USB stuck and I didn't need to reconfigure. Also, when I paired the second controller, it picked up the configuration from the first controller and I didn't need to configure it at all.

                                            Multiple restarts of the RP4 and consistent connection was apparent with no issues.

                                            Good work @KrazeeTyger

                                            R 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.