Set Up and Use Sport Controllers on Linux

AAA games are now available on Linux. Valve's Steam delivery service and SteamOS are at the forefront of games running on Ubuntu and other Linux operating systems.

However, if you're looking to move to Linux for gaming, there's no doubt one question holding you back: are game controllers compatible with Linux?

Well they are. Here's how to set up a USB or Bluetooth game controller on Linux.

Options for gaming on Linux

There are three ways to play games on Linux:

  • The keyboard and mouse

  • A USB game controller

  • Bluetooth game controller

Each of these has its own advantages and disadvantages. However, they should all work fine.

Connect USB controllers to Linux

It doesn't matter if you're using a vanilla distro, SteamOS, or a retro gaming distro. Game controllers are now widely supported.

Do I need drivers for games on Linux?

Years ago, before Linux games became popular, device drivers for game controllers had to be installed.

Nowadays, the problem with numerous developed Linux operating systems is almost gone. Unless you are using an older Linux operating system for a specific reason (possibly hardware compatibility or other problems), you do not need to install drivers for controllers under Linux.

Drivers are now integrated into the Linux kernel.

Play Linux games with your mouse and keyboard

If you play strategy games or just prefer the keyboard and mouse combo these should work just fine. Laptop keyboards work well for gaming, although most games require a USB mouse rather than the touchpad.

USB keyboards are also perfect for gaming on Linux, especially if you prefer strategy games or first-person shooters (FPS).

Connect a mouse and keyboard for Linux games

Unsurprisingly, almost all USB keyboard and mouse devices work out of the box on Linux.

It is important that a wide range of wireless and Bluetooth keyboard and mouse combinations also work on Linux. This is important to know as this compatibility also affects the game controllers.

USB game controller on Linux

For a more complete gaming experience, you can opt for a game controller. There are various USB controllers available that should be suitable for gaming under Linux. If the controller uses xinput (most of them) you shouldn't have any problems.

Of course, the best way to check this is to try a few USB game controllers on your Linux device. They might have different levels of success, or they all work just as well. Note, of course, that you should reconfigure the controls to suit the game you are playing.

Which USB controllers work under Linux?

There's a long list of Linux-compatible USB game controllers that we can't replicate here. If you have a USB controller plug it in and see what happens. You can rely 100% on the USB versions of:

  • Xbox One controller

  • Xbox 360 controller

  • PlayStation 4 controller

  • PlayStation 3 controller

All of this should work out of the box thanks to the xboxdrv package. If you run into problems, the xboxdrv package can be installed manually in the terminal:

apt-get install xboxdrv

If the software is installed, you can define key assignments to customize the controller. It also supports startup scripts for starting games with certain associated mappings.

Despite the name, xboxdrv also supports PlayStation controllers. Clone devices based on these controllers should work as well.

The older controllers work with little fanfare. However, if you want to use the wireless version of the Xbox 360 controller or the original Xbox One wireless controller, you will need the wireless dongles that can be used to connect these devices to a PC.

Fortunately, it's easier with Bluetooth, and later versions of the Xbox One controller are based on Bluetooth rather than WiFi.

Related: How Does Bluetooth Work?

What about bluetooth game controllers on Linux?

With bluetooth devices, things can be a little trickier. Your system requires a Bluetooth receiver – this may be built-in or added as a USB dongle. When enabled, you should see the Bluetooth icon on the control panel.

No symbol? Enter to verify that your USB bluetooth dongle is recognized by Linux


Next, install with

apt-get install bluetooth

After the installation, check that bluetooth is running:

/etc/init.d/bluetooth status

If not, enter:

/etc/init.d/bluetooth start

Once started you shouldn't have any problems.

You can now pair a controller or a mouse and keyboard with Linux. The easiest way to do this is to click the bluetooth icon, set the computer to scan for devices, and press and hold the pairing button on your controller.

Moments later, they should be paired and ready to go. Popular Bluetooth controllers that can be synced with Linux include:

  • Xbox One

  • PlayStation DualShock 3 and 4

  • WiiU Pro

We'll look at how to connect these devices below.

Connecting a Bluetooth Xbox One Controller to Linux

Xbox One owners need to do very little to get their controllers working on Linux. Provided that your operating system has a 3.17 kernel, you can use the controller. SteamOS also supports the Xbox One controller.

The Bluetooth Xbox One controller connects to Linux in the same way as any other Bluetooth device.

Install game controllers on Linux

Connect a DualSense, DualShock 4, or DualShock 3 PlayStation controller to Linux

Would you like to connect a PS3, PS4 or PS5 controller to Linux?

All are possible, but Bluetooth is a bit more cumbersome. The DualShock 3 requires Bluetooth 2.0, while the DualSense and DualShock 4 require Bluetooth 4.0 or higher. Consequently, you need to make sure that the bluetooth radio on your system (or the bluetooth dongle you choose) is compatible with the controller you plan to use. Note that any controller can run on a Raspberry Pi, so setting it up on a Linux PC shouldn't be too difficult.

To connect these devices, make sure you have the correct USB cable handy as it will take a short time.

  1. Enable Bluetooth scan / pairing mode on Linux

  2. Connect the USB cable to the controller

  3. Trust the device when prompted by your Linux distribution

  4. Disconnect the USB cable

  5. Press and hold the pairing button on your controller

The PlayStation controller should now be paired with your Linux computer. Note that the Haptic Feedback and Adaptive Triggers of the DualSense controller will not work on Linux.

Play games on Linux with the Wii U Pro controller

While the Wii U didn't sell as well as the Wii or the Nintendo Switch, the Wii U Pro controller is a great option for Linux gaming.

Syncing the Wii U Pro controller with Linux is almost as easy as it is with any other device.

  1. Check for new devices in the Bluetooth tool on Linux

  2. Press the Sync button on the controller

Moments later, the controller should be recognized and you can play.

Joystick / gamepad / controller does not work on Linux

If you're having a problem with a generic game controller or a traditional gamepad or joystick, it's time to troubleshoot it. A tool called a joystick contains drivers and recognizes input. You can also use it to reconfigure controller mappings.

Install in the terminal with:

sudo apt-get install joystick

Find the drivers you need here. Use jstest-gtk to configure mappings etc:

sudo apt-get install jstest-gtk

Best controller for Linux gaming

After all that, which controllers are really best for Linux games? Often less ergonomic devices are useful for some games and not so ideal for others. In this case, it's not uncommon to have multiple controllers, especially if you like retro gaming on Linux.

Ultimately, it depends on what type of game you are playing. As a universal option, the Xbox One and PS4 controllers are likely to work with the largest variety of games. However, the Steam Controller may also be particularly suitable for the type of games you play.

For retro gaming, the list of suitable retro-style USB and Bluetooth devices continues to grow.

Ultimately, there is no right answer here: find a suitable controller and see if it runs on Linux. This can mean a few minutes of research on Google, emailing the manufacturer, or starting a Reddit thread. If it works, plug in, play, and enjoy.

Best Free Linux Games

The 10 best Linux games to play for free

If you're looking for the best Linux games to play for free, here are 10 titles to get you started …

About the author

Christian Cawley
(1444 articles published)

Deputy Editor for Security, Linux, DIY, Programming and Technology explains. He also produces The Really Useful Podcast and has extensive desktop and software support experience.

Christian is an employee of Linux Format Magazine and a Raspberry Pi hobbyist, Lego lover and retro gaming fan.

By Christian Cawley

Subscribe to our newsletter

Sign up for our newsletter to receive tech tips, reviews, free e-books, and exclusive offers!

One more step …!

Please confirm your email address in the email we just sent you.

. "border =" 0

Leave a Reply

Your email address will not be published. Required fields are marked *