Support us on Patreon to keep GamingOnLinux alive. This ensures we have no timed articles and no paywalls. Just good, fresh content! Alternatively, you can donate through PayPal, Flattr and Liberapay!

How To Use A Nyko Playpad Bluetooth Controller On Linux Using Xboxdrv

Posted by , | Views: 12,827
tagline-image

I've spent more hours than I care to admit in search of the perfect portable game controller to use with my laptop. I wanted something compact and Bluetooth enabled, so the Nyko Playpad seemed to fit the bill quite nicely. Unfortunately this little device is intended for the Android and iOS platforms. PC gaming was clearly an after thought for this thing, as is evidenced by the Android firmware updater that will prompt you to flash a PC-friendly version of the firmware, only to deny the request with promises that said feature is in the works. Highly doubtful. The Android software hasn't been updated in years, and is absolute rubbish. I finally had to use their Windows updater to flash the latest firmware.

Flashing the new firmware probably wasn't necessary, but it was all part of a long, painful process of trial-and-error to get this hunk-o-junk working. The good news is that we can remap the controller as a sort of psuedo-Xbox controller with a command line utility called xboxdrv. Whereas the Xbox has sort of become a PC-gaming standard and many games have support for it built in, this makes a lot of sense. Not to mention the Playpad's layout is nearly identical to the Xbox controller. All we miss out on are the stick-click inputs. So without further ado, here's the script I whipped up to remap a Nyko Playpad controller as an Xbox controller.

#!/bin/bash
eventnum=${1-17}
#sudo rmmod xpad
sudo modprobe uinput
sudo modprobe joydev
sudo xboxdrv --evdev /dev/input/event$eventnum --evdev-absmap ABS_GAS=RT,ABS_BRAKE=LT,ABS_X=x1,ABS_Y=y1,ABS_Z=X2,ABS_RZ=y2,ABS_HAT0X=dpad_x,ABS_HAT0Y=dpad_y --axismap -Y1=Y1,-Y2=Y2 --evdev-keymap BTN_START=start,KEY_HOMEPAGE=guide,KEY_BACK=back,BTN_A=A,BTN_B=B,BTN_X=X,BTN_Y=Y,BTN_TL=LB,BTN_TR=RB --mimic-xpad --detach-kernel-driver --controller-slot 0 --silent


I commented out the "rmmod xpad" command because it was suggested in the xboxdrv manpage, but if you aren't using the xpad module, then obviously you don't need to remove it.

I save the above script in a file called "nyko" in my home directory and simply execute "sh nyko" once the controller is connected through my Bluetooth manager. By default, my script looks at event17, so you will probably need to modify the eventnum variable to match your configuration. To figure out which input event belongs to your controller, connect the device and run "ls /dev/input". It's very likely the event with the highest number, but just to be sure you can run "evtest /dev/input/eventxx" to test it out. Once you know the number, you can either modify the script or pass the event number into it, like so: sh nyko xx.

As I mentioned earlier, I did flash a newer version of the firmware on my controller, so the above xboxdrv configuration may not work with an out-of-the-box Playpad. It's not terribly difficult to figure it out on your own, though. To do so, run the evtest command on the input event for your controller and write down the code for each input. Then consult the xboxdrv manpage for the corresponding xbox input and adjust the "--evdev-absmap" and "--evdev-keymap" paramters accordingly.

Thoughts on the Controller

This controller is not great. It's merely acceptable for a portable controller. The joystick nubs are not very accurate and will hurt your thumbs after a while. The bumpers are mushy and easy to hit accidentally. The d-pad and face buttons, however, are stiff and responsive, but I struggle a bit with accuracy on the d-pad as well. Its primary advantage is its super compact size. Getting this thing up and running on a Linux machine was an absolute nightmare. I still run into instances where games don't properly recognize it. While xboxdrv creates a functional, emulated xbox joystick, it doesn't fully hide the Playpad from the OS, so some games think there is a ghost controller in slot 1 and refuse to recognize the perfectly fine xbox instance in slot 2. If I think about the hours I put into configuring the controller, I risk breaking down into tears. That being said, when it does work, it's kind of awesome. This thing is tiny, wireless, rechargeable, and packs in a lot of buttons for such a small footprint. It's almost the perfect controller for leaving in a laptop bag. But there's no denying that the shoulder buttons and joysticks are weak. I can't quite recommend or condemn this controller. If it fits your needs, go for it. With a great amount of patience, you can get it to work under Linux. Article taken from GamingOnLinux.com.
0 Likes
We do often include affiliate links to earn us some pennies. We are currently affiliated with GOG, Humble Store and Paradox Interactive. See more information here.
About the author -
I am one half of the creative team behind Dototot, a digital media production and consulting studio that relies entirely on Linux and (mostly) free, open-source software. I am also the disembodied voice behind Mini Steam Reviews, a YouTube channel featuring concise video reviews of Linux Steam games with a simple verdict.
See more from me
The comments on this article are closed.
13 comments
Page: «2/2
  Go to:

sobkas 3 April 2015 at 1:01 pm UTC
Can anyone test if this config file works?
https://gist.github.com/sobkas/f0c0bcbe30881472155d
loggfreak 3 April 2015 at 2:58 pm UTC
NovenWhich controllers are you talking about? I would love an excellent controller because my Logitech F310 does not work.
i have an ancient logitech 'dual action' controller and that one works perfectly fine out of the box as well, are you sure your controller is still functional?
Cyba.Cowboy 5 April 2015 at 1:25 am UTC
NovenThis is why I am glad the Steam controller will be out eventually. Having a native supported controller will be very nice.

The Sony DUALSHOCK 4 is natively supported by any Linux-based operating system running an up-to-date kernel:
http://askubuntu.com/a/546832/230107

It's detected as a Microsoft Xbox controller and it works flawlessly in any game that supports controller inputs... I haven't tried WINE games, but it works fine with most Steam and GOG.com games.
  Go to:
While you're here, please consider supporting GamingOnLinux on Patreon, Liberapay or Paypal. We have no adverts, no paywalls, no timed exclusive articles. Just good, fresh content. Without your continued support, we simply could not continue!

You can find even more ways to support us on this dedicated page any time. If you already are, thank you!
Livestreams & Videos
Community Livestreams
See more!
Popular this week
View by Category
Contact
Latest Comments
Latest Forum Posts