Image Image Image Image Image Image Image Image Image Image

This 8-Bit Life | April 17, 2014

Scroll to top

Top

3 Comments

Adventures in Linux: Xbox Gamepads - This 8-Bit Life

Adventures in Linux: Xbox Gamepads
Leland Flynn

This one will be really short and sweet but I spent some time figuring out how to get things working just right and thought I would share. If you’re looking for a reliable way to get your xbox 360 (or xbox 360/PC clone) controller working in Linux then read on.

 

First we need to install the xboxdrv driver, the xpad default kernel module that comes rolled in with most common installs is a bit lacking.

apt-get install xboxdrv

You can compile from source as well but in the interest of time pulling down the binary should be fine.

Then we need to blacklist the xpad module from loading at boot. If we don’t it will interfere with xboxdrv. Be sure to ignore the quotes

sudo nano /etc/modprobe.d/blacklist.conf

Add the following at the last line:

“blacklist xpad”

**Be sure to use CTRL+O to write your changes before exiting.

From here all we need to do is setup xboxdrv to run at boot so we don’t have to tell it what to do any time we want to play a game.

sudo nano /etc/rc.local

Before the line that reads “exit 0″ insert the following (again ignore the quotes):

xboxdrv --detach-kernel-driver --silent --config /usr/share/doc/xboxdrv/examples/xpad-wireless.xboxdrv &
sleep 1

** This last section tells the driver to refer to the xpad-wireless configuration file for button mapping. You can easily edit one of these to your liking and save it in any directory you like.

Comments

  1. Note that your blog is replacing double-dash with a long dash (aka emdash). This invalidates the last line.

    Use code blocks around it.

    • Leland Flynn

      Hell, you’re totally right. Thanks for the catch.

    • Leland Flynn

      Fixed

Submit a Comment