Xbox Series X controller wont Pair with RP4
-
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
-
sudo nano /etc/bluetooth/main.conf
-
@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.
-
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
-
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. -
@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 -> Driversudo /home/pi/RetroPie-Setup/retropie_setup.sh
Add the next line:
Privacy = device
to /etc/bluetooth/main.confsudo 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_xpadneoif 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!
-
-
@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.
-
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.)
-
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?
-
@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?
-
@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?
-
@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.
-
That is not working for me. I can not pair my xbox series x controller. Light is blinking, not solid and is not working.
-
@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?
-
@singingdwarf I got the controller working with USB cable yesterday without any issue, but same problem with Bluetooth connectivity.
-
@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.
-
@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
-
@skizzles I am using buster in Retropie. I just bought an Xbox series S/X controller and to my surprise, there is no video explaining how to connect this with Retropie. All videos mention either 360 or Xbox one controllers which although similar have differences in connection. I followed the steps above and was able to connect this to pie but the connection was not persistent. Even xpadneo drivers didn't make the connection persist. And I made the following tweaks after experimenting and watching other videos. I have to share them in a noob-proof manner here so that I don't forget the steps. I request mods not delete this post as it was a headache to make it work.
Steps (Slightly modified to make them persistent): make sure to connect a keyboard as well for settings.
- Update firmware on the Xbox series s controller through windows computer.
- Now get inside Retropie Setup>Manage packages>Drivers>Removed Xpad drivers (although it might not be necessary). Also, install Xpadneo drivers if not already installed. then Reboot
- I pressed F4 in Retropie and opened the command prompt terminal.
- Now open "main.conf" file as mentioned in the above post located inside "/etc/bluetooth/main.conf" and search for Privacy = off. Change that to:
Privacy = device
make sure to remove "#" before Privacy=device to enable the command if it is there. Press Ctrl+X then "Y" and ENTER key to save the file.
5. On the command prompt type "sudo nano /opt/retropie/configs/all/autostart.sh"
6. Enter (these 2 lines must be entered above "emulationstation #auto" to make them persistent. When 'ertm' is disabled the Bluetooth needs to be refreshed to connect the Xbox series s controller on reboot. So, both lines are necessary.sudo bash -c 'echo 1 > /sys/module/bluetooth/parameters/disable_ertm' sudo systemctl restart bluetooth emulationstation #auto
Press Ctrl+X then "Y" and ENTER key to save the file.
Type "sudo reboot" on the command prompt to restart. Again press F4 in the emulation station to enter the terminal.
7. Make sure that you xbox controller bluetooth is in connection mode. Press the button in front of the controller so that the xbox light will blink fast for pairing. Now Enter in terminal:sudo bash -c 'echo 1 > /sys/module/bluetooth/parameters/disable_ertm' sudo systemctl restart bluetooth sudo bluetoothctl scan on (Note the mac address of your controller that is listed after this command. It's unique for every controller. For eg mine was "44:16:22:DB:C9:8E". Type this command again if your device is not shown initially) sudo bluetoothctl pair 44:16:22:DB:C9:8E (Use your own mac address discovered above) sudo bluetoothctl connect 44:16:22:DB:C9:8E sudo bluetoothctl trust 44:16:22:DB:C9:8E
If all these steps are successful then you can also type " bluetoothctl paired-devices" command to see whether your controller is paired successfully or not. Your device mac address must be shown after this command is entered.
then sudo reboot and restart your pi.
Press the Xbox icon(Light must blink) so that Pi4 sees it as it is starting up. At this point, you might also need to re-enter your controller keys according to your needs. And it should all work from here.
Note: Bluetooth GUI under settings didn't work for connecting to the Xbox Series s/X controller for me. I don't know why? Only connecting through the terminal worked. Deviating from the above steps didn't work for me. And so I had to write the step wise guide on what is currently working.
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.