• 0
Sign in to follow this  
Badsector

KSP 1.1.2 Linux-Joystick axis are not loaded

Question

I have this problem, every time i start ksp i have to go in setting and setup all axis, i have already open a bug #9679 and i patiently wait for some solutions, what i'm asking is if anyone that have it working can post settings.cfg file for see if i can hack my settings in a working way.

Thanks in advance

Regards Luca

Share this post


Link to post
Share on other sites

22 answers to this question

Recommended Posts

  • 0

I have find the culprit is the vendor name of the joystick, someone can help me for find a solution for alias my joystick to another vendor ?

I lacks on knowledge for do that and is the only solution i have, waiting for a squad fix

Edited by Badsector

Share this post


Link to post
Share on other sites
  • 0
3 hours ago, Badsector said:

someone can help me for find a solution for alias my joystick to another vendor ?

Maybe. Depends on how Unity discovers devices... So:

Quote

I have find the culprit is the vendor name of the joystick

Elaborate.

Share this post


Link to post
Share on other sites
  • 0
19 minutes ago, steve_v said:

Elaborate.

My joystick vendor is "Greenasia Inc." and seems due to my locale "it" the "." is wrongly read as a separator and for that don't match system vendor and every time i start the game i have to setup all the joystick axis.

That applies only for axis, buttons are read correctly, here are the lines from settings.cfg

INPUT_DEVICES
{
	GreenAsia Inc.    USB Joystick      = 0
}

AXIS_PITCH
{
	PRIMARY
	{
		name = GreenAsia Inc.    USB Joystick
		axis = 1
		inv = False
		sensitivity = 1
		deadzone = 0.25
		scale = 1
		group = 0
		modeMask = -1
	}

I have try a joystick without "." in the vendor name and it work

You can find better explanation in #9679

Share this post


Link to post
Share on other sites
  • 0
1 hour ago, Badsector said:

You can find better explanation in #9679

Interesting. Unity does appear to have some issues with locale support.
First thought was: override it with Udev rules... but Udev doesn't seem to like me today (the feeling is mutual) so I'll investigate further when I'm at home.
In the mean time, have you tried AFBW? IIRC It uses SDL to detect devices, which may sidestep the problem.

Share this post


Link to post
Share on other sites
  • 0
24 minutes ago, steve_v said:

Interesting. Unity does appear to have some issues with locale support.
First thought was: override it with Udev rules... but Udev doesn't seem to like me today (the feeling is mutual) so I'll investigate further when I'm at home.
In the mean time, have you tried AFBW? IIRC It uses SDL to detect devices, which may sidestep the problem.

AFBW  solve this problem but give others problems with SAS and calibration, i prefer use the stock system that have always worked fine until 1.1.0, now with 1.1.2 input device worked like 1.0.5 but i get this annoying issue with the settings.

Edited by Badsector

Share this post


Link to post
Share on other sites
  • 0

Well, AFAICT Unity is querying Udev directly (why?), and as the 'vendor' attribute seems to be read-only (unless you rewrite the device eeprom) there's no easy way to override it. So I guess it's a) AFBW, b) wait for Unity to fix it, or c) patch the kernel (not keen).

I'll add this to my ever-growing list of Unity annoyances.

Edited by steve_v

Share this post


Link to post
Share on other sites
  • 0
5 hours ago, steve_v said:

Well, AFAICT Unity is querying Udev directly (why?), and as the 'vendor' attribute seems to be read-only (unless you rewrite the device eeprom) there's no easy way to override it. So I guess it's a) AFBW, b) wait for Unity to fix it, or c) patch the kernel (not keen).

I'll add this to my ever-growing list of Unity annoyances.

I don't think is unity because have start to happen with ksp 1.1.2 and probably is enough add some '"' to the code on Squad Side .

Share this post


Link to post
Share on other sites
  • 0

I don't think that will work for KSP.

@Badsector, can you try starting KSP like this please.

LC_ALL=C KSP.x86_64

LC_ALL=C will force the program started after it to use the posix standard for its locale instead of your system locale.

Share this post


Link to post
Share on other sites
  • 0

@sal_vager I already start ksp with LC_ALL=C , what is really strange is that buttons are stored and read correctly but not for axis.

I have try to change system locale but don't fix this issue and here are some changes from ksp 1.1.0 to ksp 1.1.2

working KSP 1.1.0

AXIS_PITCH
{
	PRIMARY
	{
		name = GreenAsia Inc.    USB Jo.
		axis = 1
		inv = False
		sensitivity = 1
		deadzone = 0.05
		scale = 1
		group = 0
		modeMask = -1
	}

not working KSP 1.1.2

AXIS_PITCH
{
	PRIMARY
	{
		name = GreenAsia Inc.    USB Joystick
		axis = 1
		inv = False
		sensitivity = 1
		deadzone = 0.25
		scale = 1
		group = 0
		modeMask = -1
	}

working KSP 1.1.2

AXIS_PITCH
{
	PRIMARY
	{
		name = Logitech Logitech Extreme 3D
		axis = 3
		inv = False
		sensitivity = 1
		deadzone = 0.05
		scale = 1
		group = 0
		modeMask = -1
	}

For last, @sal_vager what version of xubuntu are you running for see if is a libudev issue ?

Edited by Badsector

Share this post


Link to post
Share on other sites
  • 0
20 minutes ago, Badsector said:

For last, @sal_vager what version of xubuntu are you running for see if is a libudev issue ?

I'm using Xubuntu 16,04 64bit, with the UK English locale.

But I don't think it's libdev, after testing KSP every day since December I've been trying to play other games to unwind, and guess what...

Yep, now my controller axis aren't persisting in 1.1.2, but only if I go back to the settings screen, if I go straight into a game the controller axis are working.

This is likely a similar issue as in this thread, but in this case the settings are loading, but are nuked when entering settings.

@Claw has a fix for the Physics.cfg in his stock bug fixes, see this comment for more info, I don't know if it'll work for the settings.cfg though, but he can likely add it.

Checking back over my KSP zips, this bug seems to have occurred between 1.1 and 1.1.1

Badsector, can you try setting your axis, restarting KSP and resuming a game without going into the settings please?

Share this post


Link to post
Share on other sites
  • 0
22 minutes ago, sal_vager said:

I'm using Xubuntu 16,04 64bit, with the UK English locale.

But I don't think it's libdev, after testing KSP every day since December I've been trying to play other games to unwind, and guess what...

Yep, now my controller axis aren't persisting in 1.1.2, but only if I go back to the settings screen, if I go straight into a game the controller axis are working.

This is likely a similar issue as in this thread, but in this case the settings are loading, but are nuked when entering settings.

@Claw has a fix for the Physics.cfg in his stock bug fixes, see this comment for more info, I don't know if it'll work for the settings.cfg though, but he can likely add it.

Checking back over my KSP zips, this bug seems to have occurred between 1.1 and 1.1.1

Badsector, can you try setting your axis, restarting KSP and resuming a game without going into the settings please?

After setting axis , apply-accept, exit game, reload and resume a game axis are not working.

I don't think is the same issue reported from @Claw because settings are nuked only if you save from setting menu without assign axis, the issue here is related to gamepad vendor name because with different joystick-gamepad axis are persistent. My assumption about "." in the vendor name probably is not correct but is the only hint i have find for now.

For that i want try to alias the gamepad to a different vendor but like @steve_v exposed vendor name is read only and i have to wait only for a squad fix about this issue. or recompile joydev.o  kernel module and compromise system stability.

Share this post


Link to post
Share on other sites
  • 0

Okay it's working with my Logitech Wingman, Logitech Dual action and Saitek ST90 but not with my CH Yoke or GreenAsia stick, the Logitech also has a period in its name and the CH yoke does not so the period is unlikely to be the cause.

Quote

INPUT_DEVICES
{
    Saitek ST90 USB Stick = 4
    Logitech Inc. WingMan Extreme Digital 3D = 3
    CH PRODUCTS CH FLIGHT SIM YOKE USB  = 2
    Logitech Logitech Dual Action = 1
    GreenAsia Inc.      USB  Joystick   = 0
}

 As with your findings, the sticks are all shown in the settings.cfg, but two just aren't working in the game after a restart.

Spoiler

AXIS_PITCH
{
    PRIMARY
    {
        name = Logitech Inc. WingMan Extreme Digital 3D
        axis = 1
        inv = False
        sensitivity = 1
        deadzone = 0.05
        scale = 1
        group = 0
        modeMask = -1
    }
    SECONDARY
    {
        name = Saitek ST90 USB Stick
        axis = 0
        inv = False
        sensitivity = 1
        deadzone = 0.05
        scale = 1
        group = 0
        modeMask = -1
    }
}
AXIS_ROLL
{
    PRIMARY
    {
        name = Logitech Logitech Dual Action
        axis = 1
        inv = False
        sensitivity = 1
        deadzone = 0.05
        scale = 1
        group = 0
        modeMask = -1
    }
    SECONDARY
    {
        name = CH PRODUCTS CH FLIGHT SIM YOKE USB
        axis = 0
        inv = False
        sensitivity = 1
        deadzone = 0.05
        scale = 1
        group = 0
        modeMask = -1
    }
}
AXIS_YAW
{
    PRIMARY
    {
        name = GreenAsia Inc.      USB  Joystick
        axis = 4
        inv = False
        sensitivity = 1
        deadzone = 0.05
        scale = 1
        group = 0
        modeMask = -1
    }

What is interesting is the large gap in the name of the GreenAsia stick, it may have unprintable characters, but then the CH yoke would have to have them as well.

For some reason, the GreenAsia stick is always Joystick 0, but as this also affects the CH yoke I don't think that's significant.

There's nothing fancy about the controller assignment code, it just checks the axis from the Unity3D method GetAxis() against the Unity3D GetControllerNames() array, and as they are in the settings.cfg it's clearly working, but it is not correctly reading the names back in on next start.

Like I said this looks similar to the other issue where parts of the Physics.cfg are not being read correctly or at all.

@Claw says he has found the cause of the issue that results in no body lift, if there is  a problem with file reads then that could also be the cause of the issue here.

So I suggest you try his fix, or use a joystick that can be read correctly for the time being.

Share this post


Link to post
Share on other sites
  • 0

Change Hardware is not an option and neither a solution, i have try  @Claw fix but works only for BodyLift.

Just wait for a Squad fix.

Anyhow thanks for the help

Share this post


Link to post
Share on other sites
  • 0
13 minutes ago, Badsector said:

Just wait for a Squad fix

My assumption at this point is that there's some processing of the files being read in, and it's changing the controller strings so they don't match.

But I can't think what it might be, if the strings are all being converted to lower or upper case it'd affect all my sticks, and it can't be snipping duplicate characters as there aren't any on the yoke.

This one will have to wait for the devs to get back, sorry.

Share this post


Link to post
Share on other sites
  • 0

@sal_vager What i have noticed now is that CH and Greenasia have empty space after the name, you can check it with mousepad option show empty space.

If the empty space in not counted probably don't get the match with vendor.

Share this post


Link to post
Share on other sites
  • 0
51 minutes ago, Badsector said:

@sal_vager What i have noticed now is that CH and Greenasia have empty space after the name, you can check it with mousepad option show empty space.

If the empty space in not counted probably don't get the match with vendor.

Yes, I think it's trimming whitespace when writing to the file, you can see the trailing spaces are missing from the settings.cfg

There is a Unity method for this and it's probably required elsewhere in KSP, so rather than removing it and potentially breaking something else it could be applied to the results of Input.GetJoystickNames() so they match.

Previously the names were truncated as was visible in the settings.cfg, so trailing whitespace was lost except on very short controller names.

I'll make sure the devs know of this issue @Badsector, well done you may have solved this!

Share this post


Link to post
Share on other sites
  • 0

I have try without success with unicode characters, probably is easy with the CH stick by adding \\u0020 at the end.

Share this post


Link to post
Share on other sites
  • 0

Unfortunately that will not work, as KSP reads in and writes out the settings.cfg when you start, added spaces will be removed.

Share this post


Link to post
Share on other sites
  • 0

Well, there's always a chance, if this is the cause, but I couldn't say how likely it is.

Share this post


Link to post
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
Answer this question...

×   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.

Sign in to follow this