How to Set Up Game Controllers on Arch Linux
Categories:
6 minute read
Whether you’re a casual gamer or a dedicated enthusiast, Arch Linux offers powerful flexibility when it comes to configuring hardware—including game controllers. While gaming on Linux used to be a bit of a headache, today’s support for gamepads and peripherals has improved dramatically. Thanks to modern kernel modules, open-source drivers, and robust community tools, you can get your controller working smoothly on Arch Linux with just a bit of setup.
In this guide, we’ll walk through how to set up and configure game controllers on Arch Linux. We’ll cover everything from basic USB/Bluetooth recognition to troubleshooting, testing tools, and even advanced configurations for Steam and emulators.
1. Prerequisites and System Preparation
Before diving into configuration, make sure your Arch system is up-to-date:
sudo pacman -Syu
You’ll also want to install some essential packages that help with controller detection and testing:
sudo pacman -S joystick jstest-gtk evtest
These utilities are particularly useful for identifying input issues, dead zones, and button mappings.
2. Understanding Controller Support in Linux
Game controller support in Linux depends heavily on kernel drivers and input subsystems. The Linux kernel uses the evdev and hid subsystems to handle most modern USB and Bluetooth controllers.
Here’s a quick rundown of supported controllers:
- PlayStation Controllers (DualShock 3, 4, DualSense) – supported via
hid-sony
- Xbox Controllers – supported via
xpad
(orxpadneo
for Xbox One/Series) - Switch Pro Controllers – supported via
hid-nintendo
- Generic USB Controllers – most are plug-and-play with
usbhid
To check if your controller is recognized by the kernel, plug it in and run:
dmesg | grep input
You can also verify detection with:
ls /dev/input/js*
ls /dev/input/event*
These entries confirm your device is being picked up by the system.
3. Configuring Xbox Controllers
a. Wired Xbox Controllers
Most wired Xbox 360/One controllers are supported out of the box with the default xpad
kernel driver:
lsmod | grep xpad
If not loaded, you can manually load it:
sudo modprobe xpad
b. Wireless Xbox Controllers
For Xbox One or Series X/S controllers via Bluetooth, you may want to install the community driver xpadneo
, which offers better support for vibration, battery reporting, and more.
Install xpadneo
yay -S dkms xpadneo-dkms-git
Enable DKMS to auto-load the module:
sudo modprobe hid_xpadneo
You can confirm it’s working by checking:
dmesg | grep xpadneo
To make the module load on boot:
echo hid_xpadneo | sudo tee -a /etc/modules-load.d/xpadneo.conf
4. Configuring PlayStation Controllers
PlayStation controllers are supported via the hid-sony
kernel module, which is typically included in the Linux kernel.
a. Wired Connection (DualShock 3/4, DualSense)
Simply plug the controller via USB, and it should be recognized. Confirm with:
dmesg | grep sony
b. Bluetooth Connection
Ensure bluetooth
is enabled and running:
sudo systemctl enable bluetooth.service
sudo systemctl start bluetooth.service
Put the controller in pairing mode:
- DualShock 4: Hold Share + PS until light bar flashes
- DualSense: Hold Create + PS
Use bluetoothctl
to pair:
bluetoothctl
Then enter:
power on
agent on
default-agent
scan on
When the controller appears:
pair XX:XX:XX:XX:XX:XX
connect XX:XX:XX:XX:XX:XX
trust XX:XX:XX:XX:XX:XX
Exit with quit
.
c. Persistent Bluetooth Connection
If the controller doesn’t auto-connect on reboot, consider adding a udev rule or using bluez-tools
to maintain persistent pairing.
5. Configuring Nintendo Switch Controllers
The hid-nintendo
module supports Nintendo Switch Pro controllers and Joy-Cons. The module has been in the Linux kernel since version 5.16.
Check if the module is loaded:
lsmod | grep hid_nintendo
If not, you can enable it via:
sudo modprobe hid_nintendo
Enable advanced features (like accelerometer and rumble) by setting module options in /etc/modprobe.d/hid_nintendo.conf
:
options hid_nintendo joycon_combination=1 stick_calibration=1
And regenerate initramfs:
sudo mkinitcpio -P
For Bluetooth pairing, follow the same procedure as with the PlayStation controller using bluetoothctl
.
6. Using jstest-gtk to Test and Calibrate Controllers
Once your controller is connected, test its functionality using jstest-gtk
:
jstest-gtk
This GUI tool lets you:
- See button mappings and axis
- Detect dead zones
- Calibrate the analog sticks
You can also use the terminal version:
jstest /dev/input/js0
7. Steam Controller Support
Steam has excellent controller support on Linux, thanks to its own input layer: Steam Input.
a. Install Steam
sudo pacman -S steam
Enable the Steam runtime and launch Steam. Go to:
Steam > Settings > Controller > General Controller Settings
From here, you can:
- Enable PlayStation/Xbox/Nintendo support
- Remap buttons per game
- Enable desktop configuration
Steam also allows you to use a controller as a mouse/keyboard substitute in Big Picture Mode or on the desktop.
If your controller works in Steam but not in other applications, it might be due to Steam Input overriding system mappings. You can disable this per-game.
8. Using Controllers with Emulators
Emulators like RetroArch, Dolphin, PCSX2, and others support controllers natively.
a. RetroArch
Install it via:
sudo pacman -S retroarch
Most controllers are auto-detected. You can configure inputs in:
Main Menu > Settings > Input > Port 1 Binds
RetroArch also supports hotplugging and mapping profiles for multiple controllers.
b. Dolphin Emulator
Install:
sudo pacman -S dolphin-emu
Configure controllers via:
Controllers > GameCube Controllers > Configure
You can map each button, trigger, and stick manually. Dolphin supports both SDL and evdev input backends.
9. Advanced: Mapping and Customization with antimicrox
or SDL2 Gamepad Tool
a. antimicrox
This tool allows you to map controller buttons to keyboard/mouse input, useful for games that don’t support controllers natively.
Install:
sudo pacman -S antimicrox
Launch the GUI and create a new profile. You can bind actions like:
- D-pad to arrow keys
- Buttons to keyboard input
- Analog sticks to mouse movement
b. SDL2 Gamepad Tool
Some games use SDL’s GameController API, which relies on mappings defined in a database. If your controller isn’t properly detected:
Install the tool:
yay -S sdl2-controllerdb
You can also use sdl2-gamepad-tool
to create your own mappings.
10. Troubleshooting Tips
a. Controller Not Detected
- Re-plug the device and check
dmesg
- Ensure the kernel module is loaded
- Try a different USB port
- For Bluetooth, remove and re-pair the device
b. Incorrect Button Mapping
- Use
jstest-gtk
to identify button indices - Reconfigure in emulator or game settings
- Use
antimicrox
for manual remapping
c. Multiple Controllers Conflict
- Verify
js0
,js1
, etc., withls /dev/input/
- Reorder devices using
udev
rules if necessary
Conclusion
Arch Linux gives you the freedom to configure game controllers exactly how you want—but it does expect you to roll up your sleeves a little. Whether you’re using a USB Xbox controller, a Bluetooth-enabled DualSense, or a Switch Pro controller, modern kernel support and open-source tools make setup more accessible than ever.
With tools like jstest-gtk
, antimicrox
, Steam Input, and thoughtful emulator configuration, you can game on Arch Linux with a level of control and customization that rivals any other platform. Once configured, your controller should work consistently across native games, Steam, and emulators alike.
Feedback
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.