Jump to content

Saitek X56 HOTAS input lag


Recommended Posts

Hey folks,

               I just got myself a Saitek X56 HOTAS setup and wanted to use it in KSP. Unfortunately, the inputs from the joystick side are *really* lagged. Oddly though, the inputs from the throttle unit seem to be fine and appear in the game immediately. I've tried all manner of things to get this to work, but I've had no luck whatsoever.

I have the most recent driver and profile software from Saitek. I have the most recent version of KSP. I have no mods installed.

I've tried:

Removing the profile software and leaving just the basic driver for the joystick installed.

Plugging the joystick and throttle units into different USB ports on my PC.

Clearing all of the settings in KSP and starting from scratch.

Now here's the really bizarre thing....I eventually found a forum post from an X52 joystick user, who said a mod called AdvancedFlyByWire fixed his lag issues, so I put that on to see if it would help. When I finally got it working, I can see the inputs from the joystick *instantly* in the configuration windows for the mod. Absolutely no lag, whatsoever. But, when I close the mod windows and go back to trying to fly something, it's just as lagged as before. So, obviously there's nothing wrong with the joystick itself, but rather how those inputs are being translated into and manifested in the game control surfaces. What I *really* don't understand is why the inputs from the throttle side are fine though?

Anyway, any hints or tips for how to get this working, or is this something that is going to need a patch at some point to rectify?

Cheers.

Link to comment
Share on other sites

Hi @MrBonk, I'm sorry to hear you're having trouble, I'm not sure I can help though, I don't have one of these sticks to test with.

There is a bit of a delay iirc when deflecting control surfaces, which doesn't apply to the throttle, this is to help stop fluttering when SAS is steadying the craft, maybe this is what you're seeing?

If it's major lag there has to be a problem, can you make a vid of how slow it is for you so we can see?

Unfortunately KSP's joystick code is pretty poor, and built on top of even poorer Unity engine joystick code.

Link to comment
Share on other sites

  • 1 month later...
On 2/14/2017 at 3:28 AM, sal_vager said:

Hi @MrBonk, I'm sorry to hear you're having trouble, I'm not sure I can help though, I don't have one of these sticks to test with.

There is a bit of a delay iirc when deflecting control surfaces, which doesn't apply to the throttle, this is to help stop fluttering when SAS is steadying the craft, maybe this is what you're seeing?

If it's major lag there has to be a problem, can you make a vid of how slow it is for you so we can see?

Unfortunately KSP's joystick code is pretty poor, and built on top of even poorer Unity engine joystick code.

I'm so sorry, I only just realised this response was here....I need to check my notification settings in here :/

I'd say it's definitely an issue with the input processing code, which appears to apply to *any* second controller that I plug in. As a process of elimination, I connected several other controllers and attempted to use those, and they all exhibit the same symptom. Whichever controller is the first one detected works perfectly, even if I swap them around so the stick is detected first instead of the throttle etc. Regardless of which one ends up as the second one listed, it lags a great deal. IIRC, the *only* thing that doesn't seem to suffer from this is the keyboard. That appeared to work lag-free no matter what else I had connected.

I eventually found a mod called Advanced Fly By Wire, which replaces the joystick controller input code apparently. Once I managed to get this actually working (it wasn't updated for 1.2.2), the inputs are processed perfectly from any controller, no matter how many are connected to the computer. I initially thought it hadn't fixed the issue, but that's because I hadn't removed the bindings in the standard KSP input settings. Once I removed those and only used the bindings in the mod, it's perfect. Unfortunately, the mod still isn't up to date for 1.2.2 and exhibits other issues that are undesirable (randomly losing bindings if other controllers are connected/removed while the game is running, being the biggest one).

I'm apprehensive to go back and render the game unplayable for the purposes of making a video (now that I've finally got it working and got all my deadzones and presets sorted, I'd rather not have to go thru all that again)....but if I absolutely have to, I will. I know I'm not the only one with HOTAS issues (I've found other forum posts about this issue), so I imagine it's pretty easy to replicate the issue though. Just plug in a second controller and try to use it.

Link to comment
Share on other sites

Glad you found a workaround MrBonk, I can't reproduce the joystick issue on Linux though, maybe because of different drivers.

9 hours ago, MrBonk said:

(randomly losing bindings if other controllers are connected/removed while the game is running, being the biggest one)

KSP relies on the list Unity makes when detecting controllers at startup, so adding controllers after this messes up which controller the bindings are assigned to, so please make sure all controllers you want to use are plugged in before KSP is started.

Link to comment
Share on other sites

1 hour ago, sal_vager said:

Glad you found a workaround MrBonk, I can't reproduce the joystick issue on Linux though, maybe because of different drivers.

KSP relies on the list Unity makes when detecting controllers at startup, so adding controllers after this messes up which controller the bindings are assigned to, so please make sure all controllers you want to use ate plugged in before KSP is started.

Yeah, I got the same issues with the stock setup, so I figured it was probably a Unity thing.

Interesting that you don't get the same issues on Linux. I'm using the 64bit version in Win10. The other controllers I tried were both Logitech ones. One an Extreme3DPro joystick, and the other an F710 wireless gamepad.

I can get any of these devices to work just fine on their own, but once they're combined with another controller, whichever one ends up as the second one is unusable, due to the input lag. Again, however, I can set this same scenario up using the AFBW mod and all combinations of all controllers work fine. So I have to assume it's in the input processing code in KSP.

Thanks for trying to replicate this anyway :)

Link to comment
Share on other sites

Saitek driver will cause lag in almost all unity games. If you do not really use the key mapping function, you can uninstall Saitek driver and use Win 10 stock driver only. The same topic comes up in Unity forum, but there is no good solution to this yet.

Link to comment
Share on other sites

6 hours ago, damowang2 said:

Saitek driver will cause lag in almost all unity games. If you do not really use the key mapping function, you can uninstall Saitek driver and use Win 10 stock driver only. The same topic comes up in Unity forum, but there is no good solution to this yet.

If that's the case, why does KSP work fine with the Advanced FlyByWire mod installed and the same hardware/drivers? That doesn't make any sense if it's the fault of the Saitek driver.

Link to comment
Share on other sites

This issue seems to exist since times old but can't find any evidence it was ever correctly diagnosed, therefore never truly fixed. Don't know if there's more to @damowang2's post than Unity forum threads like this (that provides absolutely no help to determine why the issue), probably more useful is this old issue on the KSP bugtracker.

I have a Saitek X52Pro, not a X56. I always use the Saitek drivers (without any middleware like AdvancedFlyByWire). I never experienced any lag from my HOTAS in KSP nor in other Unity games. For how little I could tell, a number of other KSP users also have a Saitek HOTAS but don't have lag.

That makes finding the cause of this issue really difficult: the drivers may really be part of the problem, but only if there's something else with the OS that fights them; unfortunately nothing written up to now helped determine what (I could only consider showing a DXDiag save with Windows OS, hopefully it would tell if there's any conflict among input devices or with USB. Unfortunately seems nobody who reported this issue till now considered this worth showing).

 

Link to comment
Share on other sites

20 hours ago, diomedea said:

@damowang2probably more useful is this old issue on the KSP bugtracker.

Yep, so the issue you've linked there is precisely the issue I'm experiencing with my setup. However, it actually extends to *any* additional controllers that are used, not just the Saitek devices. So it's certainly related to the order in which the controllers are being recognised by the system (OS, game, drivers, whatever).

 

20 hours ago, diomedea said:

I could only consider showing a DXDiag save with Windows OS, hopefully it would tell if there's any conflict among input devices or with USB

I've just run that now and it reports no issues, but I'm happy to upload the report txt file if it will help?

Link to comment
Share on other sites

1 hour ago, MrBonk said:

I've just run that now and it reports no issues, but I'm happy to upload the report txt file if it will help?

As DXDiag reports no issues, I won't probably find anything useful; however others may know better so I'll suggest to upload the report anyway. Besides, just comparing some of the data against the report from an installation where no issues are found, could allow to point to discrepancies.

The issue may be tied to something written in device properties (mostly written by the device installer in the registry; a number determined by the system itself, in particular dealing with the USB chain), but certainly I won't be able to spot something wrong. Searching evidence with the properties would imply to check entries against other USB devices on your system, I'd look if other devices which are polled very frequently (e.g. mice) share a part of the same chain.

It's very interesting you wrote the issue is related to the order devices are recognized by the system: that's also my idea of the possible cause. If you could change USB port, or even disconnect other devices to find one configuration that works, then keep track of how the chain to the HOTAS is configured in properties, comparing different configurations should allow to notice something specific at the root of the issue. However this is going to be a long boring exercise, best if was done by QA with device producers.

Link to comment
Share on other sites

Just a thought, are you using a USB hub? With many hubs I've used only the first four ports provide the full 2 amp supply and even that is split between the ports.

For example I have a USB webcam that struggles to work and produces a corrupt image if I use port 5, 6, or 7 on my hub, or if other things are plugged into ports 2, 3 and 4 with the webcam in port 1, so I have to plug it into the PC directly.

It's possible your sticks just aren't getting enough power.

If you have spare USB ports on the back of the PC try those instead.

Link to comment
Share on other sites

50 minutes ago, sal_vager said:

Just a thought, are you using a USB hub? With many hubs I've used only the first four ports provide the full 2 amp supply and even that is split between the ports.

For example I have a USB webcam that struggles to work and produces a corrupt image if I use port 5, 6, or 7 on my hub, or if other things are plugged into ports 2, 3 and 4 with the webcam in port 1, so I have to plug it into the PC directly.

It's possible your sticks just aren't getting enough power.

If you have spare USB ports on the back of the PC try those instead.

Yeah I read quite a bit about people reportedly having various issues when using non-powered hubs, but at the time I wasn't using a hub at all. Both the stick and the throttle were connected directly to the PC via USB3 ports. I tried various combinations of the other ports available on the machine, but nothing changed apart from the order in which the controllers were recognised. Obviously it was this process that lead to me discovering that it was always the second detected controller that's laggy. Even my Logitech F710 wireless gamepad lags if it's the second one in the list....only the USB dongle is attached for that, which would be consuming next to no power at all.

FWIW I'm now using a powered hub and have both the stick and throttle connected through that. Exactly the same issue with the stock KSP install, but again works fine through AFBW.

If there's anything specific you'd like me to try, I'm more than happy to be a guinea pig :)  I know how much of a PITA it is to solve these really unusual issues (I'm a developer myself), so if you think of anything that might help, flick it my way and I'll test whatever I can.

1 hour ago, diomedea said:

If you could change USB port, or even disconnect other devices to find one configuration that works, then keep track of how the chain to the HOTAS is configured in properties, comparing different configurations should allow to notice something specific at the root of the issue. However this is going to be a long boring exercise, best if was done by QA with device producers.

I tried every combination of available ports on my machine that I could think of. The only devices connected to the PC are my KB, mouse, and the Saitek stick and throttle units. I moved all of those devices around between various ports, but still ended up with the same end result, with 1 of the 2 controllers lagging badly.

This is bound to be one of those 'perfect storm' issues, where it ends up being a combination of factors that nobody ever even thought of testing during QA :)

Link to comment
Share on other sites

 

1 hour ago, MrBonk said:

If there's anything specific you'd like me to try, I'm more than happy to be a guinea pig :) 

I honestly have no idea what to suggest at this point.

I know AFBW uses SDL to talk to xinput on Windows,

On 9/29/2014 at 8:26 PM, nlight said:

3. Please note that XInputInterface.dll and SDL2.dll must be in the same folder as the KSP executable and not in GameData.

I don't know what Unity uses to get xinput values, something proprietary I guess.

Unity on Linux and MacOS grabs the raw input, maybe that's why I don't have this issue.

I remember Microsoft broke xinput with the 10th anniversary update, but surely that's fixed by now.

Link to comment
Share on other sites

11 hours ago, sal_vager said:

 

I honestly have no idea what to suggest at this point.

I know AFBW uses SDL to talk to xinput on Windows,

I don't know what Unity uses to get xinput values, something proprietary I guess.

Unity on Linux and MacOS grabs the raw input, maybe that's why I don't have this issue.

I remember Microsoft broke xinput with the 10th anniversary update, but surely that's fixed by now.

hmmm....ok, so that maybe narrows it down a little further. Just so happens I'm using Win10, and have that update applied. Although the issue *has* been mentioned quite some time ago, and before that update was released. Still, perhaps it's some vagary of xinput (or Unity's usage of it) that's actually causing all of this.

I'm really tempted to pick up the AFBW source and see what's required to make it fully compatible with 1.2.2, but honestly, by the time I get home from work, the last thing I feel like doing is more coding :/.

11 hours ago, sal_vager said:

Unity on Linux and MacOS grabs the raw input, maybe that's why I don't have this issue.

I think I still have a Ubuntu VM kicking around somewhere here, so that's maybe another option to try, just for the purposes of elimination. If I can find the backups and get it working, I'll post the results.

Link to comment
Share on other sites

  • 1 month later...

I've figured out a solution!  (At least for my issue, it's very similar to this)

If you 'route' your inputs through vJoy (for lack of a better term) it bypasses whatever processes are causing the delay and allows the joysticks to work perfectly (Saitech's X-56 HOTAS, in my case).

You can find vJoy here - http://vjoystick.sourceforge.net/

Then, after installing it and UJR (vJoy will have a link to it), bind any controls that have input lag to the controls in vJoy.  Then, bind the controls in KSP to the vJoy controls (NOT the controls on your actual stick).  You will have to use the quickbind feature in vJoy to do this, just read the blurb about quickbind at the bottom of the main UI for how to do it.

After doing this, it should work perfectly!

Good luck!

(Sorry for any confusing writing or explanations, it's 3AM for me and I just figured this out.  I'll try to remember to come back and check this tomorrow.)

Link to comment
Share on other sites

On 5/11/2017 at 5:06 PM, iliketanks1998 said:

I've figured out a solution!  (At least for my issue, it's very similar to this)

If you 'route' your inputs through vJoy (for lack of a better term) it bypasses whatever processes are causing the delay and allows the joysticks to work perfectly (Saitech's X-56 HOTAS, in my case).

You can find vJoy here - http://vjoystick.sourceforge.net/

Then, after installing it and UJR (vJoy will have a link to it), bind any controls that have input lag to the controls in vJoy.  Then, bind the controls in KSP to the vJoy controls (NOT the controls on your actual stick).  You will have to use the quickbind feature in vJoy to do this, just read the blurb about quickbind at the bottom of the main UI for how to do it.

After doing this, it should work perfectly!

Good luck!

(Sorry for any confusing writing or explanations, it's 3AM for me and I just figured this out.  I'll try to remember to come back and check this tomorrow.)

Unfortunately, I can't get vJoy to even install. I know there are a lot of other ppl having the same installation failure on Win10x64, so I guess I'll have to wait for the guy to sort that issue out first. Shame....AFBW has some issues that are rather annoying, so an alternative would have been nice.

Link to comment
Share on other sites

  • 2 weeks later...

I have that issue with my X52 but only since I fixed the driver issues for Elite dangerous by completely removing all traces of the joystick from my pc (including the registery) then installing the saiteck drivers for w10 (before creator update the issue was already there, using ksp 1.2.2 x64  from steam)

Before, ksp worked fine but other games had funky yaw controls (0->100 instantly) since then, the other games work flawlessly but ksp have a ~1-2s lag between the input on the stick and the output in game

Given how much work is required to switch from one driver to the other, an other option would be nice.

Gonna test vJoy but last time I tried, it got flagged as malware and didn't worked :/ 

Edited by Falco01
Link to comment
Share on other sites

  • 3 months later...

I know this is an old Tread but I hope this info can be of help to someone looking for advice.

In case your x56 or any other joystick is a bit slow or do "odd" things that it is not supposed to do by it self such as extending gear or other stuff.
Then you can often fix this issues if you plug your joystick and trust joystick into USB 3.0  ( the blue usb ports ) on your computer.
The reason are especially the trust joystick require more power, and if you are using example an usb 2.0 hub then you might not get enough power.

In general I recommend people to buy a USB 3.0 hub and use usb 3.0 to as many things as possible.. ;-)

Link to comment
Share on other sites

Ok....I've managed to get it working correctly, as per the vJoy suggestion further up this thread. I downloaded the most recent version of vJoy and then used Universal Control Remapper in place of UJR, as it's now deprecated.

It seems to have solved all of the previous issues I was having with input lag, and as an added bonus, it works no matter what version of KSP I'm running :) Using AFBW was a real issue every time there was a patch for KSP, because it would break and then I couldn't use my controllers.

So, thanks to iliketanks1998 for the original suggestion :D

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