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 -yDetecting 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 evtestGraphical Testing Tool
# jstest-gtk graphical controller test
jstest-gtk
# Or use command-line testing
jstest /dev/input/js0Xbox 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 xpadSimply plug in the USB cable to use.
Xbox Wireless Controllers (Bluetooth)
Xbox Series controllers support Bluetooth connections:
- Press and hold the pairing button on the controller (small button on top)
- Open Ubuntu Settings > Bluetooth
- 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.shxpadneo (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.shPlayStation Controllers
PS4 Controller (DualShock 4)
USB Connection
Simply plug in the USB cable — no additional drivers needed.
Bluetooth Connection
- Press and hold the Share and PS buttons simultaneously until the light bar flashes rapidly
- 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
- Turn off the controller
- Press and hold the Create and PS buttons simultaneously until the light bar flashes rapidly
- 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 onPS3 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 BluetoothNintendo Switch Controllers
Switch Pro Controller
USB Connection
Simply plug in and use.
Bluetooth Connection
- Press and hold the pairing button on the back of the controller
- 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 joycondConnection steps:
- Press and hold the pairing button on the side of each Joy-Con
- Pair the left and right Joy-Cons separately
- 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:
- Open Steam > Settings > Controller
- Enable support for your controller type
- 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 $USERAntiMicroX (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.antimicroxController Calibration
# Graphical calibration with jstest-gtk
jstest-gtk
# Command-line calibration
jscal /dev/input/js0Common Issues
Controller Not Recognized
# Check USB devices
lsusb
# Check kernel messages
dmesg | tail -20
# Reload driver
sudo modprobe -r xpad && sudo modprobe xpadUnstable 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.
| Controller | USB | Bluetooth | Notes |
|---|---|---|---|
| Xbox Series | Plug and play | Supported | Wireless adapter needs xone |
| DualShock 4 | Plug and play | Supported | Full support |
| DualSense | Plug and play | Supported | Advanced features partially supported |
| Switch Pro | Plug and play | Supported | Full support |
| Joy-Con | - | Supported | Requires joycond |
Ubuntu 26.04 has mature support for mainstream controllers, and most work plug-and-play in the majority of cases.