Skip to content

Instantly share code, notes, and snippets.

@Xrayez
Last active May 2, 2026 01:24
Show Gist options
  • Select an option

  • Save Xrayez/77eb54707126a469d512aba406269311 to your computer and use it in GitHub Desktop.

Select an option

Save Xrayez/77eb54707126a469d512aba406269311 to your computer and use it in GitHub Desktop.
Fix Bluetooth gamepad trapped in connected/disconnected cycle

Ubuntu-based:

If you can't connect the gamepad at all, try changing/adding this to /etc/bluetooth/input.conf:

ClassicBondedOnly=false

then in /etc/bluetooth/main.conf, change/add:

FastConnectable = true
Privacy = device
JustWorksRepairing = always

Don't trust Bluetooth GUI for pairing/trusting/connecting the gamepad. Try bluetoothctl:

$ bluetoothctl
[bluetoothctl] remove [MAC_OF_GAMEPAD]; if needed
[bluetoothctl] scan on
[bluetoothctl] pair [MAC_OF_GAMEPAD]
[bluetoothctl] trust [MAC_OF_GAMEPAD]
[bluetoothctl] connect [MAC_OF_GAMEPAD]

If this doesn't work, try changing the order of pair/trust commands.

All of the above might not be enough. You might need to disable ERTM (Enhanced Re-Transmission Mode):

echo 1 > /sys/module/bluetooth/parameters/disable_ertm

You might need to make this change permanent.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment