Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm having a very weird problem on my Arch Linux machine. Well, I've been having it for a couple of years, but since I don't use joypads very often I just ignored it the first time around. It's a very weird problem so read carefully.

I while ago I tried to use my Xbox 360 pad to play some old PSX games on emulators (don't worry, they were original disks). When I tried to configure the pad (using xpad kernel module), the emulator (PCSX running natively) kept telling me that the right trigger was kept pressed, therefore making configuration of the other keys impossible (since every key I tried to configure kept being assigned to the right trigger).

I tried another emulator, ePSXe running under Wine (and then ePSXe native), and had the same problem. At this point I was already extremely suspicious, I'm using an original, perfectly working Xbox 360 wired controller and xpad which is used by everybody else, why wouldn't it work? Yet, I didn't give up and tried alternative solutions, such as the xboxdrv userspace driver. No luck. I then gave up, since I didn't want to lose sleep over this.

Recently, I bought a USB adapter for PS2 controllers. I plugged it in, tried to configure it on the emus and...what? They keep telling me that the R2 button (which is in the same position as the right trigger of the X360 controller) is being pressed! What are the odds that two fully working controllers give the same problem while using different drivers and different software? At least now it's clear that it's not the X360 pad's software or xpad's or the emulator's.

Having excluded all these suspects, there is only a single explaination I could come up with, which would be that the kernel's joypad module is messed up. But I've never touched any configuration files concerning joypads and my kernel is the stock kernel from the Arch Linux repositories. Can you please help me with my problem? I've invested a lot of time and money on this particular issue.

Why does it detect always the same key (the right trigger/R2) even if those keys are technically different keys coming from different joypads using different drivers (although I think xpad just "translates" input for the kernel joypad module)? Keep in mind that the other keys work correctly, I've once managed to assign them manually and every single one of them worked, as long as I didn't assign the right trigger/R2 to any function.

Why wouldn't this work for me if I'm not using a modified kernel and I've never touched a config file relating to the joypad? Has anyone else encountered this problem? I don't even know what to type on the search engine. Thank you very much for reading.

share|improve this question

It looks like there could be a problem with the xpad modules, but only in that it may not recognize your controller(s), thus making it drop into 'unknown pad' mode.

You can modify the module's operation with three parameters:
+ dpad_to_buttons : Map D-PAD to buttons rather than axes for unknown pads
+ triggers_to_buttons : Map triggers to buttons rather than axes for unknown pads
+ sticks_to_null : Do not map sticks at all for unknown pads

By adding/changing a line in a file in /etc/modprobe.d, you can set/reset these parameters.

Create a file in /etc/modprobe.d, it MUST end with '.conf', other it won't be recognized as a config file.

In this file, place this line:

options xpad {option} [{option}...]

Add or remove options as desired. I would recommend commenting out (#) the line if there are no options listed, or just delete the file entirely.

You'll likely have to rmmod the xpad module, then modprobe to reload it with the new options.

If the options don't seem to be recognized, you may need to run depmod -a to rebuild the module dependency tables.

You can see what parameters are valid for a module with the modinfo command.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .