r/OptimizedGaming • • 6d ago

Vibecoded Tools & Mods | Optimization Guide Stuttometer - open-source Windows ETW stutter & frame-pacing diagnostic tool (looking for VRR / NVIDIA / Intel testers)

Post image

Hey everyone,

I've been working on an open-source tool called Stuttometer (C++/Win32, GPLv3) to help track down micro-stutters and frame-pacing hitches on Windows without having to manually record and dig through giant .etl files.

Tools like PresentMon and CapFrameX are great at showing when a stutter happened, and LatencyMon/WPR show system activity, so the goal here was to combine that into something you can just leave running in the background (~48 MB RAM, <0.3% CPU, zero heap allocations on the ETW hot path).

When it catches a frametime spike, cadence judder, DWM compositor glitch, or audio dropout, it grabs a ~280 ms window around the hitch and correlates kernel + user ETW events (D3D12 shader/PSO compilation, driver DPC/ISR spikes like nvlddmkm.sys or amdkmdag.sys, VRAM paging, disk I/O, context switches, and SMI stalls). It also scales thresholds to your monitor's refresh rate and tries to filter out obvious loading screens and long pauses (>= 2s) so they don't skew your session stats.

Note on Admin rights: It asks for Administrator access because Windows requires it to open a kernel ETW session. There's no DLL injection, no reading game memory, no anti-cheat hooks, and no background network telemetry.

I'm a solo dev testing on one machine (AMD GPU + 200Hz/60Hz non-VRR dual monitor), so I'm trying to get feedback from people on NVIDIA, Intel Arc, VRR (G-Sync / FreeSync), and high-Hz monitors (240Hz+).

If you want to try it:

  1. Download the latest release: https://github.com/xdr0p/stuttometer/releases/latest

  2. Run stuttometer_gui.exe while playing.

  3. If it misses a hitch you felt, attributes the wrong cause, or logs any ETW warnings (or flags an obvious loading screen), hit Export JSON (turn on Redact in Settings if you want your username/paths scrubbed) and drop the .json file in a GitHub Issue (https://github.com/xdr0p/stuttometer/issues/new/choose) with what was happening on screen.

Repo: https://github.com/xdr0p/stuttometer

129 Upvotes

38 comments sorted by

•

u/AutoModerator 6d ago

New here? Check out our Information & FAQ post for answers to common questions about the subreddit.

Want more ways to engage? We're also on Discord

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

5

u/Metalbuffon 6d ago

Hello, quick question, does it tell you the stutter happened? Or what’s causing it ? Maybe errors or some software

13

u/bojodrop 6d ago

Both. It detects the stutter (with an optional OSD if you want to see it live) and ranks the most likely cause from the Windows ETW events right around that frame.

So if it's external software or drivers, it can point to things like a specific driver spiking DPC/ISR latency (e.g. nvlddmkm.sys, ndis.sys), a background app preempting the game thread, antimalware scans, disk/VRAM paging, or D3D12 shader compilation. If it's an internal game bug, it'll just point to the game/GPU pipeline itself.

2

u/Metalbuffon 6d ago

Nice! I will give it a try!

2

u/arkblemish 6d ago

Will give it a go

1

u/bojodrop 6d ago

Thank you! Feel free to message me about anything.

2

u/SlumKatMillionaire 6d ago

Saving this for later. Gonna give this a go after work. Will keep you updated OP

1

u/bojodrop 6d ago

Thank you, i appreciate it!

2

u/cemsengul 5d ago

Does this solve the stutter or just tell you why you are stuttering?

5

u/bojodrop 5d ago

It just tells you why you are stuttering. It is strictly a diagnostic tool, so it won't automatically fix anything on its own. Instead, when a stutter happens, it captures what was going on in the background (like a specific driver DPC spike, shader compilation, VRAM paging, disk stall, or background process preempting the game) so you know what to actually fix instead of guessing.

2

u/JoeRLL 5d ago

This is a dream tool of mine ever since I got into PC gaming. So this would help diagnose if the stutter is game related, system/programs related or hardware related?

1

u/bojodrop 5d ago

Exactly. It helps separate those three out by looking at what was happening right around the stutter:

  1. Game-related, like D3D12 shader compilation stalls, VRAM paging, or the game blocking on its own disk reads or memory allocations.
  2. System or background programs, like another app preempting the game's threads, Windows compositor (DWM) hiccups, or background disk and memory activity.
  3. Driver or hardware-level, like long driver DPC/ISR spikes (GPU, network, storage, etc.) or BIOS/firmware SMI stalls that pause CPU execution.

It won't directly tell you if a stick of RAM is dying or if something is overheating, since it doesn't read hardware sensors, but it narrows down whether the stall is coming from the game itself, Windows/background apps, or a driver/firmware issue.

2

u/JoeRLL 5d ago

Giving it a go now and it’s very very cool! It alone telling you it’s a PSO stutter with a notification is incredible work man. I’ll be recommending this to people in the future! Will really help when diagnosing issues in communities

1

u/bojodrop 5d ago

Thank you very much I really appreciate it! If the PSO confidence score ever feels too aggressive or misses something, feel free to create a new issue on github.

1

u/JoeRLL 5d ago

One thing that would be nice is if we could scale up the UI a bit. I play on a 77” 4K TV and it only takes up half my screen and the text is very small. Not a deal breaker but would be nice if it could be bigger!

Does it check network events at all? For online games stutters can often be caused by latency spikes and the like so could be useful for diagnosing stutters in multiplayer games if it doesn’t already.

Also I’m getting lots and lots of windows defender events but my game library is excluded from defender. Is there anyway to see what file or folder defender was scanning when the event occurred? It is good to know that defender is taking up so much CPU time though god damn

1

u/bojodrop 5d ago

Appreciate the feedback! Going through your questions:

  1. Stutter threshold: By default it runs in Hybrid mode, which tracks your rolling frametime baseline (catching 2x spikes by default, or 1.4x in High-Refresh mode) alongside cadence judder detection. So if you are playing at 120 FPS and dipping to 60 FPS lows, it will catch that as a spike or pacing judder even if you leave everything on default. If you want to dial it in yourself, you can open Settings and change the Trigger Mode, switch profiles, or unlock Advanced Settings to set your own spike multiplier and millisecond thresholds.
  2. UI scaling: Totally fair point. Because it is built natively in C++ / Win32, the layout is structured pixel by pixel, which makes arbitrary window resizing tricky. I have been thinking about adding a few fixed size presets (like Small, Medium, and Large) so it is much easier to read on a bigger display.
  3. Network events: Right now it does not trace network latency, ping, or packet events. It will catch if a network driver (like `ndis.sys`) causes a local DPC/ISR spike that stalls your CPU, but it won't diagnose server lag or packet loss.
  4. Windows Defender: At the moment it only tracks that Defender's real-time engine (`MsMpEng.exe` / `WdFilter.sys`) ran a scan and how long it took, not the specific file or folder path. Even with your game library excluded, Defender still commonly scans shader caches in AppData/ProgramData, temp files, or game launchers while you play, which is probably what you are seeing. Adding path details for Defender scans is definitely something I can look into.

1

u/JoeRLL 4d ago

Thank you for your detailed response! Much appreciated man. It’s a great app I’ve recommended it to quite a few people now

1

u/JoeRLL 5d ago

That is amazing! I’ll give it a shot! What’s the threshold for a stutter? I’d find it really useful for figuring out if there’s anything that can be done to improve games where I’m having bad framepacing (say 60 lows when playing at 120) or if the game’s own thread is just garbage and there’s nothing to be done without modding it.

I do have a lot of essential stuff running on my PC, plus all the windows bloat. I try and keep it to a minimum and manage everything with process lasso but some insight into if these things are actually impacting frametimes would be invaluable.

2

u/son8203 7h ago

Been trying out your project, very intuitive and easy to use. Just one question, I see that most stutters in my games are caused by GPU pipeline/shader execution stall as shown by the program, is this because of the games or because of my hardware ?

1

u/bojodrop 3h ago

In most cases, that points to the game rather than broken hardware.

When Stuttometer flags "GPU Pipeline / Shader Execution Stall," it means it checked for OS and background culprits (driver DPC spikes, disk stalls, CPU preemption, Defender, VRAM paging, etc.) and didn't find any, so the delay happened inside the game's own rendering pipeline.

Usually that comes down to one of two things:

  1. Game-side: shader compilation, heavy scene/effect bursts, asset streaming, or DirectStorage GPU decompression competing with rendering.
  2. GPU load or config: your GPU simply getting overloaded on a heavy frame (for example, settings or resolution pushing it to 100% with no headroom), or a disabled/corrupted driver shader cache.

It generally does not mean your GPU is defective. If you haven't already, make sure you are on the latest release (v0.12.4) since v0.12.2 to v0.12.4 fixed a few timing/ring-buffer edge cases and lowered tracing overhead. If you want to narrow down whether it's game engine code or just GPU load, try dropping a heavy setting like shadows or resolution scale for a quick test: if the stalls disappear, it was GPU load; if they still happen in the exact same spots, it's the game.

5

u/rdmprzm 6d ago

Nvidia GPU, AMD CPU here using 480hz monitor, high FPS (CS2) - will give this a pop, looks cool.

Guessing it's clean on virus total but will check anyway.

1

u/madskills42001 6d ago

The app keeps crashing for me on boot, any ideas? The window appears and disappears in a flash shucks

1

u/bojodrop 6d ago

Make sure you're opening stuttometer_gui.exe and not stuttometer.exe, because that's the CLI version and it closes immediately if opened with no flags. Also make sure you're running as admin

1

u/madskills42001 5d ago

That’s exactly what I did wrong, will try this when I get back to my PC, thanks!

1

u/bojodrop 5d ago

No worries and thanks for giving it a shot!

1

u/MassiveClusterFuck 6d ago

What's the difference between this and latency mon? Genuinely curious as that's what I've used for years to find out what is causing stutters and slowdowns

1

u/bojodrop 6d ago

LatencyMon measures systemwide ISR/DPC driver latency in isolation, so it shows which drivers spike in general without knowing if they actually caused an in game hitch, and it doesn't track GPU or game-level stalls. Stuttometer hooks into actual frame pacing via DXGI/DWM and acts like a flight recorder, capturing a ~280ms window right around a frame spike. It correlates ISR/DPC spikes alongside shader compilation, VRAM paging, CPU preemption, and blocking disk I/O to pinpoint what happened during that specific stutter.

1

u/Slopddit 6d ago

Would this help Claude/Chatgpt/Deepseek substantially with making a mod to fix stutters in a DX12 game? That’d be so awesome. I don’t think there’s currently anything out there to make the process for Claude much easier without having to burn a shit ton of tokens.

1

u/bojodrop 6d ago

It helps a lot with narrowing down what kind of fix to even try, without having to feed an LLM giant raw trace logs. You can copy a compact markdown summary or drop the small JSON report for a specific stutter straight into Claude or ChatGPT, and it immediately sees whether the hitch was synchronous DX12 shader compilation, VRAM paging/demotion, blocking disk I/O, or CPU thread preemption.

​That saves a ton of guesswork on whether you need a PSO caching/shader tweak, a streaming pool/VRAM budget config edit, or something else, and you can run it before and after to verify if the tweak actually killed that specific stall. The one thing it cannot do, since it's passive OS-level tracing and doesn't hook into the game binary, is it won't give the AI internal game function addresses or engine specific CVars, so for deeper DLL modding you'd still pair it with something like Special K or an engine unlocker.

1

u/Slopddit 6d ago

Also, please optimize, optimize, optimize! I believe vibecoded is fine as long as it’s been through enough passes of prompts to make sure it’s not buggy or janky. AI will produce shitty code if you don’t prompt it right or long enough.

1

u/1boy_dz 5d ago

is it safe to use with online games with anti-cheats?

2

u/bojodrop 5d ago

Yes, it should be safe to run alongside anti-cheats. It does not inject DLLs, hook graphics APIs, or read/write game memory. It only passively listens to Windows' built-in ETW (Event Tracing for Windows) telemetry, similar to PresentMon or LatencyMon, and the optional OSD toast is a standard non-activating desktop window rather than an injected overlay.

That said, because it is an unsigned binary running with administrator privileges, I cannot guarantee how every kernel-level anti-cheat (like Vanguard, EAC, or BattlEye) might treat it, though it never touches the game process itself.

I've personally used it while playing LoL and CS2 and haven't had an issue.

2

u/_FrostyVoid_ 6d ago

This is amazing! I've been looking for a similar tool since I first got my PC. I want to get back to you with the feedback but your messages are off

1

u/SnooPaintings7769 5d ago

Virustotal.com y a probarlo, gracias.

1

u/Majin_Erick 5d ago

I'll try it.