Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I'm currently trying to get 2 PS3 controllers (that are connected via USB) to work on my Ubuntu 12.04 machine. For most games this works out-of-the-box but some games such as Shutter identify the two controllers as being only one. I found out that in the "Shatter-case" the "Bus-Vendor-Product-Version" information that is provided by e.g. cat /proc/bus/input/devices is used to identify the gamepad (which is identical for the both controllers):

I: Bus=0003 Vendor=054c Product=0268 Version=0111
N: Name="Sony PLAYSTATION(R)3 Controller"

There is a config file for Shatter (~/.sidhe/Shatter/data/profiles/default_plr_profile.xml) that stores the information like this:

<singleplayer_controller_guid>gamepad_030000004c0500006802000011010000</singleplayer_controller_guid>

Do you have any ideas how I could work around this (maybe changing the "Product"-id or something like that for one controller)?

share|improve this question

1 Answer 1

That sounds like a bug in SDL2. GUIDS are generated like this:

http://hg.libsdl.org/SDL/file/a9d1c47bb1aa/src/joystick/linux/SDL_sysjoystick.c#l117

And are used primarily for configuring the controller. However the GUID is only identifying the controller type not the actual controller, so two controllers of the same type generate the same GUID, which is not what GUIDs should do.

As for workaround, xboxdrv has support for PS3 controllers when connected via USB. In case you prefer Blutooth xboxdrv can also emulate a virtual controller on top of a regular one and allows you to fiddle with product, vendor, etc. on the virtual one, see examples/evdev.xboxdrv.

Made a bug report: https://bugzilla.libsdl.org/show_bug.cgi?id=2327

share|improve this answer
    
Switching to xboxdrv solved at least part of the problem. The controllers work for most games now (except "Shatter"). –  Beni Jan 1 at 17:05

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.