This HOWTO explains how to get working the Xbox 360 controller on Linux. Wireless controller doesn't work on PC at the moment.
Compiling xpad module
We have to compile the xpad module and install it. For that, we are going to prepare a new kernel and compile it.
Getting kernel sources
It's time to get lastest kernel sources (skip this step if you don't want to get lastest sources). So, we emerge gentoo-sources.
Code: Select all
# emerge gentoo-sourcesPreparing kernel
Now we're going to apply a small patch to our kernel tree to modify the current xpad driver.
Download the patch from
Code: Select all
http://kamikaze.waninkoko.info/misc/xpad-360-support-2.6.21.patchCode: Select all
# cd /usr/src/linux
# cat xpad-360-support-2.6.21.patch | patch -p1Compiling kernel
It's time to compile kernel but at first we have to change configuration.
To get the controller working we have to compile as module (or compile into the kernel) the options from below:
Kernel options
Code: Select all
Device Drivers -> Input device support -> Joystick interface
Device Drivers -> USB support -> USB Human Interface Device (full HID) support
Device Drivers -> USB support -> USB Human Interface Device (full HID) support -> HID input layer support (this cannot be compiled as a module)
Device Drivers -> USB support -> X-Box gamepad supportCode: Select all
# make && make modules_installLoading modules
We're going to load needed modules. We have to load this modules: joydev, usbhid, xpad
Code: Select all
# modprobe joydev usbhid xpaddmesg
Code: Select all
input: Microsoft Xbox 360 Controller as /class/input/input6Testing the controller
Well, now it's time to test the controller. Run:
Code: Select all
# cat /dev/input/js0Further information
This method has been tested on a x86 machine, with 2.6.14-gentoo-r5 kernel. Controller has been tested with TuxRacer and works perfectly.



