7

It's not that it's being recognised, when I run lsusb I get the following output$ lsusb Bus 001 Device 002: ID 8087:8000 Intel Corp. Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 003 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 002 Device 003: ID 0eef:791b D-WAV Scientific Co., Ltd Bus 002 Device 002: ID 046d:c21d Logitech, Inc. F310 Gamepad [XInput Mode] Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub And when I start up jstest-gtk it seems to recognise that my controller is there. I can open it up to see what is happening, and my left joystick works perfectly, but the trigger buttons and right joystick buttons are mixed up.

I am hoping there's a working profile I can download and install to get the buttons to map correctly or, failing that, an easy GUI programme to change the mapping (for the OS - not just in a specific emulator) - possibly with different, selectable, profiles. So far my googlefu is failing me, so any help is appreciated.

Cheers!

PS - It's for a game under Steam if that helps (ie if there is a way to do this within Steam then that will do too. The game itself (Glare) doesn't have a system for doing this.

  • This might help qjoypad.sourceforge.net/#introduction – Faizan Akram Dar Apr 15 '15 at 3:32
  • I've had a look at that, I can install it, and get a tray icon, but that's about it. If I run it from terminal it can read all my inputs, but there doesn't appear to be a way to map those inputs to the controller. – Tamsyn Michael Apr 15 '15 at 8:07
  • I've gotten it working - it seems to be for mapping keyboard and mouse to the control pad, not fixing the control pad mapping. All the inputs on the control pad do something, it's just that what it's mapping to is wrong (so I press the B button and it reads it as X, or I push the left joystick left and it reads it as me pulling the right trigger, etc). – Tamsyn Michael Apr 15 '15 at 14:58
  • qjoypad is similar to xpadder in windows, it maps joystick to mouse and keyboard. Anyway if it solved your problem you may upvote on comment. – Faizan Akram Dar Apr 15 '15 at 15:02
  • 1
    I'd recommend trying out some of the software mentioned in askubuntu.com/q/32031/162914 – Robobenklein Apr 20 '15 at 3:13
4

Use jstest-gtk to map the right analog stick to the correct axes. In the mapping window drag Axis 2: ABS_RX and Axis 3: ABS_RZ above Axis 4:ABS_Z (really left trigger).

Your final configuration should look like this: enter image description here

Saving this profile would give you ~/.config/jstest-gtk/profile1.xml

<?xml version="1.0"?>
<joysticks>
  <joystick>
    <name>Logitech Gamepad F310</name>
    <device>/dev/input/js0</device>
    <calibration>
      <axis>
        <calibrate>1</calibrate>
        <center-min>-128</center-min>
        <center-max>128</center-max>
        <range-min>-32639</range-min>
        <range-max>32639</range-max>
        <invert>0</invert>
      </axis>
      <axis>
        <calibrate>1</calibrate>
        <center-min>-128</center-min>
        <center-max>128</center-max>
        <range-min>-32639</range-min>
        <range-max>32639</range-max>
        <invert>0</invert>
      </axis>
      <axis>
        <calibrate>1</calibrate>
        <center-min>-128</center-min>
        <center-max>128</center-max>
        <range-min>-32639</range-min>
        <range-max>32639</range-max>
        <invert>0</invert>
      </axis>
      <axis>
        <calibrate>1</calibrate>
        <center-min>-128</center-min>
        <center-max>128</center-max>
        <range-min>-32639</range-min>
        <range-max>32639</range-max>
        <invert>0</invert>
      </axis>
      <axis>
        <calibrate>1</calibrate>
        <center-min>127</center-min>
        <center-max>127</center-max>
        <range-min>0</range-min>
        <range-max>254</range-max>
        <invert>0</invert>
      </axis>
      <axis>
        <calibrate>1</calibrate>
        <center-min>127</center-min>
        <center-max>127</center-max>
        <range-min>0</range-min>
        <range-max>254</range-max>
        <invert>0</invert>
      </axis>
      <axis>
        <calibrate>1</calibrate>
        <center-min>0</center-min>
        <center-max>0</center-max>
        <range-min>-1</range-min>
        <range-max>1</range-max>
        <invert>0</invert>
      </axis>
      <axis>
        <calibrate>1</calibrate>
        <center-min>0</center-min>
        <center-max>0</center-max>
        <range-min>-1</range-min>
        <range-max>1</range-max>
        <invert>0</invert>
      </axis>
    </calibration>
    <axis-map>
      <axis>ABS_X</axis>
      <axis>ABS_Y</axis>
      <axis>ABS_RX</axis>
      <axis>ABS_RY</axis>
      <axis>ABS_Z</axis>
      <axis>ABS_RZ</axis>
      <axis>ABS_HAT0X</axis>
      <axis>ABS_HAT0Y</axis>
    </axis-map>
    <button-map>
      <button>BTN_A</button>
      <button>BTN_B</button>
      <button>BTN_X</button>
      <button>BTN_Y</button>
      <button>BTN_TL</button>
      <button>BTN_TR</button>
      <button>BTN_SELECT</button>
      <button>BTN_START</button>
      <button>BTN_MODE</button>
      <button>BTN_THUMBL</button>
      <button>BTN_THUMBR</button>
    </button-map>
  </joystick>
</joysticks>
  • Thanks a lot! I haven't had the chance to test this answer, but it is a good answer, nonetheless. =) – Tamsyn Michael Apr 27 '15 at 5:45
2

I'm having a similar problem and I tried what was suggested but I still have the same problem. My right analog stick will not work for looking up/down, only left/right. I've tried countless suggestions and nothing's worked so far.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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