I got an NVIDIA Shield Controller with my Shield Tablet a while back. I’ve used it some on both the tablet itself and via USB on Windows, but it doesn’t work out of the box on Linux and until recently I didn’t care because my wireless 360 controllers worked just fine. However, I left the 360 controllers at home with the Xbox itself when I moved out to college, only bringing the Shield controller with. So this week I actually took the time to get it working, and this is the result of my search.
The only requirement for this that I didn’t already have installed was
xboxdrv, the userspace gamepad driver. (Which is available in the AUR on Arch Linux.) To find the correct device path I used
evtest. (Available in community on Arch.) You don’t necessarily need it, but you’ll find the device faster than just trying everything with
First you need to make sure that the controller is connected and being detected properly. To do this you can check
/dev/input/by-id/ for any items containing
"NVIDIA" in their name. Unfortunately in my experience these handy symlinks only exist for the little mousepad thing. As such the next step is to go through and run
evtest on every
/dev/input/event* device until you find the one that responds when you press a button or move a stick on the controller.
Once you find the device, just put it in place of
"/dev/input/event20" in the below command. (event20 is what it was on my desktop)
sudo xboxdrv --evdev "/dev/input/event20" --evdev-keymap "KEY_HOMEPAGE=guide,BTN_THUMBR=tr,BTN_WEST=y,BTN_TL=lb,BTN_TR=rb,BTN_START=start,BTN_A=a,BTN_THUMBL=tl,BTN_NORTH=x,KEY_BACK=back,BTN_B=b" --evdev-absmap "ABS_RZ=y2,ABS_BRAKE=lt,ABS_Y=y1,ABS_GAS=rt,ABS_Z=x2,ABS_X=x1,ABS_HAT0X=dpad_x,ABS_HAT0Y=dpad_y" --axismap "-y2=y2,-y1=y1" --mimic-xpad
If you get an error like
"couldn’t convert ‘BTN_WEST’ to enum, not a member of EV_KEY" try this command instead:
sudo xboxdrv --evdev "/dev/input/event20" --evdev-keymap "KEY_HOMEPAGE=guide,BTN_THUMBR=tr,BTN_Y=y,BTN_TL=lb,BTN_TR=rb,BTN_START=start,BTN_A=a,BTN_THUMBL=tl,BTN_X=x,KEY_BACK=back,BTN_B=b" --evdev-absmap "ABS_RZ=y2,ABS_BRAKE=lt,ABS_Y=y1,ABS_GAS=rt,ABS_Z=x2,ABS_X=x1,ABS_HAT0X=dpad_x,ABS_HAT0Y=dpad_y" --axismap "-y2=y2,-y1=y1" --mimic-xpad
For some reason it doesn’t always start spewing event info at you until you use the controller with something, so to know whether or not it worked I usually just open Steam and press the home button. If Steam enters Big Picture mode the controller is set up and should work with any game a normal 360 controller works with. I personally have tested it with Knights of the Old Republic II and Shadow of Mordor without any major issues. If you don’t like all that event info in your face/terminal you can add
--silent to the
xboxdrv command to suppress it.
If it doesn’t work, try restarting the application you’re testing it with. If that doesn’t work go back and verify all the steps. If it still doesn’t work I really have no idea what’s wrong and probably won’t be of much help, but you can comment here and I’ll give it a shot. (So long as you can give more information than “it’s not working”, cuz if that’s all you’ve got I KNOW I won’t be able to do anything.)