Contents
While connecting an XBOX One controller to your stock TX2 Ubuntu via Bluetooth is rather straightforward, there is something you need to tweak to make it work flawlessly.
The major issue regarding connecting a XBOX One controller to a stock Ubuntu is that the XBOX One controller does not support Enhanced Re-Transmission Mode (ERTM) while most Ubuntu systems have this mode enabled by default. This causes errors when trying to pair a XBOX One controller to the systems.
[Step 1] Disable Enhanced Re-Transmission Mode (ERTM)
Before paring a XBOX One controller, the enhanced retransmission mode must be disabled. Use the following commands to do so:
sudo -i echo 1 > /sys/module/bluetooth/parameters/disable_ertm exit # to verify the value, it should print 1 cat /sys/module/bluetooth/parameters/disable_ertm
However, you will have to run this command every time you boot. To avoid the hassle, let’s create a configuration file and make it effective upon booting up:
sudo vim /etc/modprobe.d/bluetooth.conf
Add the following line in the file:
options bluetooth disable_ertm=Y
Now that every time you boot, ERTM should be disabled automatically.
[Step 2] Pair XBOX One Controller
Follow the usual steps to pair your XBOX One via Bluetooth.
[Step 3] Find Device Path
Typically your controller, once paired (or plugged in if wired), is assigned a device path as “/dev/input/js0”. It may also be under a different path if you have different configurations. To check the exact device path/name, see what pops up:
ls /dev/input | grep js
[Step 4] Test Input
A easy way to test if your controller works is by using the “jstest” tool. Install and run the test with the device path you found from last step:
sudo apt install jstest-gtk jstest /dev/input/js0
Now you should be able to see changes in values on your screen when touching your controller.
References
- https://www.reddit.com/r/RetroPie/comments/aakkop/xbox_one_s_controller_disable_ertm_persist_on/