Jump to content

KSP 1.4 Joystick not found under linux


Recommended Posts

The joystick is correctly installed and work fine in KSP 1.3.1

Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 Device 002: ID 0079:0006 DragonRise Inc. PC TWIN SHOCK Gamepad
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 003: ID 04f2:0841 Chicony Electronics Co., Ltd HP Multimedia Keyboard
Bus 003 Device 002: ID 1bcf:0005 Sunplus Innovation Technology Inc. Optical Mouse
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

But in configuration the gamepad don't work like it is not installed

Edit

Bug Report

Edited by Badsector
Link to comment
Share on other sites

I don't have an answer (sorry), but am having the same issue. My joystick works fine with 1.3.1 but not at all with 1.4 . I've calibrated the joystick, deleting the contents of ./.config/unity3d and using the 1.3.1 config file, all to no avail... One interesting note however, is that I looked at the 1.3.1 config file that I tried using, and all the joystick entries had been deleted. Don't know if that means anything or not, but you never know...

Link to comment
Share on other sites

I have try others solutions like add "SDL_JOYSTICK_DEVICE=/dev/input/js0" to /etc/environment but nothing

After checking the player log i don't find "Using libudev for joystick management" in 1.4

If someone can confirm the same issue i open a bug

Edited by Badsector
Link to comment
Share on other sites

1 hour ago, giganetom said:

I've got the same problem with my custom controller. It appears under /dev/input/js1, jstest-gtk can see it, it even works under the Windows version, but doesn't appear at all under the Linux version.

 

6 hours ago, Lindy said:

I don't have an answer (sorry), but am having the same issue. My joystick works fine with 1.3.1 but not at all with 1.4 . I've calibrated the joystick, deleting the contents of ./.config/unity3d and using the 1.3.1 config file, all to no avail... One interesting note however, is that I looked at the 1.3.1 config file that I tried using, and all the joystick entries had been deleted. Don't know if that means anything or not, but you never know...

 

I have open a bug if you have others information please send yours log or settings

Regards

Luca

Link to comment
Share on other sites

2 hours ago, giganetom said:

Gone crazy and did the same with strace, got the same (negative) result: seems like it's not even trying.

Lolz! My best wild guess is that at best something got forgotten, or over zealously cleaned up, or at worst linux has been boned again by Unity and/or Mono

Link to comment
Share on other sites

So am I the only person that finds it Ironic that after posting link's hailing Kerbal users building of fancy and elaborate custom controllers. And having a release stream on twitch featuring such a controller. Their new game Breaks said controllers. LOL Way to go squad!

Link to comment
Share on other sites

Hello everyone, I have the same issue under Ubuntu Linux, and I found a workaround while we wait for a patch to fix this problem:

- Edit: Scratch all that i wrote below, it seems the settings don't get applied, and the joystick doesn't work in flight!  >:(

---------------------------------------------

In a Unity forum, (https://forum.unity.com/threads/no-joystick-detected.475870) someone posted a way to have your joystick recognized:

sudo apt-get install cmake
sudo apt-get install libsdl1.2-dev
sudo apt-get install libsdl2-dev
sudo apt-get install libncurses5-dev
cd ~/Downloads/sdl-jstest-master
mkdir build
cd build
cmake ..
make install

After compiling and installing, run: sdl2-jstest -l

sdl2-jstest -l
Found 5 joystick(s)

Joystick Name:     'Logitech Logitech Extreme 3D'
Joystick GUID:     030000006d04000015c2000010010000
Joystick Number:    0
Number of Axes:     4
Number of Buttons: 12
Number of Hats:     1
Number of Balls:    0
GameController:
  Name:    'Logitech Logitech Extreme 3D'
  Mapping: '030000006d04000015c2000010010000,Logitech Logitech Extreme 3D,a:b0,b:b4,back:b6,guide:b8,leftshoulder:b9,leftstick:h0.8,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:h0.2,start:b7,x:b2,y:b5,platform:Linux'

Joystick Name:     'Xbox 360 Wireless Receiver'
Joystick GUID:     030000005e040000a102000000010000
Joystick Number:    1
Number of Axes:     6
Number of Buttons: 15
Number of Hats:     1
Number of Balls:    0
GameController:
  Name:    'X360 Wireless Controller'
  Mapping: '030000005e040000a102000000010000,X360 Wireless Controller,a:b0,b:b1,back:b6,dpdown:b14,dpleft:b11,dpright:b12,dpup:b13,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,'

(.... el receptor instala 4 joysticks, usamos el nº1)

After that, append the mapping line to /etc/environment:

SDL_GAMECONTROLLERCONFIG="030000006d04000015c2000010010000,Logitech Logitech Extreme 3D,,lefttrigger:b0,righttrigger:b1,a:b2,b:b4,x:b2,y:b5,start:b7,back:b6,guide:b8,leftstick:b9,leftshoulder:b10,rightshoulder:b11,dpleft:h0.8,dpright:h0:2,dpup:h0.1,dpdown:h0.4,leftx:a2,lefty:a3,rightx:a0,righty:a1,platform:Linux,030000005e040000a102000000010000,X360 Wireless Controller,a:b0,b:b1,back:b6,dpdown:b14,dpleft:b11,dpright:b12,dpup:b13,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3"

In my case, I had to tweak the default mapping to get the 4 axes and <<most of>> the buttons to work,  enough to be playable ;-D

Cheers!

Edited by luke-lukem
Link to comment
Share on other sites

Just tried 1.4.1, same deal. Guess I won't be playing the making history thing for a long time.

But it's fine -  I just perfected an Energia in 1.3 thanks to tweakscaled vectors

Edited by surge
Link to comment
Share on other sites

4 hours ago, surge said:

Just tried 1.4.1, same deal. Guess I won't be playing the making history thing for a long time.

But it's fine -  I just perfected an Energia in 1.3 thanks to tweakscaled vectors

Same here, if squad is able to fix the problem ok otherwise 1.3.1 is fine for me.

@luke-lukem thanks for the info.

Edited by Badsector
Link to comment
Share on other sites

Here's something to do until the linux joystick problem gets sorted out.... Keep the Game Data folders in your windows and linux installs sync'ed, then diff the save files every now and then... I only really need the joystick for flying spaceplanes & atmospheric aircraft. When I have a few aircraft missions together I'll diff the save files, and fly airplanes in windows!

Link to comment
Share on other sites

Nice, another {snip} up that prevents me from even contemplating buying the DLC.

On 3/13/2018 at 6:04 PM, Delbrutis said:

So am I the only person that finds it Ironic...

No. In addition, I find it ridiculous that something as obvious as joysticks not working at all on GNU/Linux got through QA.

On 3/13/2018 at 6:04 PM, Delbrutis said:

LOL Way to go squad!

Indeed. Colour me not impressed. :mad:
 

On 3/14/2018 at 11:08 PM, Lindy said:

Keep the Game Data folders in your windows and linux installs sync'ed

What "windows install"? Nobody mentioned one, I haven't had one in years, and I'm not starting now.

If this game didn't run natively on my OS, I would not have bought it in the first place.

Edited by Gargamel
Portions Redacted by moderator
Link to comment
Share on other sites

Some news, following @luke-lukem advice i have set SDL_GAMECONTROLLERCONFIG variable, you can find a database with mappings for your device at https://github.com/gabomdq/SDL_GameControllerDB and after you can check with gamepadtool application if all work fine, now the joystick is found and the setting accept keybinding but don't store gamepad axis and probably is related at that old issue

Now i'm going to update the issue on the bugtracker, if you can try that solution can be useful for solving this annoying bug

Edited by Badsector
Link to comment
Share on other sites

In case we have to end up using this ridiculous system that basically maps the axes of my very expensive joystick to act like a pathetic console controller, heres one for the CH F-16 Combatstick (just the joystick, not the throttle controller):

SDL_GAMECONTROLLERCONFIG="030000008e060000f400000000010000,CH PRODUCTS CH COMBATSTICK USB,platform:Linux,a:b0,b:b2,x:b1,y:b9,back:b3,rightstick:b8,dpup:b4,dpdown:b6,dpleft:b7,dpright:b5,-leftx:h0.8,+leftx:h0.2,-lefty:h0.1,+lefty:h0.4,rightx:a0,righty:a1,lefttrigger:a2~,"
Don't forget to `export SDL_GAMECONTROLLERCONFIG`

Note that there are no new lines in these, the forum formatting will probably add more, so you need to remove them (I've forgotten how to do the codeblock thing)

As luke-lukem and Badsector have noted, it doesn't actually work yet, because KSP immediately forgets the settings.

While I have the extremely hard to find program (you basically have to recompile SDL2 completely) that generates these strings, heres one for a Logiteck MOMO Racing Wheel with pedals:

SDL_GAMECONTROLLERCONFIG="030000006d04000003ca000000010000,Logitech Logitech MOMO Racing,platform:Linux,a:b3,b:b5,x:b2,y:b7,back:b4,guide:b6,leftshoulder:b0,rightshoulder:b1,rightx:a0,-righty:a1~,+righty:a2~,"

The really moronic thing about this system is that the GUIDs (that huge hex number at the beginning) are generated seemingly randomly by SDL2. Theres no way to find out what they are without writing code that asks libSDL2 itself; they aren't related to USB addresses or vendor/product IDs at all.

Some "millenial" at SDL needs a good hard stabbing in the face.

Edited by surge
Link to comment
Share on other sites

While I'm at the soapbox, in the 1990s I wrote a bit of code for a project called "gamedev" that automatically calibrated polled joysticks. Several months later, I found something similar in the linux kernel, similar to:

value > axis_max ? axis_max = value : value;

value < axis_min ? axis_min = value : value;

I think they missed the extra part that also centres the axes - they lost that when they started using /dev/input/jsX (evdev) instead of just /dev/jsX.

I released my bit as public domain, so no matter who wrote it, it has been used in SDL right up until SDL1.2 and because of it, I've always been able to laugh at windos users with impunity because they seem to need to constantly calibrate their joysticks.

Now this... nothing makes me angrier than morons "forgetting" good algorithms just to be more "windows-like", or lately, "console-like", or "ipad-like".

 

Edited by surge
Link to comment
Share on other sites

8 hours ago, surge said:

As luke-lukem and Badsector have noted, it doesn't actually work yet, because KSP immediately forgets the settings.

The problem is not that KSP forget the axis, axis are recognised and stored perfectly in setting.cfg, the problem is that KSP don't use them.

I have already updated the issue, and i'm waiting for some news from squad

Link to comment
Share on other sites

@luke-lukem

sdl2-jstest -l gives me:

Found 1 joystick(s)

Joystick Name:     'XEOX Gamepad SL-6556-BK'
Joystick GUID:     03000000450c00002043000010010000
Joystick Number:    0
Number of Axes:     4
Number of Buttons: 12
Number of Hats:     1
Number of Balls:    0
GameController:
  not a gamepad

but sdl2-jstest -t 0 recognizes all axes. Also all other joystick/gamepad testing tools I found.

KSP 1.3.1 and all other joystick games I've installed recognized the gamepad.

So this seems not to be the problem.

Exporting the XEOX string from the Git manually changes nothing.

 

KSP 1.4.1 does not recognize the gamepad! (1.4.0 I didn't test)

 

Alex

Link to comment
Share on other sites

I've been trying to get my Wiimote Classic Controller to work with KSP 1.4, to no avail. The PS4 controller works out of the box though...

Edit: Well, the buttons on the PS4 controller work. The axis are shown in settings, but do not work ingame (and no, dead zone isn't set to 1).

Edited by soulsource
Link to comment
Share on other sites

Hi fellows, thank you for your support, I hope the devs fix this problem soon, because I really need the joystick to fly planes and drive rovers.

In the meantime I've restored my 1.3.1 install, so if this issue gets solved, I'll be happy to hear about it.

Cheers!

Link to comment
Share on other sites

On 3/17/2018 at 11:41 PM, Badsector said:

The problem is not that KSP forget the axis, axis are recognised and stored perfectly in setting.cfg, the problem is that KSP don't use them.

It's clearly not that because I've noticed that after assigning an axis, and returning to the settings screen, it still shows '<>' as if it hasn't been assigned, rather than saying something like <Joy2, axis3> or whatever that stupid SDL2 mucks it up to be.

Admittedly, I havent checked the settings.cfg immediately after, but AFAIK, that is only saved on exit anyway. Or perhaps when you press "Apply".

Edited by surge
Link to comment
Share on other sites

And luke-lukem, Squad has always screwed up linux (and apple) majorly in the first few new versions, hopefully take-two won't do any worse.

Although I wonder why you need a joystick to drive a rover :P 

I just write kOS code to do trivial crap like that :)

 

Edited by surge
Link to comment
Share on other sites

Well, there are two issues.

Issue #1: If your input device is not a gamepad (or not recognized by SDL to be one), KSP will not recognize it at all. No buttons or axes work.

Issue #2: If your input device is recognized by SDL as a gamepad (or you are using the environment variable that maps it to a gamepad layout), buttons work just fine. Axes however cannot be assigned. They are shown in the assignment dialogue, and are stored to settings.cfg for the respective control-axis (e.g. AXIS_YAW), but are not shown directly in the input settings UI and are not usable ingame. Furthermore, the INPUT_DEVICES block in settings.cfg remains emtpy.

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...