Name's Jason Thibeault. I'm an IT guy, skeptic, feminist, gamer and atheist, and love OSS, science of all stripes (especially space-related stuff), and debating on-line and off. I enjoy a good bit of whargarbl now and again, and will occasionally even seek it out. I am also apparently responsible for the death of common sense on the internet. My bad.

EVENTS

Getting a PS3 controller to work with Windows and Linux: compare/contrast

A bit of nerdery to lighten the mood. It’s been so heady around these parts lately.

Recently, I decided to connect my PS3 controller to my laptop so I could play The Binding of Isaac on Steam with a real controller. I know, I know, I could have gotten a PC controller and saved myself a ton of hassle. But I had that PS3 controller right there, and a geek like me is gonna make do.

I suspected it would have to send signals to the computer somehow, since it plugs into USB already and uses the 5v USB power draw for charging, and it has to be plugged into USB to pair it with the PS3 before you can use it via bluetooth. Also, the hardware in a PS3 is compatible enough with regular computer hardware that at launch, they even had a Linux distro (now scuttled) that you could install and dual-boot it.

Anyway, as it turns out, my suspicions were correct — when I plugged it into my Windows 7 laptop (yes, my work laptop), it registered a USB HID (Human Interface Device — an input like keyboard, mouse or joystick) but didn’t have any drivers for it, either on Windows Update or natively.

So I did some Google searching. As it turns out, there is in fact a way to get Windows to recognize it as a proper interface device, though the procedure is rather squirrely and doesn’t always work exactly right.

Let me very briefly go over the steps I took to get things working under Windows 7.

First, apparently my bluetooth adapter is incompatible with the only known way to sync a PS3 controller with a laptop under Windows, so I decided to skip that step altogether. It was probably a wise decision, because the procedure for doing so was particularly onerous, and by the looks of it, rather risky. I followed this guide, though the drivers are built as a sketchy website-based installer — seriously, it requires you to be online to get the drivers to work, otherwise all the inputs get messed up. I suspect this requirement is so that you’re forced to see the ads that the driver makers implemented in the install program. The newest drivers thankfully didn’t require that you boot without driver signing (!!!), like a previous version had, which really increases the skeevy factor of this particular utility. Also, the fact that the drivers don’t do the actual heavy lifting, and they seem to be a conduit for however you configure the controller via this utility, means you pretty much are going to have to put up with its clunky ad-laden interface just to get the controller to work on a given boot.

Worse, sometimes you have to start all steps over after plugging the device in, otherwise it shows up as the incorrect type of controller and half of the buttons, the analogs, and d-pad all get completely messed up (showing as the wrong type of controller), are completely misassigned (the d-pad is mixed up for instance — left hits down, up hits up, right hits some face button), or just don’t work at all.

But you can get it to work sometimes.

Given all that, and the fact that as far as I was concerned I didn’t need to be playing wirelessly (and the bluetooth stuff didn’t support my wireless stack anyway), I chalked my progress up as a win. It was a pyrrhic victory, but it was a victory nonetheless.

Getting Isaac to recognize my keys, however, took using an application called JoyToKey to map the joystick buttons / axes to keypresses or mouse movements. I ended up setting the left analog stick as the movement, and shooting in different directions as the face buttons — I’d originally tried the D-pad and right analog stick, but there were shooting issues where diagonals were too easy to hit and you’d stop shooting altogether.

—-

Later, I decided to try to get the controller working on Ubuntu 12.04 on my Netbook. One quick Google search led me to an article on the Ubuntu wiki that showed that all I had to do is install the following packages via a terminal:

Then I rebooted, then I plugged in the PS3 controller, then I hit the PS button (this step was evidently important, and I’d forgotten about it when trying to demonstrate it to Jodi later).I was then able to control the mouse using the PS3 controller. That’s about as close to “just working” as I could imagine with this setup. The left analog stick controlled the mouse (with select being left mouse, R3 being right mouse button, and the right analog stick being scroll wheels). No need for the messy JoyToKey setup at all, it all just worked. If you don’t want the mouse emulation, you can leave out “xserver-xorg-input-joystick” from the above line, but it’s a good way to prove to yourself that it’s working.

I also set up the buttons in FCE Ultra no problem, as a native joystick, though ZSNES repeatedly considered J19 (I believe R2) as fully depressed when trying to set a button. I’ll figure them out at some point in the future and maybe add in the joystick configuration I got to work. Also, there’s no bluetooth on this netbook, but the bluetooth stack is apparently much easier than under Windows to work with.

Have you folks tried this? What was your experience like, and with what OS? Anyone tried a Mac yet? How about bluetooth?

Comments

I tried getting my PS3 controller to work on my PC for a game demo. I had to download 3rd party software. Even then the game would not recognize my controller. So I pretty much gave up on it. I need to get a new thumb drive so when I go out I’ll check for a PS3-like controller that works on the PC.

I actually have all the components to try this on the Mac, but haven’t done so yet; I got a cheap “DualShock” USB Logitech pad years ago, so I haven’t bothered with it. The Logitech one beat out the Linux update; after plugging it in, all the games recognized it as a valid controller. Done.

From what I’ve read though, getting the PS3 controllers to pair with the Mac via bluetooth is some bad voodoo. It works, but not consistently, and with a lot of different processes floating around that may work for some people.

I used to use one of those shady third party programs for the DualShock 3 on Windows 7 (MotionJoy was the name, I think), because my DualShock 2 with a USB adapter forcibly linked the D-Pad and Left Stick, yet I needed them to have separate functions for the Dolphin Wii emulator.

It was a pain, required constant recalibration, and when I got a bluetooth adapter so I could use a real Wiimote w/Classic Controller instead, I had to fully uninstall the drivers because they kept getting interpreted as MotionJoy drivers instead of the generic bluetooth drivers that would work with a Wiimote.

So yeah…it was shady, not easy to use, needed recalibration every time I restarted my computer, and screwed with basic functionality of my bluetooth adapter; it was just no fun on Windows.

MotionInJoy worked OK for me, but I just went with it plugged in USB (and had it emulate the 360 gamepad). But it was a pain to get working and once it was I just never touched it since. (it was only temporary while I was waiting on a 360 controller to get shipped, and I have my gaming PC always automatically boot into test mode anyway)

As far as ‘just working’ the 360 controller is pretty much where thats at nowadays. Just plug it in (wired, or with the wireless adapter [the play&charge kit doesn’t do data, just charges]), and Windows Vista+ picks it up automatically, and most games will automatically assign the buttons and even show the proper button icons (instead of Joy8, Joy9, or just keep saying to press keyboard buttons).

I also have Joy2Key on my HTPC to use a 360 controller as a backup remote, and once I got it all set up its OK, except randomly WMC and MPC-HC take turns not recognizing the skip forward/back assignment (which is stupid, since its the same key binding, and its on the global profile, but whatever.)

1. Install the filter driver (libusb-win32-filter-bin-0.1.10.1.exe).
2. Unpack ps3sixaxis_en.exe
3. Plug the SIXAXIS into your PC.
4. Run ps3sixaxis_en.exe once. (Whenever you connect it.)
5. Push the PS button on the SIXAXIS once if it doesn’t see it straight away.
!***Hurry up and press PS button immediately upon execution before the window closes.***!

I find it helpful to have the controller CPL open to see if it takes. Also, to reassign keys.

I went through all this about 2 months ago. MotionJoy (MotionInJoy?) driver seemed to work, although I didn’t do too much with it at the time. A week or so later, I had to replace my mouse (an old wireless Logitech that they don’t make or support anymore). I’ve always had good luck with logitech peripherals so I bought a new logitech wireless mouse to replace it.

Except Logitech switched to a different way of connecting their wireless peripherals, and this new way of doing it conflicts with the MotionJoy drivers. It was a bigger hassle to uninstall everything thoroughly and get the new Logitech stuff set up.

I just wound up buying a cheap third party xbox controller. Didn’t even need to install any drivers. Just plugged it in and it was recognized immediately.

I really don’t understand what is so different about the PS3 controller that it won’t work just as easily as the xbox controller on a PC, even if it’s using it wired only.

It’s almost certainly all the proprietary junk Sony uses for data protocols, combined with the fact that they never made Windows drivers and have no intention of ever doing it. That MotionInJoy works says a lot — it’s sending data to the computer, it’s just the computer can’t interpret it as a regular joystick device.

No luck on ZSNES yet. Just got done a round of Megaman 3 on FCEU though, worked grand.

There are some evident irregularities between how hexdump reports all the input data from the joystick under Ubuntu ( hexdump -v -e ’49/1 “%02x ” “\n”‘ < /dev/hidraw0 ), and how the GTK joystick calibration utility jstest-gtk reports them. For instance, the left d-pad button does not show any “axis” (all PS3 buttons are pressure-sensitive and read as both buttons and an ‘axis’ to read how hard you’re pushing it).

I think my problem with ZSNES is that it’s reading all the inputs when I try to configure the buttons, and the driver is reading one of them wrong. Considering no axis reads out on the left d-pad, but the hexdump shows a two-byte pair reading the pressure on that same button, the problem is in Ubuntu’s drivers.

I can’t really say anything about the ubuntu/linux method, as I’ve only just started using ubuntu (that’s actually why I came here), I have been using motion injoy for a couple of months to a year now, and i have to say it’s actually not that hard to figure out…i mean there are a FEW things that are a little annoying, but it’s really not that hard to use…and yes, there is an offline functionality built in. i know this, because i have bad dial up, and ive honestly almost never used the online functionality… =/

if you notice, there’s an option near the top that says “local” that lets you use it offline…it used to be you had to download the files for the offline config separately, then copy it to program files, but it doesn’t look like you have to do that anymore.

as for the Bluetooth issue that some have complained about…that has to do with the way the software ‘pairs’ for lack of a better word with the ps3 controller. if you have an external Bluetooth, just move it to a different USB port when you don’t want to use the ps2 controller with it. if you have an internal bluetooth, you can pick up a cheap one from amazon that costs about $1.50USD plus about 5 on shipping ( i did, anyhow) that works just fine with motioninjoy, although i i dont really use the bluetooth that often, anyhow, cuz id rather use it wired anyhow…

my only real beef is that anytime you have to reconnect a controller or restart the comp, it resets to this weird default set up that kinda sucks. honestly, i wish it would just stick with whatever the last used profile was and call it good, but otherwise it works great.

zsnes, fecu, epsxe, pcsx2… i have no problems with it running any of them. heck, with a little fiddling in the profile settings, you can use it with doom 3. it has a built profile tool for mapping the buttons to joystick, mouse, joystick, or some other input functions.

I had a good laugh at this once I realized you were calling Motionjoy shady. People that don’t know how to properly set something up instantly dismiss it. I have it, and have had no issues what so ever and I’ve been using/updating it for years.

“I also set up the buttons in FCE Ultra no problem, as a native joystick, though ZSNES repeatedly considered J19 (I believe R2) as fully depressed when trying to set a button.”

I had this same problem with my Wii Classic Controller Pro and assigning keys.
I found out that you need to press the “set key/assign key in ZNES and immediately after press the key on your pad that you want to assign or else it will always assign that “ghost key”.
So it works but you have to be fast!
Keep trying until you get all the keys set. Then you are done and can play just normal.
I am using Windows 7. Cheers!

I also tried the shady motionjoy stuff tonight. Not only have they always been shady, and known to be (it’s quite likely spyware with the online requirement for it to work,) but now their web site is broken, which in turn completely breaks all their drivers. I got it installed, and it launched every time I connected the controller, but the best I ever managed to do was get “gamepad” level functionality (dpad and buttons, no thumbsticks) Nothing in the configuration tool would actually load a page, and there were scripts throwing errors every time you clicked anything. The only menu still working was to select a language.

Hopefully, that means it’s so broken that it never phoned home with a bunch of info I don’t want some shady company to have, because I stumbled across an alternate method which works great (though it causes it to show up as an XBox 360 controller, which confused me at first since I also have a 360 controller connected at the moment.) This does require having a service run from then on, but it detects connection/disconnection perfectly, and allows the use of all buttons, plus the variable pressure sensing for L2/R2.