Posts: 1667
Joined: Mon Oct 29, 2012 2:07 pm

XBox360 Joypad Drivers - Installation/Config & D-PAD Use

Thu Jan 23, 2014 10:52 am

I have been replying in various Threads/Posts on the Raspbian update which is causing an error in the Xbox360 Joypad Drivers. To this end here is how to install/configure for operation and force use of the D-PAD rather than the analogue sticks for users who wish to do so.

Update the package lists and Install the Xbox Drivers
From a Console or Terminal
Type - sudo apt-get update
Then - sudo apt-get install xboxdrv

From Console or In a Terminal
Type - sudo nano /etc/rc.local

If your Xbox controller is USB (not wireless) change --wid to --id. If you wish to add more controllers add another line and increment wid/led sequentially, so for a second add --wid 1 --led 3 etc.

In the script (above 'exit') add the line

xboxdrv --trigger-as-button --wid 0 --led 2 --deadzone 4000 --silent & sleep 1

NB As from Raspbian Wheezy Image 2013-12-18 the Kernel has been updated to 3.10. This Kernel includes Default Joystick Drivers which causes a conflict with the newly installed Xbox Drivers so these need to be detached for correct functionality.

xboxdrv --trigger-as-button --wid 0 --led 2 --detach-kernel-driver --deadzone 4000 --silent & sleep 1

Press Left Ctrl and 'x'
Press 'y' to overwrite the file
Enter to exit

Now plug in your controller, restart your RPi (Type - sudo reboot), it should now inform you -

The Xbox/XBox360 controller should now be available as:
/dev/input/js0 (or whichever port you have set in the config File)

Obviously some programs/emulators will require further setting of their respective configuration files to run correctly (e.g. RetroArch/RetroPie) but for the most part this is all that is required for controller operation (in PiMAME4ALL for instance).

Adding --dpad-only to the rc.local script (following --trigger-as-button) forces the use of the D-Pad (ignoring both analogue sticks), without having to re configure the emulator. I haven't tested this using every emulator available but it seems to work successfully with most thus far.

RETROARCH (RetroPie, Ultra Slim)
KitchUK has noted using 'dpad-only' option causes some config issues, this is easily resolved, go to the retroarch config file and remove -

input_player1_down_btn =
input_player1_left_btn =
input_player1_right_btn =

The Xbox Driver Manual detailing all options and settings can be found Here - http://pingus.seul.org/~grumbel/xboxdrv/xboxdrv.html
"The list of things I have heard now contains everything!"

Return to “Gaming”