I've synced my controller during installation and now it's not working at the Zerogame menu.

This is a complex issue and can be caused by multiple things, so we will go through them all one by one. First, we want to figure out exactly what the issue is, so follow the instructions below so that we can figure out which particular issue you are actually having.

 

#1 - Is your keyboard the only thing plugged into the PS3's USB ports?

First, be sure you are booting up Linux with a USB keyboard plugged into the PS3 and *nothing else*. Make sure that not even the PS3 USB charging cable is plugged in. Make sure all your Rock Band instruments are unplugged as well. If you do not unplug your devices from the USB ports on the PS3, Linux may see one of the other devices as the first controller ahead of your SIXAXIS/DualShock, which means Zerogame will not see it as the first controller and make the menu not respond to your button presses. Anytime after booting, press the PS button on one of your paired SIXAXIS/DualShock controllers to turn it on. The four LEDs on the controller will flash and stay flashing. This is normal when using Zerogame.

 

#2 - Are your controllers properly paired with the PS3 in Linux?

If you press the PS button and your LEDs don't flash, you haven't properly paired your controllers yet.

If you rebooted and have all your devices unplugged from the PS3 and still do not have your controllers responding on the Zerogame menu, we'll want to check to see if your controller is properly pairing to the PS3. After your controller's been turned on and the LEDs are flashing, we can check to see if the controller has been properly recognized.

Login as the root user on a text terminal (Ctrl-Alt-F2), then go to /dev/input:

cd /dev/input

Your SIXAXIS should be represented by js0 in the /dev/input folder. Linux will numerate each joystick starting from js0 and moving up... so if you had 4 joysticks plugged in,you would have js0 through js3 in /dev/input. We'll check to make sure your SIXAXIS is js0 by doing the following:

cat js0

At this point, you should see garbage being output to the screen and stop. Start pressing buttons and see if more garbage is being written to the screen in reaction to your button presses. If so, your controller is properly paired and working and is seen as the first controller - so far, so good.

If you do not see garbage being output to the screen, be sure you are using an official Sony SIXAXIS or DualShock controller. 3rd party controllers may or may not work.

Hit Ctrl-C to stop "cat js0".

For those of you who didn't see garbage being output to the screen while pressing buttons... see if there are any other js files in /dev/input:

ls /dev/input/js*

It should output just js0. If you see js0 and js1, you either have something else plugged into the PS3 that it sees as a joystick, perhaps even your keyboard. Try "cat js[number]" without the brackets and test each one until you find the one associated with your controller. If you have js1 and no js0, something is being seen as the first joystick before your SIXAXIS... probably something plugged in before you booted. Reboot and try again.

If your controller shows up as js0 and is reacting properly, move on. Switch back to Zerogame with Ctrl-Alt-F7.

 

#3 - Is your keyboard seen as a keyboard by Gizmod?

Gizmod is a piece of software that can take input from any device and create input to send to any program. It's used within Zerogame for a few different reasons:

  1. To avoid a bug in the way Wahcade handles joystick input
  2. To allow us a simple way to quit emulators that do not allow us to set up a joystick button for quitting

Gizmod is also the reason why a keyboard is needed to be plugged in at all times. It cannot simulate keypresses without a keyboard being plugged in, a problem which I plan on fixing in the near future. If your keyboard is recognized, your button presses on your SIXAXIS should work and get passed along as keyboard events to Wahcade, allowing you to move up and down through your gamelist and so on.

To test Gizmod and see how it is seeing your devices, switch to a text terminal (Ctrl-Alt-F2) and login as zerogame. Run the following command:

killall gizmod

Followed by:

gizmod

 

(If the 'killall gizmod' command comes back saying nothing's been killed, it just means gizmod wasn't running at the time. Continue on as normal.)

 

Once gizmod starts, it outputs a list of your recognized devices to the terminal. You should be able to see your keyboard as well as your SIXAXIS/DualShock 3 controller listed in the device list, such as in the following example, which shows a Logitech wireless keyboard being used with a dongle and two PS3 controllers:

Standard - Directory Input
Standard - Logitech USB Receiver [event0] vid: 0x96d pid: 0xc512
Standard - Logitech USB Receiver [event1] vid: 0x96d pid: 0xc512
Keyboard - Sony Computer Entertainment Wireless Controller [event3] vid: 0x54c pid: 0x268
Keyboard - Sony Computer Entertainment Wireless Controller [event4] vid: 0x54c pid: 0x268

Here, gizmod is showing us how it is seeing your devices. We want it to see both our controllers and our keyboard as keyboards. As you can see, it successfully sees the SIXAXIS as a keyboard, but it is not recognizing the keyboard. Here's how we fix that.

 

#4 - Making gizmod see your keyboard as a keyboard

While still on the same text terminal, hit Ctrl-C to quit Gizmod. Make a note of the text it output for the keyboard somewhere as we will need it. Logout of the zerogame user by typing in "exit", then login as root. Gizmod's got one file that it uses to determine whether a particular device should be seen as a keyboard. Let's edit the file by typing in the following (remember, Linux is case-sensitive):

nano /etc/gizmod/GizmoDeviceStrings.py

With the file open, scroll down until you a line that starts with the following:

KEYBOARD_GIZMOS = ["keyboard", "Sony Computer Entertainment Wireless Controller", "0x566:0x3107"....

This particular line is what Gizmo compares device strings against. If any of those strings show up in a device name, it will treat it as a keyboard. As you can see, if the device name has the word "keyboard" in it, it will be seen as a keyboard. Now, the real issue with your keyboard is just that we will need to add your keyboard string or USB vendor ID and product ID to the list of KEYBOARD_GIZMOS line. Because gizmod will consider any string you put in as a keyboard, you will want it to be specific. In our example case, don't put in "Logitech", put in "Logitech USB Receiver" in. Alternatively, you can use the USB vendor ID and product ID. In the text output by gizmo for your devices, you can find them listed as vid and pid. The third string in the list of KEYBOARD_GIZMOS shows you how you should enter in your vid and pid if you decide to go this route.

Looking at the full KEYBOARD_GIZMOS line, you can see that the Logitech USB Receiver is already listed, so you can see how it should be entered into the file. Be sure NOT to make the line wrap or else gizmod might complain. Delete empty space until the entire KEYBOARD_GIZMOS string is all together on the same line. Save the file and quit nano.

Once you've entered your string, test it out by doing the following:

gizmod

And see what gizmod now says about your devices. If you see that the string for your keyboard has changed from standard to keyboard like the example below, SUCCESS:

Standard - Directory Input
Keyboard - Logitech USB Receiver [event0] vid: 0x96d pid: 0xc512
Keyboard - Logitech USB Receiver [event1] vid: 0x96d pid: 0xc512
Keyboard - Sony Computer Entertainment Wireless Controller [event3] vid: 0x54c pid: 0x268
Keyboard - Sony Computer Entertainment Wireless Controller [event4] vid: 0x54c pid: 0x268

At this point, quit gizmod with Ctrl-C and reboot your PS3. You should now be able to move around in Zerogame using your SIXAXIS/DualShock 3 d-pad.

 

#5 - File a bug to get your keyboard string added to Zerogame's default list

Now that you've got your keyboard and controller working as they should, do yourself and the other members of the Zerogame community that use the same keyboard a favor and file a bug/support ticket on the website which includes the full string for your keyboard as seen by Gizmod, such as below:

Standard - Logitech USB Receiver [event0] vid: 0x96d pid: 0xc512
Standard - Logitech USB Receiver [event1] vid: 0x96d pid: 0xc512

I'll then receive the bug report and add your keyboard strings to my collection in SVN. At that point, you won't ever have to go through this process ever again as your keyboard will be recognized by all future releases of Zerogame.

 

#6 - Have a cookie

I know this was a long post with a lot of information in it. If you are confused or have questions about this FAQ, feel free to ask for clarification in the forums.