How to Use Xbox 360 Wireless Gaming Controller?

Im Curious about the usage of the controller to play any games, like... does it even work in linux?,if so do i need a driver of some sorts?


I'm using the Microsoft Xbox 360 Wireless (Gaming) Receiver for Windows in Ubuntu Linux together with multiple “Microsoft Xbox 360 Wireless Controller” gamepads for single or multiplayer games with up to 4 controllers simulatiously.


This solution took me some time to figure out and it might be not the final solution to issues with gamepads in Linux, but these controllers are some of the most supported gamespads in the Linux world and a standard in PC gaming for game developers since their introduction in 2005 until today. This solution works for Xbox and Xbox One Controllers too.

As drivers, I've used xboxdrv and xpad before on my notebook (from Ubuntu LTS-Versions 12.04 until 18.04), but xboxdrv failed to be fully recognised with some games on my new PC with a fresh Kubuntu 18.04 LTS installed, because xboxdrv it is unmaintained now (since about 2 years). The last Ubuntu LTS it was working perfectly for me was 14.04, just with installing the PPA.

Just after installing Kubuntu 18.04 LTS (or Ubuntu 18.04 LTS for that matter), I’ve first tried to use my Xbox360 Wireless Controller gamepads and it worked out of the box with the default kernel driver version of xpad, but only in some games, where the analog bumpers (LB and RB) where not needed. Problems arrived in Steam and Steam Play, for native Linux games as well as Windows games though Steam Play (Valve's Wine adaption inside steam). Valkyria Chronicles played well, in Grand Theft Auto V only the camera worked (unplayable) and in Project Cars 2 I was able to assign the basic controls to buttons that worked, but it was almost unplayable.

I tried every solution with xboxdrv then, that I could find on the net, but it’s just too old now. Valve contributed a lot to linux gaming since then. All buttons worked with xboxdrv, but the configuration mixed up the axis of the right stick and the right bumper and I couldn’t figure out how to solve it.

So here is the solution using xpad that made all the magic happen just by installing it. All the gamepads worked perfectly as it should have been with all the games I tried.


Install the Linux Kernel Driver for the Xbox/ Xbox 360/ Xbox One Controllers

Go to https://github.com/paroj/xpad

Follow the installation instructions there. By the time of writing it goes like this:

Open Terminal

  1. Install git and dkms if you haven't got it by entering:

    sudo apt-get install git dkms
    

    or jump to the next step.

    If you don't know or are not sure, just enter it anyway and the system checks for a version to update only, if you have it already.

  2. Enter:

    sudo git clone https://github.com/paroj/xpad.git /usr/src/xpad-0.4
    
  3. Enter:

    sudo dkms install -m xpad -v 0.4
    
  4. Optional: reboot (just to be sure)

Enjoy! ;)

Further information to install the hardware you find at Microsoft's support here: https://support.xbox.com/en-US/xbox-on-windows/accessories/xbox-360-wireless-gaming-receiver-windows


Install this PPA with joystickwake to help with Screensavers

Unless a game takes special steps, you also will need a joystick-aware screen waker until the display servers catch up. Joystickwake helps linux gamers who are tired of their screen saver interrupting their fun. The source code and documentation are on github: https://github.com/foresto/joystickwake

  1. Enter:

    sudo add-apt-repository ppa:foresto/toys
    
  2. Enter

    sudo apt-get update
    


Xbox controllers are plug and play in Ubuntu but there is an Ubuntu wiki guide if your controller isn't recognised.

Xbox 360 wiki

Most times its best just to try it out you would be surprised by how much hardware works with Ubuntu without any tweaking or editing any text files.

Hope you have fun!!!


You're going to need a special Microsoft dongle to talk to the Wireless controller as it uses a proprietary protocol unique to the Xbox. Same goes for Windows.

Once you have that I it should plug and play (it did for me), on "most" games that suport gamepads


This package provides additional configurations over xboxdrv driver (see xboxdrv home for more info at http://pingus.seul.org/~grumbel/xboxdrv/).

Unlike stock xpad kernel driver, xboxdrv provides a wide variety of configuration options: it allows you to simulate keyboard and mouse events, remap buttons and axes, apply autofire, invert axis, tweak axis sensitivity, emulate throttle and rudder controls and send macros.

But while xboxdrv is included in its last version on Ubuntu 14.04, it lacks additional configuration to get it properly working.

This package adds additional configurations over xboxdrv:

  • Clear broken configurations;
  • Properly configure a upstart service;
  • Manage xboxdrv service on System suspend/resume;
  • Add support for user options at /etc/default/xboxdrv;
  • Start with support for 4 joysticks;
  • Add a "Joysticks" entry into System Settings panel;
  • Easy ForceFeeback activation.

To install:

sudo apt-add-repository ppa:rael-gc/ubuntu-xboxdrv 
sudo apt-get update 
sudo apt-get install ubuntu-xboxdrv

Reference:

  • New Ubuntu Xbox 360 Controller App Makes Set-Up Easier
  • launchpad.net: Ubuntu xboxdrv Integration : Rael
  • github.com: raelgc/ubuntu_xboxdrv