Jump to content
The simFlight Network Forums

FSUIPC7 7.4.12c (beta) release with auto-tuning of start-up parameters


Recommended Posts

Please find attached below (at the bottom of this post) the latest beta release of FSUIPC7, which has a new feature to auto-tune the start-up connection parameters.
Please note that this feature is only activated when using the auto-start facility, i.e. when MSFS is starting FSUIPC7, which is the default and recommended configuration. If manually starting FSUIPC7, tuning (manual) is only required if you start FSUIPC7 before MSFS is started, or if you start FSUIPC7 before MSFS is fully initialized and has not yet arrived to the main menu state. 

Quick Start

If you have not already tuned your auto-start parameters, just run this version and it will automatically tune these parameters - there is nothing you need to do.

If you have already set the DetectToConnectDelayAuto ini parameter in your FSUIPC7.ini file (in the [General] section), there are two methods to try out this new feature:

    1. Remove/delete the DetectToConnectDelayAuto  ini parameter from the [General] section of your FSUIPC7.ini file
        (before you start FSUIPC7 / MSFS). This will then tune starting from the default value of this parameter,

    2. Add the following to the [General] section of your FSUIPC7.ini file (before you start FSUIPC7 / MSFS):
                StartUpTuningActive=Yes
        This will then tune starting from the current value of the DetectToConnectDelayAuto  parameter,

When is auto-tuning performed?

Auto-tuning will be activated in the following circumstances, and only ever when auto-started by MSFS:
    1. When the default value of the DetectToConnectDelayAuto parameter is being used and auto-tuning has not already been performed
    2. When explicitly instructed to do so, by adding the following ini parameter to the [General] section of your FSUIPC7.ini file:
                 StartUpTuningActive=Yes
    3. If I detect a major difference in start-up times with a new MSFS release (either increase or decrease), then I can force an
        auto-tuning in a new FSUIPC7 release.
    4. If some re-connection attempts are detected during start-up, then auto-tuning will be set to run on the next auto-start of FSUIPC7.

Can I disable auto-tuning?

Yes. To completely disable auto-tuning, update or add the ini parameter StartUpTuningDoneVersion to your FSUIPC7.ini file with a value of -1, i.e.
    StartUpTuningDoneVersion=-1
To re-enable at any point, simply remove this ini parameter.

What does auto-tuning actually do?

The new auto-tuning feature will tune two of the parameters used by FSUIPC7 to determine how and when to connect to MSFS:

    DetectToConnectDelayAuto : this is the delay (in seconds) between when MSFS is detected and when FSUIPC7 will try to connect

    InitialStallTime : this is the time (in seconds) that FSUIPC7 will wait for a response from the connection request until it decides that
                                 the connection is dead and tries to reconnect

How does auto-tuning work?

When auto-tuning is active, it will count the number of times that FSUIPC7 tries to connect to MSFS.

It it takes multiple attempts to connect to MSFS, then it will adjust the DetectToConnectDelayAuto time by adding the InitialStallTime for each failed connection attempt, i.e.
      new DetectToConnectDelayAuto = old DetectToConnectDelayAuto  + InitialStallTime * number of reconnection attempts
Provided the new DetectToConnectDelayAuto parameter is not greater than 500 (seconds), the InitialStallTime parameter will also be set to 5 (seconds).
If the maximum limit of 500 (seconds) is reached for the DetectToConnectDelayAuto parameter, the InitialStallTime parameter will be increased by 5 seconds (to a maximum of 100) and auto-tuning will run again on the next auto-start.

If auto-tuning detects no reconnection attempts, the DetectToConnectDelayAuto will be reduced by 10 seconds (to a minimum of 30 seconds), the InitialStallTime set to 5 seconds, and auto-tuning will be set to run on the next auto-start. So auto-tuning will reduce this parameter until either the minimum is reached (30 seconds) or re-connection attempts are reported, in which case it will increase the parameter and stop running.

Maximum values reached

If, after auto-tuning you see this message in your FSUIPC7.log file:
    **** Start-up tuning complete: maximum values set. Please contact FSUIPC7 support (and attach your log file).
then the maximum value for these parameters has been set. If you are still having issues, please post a support request, attach your FSUIPC7.log and FSUIPC7.ini files and I will take a look.

There is not much I can do about this, except maybe increase the maximum values allowed. However, if you are still having issues then you have a start-up time of over 10 minutes, and I think you should be considering alternative solutions, such as using the MSFS Add-on linker program to reduce the number of Community add-ons you are using for each flight. But if you post your files I can advise.

Manually starting FSUIPC7 (i.e. no auto-start with MSFS)

 Auto-tuning is only ever performed when FSUIPC7 is auto-started by MSFS. If you start FSUIPC7 manually, then the auto-tuning details do not apply. If you start FSUIPC7 when MSFS is fully loaded, and either in the menu system or with an aircraft already loaded and ready-to-fly, then there is no tuning necessary. However, if you start FSUIPC7 before MSFS is started, or when FSUIPC7 is starting, then it is recommended to tune the DetectToConnectDelay ini parameter. Please see this FAQ entry on how to do this: 

 

For any issues or comments with this beta release, please comment below, in this topic.

The new installer is available here: https://fsuipc.simflight.com/beta/Install_FSUIPC7beta.exe.

Note that the default auto-start method in the new installer is to use the MSFS.bat file to start FSUIPC7, not the EXE.xml, although this is still available as an option (bit not recommended).

Regards,

John

Edited by John Dowson
Attachment removed, link to installer added
Link to comment
Share on other sites

2024-04-05 1439UTC

Hi John,

Your tuning algorithm seems to work on my setup. (8-year-old machine with goodly sized community folder.) My manual tweaking indicated DetectToConnectDelayAuto=200. That worked well on several tests. But I restarted with DetectToConnectDelayAuto=60 and StartUpTuningActive=Yes. That generated a new FSUIPC7.ini starting value of 180. And another try produces a starting value of 190. All seemed to be working as expected.

However, with the autotuning Beta of FSUIPC7, I now get lots of calls to simconnect that were not there in my previous version of FSUIPC (that is with v4.11 - before or after the manual tuning).

The sequence starts like this (see below) and continues repeating calls for simconnect something like 18 seconds. The FSUIPC.in and FSUPIC.log are attached.

Best,
Mike MacKuen

---


   3375 Simulator detected


   193390 Trying to connect...


   194203 SimConnect_Open succeeded


   194203 Running in "KittyHawk", Version: 11.0.282174.999 (SimConnect: 11.0.62651.3)


   194203 MSFS version = 11.0.282174.999


   194218 Initialising SimConnect data requests now


   194218 Offset file 'C:\Programs\FSUIPC7\myOffsets.txt' not found (info only)


   194218 Mapping custom control numbers 69632 - 84232


   194281 Maximum number of custom events available is 1024 (defined by ini parameter MaxNumberOfCustomEvents)


   194734 Aircraft loaded: running normally now ...


   198390 **** Data not received in required time limit: Re-connecting now...


   198609 Trying to connect...


   198656 SimConnect_Open succeeded


   198656 Running in "KittyHawk", Version: 11.0.282174.999 (SimConnect: 11.0.62651.3)


...

FSUIPC7.ini
FSUIPC7.log

Link to comment
Share on other sites

Posted (edited)
45 minutes ago, MM said:

However, with the autotuning Beta of FSUIPC7, I now get lots of calls to simconnect that were not there in my previous version of FSUIPC (that is with v4.11 - before or after the manual tuning).

I presume you mean these logged messages:

Quote

   229765 **** Data not received in required time limit: Re-connecting now...

Such messages are not taken into account when determining the value of the DetectToConnectDelayAutoini parameter. This only controls the time between when MSFS detected and when the simconnect open confirmation is received. When this is done, FSUIPC will request initial data (i.e. the user aircraft), and once this initial data has been received, everything will then start. This message indicates that the data from the initial data request was not received in the required time-limit, which is determined by the InitialStallTime ini parameter.

This issue seems to be caused by a SimConnect issue, which I have reported to Asobo (still waiting for a response). It seems that FSUIPC7 is being disconnected from the FS, but no notification or error is received by FSUIPC7, but as it recognises data is stalled, it will close and re-connect. This is why I have decided not to take into account these messages when determining the value for the DetectToConnectDelayAuto ini parameter.

If you have this message logged once, then that should not be an issue. However, if you have this message logged multiple times, you should increase the DetectToConnectDelayAuto time. Looking at you logs, you should try a DetectToConnectDelayAuto setting of 220, or maybe even  240.

There are also performance issues with FSUIPC7 when it is auto-started by MSFS, as it seems to run around 13x slower than when manually started. I have also reported this to MSFS, but for the next release I will change the start-up mechanism so this should not be an issue.

John

Later: you are also having issues with traffic information. You can try increasing the traffic stall time to prevent these, although this will not help (and will degrade performance) if the traffic connection has been terminated. Try adding this to the [General] section of your FSUIPC7.ini file:
    TrafficStallTime=2
(the default is 1 second). You can increase further, but if you are still getting those messages then best to remove and allow FSUIPC7 to close and get a new connection.

If you are not using the AI traffic information, and are not using any add-ons that use this, then you can ignore. You can also set the following option (to the [General] section of your FSUIPC7.ini file) to disable AI traffic information:
    ProvideAIdata=No

John
 

Edited by John Dowson
Later added
Link to comment
Share on other sites

John
Just a quick response concerning FSUIPC7 v4.12a.

Please note that on my setup those additional calls to Simconnect are associated with my running FSUIPC7 v4.12a.
  Quote
   229765 **** Data not received in required time limit: Re-connecting now...
When I revert to FSUIPC7 v4.11 with a FSUIPC.ini value for DetectToConnectDelayAuto=200, then those many calls are not shown in the FSUIPC.log.

I realize that these are meant to be two different things. (And the difference may be in what you are logging. I don’t know that.) As it stands, it seems as though FSUPIC7 v4.12a may be doing something extra? I guess that I’m trying to help you with the debugging. You will understand so much more about this than do I.

Thanks for your efforts,
Mike MacKuen

Link to comment
Share on other sites

8 hours ago, MM said:

Please note that on my setup those additional calls to Simconnect are associated with my running FSUIPC7 v4.12a.
  Quote
   229765 **** Data not received in required time limit: Re-connecting now...
When I revert to FSUIPC7 v4.11 with a FSUIPC.ini value for DetectToConnectDelayAuto=200, then those many calls are not shown in the FSUIPC.log.

What value did auto-tuning set for DetectToConnectDelayAuto? The auto-tuning currently doesn't take into account the re-connections done after a successful open call. One such disconnect message seems to be normal (not sure why - I have raised this with Asobo) and shouldn't cause any issues. However, I will update to take this reconnection into account.

John

  • Like 1
Link to comment
Share on other sites

Posted (edited)
2 hours ago, Tigerhawk said:

When I was setting it manually I was using 330 Delay, the auto set it to 200.

It set it but the value used was 60 (the default). Once you have ran with auto-tuning active, exit MSFS and run it again to use the new value set.
Can you also activate logging for Buttons & Keys please for future logs.

2 hours ago, Tigerhawk said:

the hotkeys were unresponsive, as before.

If you exit and restart FSUIPC7, do the hot keys then work?

Can you please try the attached version which has a few improvements. Remove the DetectToConnectDelayAuto ini parameter so that auto-tuning does its thing.

When done, exit MSFS, rename your log file (e.g. FSUIPC7-init.log) then restart MSFS and see if the hot keys are working or not. If not, exit FSUIPC7 and restart it and test again - are they working now?
Then exit FSUIPC7 and show me/attach the three log files - FSUIPC7-init.log, FSUIPC7_prev.log and FSUIPC7.log.

Thanks,

John

Standalone program: FSUIPC7.exe

But better to use the beta installer - see following post.

 

Edited by John Dowson
Further info added
Link to comment
Share on other sites

I am also going to change the default auto-start-up mechanism of FSUIPC7 back to using the MSFS.bat file rather than the EXE.xml file, although this option will still be available. I am doing this as it seems that when started vie the EXE.xml file FSUPC7 is running more than 10x slower than when started by other means. I have reported this to Asobo.

This new installer is available here: https://fsuipc.simflight.com/beta/Install_FSUIPC7beta.exe

Please re-run auto-tuning with this version by manually adding
    StartUpTuningActive=Yes
to the [General] section of your FSUIPC7.ini file.

Thanks,

John

Link to comment
Share on other sites

2 minutes ago, Tigerhawk said:

I ran the new installer, hotkeys worked first time and also on a subsequent start of MSFS.

Great!

2 minutes ago, Tigerhawk said:

Logs attached for your info.

Thanks - your files look good. Thanks for testing this,

John

Link to comment
Share on other sites

1 hour ago, Tigerhawk said:

The next time the hotkeys didn't work again.

There seem to be two issues here:

1. The variable time it takes MSFS to start and arrive to the main menu. Your second set of log files indicate that it took around 40 seconds longer for MSFS to load to the main menu compared to the first. The start-up time can depend on your system load during start-up, but I think these large differences/variations in start-up time are mainly due to online activity that MSFS performs during start-up as well as the aircraft it is loading (i.e. the aircraft in use when MSFS was last exited), and can vary quite a lot due to both network performance and the speed/load on the MSFS data serves.

2. There seems to be an issue with the request to receive key press/release events from MSFS when there has been several connection attempts, and this issue seems rather random (i.e. it can sometimes cause an issue, other times not).

I am not sure what I can do about issue 1. What I will do is:
    - if auto-tuning is not running but re-connection attempts are detected, I will flag auto-tuning to be ran on the next auto-start run of FSUIPC7
    - allow the user to completely disable auto-tuning, so that they can use the parameter value that they determine and this will not be adjusted
For the time being, I recommend that you manually set your DetectToConnectDelayAuto ini parameter back to 220 (or possibly 240) to try and prevent this key-detection problem.

Issue 2 is also rather baffling...and I have never experienced this issue here and it is difficult to understand why this is happening. Could you show me/attach your FSUIPC7.ini file so that I can check if there are any settings that could cause this issue, I will also add some additional logging for this.

John

 

Link to comment
Share on other sites

  • John Dowson changed the title to FSUIPC7 7.4.12c (beta) release with auto-tuning of start-up parameters
  • 3 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use. Guidelines Privacy Policy We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.