Skip to content

Conversation

Copy link

Copilot AI commented Nov 12, 2025

Modern games (Battlefield 6, etc.) emit Present events via the Microsoft-Windows-DXGI ETW provider rather than Microsoft-Windows-DxgKrnl. The library was only listening to DxgKrnl, missing frames from DXGI-based applications.

Changes

  • Added Microsoft_Windows_DXGI ETW provider definition with Present event descriptors (based on upstream PresentMon v2.4.0)
  • Updated FpsInspector.StartOnceAsync() and StartForeverAsync() to enable both providers concurrently
  • Both providers now feed into the same FPS calculation pipeline

Implementation

// Before: Only DxgKrnl
session.EnableProvider(Microsoft_Windows_DxgKrnl.GUID);

// After: Both providers
session.EnableProvider(Microsoft_Windows_DxgKrnl.GUID);
session.EnableProvider(Microsoft_Windows_DXGI.GUID);

// Event handler checks both sources
if (data.ProviderGuid == Microsoft_Windows_DxgKrnl.GUID) {
    if (data.ID == dxgKrnlPresentEventId) fps.Calculate(timestamp);
}
else if (data.ProviderGuid == Microsoft_Windows_DXGI.GUID) {
    if (data.ID == dxgiPresentStartEventId) fps.Calculate(timestamp);
}

Backward compatible - no API changes. Version bumped to 2.0.6.

Original prompt

This section details on the original issue you should resolve

<issue_title>[question] Any updates planned?</issue_title>
<issue_description>Hey, is there any updates coming for this? would be great to have it up to date with the latest presentmon as there are issues with capturing data from newer games like Battlefield 6</issue_description>

<agent_instructions>似乎https://github.com/GameTechDev/PresentMon更新了一些新的方案</agent_instructions>

Comments on the Issue (you are @copilot in this section)

@emako I haven't played these games, you can PR the solution.

💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Co-authored-by: emako <24737061+emako@users.noreply.github.com>
Copilot AI changed the title [WIP] Update PresentMon for better game data capture Add DXGI ETW provider support for modern DirectX games Nov 12, 2025
Copilot AI requested a review from emako November 12, 2025 07:14
@F3NN3X
Copy link

F3NN3X commented Nov 22, 2025

hey, will this be reviewed and updated soon?

@emako
Copy link
Member

emako commented Nov 23, 2025

@F3NN3X I haven't played the corresponding game, so I can't confirm whether it works.

@F3NN3X
Copy link

F3NN3X commented Nov 25, 2025

@F3NN3X I haven't played the corresponding game, so I can't confirm whether it works.

ok. i just pulled and added the updated package to my project and it does not work on title like BF6. I see other people are having some issues with BF6 in the official presentmon github to, so it might need some more work.

@emako
Copy link
Member

emako commented Nov 25, 2025

@F3NN3X If you have any new information, let's talk about it.

@F3NN3X
Copy link

F3NN3X commented Nov 25, 2025

@F3NN3X If you have any new information, let's talk about it.

not really any new info. i just saw on the presentmon github, the presentmon overlay was crashing in BF6, most likely cause of their anti cheat. GameTechDev/PresentMon#485

RTSS have made it work though, and they use presentmon, so it is kinda weird the whole thing. unless RTSS uses a custom build of presentmon.

but as i said, i pulled the update and build the nupkg and included it in my project to test it out, and it works as intended with "compatible" games, but not in newer games like BF6.

i could probably add some debugging if you want that. but since the OG presentmon is not currently working correctly either for games like BF6, i guess it better to wait until they get that sorted

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[question] Any updates planned?

3 participants