Author Topic: Linux Joystick Issues  (Read 3368 times)

0 Members and 1 Guest are viewing this topic.

Linux Joystick Issues
Hi Guys,

Loved playing FS/FS2 ages ago and I was really pleased to discover this project.

I followed the Linux Install instructions and have had no problems. I have a fully functional install, that I can play with the mouse no problem.

The issue comes when I try to play with my joystick, (the only way to play imho).

First off a few basics,
FS Open 3.6.10
Ubuntu 9.10
Kernel 2.6.31-20
Saitek Cyborg 3D USB Joystick.

Joystick is fully functional/calibrated with other games, e.g. Vendetta-Online (with it's native Linux Client)
Binding seems to be correct also, (yaw is on X axis, pitch on Y axis and buttons work).

The issue is the calibration seems way off. Centre point seems ok, i.e. the ship doesn't spin when I don't touch it, but the ship only responds when I yaw left and pitch down, I can't yaw right or pitch up.

jscal -c seems to work, and I apply the settings (using jscal -s)but this makes no difference to the behaviour of the joystick within fs2.

So my question, how is the joystick calibration handled by the linux version of fs_open? How can they be modified? I've fiddled around with jscal/jstest for ages, modfying values manually but none of it seems to do anything. Is this a waste of my time? Is there a config file that fs_open will take to set correction values for joystick configuration?

Any help would be kindly appreciated, no other thread I have searched for seems to cover this.

Kind Regards
Steve Collison

 
Re: Linux Joystick Issues
Alight Guys,

After another hours fiddling it's working!, largely thanks to another thread found here, http://www.hard-light.net/forums/index.php?topic=17364.msg572070#msg572070 and another post on a different forum here http://superuser.com/questions/17959/linux-joystick-seems-mis-calibrated-in-an-sdl-game-freespace-2-open.

Though to save anyone reading those two threads I'll put it in the way that my limited brain can understand!

It seems to me that jscal wasn't putting the calibration values anywhere that was being noticed because SDL (SimpleDirectmediaLayer) doesn't use /dev/input/js0 to talk to the joystick hardware.

So i followed the instructions on the above thread, added SDL_JOYSTICK_DEVICE=/dev/input/js0 to /etc/environment and rebooted. Then recalibrated (jscal -c /dev/input/js0) and hey presto it worked!

One quick note though, the settings are lost on every reboot, so adding the settings to a startup script will help matters. E-mail me if anyone wants to know how I did this. (though this thread may help ya http://ubuntuforums.org/showthread.php?t=391995.

Also, I did re-compile and reinstall libSDL with the --disable-input-events flag but this seemed to make no difference, maybe it did, so if the above method doesn't work try also recompiling libSDL.

I can now enjoy this lovely game all over again and also enjoy the fantastic work the community has put into the fs_open engine and all of the mods!

Apologies for the wasted post

Regards
Steve



 

Offline captain-custard

  • previously known as andicirk
  • 210
  • one sandwich short of a picnic
Re: Linux Joystick Issues
wow a self solving support .....;;; do i see Jeff Vader and The E skipping across the meadow hand in hand ?  :D
"Duct tape is like the force. It has a light side, a dark side, and it holds the universe together."

 

Offline Jeff Vader

  • The Back of the Hero!
  • Moderator
  • 212
  • Bwahaha
Re: Linux Joystick Issues
do i see Jeff Vader and The E skipping across the meadow hand in hand ?  :D
... perhaps an approving nod from a respectful distance.

Still, I gotta admit. This is pretty cool.
23:40 < achillion > EveningTea: ass
23:40 < achillion > wait no
23:40 < achillion > evilbagel: ass
23:40 < EveningTea > ?
23:40 < achillion > 2-letter tab complete failure

14:08 < achillion > there's too much talk of butts and dongs in here
14:08 < achillion > the level of discourse has really plummeted
14:08 < achillion > Let's talk about politics instead
14:08 <@The_E > butts and dongs are part of #hard-light's brand now
14:08 <@The_E > well
14:08 <@The_E > EvilBagel's brand, at least

01:06 < T-Rog > welp
01:07 < T-Rog > I've got to take some very strong antibiotics
01:07 < achillion > penis infection?
01:08 < T-Rog > Chlamydia
01:08 < achillion > O.o
01:09 < achillion > well
01:09 < achillion > I guess that happens
01:09 < T-Rog > at least it's curable
01:09 < achillion > yeah
01:10 < T-Rog > I take it you weren't actually expecting it to be a penis infection
01:10 < achillion > I was not

14:04 < achillion > Sometimes the way to simplify is to just have a habit and not think about it too much
14:05 < achillion > until stuff explodes
14:05 < achillion > then you start thinking about it

22:16 < T-Rog > I don't know how my gf would feel about Jewish conspiracy porn

15:41 <-INFO > EveningTea [[email protected]] has joined #hard-light
15:47 < EvilBagel> butt
15:51 < Achillion> yes
15:53 <-INFO > EveningTea [[email protected]] has quit [Quit: http://www.mibbit.com ajax IRC Client]

18:53 < Achillion> Dicks are fun

21:41 < MatthTheGeek> you can't spell assassin without two asses

20:05 < sigtau> i'm mining titcoins from now on

00:31 < oldlaptop> Drunken antisocial educated freezing hicks with good Internet == Finland stereotype

11:46 <-INFO > Kobrar [[email protected]] has joined #hard-light
11:50 < achtung> Surely you've heard of DVDA
11:50 < achtung> Double Vaginal Double ANal
11:51 < Kobrar> ...
11:51 <-INFO > Kobrar [[email protected]] has left #hard-light []

 
Thank goodness for this thread.
For whatever reason (incompetance?) SDL_JOYSTICK_DEVICE didn't seem to work for me on Ubuntu 10.10 (Maverick), but the related hack of killing the /dev/input/event? source for the joystick seems to work for me*. However, it's unpleasant so I wouldn't recommend it unless you are desperate.

Anyway, this is majorly confusing. Is fs2 doing something atypical or is Ubuntu wholly at fault here? I'm kind of suspecting the latter because xserver-xorg-input-joystick displayed the same calibration problems after using jscal.

BTW, it should be possible to store the calibration using jscal-store. I've had mixed success with this so far.


* Something like...
> cd /dev/input/by-id/
> readlink *event-joystick
> sudo rm <the path(s) from the above command>
Now SDL is forced to use /dev/input/js0