Jump to content

Photo

Linux Joystick Workaround

linux joystick detection

  • Please log in to reply
11 replies to this topic

#1
R4Z0R-8L4D3

R4Z0R-8L4D3
  • Backer
  • 15 posts
  • Joined: 22-November, 2015
  • United States

Just wanted to throw this on here for anyone who was stuck in the same situation on Linux with the game not detecting joysticks. This is by no means a proper fix but a work around so you can use a joystick.

 

QJoyPad (http://qjoypad.sourceforge.net/)

 

Basically you can map a joystick that is detected and properly configured in Linux to any mouse or keyboard functionality the game supports. It runs in a task tray and you can setup and select different profiles on the fly.

 

Takes some fiddling but no more than anything else in Linux and works very well.

 

If you have a older joystick like mine (CH Flightstick Pro) be sure to use 'jstest' or 'jstest-gtk' to calibrate, that way the proper values are being reported e.g. 0 to 32767 rather than 0 to 255.

 

Enjoy!


  • 3

#2
raptur

raptur
  • Underground
  • 485 posts
  • Joined: 07-May, 2015
  • United States
x3
x3
x2

Thank you R4Z0R-8L4D3!

 

When setting up pitch/roll/yaw, make sure to check the gradient box so it's treated as an actual axis. For example, I have yaw left mapped to the left arrow key in qjoypad, and get faster or slower yaws based on how far my joystick is moved to the left. Apparently, under the hood qjoypad accomplishes this by sending keypress events at different rates. Here's some more documentation on axis configuration:

 

http://qjoypad.sourc...t/doc/x179.html

 

EDIT: it's better to set pitch and yaw to be Mouse (vert.) and mouse (hor.), since you'll get smoother motion. I think you'll still need to pass roll as a simulated keyboard pressing rate.


  • 1

#3
mikus

mikus
  • Backer
  • 27 posts
  • Joined: 19-June, 2015
  • United States

I dunno, after messing with this thing for a half hour mapping keys, it just started registering constant pushes from my saitek and freaking out my entire system.  I finally gave up in a fit of frustration finally having to just kill the qjoypad pid after realizing I couldn't "unmap" keys without resetting config, and starting over having wasted yet another hour of my life to just get this f'ing game with my joystick working.

 

Sublevel Zero at Conzar's recommendation looked pretty good for a Descent-ish fix, and they seem to have figured out the lost art of making a joystick useful in games, so I'll try that while you guys figure out the engine support under linux (or don't as it seems).


  • 0

#4
raptur

raptur
  • Underground
  • 485 posts
  • Joined: 07-May, 2015
  • United States
x3
x3
x2

It sounds like maybe your joystick is not quite centered? Use jstest to center it, and you might also tweak the blue triangles in the axis config to increase deadzone. Also, each profile is stored under ~/.qjoypad3/ in a pretty intuitive text format, so you can delete lines manually as a last resort; or delete ~/.qjoypad3/layout to get it to start up the next time with no layout selected. If you drop by in chat, I'm there most evenings and would be happy to help.


  • 0

#5
defcon_x

defcon_x
  • Underground
  • 1,450 posts
  • Joined: 20-March, 2015
  • United States
x12
x4

What if it says I need libxtst to compile the program but I clearly have libxtst?


  • 0

LINUX OS: MINT 17.X • DESKTOP: CINNAMON 2.X • CPU: i3 • RAM: 8GB • GPU: GTX960 • Thrustmaster T16000M • HELP DE-BUG D:U!


#6
raptur

raptur
  • Underground
  • 485 posts
  • Joined: 07-May, 2015
  • United States
x3
x3
x2
Could you pastebin the compilation output? i.e, run:
 
 
make &> qjoypad_compile_log
 
and then upload to pastebin.com and post the link here. Or, install wgetpaste and just run:
 
 
make 2>&1 | wgetpaste
Please also pastebin the output of ldconfig -p
  • 0

#7
R4Z0R-8L4D3

R4Z0R-8L4D3
  • Backer
  • 15 posts
  • Joined: 22-November, 2015
  • United States

Alternatively if you're still running Mint it should be in your distro repo.


  • 0

#8
raptur

raptur
  • Underground
  • 485 posts
  • Joined: 07-May, 2015
  • United States
x3
x3
x2

I couldn't find qjoypad in the repos at http://packages.linuxmint.com/


  • 0

#9
raptur

raptur
  • Underground
  • 485 posts
  • Joined: 07-May, 2015
  • United States
x3
x3
x2

Hmm, looking at the PKGBUILD for Arch, there is a patch that modifies qjoypad.pro, changing

 

QMAKE_LIBS += -lXtst

 

to

 

QMAKE_LIBS += -lXtst -lX11

  • 0

#10
defcon_x

defcon_x
  • Underground
  • 1,450 posts
  • Joined: 20-March, 2015
  • United States
x12
x4

 

Hmm, looking at the PKGBUILD for Arch, there is a patch that modifies qjoypad.pro, changing

QMAKE_LIBS += -lXtst

to

QMAKE_LIBS += -lXtst -lX11

 

Does this have to do with the error I had? Should I attempt this patch, or were you just adding to the general commentary about qjoypad?

 

I was able to install using sudo apt-get but it appears to run invisibly when I run it that way. That's why I'm attempting a manual compilation.


  • 0

LINUX OS: MINT 17.X • DESKTOP: CINNAMON 2.X • CPU: i3 • RAM: 8GB • GPU: GTX960 • Thrustmaster T16000M • HELP DE-BUG D:U!


#11
raptur

raptur
  • Underground
  • 485 posts
  • Joined: 07-May, 2015
  • United States
x3
x3
x2
You don't need to compile manually. It should appear in your task bar. Left click the task bar icon to bring up the configuration window, and right click to select a profile.
  • 0

#12
defcon_x

defcon_x
  • Underground
  • 1,450 posts
  • Joined: 20-March, 2015
  • United States
x12
x4

You don't need to compile manually. It should appear in your task bar. Left click the task bar icon to bring up the configuration window, and right click to select a profile.

 

Clicking on the task bar icon brings up nothing.

 

It's running in the task manager but is not producing any visible GUI at all.


  • 0

LINUX OS: MINT 17.X • DESKTOP: CINNAMON 2.X • CPU: i3 • RAM: 8GB • GPU: GTX960 • Thrustmaster T16000M • HELP DE-BUG D:U!






Also tagged with one or more of these keywords: linux, joystick, detection

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users