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

But if you're interested in switching to Linux for gaming, there is undoubtedly a question holding you back: are game controllers compatible with Linux?

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

Options for Gaming on Linux

You have three options for playing games on Linux:

  • The keyboard and mouse
  • A USB game controller
  • Bluetooth game controller

Each of these comes with its own advantage and disadvantage. However, they should all work without a problem.

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 Gaming on Linux?

Years ago, before Linux gaming became popular, it was necessary to install device drivers for game controllers.

These days, with numerous developed Linux operating systems to choose from, the problem is almost non-existent. Unless you're using an older Linux operating system for a specific reason (perhaps hardware compatibility or other problems) there is no need to install drivers for controllers on Linux.

Drivers are now baked into the Linux kernel.

Play Linux Games With a Mouse and Keyboard

If you're playing strategy games or just prefer the keyboard-and-mouse combi, these should work fine. Laptop keyboards are fine for gaming, although you'll need a USB mouse rather than the touchpad for most games.

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 gaming

Unsurprisingly, you'll find that pretty much all USB keyboard and mouse devices will work out of the box on Linux.

Importantly, a wide selection of wireless and Bluetooth keyboard and mouse combinations will also work with Linux. This is important to know, as this compatibility also impacts game controllers.

USB Game Controllers on Linux

For a more complete gaming experience, you may opt for a game controller. Various USB controllers are available that should be suitable for gaming on Linux. If the controller uses xinput (most of them do), you should have no problems.

Naturally, the best way to check is to try a few USB game controllers on your Linux device. You may have varying degrees of success, or they may all work just as well. Note, of course, that you should reconfigure the controls to suit the game you're playing.

Which USB Controllers Work on Linux?

There is a long list of Linux-compatible USB game controllers which we don't have space to replicate here. Suffice to say, if you own a USB controller, plug it in and see what happens. You can be 100% confident with the USB versions of:

  • Xbox One controller
  • Xbox 360 controller
  • PlayStation 4 controller
  • PlayStation 3 controller

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

        apt-get install xboxdrv
    

With the software installed, you can set button mappings to customize the controller. It also supports startup scripts to launch games with specific mappings applied.

Despite the name, xboxdrv also supports PlayStation controllers. Similarly, clone devices based on these controllers should also work.

The older controllers work with little fanfare. However, if you want to use the wireless version of the Xbox 360 controller, or the original wireless Xbox One controller, you'll need the wireless dongles for that allow these devices to be connected to a PC.

Happily, things are simpler with Bluetooth, and later versions of the Xbox One controller rely on Bluetooth rather than wireless.

Related: How Does Bluetooth Work?

What About Bluetooth Game Controllers on Linux?

For Bluetooth devices, things might be a little trickier. Your system will need a Bluetooth receiver---this might be built in or added as a USB dongle. If enabled, the Bluetooth symbol should be displayed in the panel.

No symbol? To check if your USB Bluetooth dongle is recognized by Linux, enter

        lsusb
    

Next, install with

        apt-get install Bluetooth
    

After installation, check Bluetooth is running:

        /etc/init.d/bluetooth status
    

If not, enter:

        /etc/init.d/bluetooth start
    

Once started, you should have no problems.

You can now pair a controller, or 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 hold the pairing button on your controller.

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

  • Xbox One
  • PlayStation DualShock 3 and 4
  • WiiU Pro

We'll take a look at connecting these devices below.

Connecting a Bluetooth Xbox One Controller to Linux

Xbox One owners need to do very little to get their controllers running with Linux. Provided your OS has a kernel past 3.17, you can use the controller. SteamOS also supports the Xbox One controller.

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

Install game controllers on Linux

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

Want to connect a PS3, PS4, or PS5 controller to Linux?

All are possible, but Bluetooth is a little fussier. The DualShock 3 requires Bluetooth 2.0, while the DualSense and DualShock 4 need Bluetooth 4.0 or later. Consequently, you need to ensure the Bluetooth radio on your system (or your chosen Bluetooth dongle) is compatible with the controller you wish to use. Note that either controller can run on a Raspberry Pi, so this shouldn't be too difficult to set up on a Linux PC.

To connect these devices, be sure you have the correct USB cable handy as this is briefly required.

  1. In Linux, enable Bluetooth scanning/pairing mode
  2. Connect the USB cable to the controller
  3. When prompted by your Linux distro, trust the device
  4. Disconnect the USB cable
  5. Hold the pairing button on your controller

The PlayStation controller should now be paired with your Linux computer. Note that the DualSense controller's Haptic feedback and Adaptive triggers 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 good option for Linux gaming.

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

  1. In the Bluetooth tool on Linux, scan for new devices
  2. On the controller, press the sync button

Moments later, the controller should be detected and you're ready to play.

Joystick/Gamepad/Controller Won't Work on Linux

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

Install in the terminal with:

        sudo apt-get install joystick
    

This provides the drivers you need. To configure mappings and so forth, use jstest-gtk:

        sudo apt-get install jstest-gtk
    

Best Controllers for Linux Gaming

So, with all of that explained, which controllers are really best for Linux gaming? Often, less ergonomic devices tend to be useful for some games and not so ideal for others. It isn't unusual to end up with multiple controllers in this case, particularly if you enjoy retro gaming in Linux.

Ultimately, it depends on what type of game you're playing. For a universal option, the Xbox One and PS4 controllers are probably suited to the widest selection of games around. But you might also find the Steam Controller is particularly suited to the type of games you play.

For retro gaming, the list of suitable retro-styled USB and Bluetooth devices just keeps on growing.

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