Skip to content

v0.5.7.0-test Native GPU Monitoring, Separate 2D/VR FPS Caps and Trial MSFS Internal Performance Metrics

Pre-release
Pre-release

Choose a tag to compare

@ResetXPDR ResetXPDR released this 24 Nov 03:18

MSFS Compatibility: 1.39.12.0, 1.9.24.0.
MSFS Widget Version: 1.7.5

Release notes for 0.5.7.0-Test

As of Test14, this update adds native GPU load and VRAM monitoring so GPU-Z is no longer needed on most cards (using AMD's newer ADLX on AMD cards), adds a Cap FPS option for MSFS 2024, fixes false low FPS readings caused by RTSS frozen data, and reads MSFS's own CPU thread, GPU and frame times on MSFS 2020 and 2024, shown with Log+ and allowing for frame rate caps set outside MSFS, for future automation.

Testers on any GPU (NVIDIA, AMD or Intel): please run your first flight with GPU-Z also running and send me your log, as every 30 seconds it logs the native and GPU-Z readings side by side.

Test14:

  • AMD: ADLX (amdadlx64.dll, AMD's successor to ADL) is now the source for GPU load, VRAM used and board power, replacing ADL. In Test13 logs its readings were steady and matched GPU-Z, where single ADL readings swung between idle-looking and real values (e.g. 39 to 474 W), and its read took about 25 us against about 850 us for ADL. ADL (load) and the Windows statistics (VRAM) stay as fallbacks, used until ADLX is ready, without ADLX, or if it fails
    • GpuMonitor.StartAdlx (from SelectAdapter for AMD cards) starts ADLX on a background task (AdlxBackgroundInit), as its startup took about 740 ms, so no tick waits for it. ADL is the source until it is ready. Logged as "GpuMonitor:InitAdlx" and "GpuMonitor:SelectAdlxGpu", ending with "ADLX is now the source for ..." when it takes over
    • Each tick ReadAdlxLatest reads the newest tracked sample (GetGPUMetricsHistory over the last 2 s, AdlxLatestWindowMs, newest picked by its timestamp, new AdlxGetLongFn and AdlxMetTimeStamp) from ReadCurrentSource, for load and VRAM (VRAM from the Windows statistics if ADLX has none). ADLX tracking stays at its default 1000 ms sampling
    • ADLX is dropped for the rest of the run (DropAdlx, logged as a warning, ADL takes over in the same read) when a read fails, the newest sample stops changing for 5 reads (AdlxStaleReads) or reads are slower than 50 ms 3 times in a row (AdlxSlowReads; Test13 stopped after a single slow read, which was a system-wide hitch). The existing bad-read fallback to the Windows statistics also drops it
    • TryReadPowerW: board power for the Log+ status line from the ADLX sample when ADLX is the source
    • The Test13 per-tick ADLX current read (ReadAdlxCurrent, GetCurrentGPUMetrics) and EnsureAdlx are removed; SelectAdlxGpu now takes the adapter name
    • New fields adlxUsable, adlxInitComplete, adlxInitTask, adlxDropped, adlxSlowCount, adlxSameTsCount, adlxLastTs, adlxLast. LoadSourceActive, LoadSourceName and UpdateSourceDescription include ADLX ("AMD ADLX load and VRAM, AMD ADL fallback")
    • GPU sources line: "ADLX (source)" with its per-tick readings and the 5 s history as before, or why it is not the source. ADL is read only for this line when ADLX is the source, shown as "ADL Load:x% (comparison only)"
    • Shutdown waits up to 3 s for the background startup before stopping ADLX
  • Log+ MSFS load line: frame rate caps set outside MSFS are now allowed for. Tests showed that when RTSS, an NVIDIA driver cap, VSync, headset reprojection (e.g. Virtual Desktop SSW), OFXR or VectorXR holds the frame rate, MSFS counts the waiting as CPU thread time, so a thread looked maxed out with almost no headroom when there was plenty to spare (e.g. Main 98%, Hdrm 2% with an RTSS cap, against 37% at the same frame rate with MSFS's own limit). MSFS's own Max Frame Rate (and so Cap FPS) leaves its wait out, but OFXR adds waiting to the render thread even then. VectorXR adds it to the main thread, like RTSS
    • New cap detection (LODController.UpdateCapDetection, each tick from SampleMsfsEngineData): a rolling 10 s window (CapWatchSeconds) of native FPS, also during the FPS settle (a ceiling cannot be found early if there is none), not while paused, so a cap that only appears later (e.g. at cruise) is still found. A cap is a ceiling the FPS keeps reaching but never goes over (the 80th percentile second, CapCeilingPercentile, with at least 7 seconds within 2% of it, minimum 0.5 FPS, CapMinHits, CapTolerance, and no more than 1 over it, CapMaxAbove); it need not be steady enough to count as fixed FPS. Moving to a lower cap can take up to 10 s to show, while the old seconds roll out of the window. The window starts again when the graphics mode, VR, MSFS's frame limit, Cap FPS, the target FPS or the native FPS source changes
    • Native FPS for the window (new CapNativeFps): OFXR's or VectorXR's app FPS from their status files; else RTSS's FPS when it is the live FPS source and counts native frames (NFR, plain VR and LSFG, as RTSS does not see Lossless Scaling's frames); else MSFS's own FPS (fpsRawMSFS); else MSFS's frame time. The frame time is a single read each second and swung from 36 to 45 FPS under a steady 40 FPS VectorXR hold, so the cap was found then lost a second later. MSFS's own FPS wandered by about 1 FPS a second under an NVIDIA cap at 40, so that cap was found and lost a few times, where RTSS read 39.8 to 40.2 every second. With DLSS FG, FSR, Man FG and MSM, RTSS counts generated frames (dynamic multipliers cannot be divided back out reliably), so MSFS's own FPS is used there
    • A watched cap, once found, is kept while at least 4 of the 10 seconds are on the ceiling (new CapKeepHits, 7 still needed to find it, CapMinHits), still with no more than 1 over it, so a wobbly reading no longer clears it but FPS rising above the ceiling still does. This also covers users without RTSS
    • Log+ per-second line: the native FPS the cap watch used and its source, e.g. "MSFS:FT 24.5 Nat 40.0 (RTSS) Main ..." (new capNativeLast, capNativeSourceLast), to check the watch in each mode
    • VectorXR and OFXR need no watching (new KnownExternalCap, capKnown): while generating they always pace to a cap their settings give, VectorXR's hold rate (VxrHoldFps, while generating and not paused) or OFXR's display rate over its multiplier (OfxrDisplayHz / OfxrModeMultiplier, while generating, not paused, not desynced and at 2X or more). That is the cap, always external, from the first tick, with no comparison with MSFS's own frame limit: with Cap FPS and VectorXR both at 40, which one held swapped from moment to moment, and VectorXR's wait showed on the main thread (21 to 24 ms, "Hdrm 9 to 17% CPU") whenever it held. When they stop generating, the cap clears ("VectorXR or OFXR no longer generating, watching again") and watching takes over
    • Their cap counts as reached when their app FPS over the last 5 seconds is within 7.5% below it (CapKnownOnPct), as VectorXR's app FPS averaged 38 to 39 against its 40 hold while it was the one holding
    • Any other cap is watched: internal when it matches MSFS's live frame limit, external when MSFS's limit is off or more than 3% (at least 1 FPS) above it, so an RTSS cap below MSFS's limit is still found as external (unknown when the limit cannot be read). With no cap found, MSFS's live frame limit, when set, is taken as an internal cap
    • Only external (and unknown) caps are logged and shown, as AutoFPS already knows when MSFS's own limit is set, by the user or by Cap FPS: "FPS cap found: external, ceiling 40.0 native FPS (VectorXR hold rate), MSFS frame limit off, ..." or "(7 of 10s on it)" when watched, "FPS cap cleared (...)", and "Cap none/external " on the 30 s MSFS engine line. Internal caps are kept quietly for the OFXR render thread check (new CapReported; SetCapKind takes the found detail and whether it was watched)
    • The first external cap found by watching in a flight also logs, once, "External FPS cap detected (e.g. RTSS, VSync or headset reprojection): CPU thread times include waiting while FPS sits on it. For meaningful load figures, cap FPS with AutoFPS Cap FPS (which sets MSFS's own frame limit) instead." (new capAdviceGiven). Not for OFXR's or VectorXR's known caps, which are part of how they work. Logging only for now
    • FPS counts as on the cap when the average of the last 5 seconds (CapOnSeconds, CapRecentFps) is within the tolerance of the ceiling or above it, so per-second jitter does not make the line flicker
    • "ext cap" applies only while FPS is on an external cap, the busiest CPU thread is at 85% or more of the frame time (CapWaitPct, it is soaking up the wait) and the GPU is under 90% (CapGpuLimitPct, otherwise the GPU is the real limit and the threads are waiting on it), the last two as 5 second averages (capTopPctRecent, capGpuPctRecent). In tests the GPU was 32 to 80% under external caps and 90 to 92% when free running GPU-bound
    • Which thread is left out: with VectorXR's cap the main thread, only while it is at 85% or more of the frame time and the GPU under 90% (5 second averages, new capMainPctRecent), as MSFS's own limit may be the one holding (main thread a true 14 to 17 ms then); with OFXR's cap the render thread, whenever FPS is on it; with any other external cap the busiest thread, under the "ext cap" conditions above; with an internal cap in OFXR, the render thread
    • When it applies, that thread is left out of the load shown (the busiest of the remaining threads and the GPU, both still true readings), and the headroom is shown as n/a, e.g. "MSFS Load: Rdr 19% | GPU 38% (total) | Hdrm n/a (ext cap)" (log: "Head n/a (ext cap)"). The waiting thread's real time is unknown, and it is usually the main thread and usually the real limit, so no headroom figure can be trusted: with an NVIDIA driver cap at 40 the earlier estimate read "~62% GPU", where Cap FPS at the same 40 showed the true 51% CPU. Below the cap, or with MSFS's own limit holding, everything is shown as before. The widget and web page show the same line from the app's status
    • Findings from testing RTSS, an NVIDIA driver cap, Virtual Desktop SSW, OFXR and VectorXR, for users and future automation: MSFS's frame time data is usable with no FPS cap set outside MSFS, or with Cap FPS (MSFS's own limit) set to the same value as the outside cap (or slightly lower if necessary), as MSFS's limiter then holds and the thread times are true (NVIDIA cap 40 with Cap FPS 40: main thread a true 12 ms from the start; SSW 40 with Cap FPS 40: true 13 to 14 ms after about a minute to settle). VectorXR was the exception at the same value, taking turns holding with MSFS, so the wait partly leaked into the main thread (still to be tested further). It is unusable with an outside cap below MSFS's limit or with MSFS's limit off, shown as "Hdrm n/a (ext cap)". Frame time based automation will need no outside cap, or Cap FPS set to the same value (or slightly lower if necessary)
  • MSFS's own VRAM budget and usage, as Windows reports them for the MSFS process, are now logged on the GPU sources line, e.g. "MSFS VRAM used:8394 MB budget:9915 MB (85% of budget, budget 81% of the card)", to check them against MSFS's overlay before VRAM+ uses them. Logging only
    • GpuMonitor.MsfsVramBudgetText: D3DKMTOpenAdapterFromLuid, D3DKMTQueryVideoMemoryInfo (local memory) on the MSFS process (opened with query access), D3DKMTCloseAdapter. "MSFS VRAM budget n/a" with the reason logged once when not available
    • MemoryInterface.ProcessId: MSFS's process id
  • AppConfig TestVariant -test14 (WidgetVersion stays 1.7.5)

Test13:

  • GPU sources log line (every 30 s, test builds and Log+): every load and power reading is now followed by the average and median of its last 5 readings (one a second, matching the status line's 5 tick averages), e.g. "ADL Load:4% (avg 44%, med 52%)" and "board:42W (avg 70W, med 101W)", as single readings can swing widely (ADL on RDNA4 read 42 to 374 W board power and 4 to 100% load). Logging only, nothing else uses them
    • GpuMonitor: vendorLoadSum/vendorLoadCount replaced by vendorLoadSamples, adlAsicPowerSum/adlBoardPowerSum and their counts replaced by adlAsicPowerSamples and adlBoardPowerSamples (lists, cleared after each line)
    • New GpuMonitor.Stats (" (avg x, med y)" over the last StatsWindow (5) readings) and Median (sorts a copy); AdlPowerAverage removed (it averaged the whole 30 s)
  • NVIDIA: NVML board power is now also read each tick while the GPU sources line is being logged, so it gets an average and median too (it was a single reading every 30 s). Its read time is logged as NvmlPowerRead
    • New GpuMonitor.CollectStats (set each tick by LODController.UpdateVariables to Config.TestVersion || Model.LogPlus) and CollectPowerStats, called at the end of a good TryRead, after the read timing so AvgRead stays comparable with earlier builds
    • New nvmlPowerSamples, nvmlPowerTicks, nvmlPowerCount; powerStatsFailed stops the extra readings for the run after an exception
  • AMD: ADLX (amdadlx64.dll, AMD's successor to ADL, installed with current AMD drivers) is now read alongside ADL for everything ADL is used for and more: GPU load, board power, GPU (chip) power and VRAM used. Logging only, to compare its readings and its cost to AutoFPS with ADL's (ADL reads take about 850 us) and the Windows statistics' VRAM, to see if it can replace ADL. GPU load still comes from ADL and VRAM from the Windows statistics, unchanged. If ADLX is missing or fails, it is logged once and left alone for the rest of the run
    • Loaded on the first tick with CollectStats set: ADLXInitialize2 (or ADLXInitialize) with the SDK version 2.0.0.125 the interface slots were taken from, then GetPerformanceMonitoringServices. Logged as "GpuMonitor:InitAdlx" with the ADLX version, sampling, history and init time
    • ADLX's own metrics tracking is started with its sampling interval left at ADLX's default (1000 ms, the same rate as AutoFPS's own reads), as the cost of faster background sampling, which runs inside AutoFPS's process, is not known yet. The history is set to 5 s (AdlxHistorySec, clamped to the driver's range), the same span as the other sources' last 5 readings
    • The GPU is found in ADLX's GPU list by the selected adapter's name (one match only), and checked for GPU usage, board power, GPU power and VRAM support (adlxHasLoad, adlxHasBoard, adlxHasGpuPower, adlxHasVram). Logged as "GpuMonitor:SelectAdlxGpu" with a first reading of each. Looked up again if the selected adapter changes
    • Each tick: one current reading (GetCurrentGPUMetrics) of all four, timed, checked as the other sources are (load 0 to 100%, power 1 to 1000 W, VRAM used up to 5% over the card's total). A read over 50 ms (AdlxSlowReadMs) stops the per-tick reads for the run and is logged
    • GPU sources line: "ADLX Load:52% (avg, med) board:205W (avg, med) gpu:180W (avg, med) Used:9800 MB (avg, med)" from the per-tick readings, then "ADLX history 5s at 1000ms: Load (avg, med) board (avg, med) gpu (avg, med) Used (avg, med) n=5" over every sample in it from the tracked history (GetGPUMetricsHistory), with AdlxRead (average and max per-tick read time) and AdlxHistRead (history read time). "ADLX n/a (reason)" when it is not used
    • New AdlxValues (one reading, -1 for each value not supported or not plausible), AdlxSamples (lists per value), ReadAdlxMetrics, ReadAdlxValues, ReadAdlxCurrent, AdlxValuesText, AdlxText
    • ADLX interfaces are called through their vtable slots (from the SDK's C headers ISystem.h and IPerformanceMonitoring.h) with delegates cached by function address (AdlxFn); every object ADLX returns is released when done with
    • New GpuMonitor.Shutdown, called from App.OnExit: stops ADLX tracking, releases its objects and calls ADLXTerminate
  • AppConfig TestVariant -test13 (WidgetVersion stays 1.7.5)

Test12:

  • FreeTLOD: the TLOD range in the status line and the log now shows the active range, so with settings reduction lowering TLOD Min from 25 to 12 it shows "FreeTLOD 12" instead of "FreeTLOD 25-12". While TLOD Min Extra is active, the first number is the raised minimum
    • MainWindow status line: FreeTLOD range from serviceModel.rangeMinTLOD and rangeMaxTLOD (was the configured MinTLOD for the first number), one number when they are equal
    • LODController 10 second log line: TLODRng from Model.rangeMinTLOD and rangeMaxTLOD for FreeTLOD too (was the configured MinTLOD and MaxTLOD, halved at night)
  • Man FG: once chosen, it now stays until Auto is picked from the multiplier list, whatever MSFS reports. Before, MSFS's VR mode took over and switched the graphics mode to VR (seen with a VR frame generation AutoFPS does not detect yet, DesktopXR), only going back to Man FG on returning to 2D. In VR, Man FG uses its own target and multiplier; VR LODs and the VR cap still follow MSFS's VR mode
    • LODController.GetMSFSState: Man FG is checked before VR, so the graphics mode stays Man FG; restoreManFgAfterVR removed as no longer needed
    • VR on or off is now taken from MSFS's VR mode (new vrModeActiveLast, nowVR, wasVR) rather than the graphics mode name, so the VR housekeeping (LOD and cloud reset, FPS settle, VR flight type profile auto-switch, FG type check on leaving VR) still runs when Man FG is kept through VR, logged as "MSFS VR mode on/off, graphics mode kept at Man FG". Before the first reading, the previous graphics mode name says whether it was VR, as before
  • Man FG in VR: the status line now shows "VR Man 2X" (its set multiplier, 1X when dynamic) instead of just "VR", and Cap FPS now works there. Cap FPS showed "Caps depend on graphics mode: set in flight" and was never applied, as its check needed the graphics mode name to match MSFS's VR mode. In VR it uses the VR cap with the Man FG multiplier
    • MainWindow status line: new Man FG case in the VR branch, after VR Conflict
    • LODController.GetGfxModeName: "VR Man nX" for the log's Mode when in VR
    • ServiceModel.CapFpsModeKnown: Man FG is valid in both 2D and VR
  • Cap FPS: unticking it (or turning Monitor only on) now leaves Max Frame Rate to MSFS for the rest of the flight. MSFS's value was put back correctly, but at the end of the flight the value saved at its start was written back into MSFS and UserCfg.opt, undoing any change made in the MSFS menu meanwhile
    • LODController.ApplyFrameCap: Model.CapFpsUsedThisSession cleared after RestoreFrameLimiter when Cap FPS is off, so ServiceModel.RestoreFrameLimiter at the end of the flight and the UserCfg.opt FrameLimiter restore in MemoryManager.RestoreUserCfgOptSettings skip it. Ticking Cap FPS again takes MSFS's current value as the one to restore, as before
  • Main window Target FPS line: the gaps before Target, FPS and Cap FPS are 2 px smaller each, so Cap FPS sits a little further from the right edge
    • MainWindow.xaml: lblTargetFPS1 and lblTargetFPS2 left margin 12 to 10, chkCapFps left margin 14 to 12
  • AppConfig TestVariant -test12 (WidgetVersion stays 1.7.5)

Test11:

  • MSFS 2024 MS Store 1.9.24.0: the built-in entry now includes the GPU frame time and frame time as well as the CPU thread times and frame limiter, so MS Store users get them straight away on the first run with no search
    • MsfsEngineData.BuiltInAddresses "1.9.24.0 6AE8D8A4": added gpu=49B11A8,49B11A1,0,258 and frm=1F74556,1F744FA,10, taken from a tester's Test9 log ("Built-in entry" line)
  • Log+ status line 3 and the Load log text: the GPU % is now the higher of MSFS's GPU time as a % of the frame time and the GPU load reading (NVML, ADL or GPU-Z, the same GPU load used elsewhere), as MSFS's GPU time leaves out frame generation and any other work on the GPU, which made the GPU headroom look higher than it really was. "(total)" follows the GPU % when it comes from the card's total load reading, e.g. "GPU 98% (total)". The headroom and which of CPU or GPU is limiting use the same GPU %. If MSFS's GPU time is not available, the load reading alone is used
    • Status line 3: "Headroom" shortened to "Hdrm" to keep it in line with the rest of the status line (the log keeps "Head")
    • LODController.SampleMsfsEngineData: new msfsGpuPct, loadGpuPct (Model.gpuUsage, clamped 0 to 100), gpuFromLoad, showGpu and gpuSource feed gpuPct, headroom, line3 and loadText
  • Main window: a double-click on empty space within 10 px of any visible button, checkbox or radio button no longer toggles between the full and compact views, as it is most likely two slightly missed clicks on that control (e.g. a stepper's - or + button). Clicks on the controls themselves are unchanged. The widget and web page have no double-click view toggle, so are unchanged
    • MainWindow.AutoFPS_DoubleClick: checks new NearButton(e.GetPosition(this)) before toggling windowPanelState
    • New NearButton walks the window's visual tree for visible ButtonBase controls (buttons, checkboxes, radio buttons) and checks the point against each one's bounds inflated by new constant DoubleClickNeutralZone (10 px)
  • In-game widget: holding the Tuning step bar's - or + button (e.g. OLOD Base) no longer jumps back to a lower or older value part way through. The Tuning tab is rebuilt whenever a label's text changes (e.g. the TLOD status), and the rebuild refilled every box from the app's saved value, while a held step is only sent 450 ms after the last step, so the box went back to the old value and stepping carried on from there (seen as a value applied twice in the log, e.g. OLODAtBase 25 then 25). The web page has no step bar, so is unchanged
    • HtmlWidgetPanel.js applyTuning: before a rebuild, keeps the value of each box still held by tuneSuppress (being stepped, or its step not yet sent or applied) in keepVals, and puts it back into numValues and the box's text after buildTuneSection
  • Main window: the same protection for its own steppers, as a settings reload while holding a Tuning or Target FPS - / + button could do the same
    • MainWindow.LoadSettings: keeps the text of the Tuning box being stepped (new TuneStepPending: tuneStepRepeatTimer or tuneStepApplyTimer running) and of txtTargetFPS while targetFpsStepRepeatTimer or targetFpsStepApplyTimer is running, putting it back after LoadSettingsCore if the reload changed it. The cap boxes already did this in their own fill (stepping in the cap box refresh)
  • TLOD Status (Spike Protection): with fewer than the 4 spikes needed to check for periodic spikes, it now shows "No spikes" when none were found, or e.g. "2 spikes, 4 needed", instead of "Spikes but < 4 (n)", which read as spikes found even with 0
    • ServiceModel periodic spike detection: new SpikeDetectProtStatus text for spikeCandidates.Count below 4
  • AppConfig TestVariant -test11, WidgetVersion 1.7.5 (autofps-html-widget-panel.xml AssetPackage Version 1.7.5)

Test10:

  • MSFS 2020 engine data: the CPU thread times, frame time and GPU frame time are now read on MSFS 2020 too, with the same Log+ status lines 2 and 3 and Log+ log lines as MSFS 2024. MSFS 2020's Dev Mode overlay texts are not stored as plain text in its exe (they are not found anywhere in memory), so the MSFS 2024 search from MSFS's code cannot work there. Instead the values are built in per MSFS 2020 exe, found with a memory scanner and confirmed after an MSFS restart, and checked against live readings each run. Built in for Steam 1.39.12.0 and the 1.40.2.0 beta. On any other MSFS 2020 exe (MS Store, a beta or an update) the known values are tried too and used if they pass the same check. If none pass, the timing pointer is searched for in the exe and saved when found, as an MSFS 2020 update can move the pointer while the structure's fields stay the same (seen on the 1.40.2.0 beta: pointer moved from exe+782E2C0 to exe+78316E0, fields unchanged); if nothing is found it is logged and nothing is shown
    • MSFS 2020 Steam 1.39.12.0 (exe tag "1.39.12.0 697051EA"): timing pointer exe+782E2C0, fields frame time +10, MainThread +58, RdrThread +A0, Manipulators +1C0, CoherentGTUIThread +400, GPU +408 (Graphics Queue, the overlay's "GPU", right after CoherentGTUIThread as on MSFS 2024). CoherentGTDraw (+130) is not used, to keep the lines the same as MSFS 2024
    • MSFS 2020 Steam 1.40.2.0 beta (exe tag "1.40.2.0 6AEE5019"): timing pointer exe+78316E0, same fields. Found by the pointer search (52 of 72977 candidates in 332 ms, 0x3420 bytes from the 1.39.12.0 pointer), matching a memory scanner run, then confirmed from the saved value after an MSFS restart
    • MsfsEngineData: new BuiltIn2020 (exe tag to pointer RVA and offsets), Resolve2020 and Check2020. Resolve takes the MSFS 2020 path before any search. The entry for the exact exe is tried first, then every other entry (built-in and saved), and the log says which entry was used and whether built-in or saved. The values are used only once a live reading passes the check: every field 0 to 2000 ms, frame time 4 to 250 ms, no time over twice the frame time, and the frame time within 20% of 1000 / MSFS's FPS when known (Check2020FpsTolerance). Up to 30 tries 0.5 s apart (Check2020Tries, Check2020IntervalMs), for MSFS to create the structure and give a plausible reading. A reading that passes before MSFS's FPS is known keeps waiting for it, so the frame time is checked against it, and is only accepted without that check on the last try (logged as such). On a pass it logs the pointer, offsets and readings, otherwise why it failed
    • Check2020 split into Check2020 (reads the timing pointer) and Check2020At (checks the structure at a given address, read in one block, also returning the frame time)
    • New Search2020, run when no known entry passes: starts from the pointer of the known entry nearest in version (NearestVersion2020: the same version, otherwise the newest below the running one, otherwise the oldest above it), reads the exe's writable data within +-32 MB of it (Search2020Half, 64 KB reads Search2020Chunk), and tries every 8 byte value that looks like a heap address outside the exe as the timing structure with the same field offsets, nearest first, each address once. A match must pass Check2020At including the frame time against MSFS's FPS, then pass again 250 ms later (Search2020RecheckMs) with the frame time changed. Time cap 10 s (Search2020MaxMs). Waits up to 10 s for MSFS's FPS first (Search2020FpsWaitMs), as the search needs it. Logs where it was found, how far from the start, candidates tried, time and MB read, plus a "Built-in entry for MsfsEngineData.BuiltIn2020" line to paste in
    • Values found by the search, or a known entry from another exe that passed, are saved to the sim config (new msfs2020EngineData, with the previous exe's moved to msfs2020EngineDataPrev for release/beta switching; Save2020, TryParse2020, format "exe tag|pointer,frame,Main,Rdr,Manip,GTUI,GPU" in hex), so later runs use them straight away
    • New LooksLikeHeap: the timing pointer must hold a user mode, 8 byte aligned address (was only 0x10000 or more, which text such as 746C66 on the 1.40.2.0 beta passed). SetFields2020 and Fields2020Text added for the shared field setting and log text
    • Resolve2020 reads FlightSimulator.exe's own base (new Exe2020) and its exe tag, as the app's module base on MSFS 2020 is WwiseLibPCx64P.dll (simModule), not the exe
    • MsfsEngineData.IsEnabled: both MSFS 2020 and 2024 (was MSFS 2024 only). The frame limiter stays MSFS 2024 only, logged as "Frame limiter: not used on MSFS 2020"
    • During Test10 development: a first trial ran the MSFS 2024 search on MSFS 2020, which found nothing ("MainThread" text not in the exe) and is replaced by the above. The 1.40.2.0 beta pointer was built in only after the search had found it on its own
  • AppConfig TestVariant -test10 (WidgetVersion stays 1.7.4)

Test9:

  • MSFS 2024's own GPU frame time (the "Graphics Queue" figure on MSFS's Dev Mode FPS overlay) read from MSFS memory, logged and shown live on the Log+ status lines, as a trial towards a GPU load that works on any card. Read only, nothing acts on it yet. It sits in the same timing structure as the CPU thread times, just after CoherentGTUIThread (+258 on Steam 1.9.24.0, found with a memory scanner), and keeps updating with the overlay and Dev Mode off
    • MsfsEngineData: the field is worked out from MSFS's code like the CPU thread times, so MSFS updates are picked up: the "Graphics Queue" overlay text (new GpuTextBytes), every instruction that loads it (FindRipLeaRefs, near the last known location first, then all code), then in that function (new AnalyseGpu) a double read at CoherentGTUIThread + 8 (new GpuFieldAfterGtui) from the timing structure pointer loaded there, otherwise such a read within 0x800 bytes of the text load (GpuNearLabel), otherwise, if the layout has moved, the only field after CoherentGTUIThread read from that pointer (noted in the log). Last resort if the text is not loaded directly: a read at that offset just after any load of the timing structure pointer in MSFS's code (new FindRipMovRefs). Never guessed: if no read is found it is logged why and the GPU frame time is left out, with nothing else affected
    • New DecodeDoubleRead (movsd, sqrtsd, addsd, mulsd, cvtsd2ss, subsd, minsd, divsd, maxsd from [reg+disp]) and CollectGpuReads. The CPU thread time search (CollectDoubleReads, exactly five movsd reads) is unchanged
    • Saved per MSFS exe with the CPU and limiter values, as a new "|gpu=read,labelload,text,offset" part of msfsEngineAddresses (Entry.GpuRead, GpuLabelLoad, GpuText, GpuOffset, CopyGpu; text 0 when anchored on a timing pointer load), and checked against MSFS's code every run (new VerifyGpu: the read still has the same offset, and the text load still loads "Graphics Queue", or the pointer load still loads the timing structure into the read's register). Builds before Test9 ignore the gpu part. Built-in entry added for Steam 1.9.24.0 (gpu=4A46938,4A46931,0,258, found by the last resort search: the Graphics Queue text is loaded in the CPU thread times function, which reads only the five CPU fields), MS Store to follow from a tester's log
    • The Resolve log line adds "GPU frame time: timing structure +X, read by code at exe+..." or "GPU frame time NOT found (reason)", the built-in entry line includes it, and the first readings line adds the first GPU frame time
    • New MsfsEngineData.TryReadGpuTime (ms, 0 to 2000 ms) and GpuReady
    • LODController.SampleMsfsEngineData reads it each tick with the CPU thread times and the frame time (below). GPU % is the GPU frame time over the frame time, bounded to 0 to 100%. The 30 s MSFS engine log line adds "GPU avg/max ms (n% of the frame time)" (new engineGpuSamples, engineGpuSum, engineGpuMax, engineGpuFrameMsSum)
    • The GPU comparison line (test builds and Log+) adds "MSFS GPU:n% (x ms)" over the time since the last line, bounded to 0 to 100%, next to NVML or ADL and GPU-Z, to see how it tracks them on each card (new compareGpuSamples, compareGpuSum, compareGpuFrameMsSum)
    • Checked on an RTX 4090 against the overlay, RTSS and NVML: without frame generation and with the GPU as the limit it read 87 to 98% against NVML's 89 to 99%. With frame generation it reads lower than NVML (about 30% against 37% with FSR FG capped, 75% against 95% with DLSS FG uncapped), as the generation work is not in the Graphics Queue time
  • MSFS 2024's own frame time (the ms figure under the FPS on MSFS's Dev Mode FPS overlay) read from MSFS memory as the frame time for all the MSFS load %s, so they all come from the same rendered frame. It is +10 in the same timing structure, the interval of each rendered (native) frame including any frame limiter wait. Checked on an RTX 4090 with a memory scanner against the overlay and RTSS with no frame generation, FSR FG and DLSS FG, each capped and uncapped, and with MSFS not focused: always the native frame (e.g. 50 ms at 40 FPS on screen with FSR FG and MSFS's limiter at 20, 33.3 ms at 60 with DLSS FG and 30, 11.6 ms at 171 with DLSS FG uncapped)
    • MsfsEngineData: new FrameFieldOffset 0x10, found in MSFS's code (new DeriveFrame) as a double read at +10 just after a load of the timing structure pointer, the nearest to the CPU thread times code. Saved as a new "|frm=read,load,offset" part of msfsEngineAddresses (Entry.FrameRead, FrameLoad, FrameOffset, HasFrame, CopyFrame) and checked against MSFS's code every run (VerifyGpu's pointer load check). Built-in entry added for Steam 1.9.24.0 (frm=2011F06,2011EAA,10, found by the pointer load search and confirmed in a run), MS Store to follow from a tester's log
    • The Resolve log line adds "Frame time: timing structure +10, read by code at exe+..." or "Frame time NOT found (reason), MSFS's FPS used instead", the built-in entry line includes it, and the first readings line adds the first frame time. New MsfsEngineData.TryReadFrameTime and FrameReady
    • Without it, MSFS's own FPS (Model.fpsRawMSFS) gives the frame time. Also native in every mode, but it read 2 to 8% high uncapped in tests (e.g. 121 to 130 against RTSS's 120 with no frame generation), exact when capped
    • Frame generation check, every 30 s: if MSFS's frame time ever matches the generated rate instead (the native frame time from MSFS's FPS ÷ the frame multiplier, Model.CapFpsModeMultiplier), MSFS's FPS is used for the rest of the flight and a warning logged once (new frameTimeUseFallback, engineFrameSamples, engineFrameSum, engineFrameMax, engineRawFrameSamples, engineRawFrameMsSum). Not seen in any test
    • The 30 s MSFS engine log line adds "Frame avg/max ms", or "Frame from MSFS's FPS" when it is not found
  • Log+ status lines 2 and 3 now show MSFS's own engine data, live each tick, in the main window and the in-game widget (not on the web page, which stays a simple diagnostic page):
    • Line 2: the frame time, CPU thread times and GPU frame time in ms, with short names to keep it near 60 characters (FT frame time, Mnp Manipulators, UI CoherentGTUIThread), e.g. "MSFS: FT 50.0 Main 11.7 Rdr 5.6 Mnp 3.3 UI 2.8 GPU 15.5 ms" (the GPU part left out if its field is not found). The Log+ per-second line uses the same names, e.g. "MSFS:FT 50.0 Main 11.7 Rdr 5.6 Mnp 3.3 UI 2.8 GPU 15.5ms"
    • Line 3: the load summary, e.g. "MSFS Load: Main 48% | GPU 32% | Headroom 52% CPU" (labelled MSFS Load, as these are MSFS's own figures, not general CPU or GPU loads): the busiest CPU thread by name (Main, Rdr, Mnp or UI) and the GPU as a % of the frame time, each bounded to 0 to 100% (a single frame's time can run over the frame time, e.g. GPU work overlapping the next frame when the GPU is the limit), and the headroom, 100% less the higher of the two, with the one limiting it. Without the GPU field, "MSFS Load: Main 48% | Headroom 52% CPU"
    • New ServiceModel.MsfsEngineStatusText (line 2) and MsfsLoadStatusText (line 3), set by LODController.SampleMsfsEngineData each tick ("" when the CPU thread times cannot be read). New LODController.FramePct
    • MainWindow adds them as the last lines of lblStatusMessage, not while a Target FPS warning replaces the status line
    • In-game widget 1.7.4: the widget's statusMessage is now the full status line, so the widget shows every line the main window does, and any future change to the status lines needs no widget change. Its height already follows the lines (auto height in 2D, grows only in VR)
    • HtmlWidgetPanel.js: the smaller status font (status-compact) is now used when any line is over 60 characters, not only the first, so the engine lines don't wrap
    • Web page: new statusWeb field in the status JSON (WidgetTelemetryPayload.statusWeb), the status line from new MainWindow.StatusTextForWebPage, which leaves the engine lines out (statusEngineLine). AutoFpsWebServer's Status row shows statusWeb, or statusMessage from an older app. The page now shows a multi-line value (e.g. a Target FPS warning) on separate lines (td:last-child white-space: pre-line) instead of joined with " | "
  • MSFS engine data sampled about 10 times a second and averaged over each second, instead of one frame's values each second, so status lines 2 and 3, the Log+ per-second and 10-second lines and the GPU comparison line are steadier and a single frame blip no longer swings them. About 100 small memory reads a second, well under 1 ms of CPU a second
    • ServiceController.ServiceLoop: the wait between ticks now sleeps in steps of up to 100 ms (new EngineSampleMs), sampling after each step. Each step works out the time left from nextTick, so ticks still land on nextTick (OFXR phase correction and overrun reset unchanged) and only the last short sleep is rounded by the Windows timer, as the single sleep was. A failed sample is logged at Debug and skipped
    • New LODController.SampleEngineFast (not while the app is paused or when the engine data is not used), AddEngineSample and ResetFastSamples, with new fastSamples, fastMainSum, fastRdrSum, fastManipSum, fastGtuiSum, fastFrameSamples, fastFrameSum, fastGpuSamples and fastGpuSum
    • SampleMsfsEngineData takes one sample at the tick, then uses the averages since the last tick for everything it did with the single reading. The %s are the average time over the average frame time. The 30 s line's avg/max is now of the per-second averages
  • Log+: GPU power in watts next to the GPU % on the status line, e.g. "GPU 37% 91W", in the main window and the widget, and "Pwr:91W" after GPU:x% in the 10-second log line. Averaged over the last 5 seconds like the GPU load, so it doesn't jump around (NVML and ADL power are both momentary readings). Shown only while the GPU % is shown, and left out with no power source (Intel and other cards without NVML, ADL PMLog or GPU-Z power)
    • New GpuMonitor.TryReadPowerW: NVIDIA NVML power usage (whole board), AMD the PMLog board power from the tick's read (ASIC power on cards without board power, new adlLastPowerW set in SumAdlPower)
    • New LODController.UpdateGpuPower, called each tick after the GPU load: GpuMonitor first, otherwise GPU-Z's Board Power Draw sensor or its first other power sensor in watts (new GpuzBoardPowerW), averaged over 5 ticks (new gpuPowerSamples) into new ServiceModel.gpuPowerW
    • MainWindow adds it after the GPU % (Log+ only), so the widget shows it with no widget change
  • CPU sampler off for now, code kept: its Log+ CPU status line (CPU, Dom, Top2, MSFS %) was an attempt at telling how CPU bound MSFS is from outside it, which MSFS's own thread times now show directly. It is no longer started for each flight, so its PDH sampling overhead goes too
    • New ServiceModel.CpuSamplerEnabled (static readonly, false). MainWindow only starts the CpuHeadroomProbe and shows the CPU status line when it is true
    • Log+ per-second line: the CPU, Dom, MSFS and Top2Avg fields are replaced with the MSFS engine data, e.g. "MSFS:FT 50.0 Main 11.7 Rdr 5.6 Mnp 3.3 UI 2.8 GPU 15.5ms Load:Main 23% GPU 31% Head 69% GPU", then GPU and VRAM as before (LODController.AddEntryPerfLog, new perfEngineLogText). It no longer depends on the CPU sampler
    • Log+ 10-second line (LODController.UpdateVariables): the CPU, Dom, Top2Avg and MSFS fields are replaced with the load summary, e.g. " Load:Main 23% GPU 31% Head 69% GPU", keeping the "(n Cores)" ending from the CPU affinity option (new engineLoadLogText)
  • GPU-Z card check: GPU-Z reports one GPU at a time (its selection at the bottom of its window), so on connect its card name must match the adapter MSFS uses. If not, GPU-Z's load and VRAM are not used, a warning is logged once ("GPU-Z is reporting X, not Y that MSFS uses - select Y at the bottom of the GPU-Z window"), it is retried every 30 s, and while GPU-Z is the GPU load source (no native GPU load) the status line shows "GPU-Z wrong card", which the widget and web page show as is. With no card name from GPU-Z, or no MSFS adapter name yet, GPU-Z is used as before
    • New LODController.GpuzCardMatches, called from gpuzRunning on connect once the GPU Load sensor is found: reads GPU-Z's data fields (GpuzWrapper.DataKey and DataValue, up to 128, new GpuzDataScanMax) for CardName and compares it with Model.GpuMonitorAdapterName (new GpuNamesMatch: letters and digits only, case ignored, either containing the other). On a mismatch it checks GPU-Z is still running (its shared memory keeps the last values after it closes), closes GPU-Z and retries in gpuzRetrySeconds
    • Test builds and Log+ log every GPU-Z data field once per app run ("GPU-Z shared data fields (n): ...", new static gpuzDataListed), to confirm the card name field on each card. No CardName is logged once per app run (new gpuzCardNameMissingLogged)
    • New gpuzWrongCardLogged keeps the retries quiet ("GPU-Z companion app running" is not logged again while the card is wrong) and logs "GPU-Z now reporting X, the adapter MSFS uses - GPU-Z in use" when it matches again
    • New ServiceModel.GpuzWrongCard, cleared when the card matches or GPU-Z is no longer running at a retry, and ServiceModel.NativeGpuLoadActive, set by LODController.UpdateVariables each tick. MainWindow shows " | GPU-Z wrong card" when GpuzWrongCard and not NativeGpuLoadActive, ahead of the "Start GPU-Z for ..." prompts
  • GPU frozen checks held while MSFS is paused. During a 31 minute pause at cruise, VRAM stayed identical to the byte, and once GPU load had also held steady for 2 minutes, NVML, GPU-Z and then the Windows statistics were each dropped as frozen (an MS Store tester's log), until the native retry a minute later. While paused the readings can legitimately stay identical, so the checks now restart on resume
    • New GpuMonitor.SimPaused, set by LODController.UpdateVariables each tick from ServiceModel.AppPaused before GpuMonitor.TryRead. GpuMonitor.CheckRead restarts its frozen timer while it is set
    • LODController.ReadGpuzChecked restarts gpuzUnchangedSinceTick while ServiceModel.AppPaused
  • ADL method names in the log are now fixed text, so release builds show "PMLog" instead of "b". The release build's obfuscation renames enum members, and the log printed the enum
    • New GpuMonitor.AdlMethodName, used on the selection line (ADL ok (...)), the selection description, the rejected methods list, the comparison line and the power n/a text
  • AMD board power averaged in the test log, as single ADL PMLog power readings swing widely (38 to 267 W on an RX 9070 XT in Test8, against GPU-Z's 60 to 202 W). The comparison line now gives the current value and the average since the last line, e.g. "ADL asic:n/a board:199W (avg 165W)". No extra ADL reads: the PMLog read for GPU load (once a second) already returns every sensor
    • New GpuMonitor.SumAdlPower, called from ReadAdlActivity after each valid PMLog read, adds the ASIC and board power (when supported and 1 to 1000 W) to new adlAsicPowerSum, adlBoardPowerSum, adlAsicPowerCount and adlBoardPowerCount, reset with the other comparison sums in CompareText. New AdlPowerAverage formats the average in PowerText. NVIDIA is unchanged, as NVML board power already matches GPU-Z
  • MSFS engine log line: the "raw" FPS and frame time now come from MSFS's own FPS (Model.fpsRawMSFS) instead of the FPS source's, so with RTSS and frame generation they are the rendered rate, as the line has always intended (e.g. raw 20.0 (50.0 ms) with FSR FG at 40, not raw 39.9 (25.0 ms))
    • LODController.SampleMsfsEngineData: engineRawFpsSum sums Model.fpsRawMSFS
  • AppConfig TestVariant -test9, WidgetVersion 1.7.4
  • autofps-html-widget-panel.xml AssetPackage Version 1.7.4

Test8:

  • AMD ADL adapter detection made robust: an ADL entry is now AMD if its UDID names vendor 1002, the method LibreHardwareMonitor uses because ADL's iVendorID field is wrong on Windows (a parse error), with Test7's vendor id check (1002 or 0x1002) kept as the backup
    • GpuMonitor.FindAdlAdapter reads each entry's UDID (strUDID, new AdlInfoOffUdid at offset 8, e.g. "PCI_VEN_1002&DEV_7550&SUBSYS_...") and new UdidVendor reads the hex vendor id after PCI_VEN_. An entry counts as AMD if either check passes. Card name matching and everything after it are unchanged
    • If no entry is AMD by either check, the log now gives the raw vendor ids seen and the first UDID, so a failure shows exactly why
    • On success the selection line now gives how the AMD entries were found ("n AMD entries, n by UDID, n by vendor id") with the ADL adapter index
  • AppConfig TestVariant -test8

Test7:

  • AMD ADL now finds the card. ADL reports the AMD vendor id as decimal 1002, not hex 0x1002, so in Test6 every ADL adapter entry was skipped ("ADL adapter list not recognised (5 entries, none with AMD vendor id)") and the RX 9070 XT fell back to the Windows estimate
    • GpuMonitor.FindAdlAdapter accepts vendor id 1002 (new AdlVendorAmdDecimal, as AMD's own samples check) as well as 0x1002
  • Windows engine statistics are no longer used for GPU load at all, neither shown nor used for automation. Compared with NVML, ADL and GPU-Z on four cards (RTX 4090, RTX 3060 Laptop, RTX 5080, RX 9070 XT) they read 10 points high to 25 points low, varying by card, driver and settings, and on the RTX 5080 dropped to 5 to 14% for whole 30 s windows while NVML read 55 to 95%. GPU load is now native only from the driver's own figure (NVML on NVIDIA, ADL on AMD). Intel, any other GPU, and NVIDIA or AMD when NVML or ADL cannot be used get native VRAM with GPU load from GPU-Z when running, otherwise none
    • Removed from GpuMonitor: the busiest engine estimate and its 10 s pick and 30 s checks (ReadEstimateLoad, LockEstimateNode, StartEstimateCheck, CheckEstimateNode, ResetEstimatePick, AllNodes, LoadIsEstimate, kmtEstimateOk and the estimate fields), the 3D engine read (ReadKmtLoad, ReadKmtLoadNodes, kmtLoadOk, loadNodes, lastNodeRunning, lastNodeTime, lastKmtLoad, kmtOddSampleLogs), the engine type lookup (Find3DNodes with D3DKMTOpenAdapterFromLuid, D3DKMTQueryAdapterInfo, D3DKMTCloseAdapter and the node metadata constants), the engine checks in InitKmt, the busiest engine comparison (ReadBusiestSinceLast), the engine timing (kmtLoadTicks, kmtLoadCount, kmtLoadCalls) and the public LoadEstimated property
    • Removed the asterisk: ServiceModel.gpuLoadEstimated, its use on the MainWindow status line and in the LODController UpdateVariables log line
    • GpuMonitor.TryRead no longer takes flightSettled, and LODController.UpdateVariables no longer works out gpuFlightSettled
    • Windows statistics are still used for VRAM (dedicated VRAM resident), which matched GPU-Z to within a few MB on the 9070 XT, so VRAM+ works natively on every card
    • When NVML or ADL fails, GpuMonitor now falls back to the Windows statistics for VRAM only, with GPU load from GPU-Z if running
    • Comparison log line: the Windows 3D or busiest engine figure is gone. With no NVML or ADL it logs "Load:n/a (no NVML or ADL), GPU-Z needed for GPU load"
    • Removes the 1 to 4.5 ms of engine reads per tick seen on the 9070 XT in Test6
  • Board power read as a trial, logged only (test builds and Log+), to decide later where to show it, possibly with MSFS frame time data in the live values section. Nothing else uses it
    • NVIDIA: NVML nvmlDeviceGetPowerUsage (whole board, milliwatts), new delegate NvmlGetPower, optional (logged as n/a if the driver lacks it)
    • AMD: ADL PMLog sensors PMLOG_ASIC_POWER 23 (the GPU chip) and PMLOG_BOARD_POWER 73 (the whole card, newer cards only), from AMD's adl_defines.h, each only if the driver marks it supported. Needs the PMLog activity method, otherwise logged as n/a
    • Every value must be 1 to 1000 W (MaxPlausiblePowerW), otherwise logged as implausible
    • New GpuMonitor.PowerText and AdlPowerSensor, read only when the comparison line is written (every 30 s), so nothing is added per tick. Added to the line as "| Power NVML board:350W" or "| Power ADL asic:209W board:222W"
    • GPU-Z power for comparison: LODController.gpuzRunning finds every GPU-Z shared sensor with "Power" in its name (case ignored, up to 6, GpuzPowerSensorLogMax) once on connect, alongside the GPU Load and Memory Used sensors, and keeps their indices (new gpuzPowerSensorIndices, cleared in CloseGpuz). LogGpuSourceComparison reads them by index after the GPU-Z load and VRAM, with value and unit, e.g. "Board Power Draw:350W", so the sensor list is not scanned every 30 s. Sensors GPU-Z lists without a value (NaN, as most power rails on an RTX 4090) are left out of the line. Names are matched loosely as they vary by card and GPU-Z version
    • The same connect scan logs every sensor GPU-Z shares, with units, once per app run (new static gpuzSensorsListed), test builds and Log+ only, as "GPU-Z shared sensors (n): ...", to confirm whether GPU-Z offers power on each card. Scans at most 128 records (GpuzSensorScanMax, GPU-Z's shared memory limit) and stops at the first empty or null name
  • New common config setting MaxLogsPerDay (default 20, config file only, applies at the next app start): the most log files kept for any one day, newest kept, so heavy testing with per session logs does not pile up dozens of files. The 3 day retention is unchanged
    • App.CleanSessionLogs now takes maxPerDay: after removing logs older than the 3 most recent days, it groups the remaining logs by day and deletes the oldest (by last write time) beyond maxPerDay, allowing one fewer for today as this run's log is about to be created
    • New App.ReadCommonInt (reads a whole number straight from the common config, as InitLog runs before ServiceModel loads it) and DefaultMaxLogsPerDay. InitLog clamps the value to 1 to 1000
    • The InitLog line now says "logs of the last 3 days kept, up to N a day"
    • ServiceModel.MaxLogsPerDay, read with ParseIntSetting so the key is added to the common config file and can be found and edited
  • AppConfig TestVariant -test7

Test6:

  • AMD GPU load now read from the AMD driver itself (ADL), the same GPU activity figure GPU-Z shows, instead of the Windows engine statistics. On an RX 9070 XT the engine types cannot be read, so the busiest engine over the first 10 s of flight was locked onto, and in a GPU-Z comparison run that was the wrong engine: AutoFPS read 0 to 11% GPU load while GPU-Z read 66 to 100% for the whole flight (GitHub discussion #316)
    • New ADL section in GpuMonitor.cs: atiadlxx.dll (atiadlxy.dll in a 32-bit process) loaded once per app run with NativeLibrary.TryLoad (new InitAdl), using ADL2_Main_Control_Create (connected adapters only), ADL2_Adapter_NumberOfAdapters_Get and ADL2_Adapter_AdapterInfo_Get. The ADL malloc callback is a static delegate (adlMallocCallback) so it is never collected
    • The adapter is found in ADL by name (new FindAdlAdapter), as NVML does. ADL lists one entry per display output, so entries on the same PCI bus number are one card. Not used if no AMD entry has the adapter's name, if two or more cards have the same name (identical cards cannot be told apart), or if no entry has the AMD vendor id (AdapterInfo layout not recognised)
    • Three ways to read the GPU activity %, tried in order at selection, and the first that reads correctly is used (new SelectAdl, ReadAdlActivity, AdlMethod): PMLog (ADL2_New_QueryPMLogData_Get, sensor ADL_PMLOG_INFO_ACTIVITY_GFX 19, RDNA and newer, as LibreHardwareMonitor uses), OverdriveN (ADL2_OverdriveN_PerformanceStatus_Get, iGPUActivityPercent, Polaris and Vega) and Overdrive 5 (ADL2_Overdrive5_CurrentActivity_Get, iActivityPercent, older cards). Structure layouts and sensor numbers checked against AMD's public ADL SDK headers (adl_structures.h, adl_defines.h)
    • Every ADL reading is checked: activity 0 to 100%, plus a second value from the same structure must be plausible (PMLog GFX clock 1 to 10000 MHz or edge temperature 1 to 150 C, OverdriveN core clock above 0, Overdrive 5 engine clock above 0), so a layout or sensor mismatch is rejected rather than read as load. This also rejects the 65535 activity some AMD drivers have reported, falling through to the next method
    • ADL gives GPU load only. VRAM still comes from the Windows statistics, which matched GPU-Z to within a few MB on the 9070 XT
    • Read failures and frozen values fall back from ADL to the Windows statistics, as NVML does
    • New log line GpuMonitor:InitAdl giving which activity functions the driver has. The selection line now gives the ADL method, ADL adapter index and first reading with its check value, or why ADL could not be used
  • Windows statistics GPU load, when the driver does not report which engine is the 3D engine and there is no NVML or ADL (Intel, any other GPU, or NVIDIA or AMD when NVML or ADL cannot be used), is now an estimate from the busiest engine, rechecked every 30 s, and shown with an asterisk (e.g. "GPU 64%" on the status line, in the widget and on the web page, and "GPU:64%" in the log). Before, the busiest engine over the first 10 s of flight was locked onto for good, which on an RX 9070 XT was the wrong engine (see above). When the driver does report the 3D engine (Find3DNodes), that engine is read as before and there is no asterisk
    • Pick: once the flight has settled (FPS settle and initial settle done, and at least 10 s into the flight, as TLOD method 2 has no settle), every engine is read each tick for 10 s (EstimatePickSeconds) and the GPU load is the busiest engine each tick. Then the engine busiest over those 10 s is locked onto and read alone, logged by GpuMonitor:LockEstimateNode with its busy % and the next busiest engine's
    • Check: every 30 s (EstimateCheckSeconds) every engine is read once and its busy % averaged over those 30 s. If another engine was busier than the locked one by more than 10 points (EstimateSwitchMargin), a new pick starts (GpuMonitor:CheckEstimateNode, Information), showing the busiest engine each tick while it samples. Otherwise the engine is kept (Debug line with both figures). The real 3D engine should normally be well clear of the others, so the margin stops two similar engines triggering repeated picks
    • Cost: every engine each tick only during a 10 s pick (about 1.7 to 2.4 ms a read with 8 engines on the 9070 XT), then one engine each tick plus one read of every engine every 30 s
    • A gap of more than 5 s between reads (MaxSampleGapSeconds: between flights, MSFS loading) restarts the pick sampling or the check window, so time out of flight, where video decode is busiest, is never counted. The locked engine is kept across flights while the same adapter is selected, and keeps being checked
    • Until the first pick has started sampling, GPU load comes from GPU-Z when running, otherwise it is unavailable. VRAM is read natively throughout
    • New GpuMonitor fields kmtEstimateOk, estimateLocked, estimateNode, estimatePickBusy, estimatePickSeconds, estimatePickPrimed, estimateCheckRunning, estimateCheckStart, estimateLastRead, estimateSettled, estimatePicks, and methods ReadEstimateLoad, LockEstimateNode, StartEstimateCheck, CheckEstimateNode, ResetEstimatePick, AllNodes, LoadIsEstimate. New public property GpuMonitor.LoadEstimated
    • Removed the old fallback: LockBusiestNode, BusiestLockSeconds, loadNodesLocked, nodeBusyAccum, fallbackSampledSeconds, fallbackPrimed, and the every-tick engine reads TryRead made with NVML as the source until the lock. kmtLoadOk is now true only when the 3D engine is found. loadNodesDescription holds the 3D engine found, or why it is not known
    • GpuMonitor.TryRead has a new input flightSettled and a new out parameter loadAvailable (false with VRAM only, or before the first estimate pick). New GpuMonitor.LoadAvailable property
    • New ServiceModel.gpuLoadEstimated, set in LODController.UpdateVariables (false when the load comes from GPU-Z or is unavailable). MainWindow adds the asterisk after the GPU % on the status line, which the widget and web page show as is, so no widget change is needed. The UpdateVariables log line adds it after GPU:x%
    • LODController.UpdateVariables: with native VRAM but no native load yet, GPU load comes from GPU-Z (ReadGpuzChecked) when running, otherwise gpuUsage is -1 (unavailable). VRAM+ keeps working from the native VRAM reading either way
    • LODController constructor: logs "Native VRAM monitoring active (...), GPU-Z needed for GPU load" when the engine statistics are unreadable, and checks for GPU-Z as it does with no native monitoring
    • SourceDescription now names the load source: NVML, "AMD ADL load, Windows GPU statistics VRAM", Windows GPU statistics, "Windows GPU statistics, GPU load estimated from the busiest engine", or "Windows GPU statistics VRAM only, GPU load from GPU-Z"
    • The "engine busy counter did not move" debug line is now only checked when one engine is read, so idle engines during a pick do not trigger it
  • Comparison log line (test builds and Log+) now logs the Windows engine load next to NVML or ADL, to find out whether the Windows statistics give a usable GPU load on each card type. It is not used for anything else
    • GpuMonitor.CompareText: "NVML Load:x% (avg y%)" or "ADL Load:x% (avg y%) (method)", then the Windows VRAM, then "3D Load:z% (avg)" when the 3D engine is known, or "3D engine unknown, busiest engine:node n z% (avg, next busiest w%)" when not (new ReadBusiestSinceLast, one call per engine every 30 s), which shows what the estimate would read and pick on that card. Both averages cover the time since the last comparison line (new vendorLoadSum, vendorLoadCount, summed in TryRead), so they compare like for like
    • With the estimate as the source it logs which engine is locked, or that a pick is under way and how far through. With unreadable engine statistics it logs "Load:n/a (reason), GPU-Z needed for GPU load"
    • New AdlRead timing (adlTicks, adlCount) in the line, next to AvgRead and WinStatsRead
  • AppConfig TestVariant -test6

Test5:

  • RTSS plausibility check now switches back to RTSS as soon as RTSS is plausible again and its data is shown to be changing, instead of always waiting for the frozen check to complete (about 10 seconds). After a graphics mode switch, live RTSS data can read low for a second or two while its frame time buffer still holds the stall, flagging it, then waiting out the rest of the 10 readings on MSFS FPS (11 and 18 seconds in a test flight)
    • New ServiceController.rtssFrameTimeChangeSeen: set in GetRTSSFPS when a reading collected by the frozen check (RTSSInstFrameTimeArray) differs from the previous one, as the frozen check can then no longer find the data frozen. Cleared when the frozen check restarts (ResetAverageFPS, and UpdateAverageFPS_Master when RTSS's MSFS entry goes while frozen)
    • New RtssPlausibleReadings 2 and rtssPlausibleCount: while flagged (rtssImplausible), CheckRtssPlausible now keeps comparing and counts RTSS readings at or above RtssImplausibleRatio of MSFS in a row. With a change seen and 2 plausible readings in a row, the flag is cleared and RTSS used again straight away, logged as "RTSS FPS x plausible again against MSFS FPS y on 2 readings in a row and the RTSS data is changing, so RTSS is used again"
    • A change alone is not enough, as live RTSS data can still read low. Frozen data never changes, so it is never released early and is latched when the frozen check completes, as before
    • After an early release the check carries on for the rest of the frozen check's readings, so RTSS reading low again on 2 readings in a row flags it again (MSFS FPS, FPS settle restarted). Otherwise the flag is still released when the frozen check completes ("RTSS FPS data found to be changing, so RTSS is used again")
    • rtssPlausibleCount reset wherever rtssImplausibleCount is
    • AppConfig TestVariant -test5

Test4:

  • In-game widget 1.7.3: the Cap stepper's - button now stops at the lowest cap and no longer turns the cap Off, as in the app since Test3. Only the 2D Cap / VR Cap button turns a cap Off. Missed from the Test3 build
    • HtmlWidgetPanel.js stepMfr: steps clamped to CAP_MIN to CAP_MAX native frames, and does nothing while the cap is Off (the stepper is inactive then)
    • AppConfig WidgetVersion 1.7.3

Test3:

  • Cap FPS - button now stops at the lowest cap and no longer turns the cap Off, in the app (the widget part was missed from the Test3 build, see Test4). Only the 2D Cap / VR Cap button turns a cap Off. With 3X frame generation and MSFS at 20, the cap starts at its lowest (60), so the first - press turned it Off and FPS ran unlimited, as an MS Store tester found
    • MainWindow.StepCapFps: steps are clamped to ServiceModel.CapFpsMin to CapFpsMax native frames, and does nothing while the cap is Off (the -/+ buttons are inactive then). The - button tooltips (btnCapFps2DDec, btnCapFpsVRDec) now say it stops at the lowest cap and the Cap button turns it Off
    • The typed value "Off" or 0 in the app's box still turns the cap Off
  • RTSS frozen data no longer causes false low FPS readings and settings reductions after each graphics mode switch, focus return or FPS settle. With DLSS frame generation and OFXR, RTSS in its default single swap chain mode can lose MSFS for good at a 2D/VR switch or focus change (its OSD stops), leaving its MSFS entry stuck at the frame time of the stall (e.g. 819.37 ms, about 13 FPS). AutoFPS detected that correctly, but every FPS average reset cleared the frozen state, so the stale reading was trusted again for the 10 readings the frozen check takes, triggering settings reductions each time (GitHub #310, discussion #314)
    • Frozen RTSS data now stays frozen through FPS average resets: ServiceController.ResetAverageFPS only restarts the frozen check (RTSSDetailedLogCount, RTSSLastInstFrameTime, RTSSInstFrameTimeArray) when the data is not frozen, and ServiceModel.ResetCloudsTLOD no longer clears RTSSDataFrozen. It is cleared only when the RTSS frame time changes again (GetRTSSFPS, "RTSS data changing again") or RTSS's MSFS entry goes (UpdateAverageFPS_Master), so restarting RTSS by hand recovers it without restarting AutoFPS
    • The RTSS frozen warnings (RTSSDataFrozenVRWarningSuppressed, RTSSDataFrozen2DWarningSuppressed) are reloaded from the config only when the frozen check restarts, so they are not offered again on each reset while the data stays frozen
    • New RTSS plausibility check while the frozen check collects its readings after a reset (new ServiceController.CheckRtssPlausible, RtssImplausibleRatio 0.6, RtssImplausibleReadings 2, rtssImplausible, rtssImplausibleCount): RTSS on-screen FPS below 60% of MSFS's on-screen FPS on 2 readings in a row switches to MSFS FPS straight away and restarts the FPS settle (FPSSettleActive, FPSSettleActiveLast false, fpsRawTrend reset), logged as "RTSS FPS x implausible against MSFS FPS y". The FPS average reset restarts the frozen check but keeps this result. When the frozen check completes, frozen data is latched as above, and data found to be changing switches back to RTSS ("RTSS FPS data found to be changing, so RTSS is used again")
    • Only RTSS reading low is checked, as a stale reading is low and DynFG reads RTSS at or above MSFS. Not when MSFS is the chosen FPS source, frozen detection is disabled (RTSSFrozenDetectionDisabled), or in VR with OFXR or VectorXR output FPS, as RTSS is not used then
    • New ServiceModel.OnScreenFps and VrOnScreenFps: FPS as seen on screen from an RTSS or MSFS reading, with the rules of the app's FPS display, so the two sources can be compared. MainWindow.GetFPS now uses it, with no change in what it shows
    • The permanent fix for users is to allow multiple swap chains for MSFS in RTSS (RestrictMultipleSwapChains = 0 under [RendererDirect3D12] in FlightSimulator2024.exe.cfg, or FlightSimulator.exe.cfg for MSFS 2020, in RTSS's ProfileTemplates folder, then restart RTSS). The two RTSS frozen warning pop-ups (MainWindow, 2D and VR) now say this and point to the "RTSS data freezing" section of the readme, instead of suggesting frame generation None
  • Built-in MSFS engine data for MSFS 2024 1.9.24.0 MS Store, so the CPU thread times and Cap FPS frame limiter are found without a code scan on first use, as for Steam
    • New MsfsEngineData.BuiltInAddresses entry { "1.9.24.0 6AE8D8A4", "cpu=A8085B8,4500350,82CA240,30,50,D0,250|lim=AEC00A4,4500F23,82CA150" }, from an MS Store tester's log (MsfsEngineData:Resolve, saved value checked against MSFS code)

Test2:

  • Cap FPS caps now set and saved in FPS after frame generation (on-screen FPS), like Target FPS and every other FPS setting in AutoFPS, instead of native frames (NFR)
    • New sim config settings CapFps2DFps and CapFpsVRFps in MSFS2024_AutoFPS.config (0 = Off), with CapFps2DFpsLast and CapFpsVRFpsLast for the value restored when a cap is turned back on (ServiceModel.CapFps2D, CapFpsVR, CapFps2DLast, CapFpsVRLast now hold FPS after frame generation, default 60)
    • The native frames applied to MSFS's Max Frame Rate are worked out from the saved cap and the current frame multiplier: round(cap / multiplier), within MSFS's 20 to 120 (new ServiceModel.CapFpsNfr, CapFpsNfrFor, CapFpsWantedNfr). The cap shown is that x the multiplier, the closest value MSFS allows. For example, 80 at 2X is 40 native frames (shown 80), at 3X 27 (shown 81)
    • When the multiplier changes (MFG frames, DLSS FG or other FG mode, OFXR or VectorXR multiplier, 2D/VR switch), the native frames are worked out again from the saved cap, not from the last shown value, so the cap never drifts: 80 at 2X, then 81 at 3X, is 80 again back at 2X. LODController.ApplyFrameCap now writes CapFpsWantedNfr, so a multiplier change sets the new value on the next tick, logged as e.g. "MSFS Max Frame Rate 40 → 27 (2D cap 81 FPS at 3X)"
    • New ServiceModel.CapFpsModeMultiplier, with the same rules as Target FPS (LODController.GetAverageFPS) for each graphics mode: Man FG its multiplier, LSFG its multiplier, DLSS FG its multiplier (MFG from UserCfg.opt NBFramesToGenerate), FSR FG 2, MSM its multiplier, VR and NFR 1. DynFG (multiplier 1) always counts as 1, whatever the FPS source: its multiplier changes with FPS, and following it would change the cap each time, which could make DynFG and the cap keep triggering each other. LSFG and MSM adaptive modes also count as 1, as their multiplier reads 1 (GetLSModeMultiplier, GetMSMMultiplier)
    • The -/+ buttons step one native frame at a time, so the shown cap moves by the multiplier: 2 at 2X, 3 at 3X (hold to step 5 then 10 native frames). The value landed on becomes the saved cap (MainWindow.StepCapFps). Typed values are saved as the closest value MSFS allows, e.g. 75 at 2X becomes 76 (MainWindow.ApplyCapFpsBox, ServiceModel.SetCapFps now takes the shown value and the multiplier)
    • Each cap box's tooltip shows the native frames behind it and the mode, e.g. "81 FPS = 27 native frames (FG 3X), the closest to your 80", for users who think in native frames (FillCapBox). The button, box and -/+ tooltips say the caps are in FPS after frame generation, and the 2D Cap and VR Cap tooltips say the closest allowed value is used when the multiplier changes
    • Cap FPS log lines give the shown FPS, the native frames and the multiplier, e.g. "Cap FPS 2D 80 → 82 FPS (41 NFR at 2X)" (ServiceModel.SetCapFps, SetCapFpsOn). A cap not yet converted (see below) is shown in NFR (new ServiceModel.CapFpsLogText), including in the settings line logged at start-up
  • OFXR and VectorXR multipliers for Cap FPS are taken only from stable readings, so the VR cap does not change while they are paused, desynced, on standby or waiting
    • New ServiceModel.OfxrConfiguredMultiplier and VxrConfiguredMultiplier, reset to 0 (no reading yet) at the start of each flight in the LODController constructor and set in LODController.GetMSFSState only from a stable reading. Otherwise the last stable one is kept
    • OFXR: not paused, no desync (tripped or building: desyncCondition, isDesynced), and in Auto only a multiplier detected that tick (new ofxrAutoDetected), as Auto otherwise reads 1X from tray.ini
    • VectorXR: not paused, not on standby and not waiting, as ServiceModel.ReadVXRStatusJson sets its multiplier to 1 on standby and waiting (new ServiceModel.isVxrWaiting, IsVXRWaiting). In Dynamic and Auto this is the base multiplier from its status
    • Until the first stable reading in the flight, the VR cap is not applied, shown or changeable (ServiceModel.CapFpsModeKnown). Normally that is the first tick
    • If there is no stable reading within 10 s in VR (VectorXR on standby or waiting from the start of the flight, OFXR Auto with no multiplier detected, or a status without a multiplier), their frames are 1:1 then, so 1X is used and the VR cap is applied, logged once (new LODController.capFpsMultWaitStartMs, CapFpsMultWaitMs, ServiceModel.CapFpsVrMultGuessed). With 1X the native frames are never lower than with the real multiplier, so a wrong guess can only loosen the cap, never cut FPS. The VR cap is not shown or changeable with this guess, and a cap not yet converted is not converted with it. The first stable reading replaces it
  • Caps saved in native frames (Test1, or started from MSFS's Max Frame Rate) are converted to FPS after frame generation only once the real multiplier is known, so they apply the same native frames as before
    • Test1 users: the multiplier is not known at start-up, so each saved cap (CapFps2D, CapFpsVR, CapFps2DLast, CapFpsVRLast) is kept in native frames and applied unchanged (new ServiceModel.CapFps2DPendingNfr, CapFps2DLastPendingNfr, CapFpsVRPendingNfr, CapFpsVRLastPendingNfr, CapFpsPending) until the first flight in that mode once the multiplier is known, then converted once and logged (new ServiceModel.ConvertPendingCapFps, called from LODController.ApplyFrameCap). 2D and VR are converted separately. The old keys are then no longer used (new ServiceModel.LoadCapFpsSettings)
    • Configs from the first Test2 build, which saved the multipliers (CapFps2DMult, CapFpsVRMult), are converted at start-up with those
    • The first time Cap FPS is ticked, both caps start from MSFS's Max Frame Rate in native frames and are converted the same way, so ticking Cap FPS changes nothing in MSFS (new ServiceModel.SeedCapFpsFromMsfs, called from MainWindow.chkCapFps_Click). In a flight MSFS's live value is used (MsfsEngineData.TryReadFrameLimiter), so a change made in the MSFS menu during the flight is included, or DefaultFrameLimiter if the cap was already applied in that flight; otherwise UserCfg.opt. Saved under the native frame keys (CapFps2D, CapFpsVR, CapFps2DLast, CapFpsVRLast), with CapFps2DFps, CapFpsVRFps, their Last keys and CapFps2DMult, CapFpsVRMult removed (ConfigurationFile.RemoveSetting), so they stay in native frames across app restarts until converted. If MSFS's limiter is Off, both caps start Off with 30 native frames as the value turned back on
    • Before it is converted, the 2D Cap or VR Cap button turns such a cap Off or back on in native frames, so no multiplier is needed (new ServiceModel.SetPendingCapFpsOn). Setting a value replaces it with that value in FPS after frame generation
    • ServiceModel.LoadCapFpsSettings works the caps out in locals and assigns them together at the end, as the config is reloaded on many option changes from both threads, so a cap not yet converted is never briefly read as FPS
  • Main window shows only the cap for the mode MSFS is in, 2D Cap in 2D and VR Cap in VR, as the widget does
    • MainWindow.xaml: the 2D and VR controls are each in their own StackPanel (new stkCapFps2D, stkCapFpsVR), shown by ServiceModel.VrModeActive in UpdateCapFpsUi. VR Cap's left margin removed as it no longer sits beside 2D Cap
    • The Cap FPS checkbox only shows while MSFS 2024 is running (UpdateCapFpsUi). The caps can only be seen and changed in a flight once the multiplier is known: in the MSFS main menu, or in VR before the first stable OFXR or VectorXR reading (or with the 1X guess), the cap line is replaced by "Caps depend on graphics mode: set in flight", with a tooltip giving the reason (new ServiceModel.CapFpsEditable: MemoryAccess set, initialLODsSet, CapFpsModeKnown and no 1X guess in VR; new MainWindow.xaml lblCapFpsInFlightOnly; the window is resized when the line changes, capFpsLayoutState). Before, a cap above 120 could show as 120 in the main menu, as OFXR and VectorXR counted as 1X until read, and one -/+ press would have saved 119 or 121. The caps stay saved in between
    • ApplyCapFpsBox, StepCapFps, btnCapFpsMode_Click, WidgetSetCapFps and WidgetSetCapFpsOn do nothing unless CapFpsEditable, and ApplyCapFpsBox and StepCapFps also not for the other mode's box after a 2D/VR switch (e.g. a box losing focus or a pending step as the line changes), so a cap is never saved with the wrong multiplier
  • Cap FPS settings moved from the common config (MSFS_AutoFPS.config) to the MSFS 2024 sim config (MSFS2024_AutoFPS.config), as Cap FPS is an MSFS 2024 only feature
    • CapFpsEnabled, CapFpsSeeded, the cap settings and the Sync settings are all read and saved in MSFS2024_AutoFPS.config (ServiceModel.LoadConfiguration, LoadCapFpsSettings, SetCapFps, SetCapFpsOn, SetPendingCapFpsOn, ConvertPendingCapFps, SeedCapFpsFromMsfs, MainWindow.chkCapFps_Click). In MSFS 2020 mode they are not read, so no keys are added to MSFS2020_AutoFPS.config, and Cap FPS is off
    • Transition for Test1 and Test2 configs, to be removed later: on loading in MSFS 2024 mode, each Cap FPS setting in MSFS_AutoFPS.config (CapFpsEnabled, CapFpsSeeded, CapFps2D, CapFpsVR, CapFps2DLast, CapFpsVRLast, CapFps2DMult, CapFpsVRMult, CapFps2DFps, CapFpsVRFps, CapFps2DFpsLast, CapFpsVRFpsLast) is copied to MSFS2024_AutoFPS.config unless it is already there, then removed from MSFS_AutoFPS.config. CapFpsVRType (first Test2 build, no longer used) is only removed. Logged once with the values moved (new ServiceModel.MigrateCapFpsSettingsFromCommon, CapFpsCommonKeys). The Test1 conversion to FPS after frame generation then works on the moved settings as before
  • New Cap FPS Sync option: with the Fixed target FPS option, the cap follows the target FPS
    • The cap is the target rounded up to the next value MSFS allows at the current multiplier, so it is never below the target: native frames = target ÷ multiplier rounded up, within MSFS's 20 to 120 (new ServiceModel.CapFpsSyncedNfr). For example, 59 with FSR (2X) is 30 native frames, a 60 cap. It follows target and multiplier changes, with the same stable multiplier rules as the cap
    • Set separately for 2D and VR, per profile: new sim config settings capFpsSync2D and capFpsSyncVR + the profile (e.g. capFpsSync2D3, capFpsSyncVRVFR), like targetFpsOption (new ServiceModel.CapFpsSync2D, CapFpsSyncVR, CapFpsSyncKey, SetCapFpsSync, loaded in LoadConfiguration with the target FPS option)
    • Active only for the mode MSFS is in, with Fixed as its target FPS option and a target FPS known (new ServiceModel.CapFpsSyncActive, used by CapFpsNfrFor, so LODController.ApplyFrameCap applies it). The user's own cap stays saved and is used again when Sync is off or the option is not Fixed. The 2D Cap / VR Cap button still turns the cap Off and on
    • Main window: new Sync Cap checkbox at the end of the cap line (same label as the widget) (chkCapFpsSync, chkCapFpsSync_Click), shown only with the Fixed option in a flight. While Sync is on, the box shows the synced cap and is read only, and the -/+ buttons are dimmed and inactive (FillCapBox syncNote). ApplyCapFpsBox and StepCapFps do nothing while it is on, and a step not yet applied is dropped when it is ticked. The box tooltip gives the native frames and the Fixed target it is synced to
    • The cap can only trigger the existing "Target FPS well below cap for Fixed" warning when the target is below what MSFS can cap to at the multiplier (about 95% of 20 native frames x the multiplier, e.g. below 37.5 at 2X or 75.5 at 4X), as the rounding up is otherwise always within its 5%. That warning is then correct, as MSFS cannot cap that low with that multiplier. OFXR and VectorXR are not checked by that warning
    • Logged when ticked or unticked, with the profile, and in the MSFS Max Frame Rate line as "synced to Fixed target 59", and in the settings line logged at start-up (Sync2D, SyncVR)
  • Cap FPS now put back to MSFS's own value when Monitor only is turned on in a flight, as Cap FPS being unticked does. Before, the cap stayed applied, and as the end of flight restore is skipped in Monitor only, it was left in MSFS
    • ServiceModel.SetMonitorMode calls RestoreFrameLimiter with the TLOD and OLOD restore
    • LODController.ApplyFrameCap treats Monitor only like Cap FPS unticked (restores once and resets capFpsApplied), so the cap is applied afresh when Monitor only is turned off
  • In-game widget 1.7.2: the Cap value is shown in FPS after frame generation, the same as the app
    • New capMult in the widget controls JSON (BuildWidgetControlsJsonOnUi), the current multiplier (ServiceModel.CapFpsModeMultiplier). capVal is the native frames for the saved cap at that multiplier (CapFpsWantedNfr), and the widget shows capVal x capMult (HtmlWidgetPanel.js mfrMult, showMfr). The stepper steps one native frame, so each step moves the shown value by the multiplier
    • capAvail now also needs a flight with the multiplier known (ServiceModel.CapFpsEditable), so the widget's cap control and the web page's Cap FPS row (shown as "-") follow the app
    • The stepper now sends the cap as shown, in FPS after frame generation, and the 2D Cap / VR Cap button the state wanted, each with the mode it was shown for: /api/capfps body e.g. "120|2D", /api/capfpson body e.g. "false|VR" (AutoFpsWebServer onSetCapFpsOn is now Action). The app ignores a request whose mode is not the one MSFS is in, or without a mode (an older widget), so a step or click sent just before a 2D/VR switch never lands on the other mode's cap (new MainWindow.TryParseWidgetCapRequest, used by WidgetSetCapFps and WidgetSetCapFpsOn). The value is saved through ServiceModel.SetCapFps at the current multiplier, the same as the app's box
    • When the cap control is hidden or MSFS switches between 2D and VR, the widget drops any held step, pending send and pending button state, and takes the value afresh from the app
    • New Sync Cap checkbox at the right end of the Mode / Target row, above the Cap stepper (HtmlWidgetPanel.html capSyncLabel, capSyncChk; HtmlWidgetPanel.css cap-sync-label), shown only with the Fixed option and the cap control shown (new capSyncAvail and capSync in the controls JSON). Sends the state wanted with its mode to new /api/capfpssync (e.g. "true|2D"; AutoFpsWebServer onSetCapFpsSync, MainWindow.WidgetSetCapFpsSync), shown until the app reports it, as the 2D Cap / VR Cap button does. While Sync is on, the stepper buttons are greyed out and disabled (mfr-group synced class), and the app ignores stepper sends
    • Web server page: the row is renamed "Cap FPS" and shows the cap in FPS after frame generation, with "Sync" after it while Sync is on

Test1:

  • Native GPU load and VRAM monitoring, replacing GPU-Z as the source when it works, with GPU-Z kept as the fallback
    • New file GpuMonitor.cs (class GpuMonitor, single shared instance GpuMonitor.Shared), used by LODController and MainWindow in place of GPU-Z when available
    • NVIDIA: NVML (nvml.dll, installed with every NVIDIA driver), loaded with NativeLibrary.TryLoad from the normal search path, falling back to Program Files\NVIDIA Corporation\NVSMI\nvml.dll. Uses nvmlInit_v2, nvmlDeviceGetCount_v2, nvmlDeviceGetHandleByIndex_v2, nvmlDeviceGetName, nvmlDeviceGetMemoryInfo (used MB) and nvmlDeviceGetUtilizationRates (GPU load %). This is the same driver data GPU-Z shows
    • AMD, Intel and any other GPU, and NVIDIA if NVML fails or is rejected: the Windows graphics kernel statistics Task Manager uses (D3DKMTQueryStatistics in gdi32.dll). VRAM used is BytesResident summed over the dedicated (non-aperture) segments (D3DKMT_QUERYSTATISTICS_SEGMENT), and GPU load is the 3D engine's busy % over the time since its last read, from its RunningTime (D3DKMT_QUERYSTATISTICS_NODE). This is the same figure Task Manager shows as the GPU's 3D utilisation
    • D3DKMT_QUERYSTATISTICS is filled in a zeroed 0x400 byte buffer at the x64 offsets (Type 0, AdapterLuid 4, hProcess 16, QueryResult 24, segment or node id 0x320), so no structure larger than the documented 0x328 bytes can be overrun
    • The NVML device is matched to the adapter by name (or is the only NVML device). If two or more NVML devices have the same name, the Windows statistics are used instead
    • VRAM % is worked out against the card's total VRAM from DXGI (SharpDX AdapterDescription.DedicatedVideoMemory), as the GPU-Z path does
    • A read is a handful of NVML or kernel calls, about 22 to 29 microseconds on an RTX 4090 with NVML, logged as AvgRead in the comparison line. No performance counters or process enumeration are used, as those are what cause hitches
    • All GpuMonitor calls are inside a lock, so the UI thread (VRAM+ visibility) and the service thread (every tick) cannot interfere
  • Windows statistics reads kept to the minimum number of kernel calls
    • Measured on an RTX 4090 and a Radeon integrated GPU: a segment (memory) query costs about 2 microseconds, but an engine (node) query about 250 to 350 microseconds, so reading every engine (11 on the Radeon, 15 on the 4090) took about 4 to 5 ms each second. The cost is in Windows, not the GPU, as both cards gave about the same figure
    • GPU load is now read from the 3D engine only. It is found at selection by engine type (new GpuMonitor.Find3DNodes: D3DKMTOpenAdapterFromLuid, D3DKMTQueryAdapterInfo with KMTQAITYPE_NODEMETADATA, D3DKMTCloseAdapter), checked by every engine type being a defined DXGK_ENGINE_TYPE and every engine name being readable text. Windows requires the exact D3DKMT_NODEMETADATA size, which differs between Windows versions, so for the first engine every size from 64 to 256 bytes is tried in steps of 4 until one is accepted (a wrong size is simply rejected), and the size used is logged. On the RTX 4090 every size from 64 to 256 bytes was rejected (0xC000000D), so the cause is something other than the size and the busiest engine fallback is used there, which correctly locked onto node 0, the 3D engine. The query is kept as it may work with other drivers
    • If the engine types cannot be read, every engine is read every tick until 10 s of in-flight time has been measured (BusiestLockSeconds, was 30), then only the engine that was busiest over that time (new LockBusiestNode, logged), with a 5% tolerance as tick timing can measure just under. This completes inside the 30 s initial FPS settle period, when some instability is expected anyway. Load is only read in flight, but the first read after selection and any read more than 5 s after the previous one (MaxSampleGapSeconds, was 60) also span time out of flight, such as the MSFS loading screens where video decode is the busiest engine, so they are not counted. It is time based rather than a count of reads
    • With NVML as the source, TryRead now also reads every engine each tick until the lock (outside the AvgRead timing, result not used), so it locks about 10 s into a flight as with the Windows statistics, and the Windows statistics are ready if NVML fails. Before, the engines were only read by the comparison line every 30 s, so the lock took a minute or more on NVIDIA. On the 4090 this costs about 3 to 13 ms a tick for those first 10 s only
    • Each engine now keeps its own last read time (lastNodeTime), so engines can be read at different times and the load stays correct
    • VRAM is read from the dedicated segments only (localSegments, found at selection, new ReadSelectedDedicated), not every segment
    • Measured on the 4090 after the lock: one engine read takes about 300 to 700 microseconds, against 3 to 6 ms for all 15
    • Result for AMD, Intel and other cards: 1 engine call and 1 or 2 segment calls a second, instead of every engine and segment. NVIDIA uses NVML and makes no engine calls outside the comparison line
    • The selection log line now names the load engine(s) (for example 3D engine node 0 "3D" of 15, or all engines with the reason and the 10 s lock) and the number of local segments
    • The selection log line now also says why the source was chosen (new sourceReason in SelectAdapter): NVML when the card is NVIDIA and NVML found it by name with a matching VRAM total (preferred as it matches GPU-Z), otherwise Windows GPU statistics with the reason (not NVIDIA, NVML could not be loaded, NVML could not identify the card, or NVML VRAM total mismatch)
    • The LockBusiestNode log line now says why the engine was chosen (busiest of all engines over the sampled flight time, as the engine types could not be read) and lists the average busy % of the three busiest engines as the evidence (from nodeBusyAccum)
    • A Windows statistics engine sample whose busy counter went backwards is now skipped and the last load kept (new lastKmtLoad in ReadKmtLoadNodes), rather than reporting 0%. On the 4090 one comparison read showed WinStats Load 0% in the middle of 24 to 26% readings, with the next read normal. Odd samples are logged at Debug level, up to KmtOddSampleLogMax (5) per selection (new kmtOddSampleLogs): the counter going backwards, or the locked engine's counter not moving for 5 s or more while the last load was 10% or more, to find out which caused it
    • The selection line now gives the NVML VRAM total as within 10% of the Windows total (for example 24564 MB within 10% of 24138 MB) rather than calling it matching, as NVML includes memory reserved by the driver
  • GPU adapter selection follows the adapter MSFS uses
    • The adapter is the one named in MSFS's UserCfg.opt (ServiceModel.gpuModel, read by MemoryManager.GetOptSettings), matched against the DXGI adapter descriptions ignoring spaces and case
    • Software adapters (vendor 0x1414, Microsoft Basic Render Driver) are ignored. Every other adapter can be matched by name whatever its dedicated VRAM, so integrated GPUs that report little dedicated VRAM (Intel often 128 MB) are still found when MSFS runs on them, instead of the app reading another card
    • Identical cards: the one with the most dedicated VRAM in use is chosen, as that is the one MSFS is running on
    • If the name is not found, the adapter with the most VRAM is used and the log says so. Only adapters with at least MinFallbackVramMB (256 MB) of dedicated VRAM are considered for this, so an integrated GPU is never guessed. If none qualify, GPU-Z is used if running
    • Logged once per selection by GpuMonitor:SelectAdapter, giving the adapter, how it was chosen, vendor id, total VRAM, the source (NVML or Windows GPU statistics), the Windows statistics segment and node counts, their dedicated limit and its % of the card's VRAM, and whether memory, load and NVML passed their checks
  • The MSFS adapter is saved, so it can be selected at the next start before MSFS is running
    • New LastGpuModel key in the sim config (MSFS2020_AutoFPS.config or MSFS2024_AutoFPS.config), written whenever MSFS reports a different adapter in UserCfg.opt
    • New ServiceModel.GpuMonitorAdapterName(out bool saved): returns UserCfg.opt's adapter once known (saving it as LastGpuModel if changed), otherwise the saved one with saved = true. Empty on the very first run before MSFS has been started, when nothing is selected
    • GpuMonitor.IsAvailable(name, fromSavedName) selects from the saved name, logged as "matches the MSFS adapter saved last run", so the VRAM+ controls show from start-up without GPU-Z
    • When MSFS then reports the same adapter there is no reselection, just "MSFS adapter ... confirmed by UserCfg.opt". A different adapter is selected straight away, logged as "matches UserCfg.opt", and saved
  • Checks that the native data is valid
    • At selection, the Windows statistics must have 1 to 64 segments and 1 to 256 nodes, a dedicated VRAM limit of 90 to 110% of the card's VRAM (constants KmtLimitMinRatio and KmtLimitMaxRatio), VRAM resident no more than 105% of that limit, and engines that do not all report the same running time. Each part failing is logged and that part is not used
    • At selection, NVML's own VRAM total must be within 10% of the card's VRAM from DXGI, otherwise NVML is not used and the Windows statistics are tried
    • On every read (GpuMonitor.CheckRead): load must be 0 to 100%, VRAM used above 0 and no more than 105% of the card's VRAM, and the readings not frozen (VRAM used identical to the byte and load identical for FrozenMs, 120 s, of continuous reads, restarted after any gap of more than 5 s)
    • A bad read keeps the last good values, up to BadReadLimit (3) in a row, logged once. After that, or straight away when frozen, NVML falls back to the Windows statistics, and the Windows statistics fall back to GPU-Z with native retried after RetryMs (60 s). Each step is logged
    • GpuMonitor.ReadVramPercentNow, used for the Start Max VRAM check at session start, reads memory only and returns 0 (so the GPU-Z path is used) for implausible values
  • Native monitoring can be turned off without code changes or for a hotfix build
    • Common config setting NativeGpuMonitorEnabled (default true, config file only): false reads GPU load and VRAM from GPU-Z only, as in 0.5.6.0 (new ServiceModel.NativeGpuMonitorEnabled)
    • GpuMonitor.Enabled (static readonly, so false raises no unreachable code warnings): false builds without native monitoring, exactly as 0.5.6.0. All native calls are behind GpuMonitor.IsEnabled, which stops before touching any adapter or NVML
  • LODController changes for native monitoring
    • UpdateVariables: native readings (GpuMonitor.Shared.TryRead) take precedence, GPU-Z is only used when native returns nothing valid, as before when neither is available
    • Constructor: logs "Native GPU monitoring active (...), GPU-Z not needed" when native is available, otherwise "GPU-Z companion app not running" as before
    • ReadVRAMUsageNow: tries GpuMonitor.ReadVramPercentNow first, then the GPU-Z sensor as before
    • GPU-Z closing is logged as "native GPU monitoring continues" when native is in use, otherwise with the existing wording
    • New LogGpuSourceComparison: every gpuCompareLogSeconds (30) in test builds or with Log+, logs "GPU sources:" with the values in use, every native reading (NVML, Windows statistics used, limit and load), the card total, the average native read time since the last line (AvgRead), the Windows statistics memory and load read times on their own with the number of load reads and total engine calls since the last line (WinStatsRead, for example "load:6382us per read (11 reads, 151 engine calls)", replacing an average calls per read that showed fractions such as 13.7 when all engine and single engine reads were mixed; the call count is taken before each read so a read that locks onto one engine is still counted as all engines, also when NVML is the source, from new GpuMonitor timers kmtMemTicks and kmtLoadTicks), and GPU-Z's load and VRAM when it is running. In test builds for now as most testers forget Log+, to go back to Log+ only once confirmed on all major GPU types
    • The first GPU load read of each flight (native or GPU-Z) is now ignored, with GPU load shown as unavailable for that tick (new LODController.AddGpuLoadSample, gpuFirstLoadSkipped), as it spans the end of loading and the sources disagreed widely on it (for example NVML 17% against GPU-Z 62%). The comparison line now logs from the second read (TotalTicks % gpuCompareLogSeconds == 1, was 0)
    • The 5 second GPU load average (gpuUsage) is now over the filled slots only (new gpuUsageCount, reset with the buffer in CloseGpuz). Before, empty slots counted as 0, so the load climbed from about a fifth of the real value over the first 5 seconds of a flight (for example 3%, 18%, 33%, 48%, 63%, 75%), which could let the cloud quality increase pass its GPU load check during that time. This applied to GPU-Z in 0.5.6.0 as well
  • MainWindow: the VRAM+ controls also show when native monitoring is available, checked before the existing GPU-Z process check as it is the cheapest
  • GPU-Z read checks when GPU-Z is the source
    • New LODController.ReadGpuzChecked, used in UpdateVariables in place of reading the GPU-Z sensors directly
    • A 0 MB VRAM reading checks straight away that GPU-Z is still running (IPCManager.IsProcessRunning) rather than waiting up to gpuzProcessCheckSeconds (10 s). If it is not, GPU-Z is dropped that tick, logged as "GPU-Z companion app closed (0 MB VRAM reading)". Before, VRAM read 0% and the GPU load average faded for up to 10 s first
    • If GPU-Z is still running the 0 MB reading is treated as transient and the last good values are kept, up to gpuzZeroReadLimit (10) readings in a row, after which GPU-Z is dropped
    • GPU-Z load and VRAM identical for gpuzFrozenSeconds (120 s) mean GPU-Z itself has frozen, so it is dropped, logged as "GPU-Z load and VRAM readings unchanged for 120s"
    • A dropped GPU-Z is retried every gpuzRetrySeconds (30 s) as before (new DropGpuz). The frozen check (gpuzUnchangedSinceTick) is kept over a drop, so a reconnection to still frozen GPU-Z is rejected on its first read
    • Each problem is logged once (gpuzProblemLogged), and the GPU-Z connection lines are not logged on retries while GPU-Z is known to be frozen. When its readings change again, "GPU-Z readings changing again - GPU-Z in use" is logged
    • GPU-Z VRAM used above 105% of the selected GPU's VRAM means GPU-Z is reporting a different GPU (its GPU selection at the bottom of its window). GPU-Z is dropped and retried every 30 s, logged once as "GPU-Z appears to be reporting a different GPU, select ... in GPU-Z". Before, GPU-Z set to another card gave readings such as 457% VRAM, which VRAM+ would act on
    • ReadVRAMUsageNow also returns 0 (no reading) for a GPU-Z VRAM figure above 105% of the selected GPU's VRAM
    • CloseGpuz also resets the 0 MB count and the last good values
  • Fixed NaN in the status log line with Log+ on
    • The first line after turning on Log+ showed Top2Avg:NaN% MSFS:NaN%, as the smoothed CPU values had no samples yet
    • New LODController.SmoothPctText shows "-" until the first sample, and Dom now also shows "-" while its smoothed value has no sample
  • Known difference to check on AMD and Intel: on an RTX 4090 the Windows statistics GPU load reads about 37% where NVML and GPU-Z read about 50%. NVIDIA uses NVML so is unaffected, but AMD and Intel cards use the Windows statistics, so their comparison lines will show whether the GPU load (which drives the MSFS 2020 GPU load cloud decrease) needs adjusting
    • Tested on a Ryzen 9800X3D integrated Radeon GPU (2 GB) running MSFS 2020 flat out: VRAM matched GPU-Z to the MB, and load read 96 to 97% against GPU-Z's 100%. A GPU at full load cannot show a mid range difference, so testers with AMD and Intel cards are still needed
    • Reading every engine took about 4.7 ms a second on that integrated GPU and 3.6 to 5.3 ms on the 4090, which led to reading the 3D engine only (see above)
    • In flight on the 4090, Task Manager's GPU utilisation (its 3D engine) read 53% where GPU-Z read 65% and NVML 69%, so the Windows statistics figure is Task Manager's, and NVIDIA's own figure counts the GPU as busy more generously
  • MSFS process CPU % sampling made cheaper (CpuHeadroom.cs, ProcessCpuSampler.SampleProcessPercent, the MSFS:% figure on the Log+ lines)
    • Before, it called Process.GetProcessById every second, which lists every process on the system to check the ID, and then opened the process again for the CPU time and again for the affinity
    • Now MSFS is opened once (OpenProcess with PROCESS_QUERY_LIMITED_INFORMATION) and the handle kept, so a sample is GetProcessTimes, GetExitCodeProcess and GetProcessAffinityMask on that handle. The affinity is still read every time, as the app can change MSFS's affinity
    • An ended MSFS process keeps its last CPU time, so the exit code is checked and the handle dropped (new Forget) when MSFS has ended. Handles are closed in Dispose, which CpuHeadroomProbe.Dispose already calls
    • Elapsed time now uses Stopwatch rather than DateTime.UtcNow, which can jump when the system clock is adjusted
    • Same result as before: CPU time over elapsed time, divided by the logical processors MSFS may use, clamped to 0 to 100%
  • MSFS 2024 engine data read from MSFS memory, phase 1: read only and logged, nothing acted on yet
    • New file MsfsEngineData.cs (class MsfsEngineData, single shared instance MsfsEngineData.Shared), MSFS 2024 only (MsfsEngineData.IsEnabled checks ServiceModel.isMSFS2024). MsfsEngineData.Enabled (static readonly) set to false builds without it
    • CPU thread times: MainThread, RdrThread, Manipulators and CoherentGTUIThread in ms, the same figures as the MSFS FPS overlay in Dev Mode, from a global timing structure MSFS updates every frame whether or not the overlay or Dev Mode is open (TryReadCpuTimes, each value must be 0 to 2000 ms)
    • Live frame limiter: MSFS's Max Frame Rate as currently applied, 0 when off (TryReadFrameLimiter, must be 0 to 1000). MSFS does not save changes to it in UserCfg.opt
    • Addresses are worked out from MSFS's own code, never from matching values. Frame limiter: the overlay text "%s Framelimiter@%lu", the lea that loads it, then the nearest mov r32,[rip+x] / test / jz within LimiterBackScan (0x100) bytes before it, whose global must be in a writable section, with a second anchor: the "FramelimiterOverride@" text must be loaded within 0x100 bytes before that read (AnalyseLimiter, DecodeLimiterRead)
    • CPU times: the "MainThread" text, the lea that loads it, the start of that function from the exe's function table (.pdata, FunctionStart, following chained unwind info), then the mov r64,[rip+x] in it followed by exactly 5 movsd reads from that register before it is reloaded, within CpuReadWindow (0x800) bytes (AnalyseCpu, DecodePointerLoad, CollectDoubleReads). The field offsets are taken from those instructions (Main 1st, Rdr 2nd, Manip 3rd, GTUI 5th), and the log notes if they differ from the known layout 0x30, 0x50, 0xD0, 0x250
    • Only the MSFS exe's own sections are searched, found from its PE header in memory (ReadImage): read only data sections for the texts, code sections for the instructions, each read 4 MB at a time (ChunkSize) with a 64 byte overlap (ScanRange). Both features are found in one code pass (FindRipLeaRefs)
    • Search order: the code within +-2 MB (WindowHalf) of the last known locations first, then all code sections only if that misses. The texts are always searched in full as they are fast to find
    • Results saved per MSFS exe in the sim config (MSFS2024_AutoFPS.config), new key msfsEngineAddresses, as " |cpu=pointer,code,text,main,rdr,manip,gtui|lim=global,code,text" (hex offsets from the exe start, so they survive ASLR). The exe build timestamp separates Steam and MS Store exes of the same version. When a different exe is saved, the previous one moves to new key msfsEngineAddressesPrev, so switching between release and beta needs no new search
    • Each run, a built-in or saved value is only used after a few hundred bytes of MSFS code at its location are checked to still read the same global in the same way (VerifyCpu, VerifyLimiter: same instruction, same target, same field offsets, and the Framelimiter text still loaded after the limiter read). Anything that fails is worked out again
    • New built-in table MsfsEngineData.BuiltInAddresses, with MSFS 2024 1.9.24.0 Steam (exe timestamp 6AE8C698) added. Resolve logs a paste ready "Built-in entry" line once both are found, to add the current MSFS release and beta exes
    • Resolved once per MSFS process (keyed on the module base address) on a background task (EnsureResolved, called from the LODController constructor), so it never delays the service loop
    • Logged by MsfsEngineData:Resolve: the exe tag, time taken, each address with the code that reads it and the text it was anchored to, and how it was found (built-in or saved value checked against MSFS code, found near the last known location, or full code search), or why it was not found. Then the first CPU thread times and the live frame limiter against UserCfg.opt's FrameLimiter (matches or differs)
  • LODController changes for MSFS engine data
    • Constructor: calls MsfsEngineData.Shared.EnsureResolved(Model)
    • UpdateVariables: new SampleMsfsEngineData after the GPU readings, test builds or Log+ only. It totals the CPU thread times each tick and every engineLogSeconds (30) logs "MSFS engine (Ns avg/max): Main avg/max Rdr avg/max Manip GTUI ms | Frame limiter | FPS raw FPS (frame time ms)", to compare the busiest CPU thread with the frame time
    • The frame time is from the rendered (raw) FPS (Model.fpsRaw, new engineRawFpsSum), as MSFS's thread times are per rendered frame. With frame generation, the first test showed Main 49.4 ms against 24.9 ms from the displayed 40 FPS, which matches the 20 FPS rendered (50 ms)
  • New option: one log file per app run
    • New common config setting LogPerSession (default false, config file only, new ServiceModel.LogPerSession, which adds the key to MSFS_AutoFPS.config so it can be found). Read by App.InitLog at start up, so a change applies from the next start
    • true: each run logs to its own file in the log folder, named with its start time, for example MSFS_AutoFPS_20261124_091322.log (Serilog file sink with no rolling)
    • The logs of the 3 most recent days that have any are kept and older ones deleted at every start up, whatever LogPerSession is set to, so per run logs are also cleaned up after switching back to one log per day (new App.CleanSessionLogs, LogRetainDays 3). Days without logs do not count, and today counts as one of the 3. Daily logs (MSFS_AutoFPSyyyyMMdd.log) left from before are included, dated by their names. Only files matching those two name patterns are touched
    • The InitLog line now gives the log file used, one log per session or per day, and how many older logs were removed
    • New App.ReadCommonBool reads the setting straight from the common config file, as InitLog runs before ServiceModel loads it
    • false: one log per day, as before (Serilog still keeps 3 daily files itself)
    • Log+ on (or Monitor only, which locks Log+ on) always logs per session, whatever LogPerSession is set to, as those are the logs sent for troubleshooting. App.InitLog reads LogPlus and MonitorMode from the common config at start up, and the InitLog line then says "one log per session as Log+ is on"
    • Turning Log+ on or off while the app runs switches log straight away (new App.ApplyLogPlusToLogFile, called by ServiceModel.LogPlus, now a property with a setter, so the app checkbox, the widget and Monitor only all trigger it). Without LogPerSession, Log+ on moves logging to a new per session log and Log+ off moves it back to the daily log. The old log's last line names the new file, and the new log starts with a line naming the old one. Logger creation is now in App.CreateLogger, used by both
  • New Cap FPS option (MSFS 2024): an override of MSFS's Max Frame Rate, with separate 2D and VR caps (GitHub discussion #314)
    • An override like the app's TLOD and OLOD: the cap is set live in MSFS memory only and MSFS's own setting is never changed. MSFS's Max Frame Rate is read from UserCfg.opt at the start of each flight session (new ServiceModel.DefaultFrameLimiter, read in MemoryManager.GetOptSettings) and put back live at the end of the flight (ServiceController.RestoreDefaultMSFSSettings) or when Cap FPS is unticked (new ServiceModel.RestoreFrameLimiter). If MSFS saved the override to UserCfg.opt (it saves all live values when any setting is changed in its menu), MemoryManager.RestoreUserCfgOptSettings puts FrameLimiter back to MSFS's own value with the other settings. Nothing is put back unless the cap was used that session (new ServiceModel.CapFpsUsedThisSession)
    • A change made to Max Frame Rate in the MSFS menu during a flight becomes MSFS's own value (the one put back later) and the cap is set back on the next tick, both logged. A change made while Cap FPS is unticked is also kept: when the cap is first applied (start of the flight, or Cap FPS ticked), the live value is taken as MSFS's own (LODController.ApplyFrameCap, logged when it differs). In the first test, a menu change made while Cap FPS was unticked was lost, so unticking later put back the value from the start of the flight
    • Values are native frames (NFR), before frame generation, as MSFS's limiter caps native frames: with 2X frame generation a cap of 30 gives 60 FPS on screen. Range 20 to 120, the same as MSFS, or Off (stored as 0): no frame limit in that mode, the same as MSFS's own Max Frame Rate switch off (ServiceModel.CapFpsMin, CapFpsMax, NormaliseCapFps, CapFpsText)
    • One 2D and one VR cap for the whole app, not per profile, as a cap is about the monitor or headset. New common config settings CapFpsEnabled (default false), CapFps2D and CapFpsVR (default 30), CapFps2DLast and CapFpsVRLast (the last cap other than Off, restored when a cap is turned back on) and CapFpsSeeded. New ServiceModel.SetCapFps and SetCapFpsOn set, save and log a cap
    • The first time Cap FPS is ticked, both caps start from MSFS's current Max Frame Rate (Off if MSFS's limiter is off), so ticking it changes nothing until a cap is changed. After that the caps are the app's own (MainWindow.chkCapFps_Click, ServiceModel.ReadUserCfgFrameLimiter when not in a flight session)
    • Until Cap FPS has been turned on once, the checkbox only shows while MSFS 2024 is running, so that first tick can always read MSFS's value. After that it shows whenever the app is in MSFS 2024 mode, so the caps can be set before starting MSFS (UpdateCapFpsUi). If MSFS's value still cannot be read, the default caps are used and it is read again the next time Cap FPS is ticked (CapFpsSeeded only set on a successful read)
    • Main UI: new Cap FPS checkbox at the end of the Target FPS line (chkCapFps), the master switch: unticked, AutoFPS leaves Max Frame Rate alone. Ticked, a new line shows under it, above Expert: "2D Cap -[ ]+ VR Cap -[ ]+" (stkCapFps, btnCapFps2D, btnCapFpsVR, txtCapFps2D, txtCapFpsVR and their Dec/Inc buttons). Hidden for MSFS 2020 and in Monitor only (ServiceModel.CapFpsAvailable)
    • The 2D Cap and VR Cap buttons turn that mode's cap Off, or back on at its last value (btnCapFpsMode_Click). A cap that is Off shows Off in its box, with the box and its -/+ buttons dimmed (opacity 0.4, CapOffOpacity, as in the widget) and the buttons ignoring clicks (IsHitTestVisible, as WPF's disabled look ignores the theme). Typing a value in the box turns the cap back on (FillCapBox). The button tooltips explain native frames and that the cap is an override
    • The -/+ buttons step and repeat like Target FPS (StepCapFps, hold to step 5 then 10). Stepping down from 20 goes to Off, up from Off to 20. Typing Off (any case) or clearing a box sets Off (TryParseCapBox)
    • New LODController.ApplyFrameCap, run every tick after the engine data sampling: reads the live Max Frame Rate (new MsfsEngineData.TryReadFrameLimiter, one memory read) and sets the 2D or VR cap (new MsfsEngineData.TryWriteFrameLimiter, which writes only over a value that reads back as valid and reads back to confirm) at the start of each flight, on a 2D/VR switch, when a cap is changed, and after a change in the MSFS menu, tracked by capFpsApplied and capFpsAppliedVr. A failed write is logged once and retried each tick. Not in Monitor only
    • New MainWindow.UpdateCapFpsUi, called from LoadSettings and UpdateLiveValues: shows or hides the checkbox and line (resizing the window), and refreshes the boxes and -/+ buttons unless a box is being edited or stepped
    • The LoadSettings log line shows CapFPS:2D/VR when Cap FPS is on
    • No separate Target FPS warning on the cap line: a Target FPS above what the cap allows (cap x frame generation) is left to the existing fixed FPS warning on the status line
    • Changed during Test1 development, for testers of earlier Test1 builds: Cap FPS no longer writes the 2D cap to UserCfg.opt or picks up changes made in the MSFS menu as the app's caps (MemoryManager.WriteFrameLimiterOpt, MainWindow.OnFrameLimiterFileChanged, UserCfgQuickCheck.FrameLimiterChanged and ServiceModel.CapFpsLastFileWrite removed), and 0 is now shown as Off
  • In-game widget 1.7.1: Cap FPS on the Flight tab, with no new rows
    • New Cap button and stepper at the right of the FPS row (HtmlWidgetPanel.html mfrGroup, mfrBtn, mfrStepper, mfrDecBtn, mfrVal, mfrIncBtn) for the mode MSFS is in. The button reads 2D Cap or VR Cap, as MFR is not a well known term and the widget has no tooltips. Hidden when Cap FPS is unticked in the app, for MSFS 2020 and in Monitor only
    • The 2D Cap / VR Cap button turns the cap for the mode MSFS is in Off, or back on at its last value, the same as the app's button for that mode. Off, the stepper stays in place, greyed out and disabled, with Off in the value box (HtmlWidgetPanel.js showCapOn, CSS .mfr-group.off)
    • The button sends the state wanted (new endpoint /api/capfpson, body true or false), not a toggle, and the widget shows that state until the app reports it (capPending, CAP_PENDING_MS 4 s, cleared on a 2D/VR switch). Before, a poll already on its way could flip the shown state back, so the button seemed to need several clicks
    • The button acts on press (mousedown), like the stepper buttons, rather than on click, and its text, the value box and the stepper buttons are only updated when they change rather than on every poll. In testing the button still needed up to 3 clicks: replacing the button text on every poll can stop the sim's browser delivering a click, as the press and release land on different text nodes
    • The stepper steps and repeats like the Target FPS one (hold to step 5 then 10, sent 450 ms after the last step), within 20 to 120 or Off: down from 20 goes to Off, up from Off to 20 (stepMfr, flushMfrSend, new constants CAP_MIN, CAP_MAX). The hold code is shared by both steppers (startHold and wireStepperButton now take the step function, new holdStepFn), and a Target FPS that cannot be changed (Auto) no longer stops a Cap hold
    • Both steppers now share one size: 2.2rem buttons (Target FPS was 2.6rem) and a 0.3rem gap either side of a 3.4rem box (Target FPS box was 5rem, still fits 3 digits or a half such as 41.5). The Cap button is a fixed 4rem wide (the same for 2D Cap and VR Cap) with a 0.5rem gap before its minus button (HtmlWidgetPanel.css .fps-row .stepper-btn, .fps-row .stepper-val, .mfr-group, .mfr-btn, .mfr-group.off)
    • Flight Type dropdown changed from 8.6rem to 8.35rem, so it ends in line with the end of the Target FPS + button (HtmlWidgetPanel.css .flight-type-group .custom-select)
    • App side: new web server endpoints /api/capfpson and /api/capfps (body: the cap as a whole number, 0 for Off), new MainWindow.WidgetSetCapFpsOn and WidgetSetCapFps (through ServiceModel.SetCapFpsOn and SetCapFps, the same as the app's buttons and boxes), and new capAvail (Cap FPS ticked), capOn, capVr and capVal in the widget controls JSON (BuildWidgetControlsJsonOnUi)
    • Web server page: new "Cap (NFR)" row showing the cap for the mode MSFS is in, or Off, marked (2D) or (VR), or "-" when Cap FPS is unticked