Wednesday, December 25, 2013

How to set up the Logitech F310 on Ubuntu!

How to set up the Logitech F310 on Ubuntu 13.10, so it actually works!

First things first. Check the back of the controller and make sure the switch is on the "X" position.

After that, plug it into your USB port and open up a terminal. Type in "lsusb" and you should see something like...

  • Bus 003 Device 004: ID 046d:c21d Logitech, Inc. F310 Gamepad [XInput Mode]
If you see the above then your are set to continue reading, if you do not see the above then check the switch on the back of the controller is definitely on the "X" position and re-plug the controller back in until you see the above is listed. You can keep doing lsusb over and over until you finally see the controller has been connected. 

Now you will need a program called "jstest" in order to make sure the controller actually works. Grab jstest by doing the following in a terminal.
  • sudo apt-get install jstest-gtk

Open up "jstest" and see if your controller is listed. If it looks like the pic below then you are all set! Chances are it will be empty, in which case don't worry, keep reading. 

If the controller isn't being recognized then all you have to do is enter the following into a terminal.
  • sudo modprobe xpad

Then fire up "jstest" again and see if your controller is there! It should be. 

To make this fix stick after a reboot you will need to edit a file. Simple copy and paste this into your terminal.
  • sudo gedit /etc/modules 
and type in "xpad" without  the quotes at the bottom of the document and save it. It should look like this when finished. 

Congratulations! You can now start using your controller with what you wanted it for! I use it for the pcsx emulator and find that it works great after I properly set up the buttons/controls via pcsx's controller plugin page. Make sure if using pcsx that you click the "device" box and choose "generic x-box pad". 


  1. Thank you so much. I couldn’t figure it out until now! Definitely referring this to others with the same problem!

  2. Thanks, everything has worked just to try it on some games!

  3. This comment has been removed by the author.

  4. Hey, I'm using Ubuntu 14.04, and I had a couple questions.

    Question #1:
    For some reason jstest puts the axes out of order. By default, jstest thinks one of the trigger buttons (ABS_Z) is an axis on the right control stick (ABS_RY), and that one of the axes on the right control stick is a trigger button, so I have to swap the axis order around to get the controller to work properly. This wouldn't be such a big deal, except that for some reason jstest refuses save profiles, meaning I have to rearrange the axis order ever time I reset my PC, which is really annoying. Any idea why this might be?

    Axis 4: ABS_RY Right Stick X jstest Axis 2
    Axis 2: ABS_Z Left Trigger (LT) jstest Axis 3

    Question #2:
    I'm trying to get my F310 controller to work with FINAL FANTASY XI, which was originally designed to be played with Playstation 2 controller, which is **almost** identical to the Logitech F310 controller, except for one tiny detail: the two trigger buttons on the shoulders. While a PS2 controller and the F310 controller both have four shoulder buttons, on a PS2 controller they're all just regular buttons (L1, L2, R1, R2), while on the F310 controller there are two regular buttons (LB & RB) and two trigger buttons (LT & RT), and the two trigger buttons each act as an independent one-dimensional axis. Is there any way to make the game recognize the two trigger buttons/axes as buttons?

    Axis 2: ABS_Z Left Trigger (LT) jstest Axis 3
    Axis 5: ABS_RZ Right Trigger (RT) jstest Axis 5

    1. Both of those issues seem outside of jstest to be honest. Mainly I only use jstest to see if the controller even works, any of the configurations for the buttons I do outside of jstest.

      I think your best bet would be to try and configure the controller with either qjoypad or xboxdrv.

      xboxdrv might work better for you due to being able to save the configuration.

      Good luck and sorry for the late reply.

  5. Okay. So your solution was a gem for me. Worked perfectly. However, I am unclear as to how to get it to configure to Star Wars: Knights of the Old Republic. I am not sure how to access this. Do I do it through PlayOnLinux? Or another venue all together?

    I am running Ubuntu 14.04 if that helps any

    1. Sorry for the late response. Usually you try to configure the controller in the actual game itself, if the game allows it. According to this page

      the Logitech should work by default however I am assuming you aren't using that port.

      If that is the case then how about trying these two options.

      First, try this. qjoypad. It should be available in the Ubuntu repos.

      Second, if the first one doesn't work, try to make the controller emulate an xbox controller by using xboxdrv.

      This may help.

  6. Getting this on fedora 29
    [root@localhost ~]# dnf install jstest-gtk
    Last metadata expiration check: 1:56:04 ago on Wed 06 Mar 2019 07:39:06 PM PST.
    No match for argument: jstest-gtk
    Error: Unable to find a match