Skip to Content

Game Controller Support

Linux provides excellent support for mainstream game controllers. This article explains how to use Xbox, PlayStation, and Nintendo Switch controllers on Ubuntu 26.04.

Basic Setup

The Ubuntu 26.04 kernel has built-in drivers for most controllers. Ensure the necessary components are installed:

sudo apt install joystick jstest-gtk -y

Detecting Controllers

After connecting a controller, check whether the system recognizes it:

# View input devices ls /dev/input/js* cat /proc/bus/input/devices | grep -A 5 "Gamepad\|Controller\|Joystick" # Use evtest for detailed information sudo apt install evtest -y sudo evtest

Graphical Testing Tool

# jstest-gtk graphical controller test jstest-gtk # Or use command-line testing jstest /dev/input/js0

Xbox Controllers

Xbox Wired Controllers

Xbox 360 and Xbox One/Series wired controllers work out of the box on Linux:

# The xpad kernel driver is loaded by default lsmod | grep xpad

Simply plug in the USB cable to use.

Xbox Wireless Controllers (Bluetooth)

Xbox Series controllers support Bluetooth connections:

  1. Press and hold the pairing button on the controller (small button on top)
  2. Open Ubuntu Settings > Bluetooth
  3. Search for and connect Xbox Wireless Controller

Xbox Wireless Adapter

Using the official Xbox wireless adapter requires the xone driver:

# Install dependencies sudo apt install dkms cabextract -y # Clone and install xone git clone https://github.com/medusalix/xone cd xone sudo ./install.sh # Download firmware sudo xone-get-firmware.sh

xpadneo (Enhanced Bluetooth Driver)

xpadneo provides better Bluetooth support for Xbox controllers (vibration, battery level display, etc.):

sudo apt install dkms -y git clone https://github.com/atar-axis/xpadneo.git cd xpadneo sudo ./install.sh

PlayStation Controllers

PS4 Controller (DualShock 4)

USB Connection

Simply plug in the USB cable — no additional drivers needed.

Bluetooth Connection

  1. Press and hold the Share and PS buttons simultaneously until the light bar flashes rapidly
  2. Search for and pair Wireless Controller in Ubuntu Bluetooth settings

PS5 Controller (DualSense)

USB Connection

Linux kernel 5.12+ has built-in DualSense driver support. Ubuntu 26.04 fully supports it.

Bluetooth Connection

  1. Turn off the controller
  2. Press and hold the Create and PS buttons simultaneously until the light bar flashes rapidly
  3. Pair in Bluetooth settings

Advanced Features

DualSense adaptive triggers and haptic feedback are partially supported in Steam. Use the dualsensectl tool to control more features:

# Install dualsensectl sudo apt install dualsensectl -y # Set light bar color dualsensectl lightbar 0 0 255 # Check battery level dualsensectl battery # Set microphone LED dualsensectl microphone-led on

PS3 Controller (DualShock 3)

# Connect via USB first, then use Bluetooth sudo apt install bluez-plugins bluez-tools -y # PS3 controllers require a special pairing process # Connect via USB first, then unplug to use Bluetooth

Nintendo Switch Controllers

Switch Pro Controller

USB Connection

Simply plug in and use.

Bluetooth Connection

  1. Press and hold the pairing button on the back of the controller
  2. Search for and pair Pro Controller in Bluetooth settings

Joy-Con

Joy-Cons can connect via Bluetooth, but the joycond daemon is needed to properly combine left and right Joy-Cons. It is not available in the Ubuntu repositories, so build it from source (author DanielOgorchock):

# Install build dependencies sudo apt install build-essential cmake libevdev-dev libudev-dev -y # Build and install from source git clone https://github.com/DanielOgorchock/joycond.git cd joycond cmake -B build cmake --build build sudo cmake --install build sudo systemctl enable --now joycond

Connection steps:

  1. Press and hold the pairing button on the side of each Joy-Con
  2. Pair the left and right Joy-Cons separately
  3. joycond will automatically combine them into a single controller

Steam Controller Configuration

Steam has a powerful built-in controller configuration tool called Steam Input that supports nearly all controllers:

  1. Open Steam > Settings > Controller
  2. Enable support for your controller type
  3. Press the Steam button during a game to open the controller configuration interface

Steam Controller Permission Setup

# Install Steam's udev rules (usually installed with Steam) sudo apt install steam-devices -y # Or manually add permissions sudo usermod -aG input $USER

AntiMicroX (Map Controller to Keyboard)

For games that don’t support controllers, you can map controller buttons to keyboard inputs:

flatpak install flathub io.github.antimicrox.antimicrox -y flatpak run io.github.antimicrox.antimicrox

Controller Calibration

# Graphical calibration with jstest-gtk jstest-gtk # Command-line calibration jscal /dev/input/js0

Common Issues

Controller Not Recognized

# Check USB devices lsusb # Check kernel messages dmesg | tail -20 # Reload driver sudo modprobe -r xpad && sudo modprobe xpad

Unstable Bluetooth Connection

# Restart Bluetooth service sudo systemctl restart bluetooth # Remove pairing and reconnect bluetoothctl # In bluetoothctl: # remove <MAC-address> # scan on # pair <MAC-address> # connect <MAC-address> # trust <MAC-address>

High Controller Latency

Bluetooth connections may have higher latency. For competitive gaming, a USB wired connection is recommended.

ControllerUSBBluetoothNotes
Xbox SeriesPlug and playSupportedWireless adapter needs xone
DualShock 4Plug and playSupportedFull support
DualSensePlug and playSupportedAdvanced features partially supported
Switch ProPlug and playSupportedFull support
Joy-Con-SupportedRequires joycond

Ubuntu 26.04 has mature support for mainstream controllers, and most work plug-and-play in the majority of cases.

Last updated on