I wanted to write a few lines on how I configured my controller on Ubuntu to work with Steam games, since I discovered some neat stuff.

What I've got

If your inventory differs, you might have other issues.

The play and charge is a lie

The cable can't transfer any data, and is useless for connecting the gamepad to the computer.

Controller:        Microsoft Xbox 360 Play&Charge Kit
Vendor/Product:    045e:028f
USB Path:          003:029
Controller Type:   Xbox360 Play&Charge

-- [ ERROR ] ------------------------------------------------------
The Xbox360 Play&Charge cable is for recharging only, it does not transmit data, thus xboxdrv can't support it. You have to get a wireless receiver:

* http://www.xbox.com/en-ca/hardware/x/xbox360wirelessgamingreceiver/
-------

Above is xboxdrv reproaching me for trying to work with the cable.

xpad

(not the Ubuntu package that emulates sticky notes).
A kernel module in charge of interfacing with gamepads, now bundled with Ubuntu. See more here.
This module handles regular Xbox 360 controllers (see "What I've got" above) well enough, but some games didn't recognize the controller.
It also does nothing to indicate the controller was recognized - the controller keeps blinking (like it's searching for an owner), and no message in dmesg or any log (/var/log/{syslog,kern.log,dmesg}).
The reason is that the driver registers 4 controllers (/dev/input/js{0,1,2,3}) when the reciever is plugged in, so nothing happens when it's detecting a new actual controller.

xboxdrv

An alternative userspace driver avaialble from the Ubuntu repos.
To run it, you first have to unload the xpad module using sudo rmmod xpad or by supplying -d to xboxdrv. It can also be blacklisted.
It has to be run as root (because it handles raw input devices), and gives much more visibilty to the controller's state (for instance, it sets the controller's status LED to indicate that the controller is connected).
Some games only detected my input when running xboxdrv with --mimic-xpad, even though they wouldn't work with the real xpad. Weird. It has a lot of interesting arguments (really) and the manpage is really worth a read (man xboxdrv). I think the secret to success is trying different kinds of configurations.

Steam Games and Gamepads

When using Steam's Big Picture (accessible by pressing the big Xbox logo while browsing steam), games with the gamepad icon are supposed to support gamepads (duh).

I'm going to list a few games I managed to get working with the controller, so you'll know that if you can't get these working, you have some configuration issue.
Please let me know if you have any insights / additions!

Works with xpad

Since these work with the default setup, I didn't test them on xboxdrv.

Works with xboxdrv

Image Attribution

First image taken from here: https://scognito.wordpress.com/2009/11/18/streaming-movies-and-music-from-ubuntu-to-xbox360/