Installing Driver for XBox PowerA Spectra Controller

I've got this controller ("www.bestbuy.com/site/power-a-spectra-controller-for-xbox-one-black/8685189.p?skuId=8685189") that I'm trying to get to work on Ubuntu, but its causing immense trouble. This is largely due to my inexperience with Linux.

I've installed the driver for xbox controllers using this forum here, but when I checked to see if it recognized my controller it gave me the following error:

-- [ ERROR ] ------------------------------------------------------

No Xbox or Xbox360 controller found

This forum mentioned that I need to install a patch to xpad.c to make my controller work. Advice was given on how to patch a document as a response to that guy's question. However, in this command, I need to save the patch in the same place where xpad.c is apparently saved. This leads to my questions:

  • Am I on the right track? Is xpad and xboxdrv the same thing? Will the patch in the above forum work for my purposes?
  • Where is this xpad.c? Does it install with xboxdrv? I've tried to search for it on my computer, and I get some header files for it, but I can't move the patch into the folder where its located.
  • In general, where do files get saved when installing programs like these?

Thanks in advance for the help. Please keep in mind that I am a novice: the more detail, the better.

Update: I'm using Ubuntu version 16.04. I've tried options of installing xpad-v0.4 and the steamos version. I've noted with both that the program jstest-gtk recognizes the controller, even the brand (PowerA Spectra), but the controller simply continues to flash its LED light, and it remains unresponsive when I try to input controls.


Solution 1:

I have gotten to the point where my controller was recognised, but not responding to button-presses. Maybe your controller will respond, if you follow my steps, but maybe it won't.

xpad and xboxdrv are not the same thing, they are two different approaches. It seems at the moment that xboxdrv works best, but is not quite up to date on Ubuntu.


You need to download, modify and then compile the newest version of xboxdrv.

Download

From github, https://github.com/zerojay/xboxdrv press the green Clone or Download button, then Download ZIP.

Extract the downloaded file to an empty folder.

Modify

Here comes the tricky part. In the extracted folder, locate the file [...]/src/xpad_device.cpp. Open it, and you will find a long list of entries like

{ GAMEPAD_XBOX, 0x0d2f, 0x0002, "Andamiro Pump It Up pad" },

You want to add your own controller to this list. It should be on the form

{ GAMEPAD_XBOXONE, 0x????, 0x????, "Your product description" },

And you need to find the two codes that identify it.

In a Terminal, type

watch lsusb

Plug in your controller and make a note of the line that appears in the list. This is your controller. Mine was called

Bus 002 Device 013: ID 0e6f:02b2 Logic3

In xpad_device.cpp check that your controller's ID isn't already among the xbox one controllers. If it is, you can skip the rest of this step.

Add your entry to the list, adding the first and second part of your controller's device ID to the first and second code in the entry. Mind that each entry is comma-separated, and the last entry has no comma after it.

Mine becomes

{ GAMEPAD_XBOXONE, 0x0e6f, 0x02b2, "@Play - Wired Controller for Xbox One" },

Save the file and close it.

Compile

From a terminal, navigate to the extracted folder. First paste in

sudo apt-get install \ scons \ g++ \ libboost-dev \ scons \ pkg-config \ libusb-1.0-0-dev \ git-core \ libx11-dev \ libudev-dev \ x11proto-core-dev \ libdbus-glib-1-dev

to install dependencies. The actual compiling may take a while. Type

scons

then

make install

Run

From a terminal,

sudo xboxdrv

See if it works. For actual gaming, run

sudo xboxdrv --silent

So it won't waste CPU printing all input events to the terminal.

To make starting it easier, try adding it as a shortcut with Alacarte.