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.

2 Answers2

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>
Sean
  • 1,953
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.