The driver for the xbox controller built into the kernel (xpad) seems to be quite broken. Luckily there is an alternative. Here is how to set it up under Ubuntu, other Linux distributions might differ.
Blacklist xpad kernel driver
The first step is to blacklist the xpad kernel driver to prevent it from being loaded.
# as root echo "blacklist xpad" > /etc/modprobe.d/blacklist.conf #unload module if already loaded rmmod xpad
# as root apt-get install xboxdrv
I start xboxdrv manually (as root) before I play. I tried to automate it but it wasn't very reliable.
# check it is working xboxdrv # Should output something like # Your Xbox/Xbox360 controller should now be available as: # /dev/input/js0
For actually playing I tend to start it with --silent.
This solves all the xbox gamepad issues for me. Steam, Shank, Overgrowth all work fine with xboxdrv.