Ubuntu – How to get an Xbox One controller to work with 16.04 (not Steam)

16.04games

I have a fresh install of Ubuntu 16.04 and I downloaded a game from GOG called Transistor. I bought a wireless Xbox One controller to play just this kind of game. From what I could find out, wireless isn't supported on Ubuntu for this controller yet so I plugged it in using a [known working] micro-usb > usb adapter.

  • I have successfully installed the game. I can play it with my keyboard/mouse. Clicking on the controller icon in the game settings does nothing.

  • I have installed "Ubuntu xboxdrv integration" and now have a joystick option in my settings menu. It lists four 360 controllers and none of them respond to input from the controller.

  • When I type lsusb it lists "Microsoft" as one of the things connected. I disconnected the controller and the entry goes away so I know the controller is being seen by the system. When I plug it in it rumbles for a moment.

  • If I press the "X" (connect) button it flashes for almost 30 seconds.

As I understand, wired, even the Xbox One controller, is compatible out of the box with newer versions of Ubuntu. Can anyone tell me what I'm not doing or where to start looking? I'm assuming a newish kernel was installed with the OS.

I typed lsmod and there is no ubuntu-xboxdrv or xboxdrv or even xpad in the list. I typed insmod ubuntu-xboxdrv into terminal and was told it couldn't load because there's no file or directory. Typing modprobe ubuntu-xboxdrv also said it couldn't find it. (I also tried xboxdrv for both.)

As far as I can tell, it not being a loaded mod is the number one culprit. How do I see if ubuntu-xboxdrv is even the name of the mod? I checked that the install went through by reinstalling. How do I find where it went?

Best Answer

OP's solution to their own problem:

First, I read that with kernels later than 4.1* (I checked and I have 4.4*), xboxdrv no longer works with, specifically, the xbox one controller.

It seems xpad got love from Steam so it's not as outdated as it used to be. I don't know what it loses to xboxdev but I just want the controller to work.

My controller is the newer firmware version called Covert Forces Edition. Because of its new firmware it needs a patch which I found here.

sudo apt-get install git
sudo apt-get install dkms
sudo git clone https://github.com/paroj/xpad.git /usr/src/xpad-0.4
sudo dkms install -m xpad -v 0.4

All seemed fine. But I hit lsmod and xpad still wasn't loaded. To load it I entered:

sudo modprobe xpad

This gave me a new error that it could not insert because the required key is not available. This is solved by turning off secure boot in your BIOS.

I put sudo modprobe xpad in again and there were no confirmations but no complaints. I looked under lsmod and lo and behold, at the top of the list was xpad! I'm guessing it's the mod version because now under the joystick menu in settings it comes up as a 5th controller and the damn thing responds. The "X" is lit up and buttons work.

Related Question