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.
Some you may have missed, popular articles from the last month:
All posts need to follow our rules. For users logged in: please hit the Report Flag icon on any post that breaks the rules or contains illegal / harmful content. Guest readers can email us for any issues.
12 comments
Which controllers are you talking about? I would love an excellent controller because my Logitech F310 does not work.
I have an old Logitech wingman extreme gamepad which sadly has a ruptured button membrane and has worked flawlessly since I've bought it 16 years ago, had a gravis joystick about the same age that also worked until it stopped working, I have a cheap usb gamepad of crappy quality that also worked out of the box as well as a Logitech wingman extreme joystick that also work flawlessly, not to mention there are xbox and PS controllers and a multitude of others compatible with those consoles that also work flawlessly under linux.
EDIT: BTW a quick google search tells me that your gamepad works just fine if you set the switch on the bottom to the right mode.
I've tried to do the switch thingy on the back of the controller and I still can't get it to work. Can you link where you saw that?
https://gist.github.com/sobkas/f0c0bcbe30881472155d
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.