How can I connect my XBOX Series X|S gamepad to my Linux machine?

Posted on

Problem :

Recently I bought a XBOX Series X|S gamepad. I try to connect it to my Linux PC via Bluetooth but it keeps reconnecting in short cycles. What can I do to make it work?

Solution :

If Bluetooth is not a must, one can connect the gamepad via USB. It will work flawlessly then, even on older machines (Ubuntu 20.04).

If Bluetooth is required four conditions have to be satisfied:

  • a very recent kernel is required (>= 5.11, maybe even >= 5.12)
  • some configurations have to be applied
  • xpadneo has to be used
  • You might have to pair the gamepad again.

According to xpadneo you will need a Bluetooth chipset that supports Bluetooth Low Energy. I use ASUS USB-BT400 with success.

Recent Kernel

Using Ubuntu 20.04 I could not solve the reconnection issue, even when applying the correct configurations. I could not install mainline kernel 5.12 so I updated to 20.10 and then to 21.04. Only when I reached 21.04 the gamepads started to work. Ubuntu 20.10 was not sufficient!. I then installed mainline kernel 5.12 and the gamepads still worked.

Configuring Bluetooth

On the configuration side the following has to be added to /etc/bluetooth/main.conf in section [General]:

Privacy = device
JustWorksRepairing = always
Class = 0x000100
FastConnectable = true

Maybe setting Privacy = device is enough, but I did not try that.


Finally, xpadneo has to be used. Since I use Kernel 5.12 I make sure to use a version of xpadneo that includes commit f17a4e.

Reboot and Repairing

When I migrated from Ubuntu 20.04 to 20.10 and then to 21.04, the gamepad started to work once I arrived. When I reapplied the steps here, I had to repair again after I applied all three steps. In case of trouble, try to reboot and then to repair.

If the above steps cannot resolve the connectivity problem, maybe the resources that helped me can help you too:

Please note that the XBOX Series X|S is known to occasionally reconnect. This will not be resolved by this guide.

According to the Arch Linux Wiki:

The firmware of the Xbox Wireless Controller used to cause loops of
connecting / disconnecting with Bluez. The best workaround for now is
to plug (via a USB cord) the controller to a Windows 10 computer,
download the xbox accessories application, and update the firmware of
the controller.

[…] Disabling ERTM is not required for kernel 5.12+ and there seems
to be some connection tricks that may not be necessary in the future

Obs: this recommended workaround still seems to require kernel 5.12+.

Leave a Reply

Your email address will not be published. Required fields are marked *