How to Test and Calibrate Gamepad and Joystick Controllers in Ubuntu

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:

  1. Press Ctrl + Alt + T to open the terminal.
  2. Install the testing package by running:
    sudo apt update && sudo apt install jstest-gtk joystick
  3. Type your password when prompted and press Enter.
  4. Once installed, launch the utility by typing jstest-gtk or searching for jstest-gtk in the Ubuntu application menu.
  5. Select your connected controller from the device list and click Properties.
  6. 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:

  1. In the jstest-gtk properties window, click the Calibration button at the bottom.
  2. Follow the step-by-step calibration wizard, sweeping your analogue sticks in full circular rotations.
  3. Increase the Deadzone threshold slightly if your character or camera moves without touching the physical thumbstick.
  4. 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:

  1. Verify your controller endpoint by listing joystick devices:
    ls /dev/input/js*
  2. Run the command-line tester against your device (typically /dev/input/js0):
    jstest /dev/input/js0
  3. The terminal screen will stream live numeric values for all axes and digital flags (on/off) for all buttons in real time. Press Ctrl + C to exit the diagnostic test.

Get the best tech tips delivered straight to your inbox.

Join thousands of readers mastering Apple, Google, Microsoft, and Linux.