With Proton and modern game distribution platforms transforming Linux into a premier desktop gaming environment, connecting gamepads, flight sticks, and retro controllers to Ubuntu has become a routine activity. Linux features excellent native kernel support for PlayStation DualSense, Xbox Wireless, Nintendo Switch Pro, and generic USB controllers. However, when an analogue stick develops deadzone drift or trigger axes fail to respond properly in games, testing and calibrating your hardware ensures your inputs register with pixel-perfect accuracy.
How Ubuntu Detects Connected Gamepads
When you plug in a USB controller or pair a Bluetooth gamepad, the Linux kernel assigns it two device endpoints under the /dev/input/ directory:
- Event Device (evdev): Modern interface (
/dev/input/event*) providing low-latency multi-touch and pressure-sensitive analog data. - Joystick Device (js): Legacy joystick interface (
/dev/input/js*) used by older emulators and calibration tools.
How to Test Gamepads Graphically with jstest-gtk
The most intuitive way to visually verify every button, trigger axis, and analogue thumbstick is through the lightweight graphical utility jstest-gtk:
- Press
Ctrl + Alt + Tto open the terminal. - Install the testing package by running:
sudo apt update && sudo apt install jstest-gtk joystick - Type your password when prompted and press
Enter. - Once installed, launch the utility by typing
jstest-gtkor searching for jstest-gtk in the Ubuntu application menu. - Select your connected controller from the device list and click Properties.
- A real-time diagnostic window opens displaying visual crosshairs for your analogue sticks and coloured indicators for every physical button. Move your sticks and press triggers to verify smooth, unhindered tracking.
Calibrating Deadzones and Stick Centring
If an analogue stick does not return cleanly to the absolute (0,0) centre coordinate when released, you can calibrate deadzones directly inside the utility:
- In the
jstest-gtkproperties window, click the Calibration button at the bottom. - Follow the step-by-step calibration wizard, sweeping your analogue sticks in full circular rotations.
- Increase the Deadzone threshold slightly if your character or camera moves without touching the physical thumbstick.
- Click Apply to store the updated calibration parameters.
Testing Controllers in the Terminal via jstest
If you are working on an Ubuntu system without a desktop environment or prefer terminal diagnostics:
- Verify your controller endpoint by listing joystick devices:
ls /dev/input/js* - Run the command-line tester against your device (typically
/dev/input/js0):jstest /dev/input/js0 - The terminal screen will stream live numeric values for all axes and digital flags (on/off) for all buttons in real time. Press
Ctrl + Cto exit the diagnostic test.