goatcorp / FFXIVQuickLauncher

Custom launcher for FFXIV
https://goatcorp.github.io/
GNU General Public License v3.0
2.76k stars 327 forks source link

[Bug] Modern Injection breaks MPO #1592

Open Dajova opened 1 month ago

Dajova commented 1 month ago

Update disclaimer

What did you do?

Injecting dalamud with the new method breaks MPO and hence the game doesnt know what's in the foreground or not. Legacy injection doesn't do this.

Steps-to-reproduce:

  1. Start whatever graphical utility control program, like NVIDIA Control Panel.
  2. Make sure your game is set as windowed borderless, else it does nothing.
  3. Set background application max framerate to whatever (like 30fps).
  4. Start the launcher.
  5. Select "New" injection.
  6. Start the game.
  7. Tab in and out of the game. The game stays at whatever max framerate you get, never goes to the set background framerate.
  8. Exit game.
  9. Start the launcher again.
  10. Select "Legacy" injection.
  11. Start the game.
  12. Tab in and out of the game. The game correctly switches from max fps to whatever fps you set as background framerate (like 30fps) as you go back and forth.

I've reported this in the past, but haven't made a ticket about it until i heard that you where gonna remove it soon. So here it is.

Also, you dont have to time me out everytime i try to say anything on discord, thank you. I know half your modteam despise me for existing. They know who they are.

Platform

Windows

Wine/Proton runner version

No response

Relevant log output

No response

goaaats commented 1 month ago

I don't know what MPO means, and I haven't ever seen this happen myself. It's probably something else on your machine that is causing this.

Dajova commented 1 month ago

Many dont know, but.. https://learn.microsoft.com/en-us/windows-hardware/drivers/display/multiplane-overlay-support

Essentially, it allows for multiple types of overlays and/or windows to interact with eachother without breaking compatibility with eachother, including hardware flip and, recently, the new reshade 6.2 update.

KazWolfe commented 1 month ago

Cannot reproduce on Dalamud 10.0.0.8 with ReShade 6.2.0 using entrypoint. Nvidia driver version 556.12 on a RTX 3080 FE. Windows 11 at 22631.3880.

image

Dajova commented 1 month ago

That probably means you either have no MPOs and/or have broken flip. Here, SK runs at my max limited 100fps, but is set to driver-level background fps at 60 and SK background limiter at 30 (dont worry, they dont interact with eachother, so thats not it) while i'm tabbed out. image1 This is with new injection. image2 This is with legacy injection.

And as you can see in the limiter itself which condition is engaged or not...

edit: also, this is without reshade as well, just pure injection, i just took up reshade as a example for a injected program that works better in the same way with legacy rather than new.

edit2: Further clarification; It breaks the "communication" with Xbox Game Bar, which Windows uses to properly raise and lower window state of games, which is mainly used via MPO (i think that's what happening, at least). image

MapleHinata commented 3 weeks ago

I did some testing on this, but here's a tl;dr: I believe this is a game "bug" that only shows up when the game is rendering in Flip model.

First of all, this isn't tied to MPOs, nor does Dalamud break them, if MPOs were broken, you wouldn't be on Hardware Composed: Independent Flip, since that presentation mode is reserved for instances where 1) DirectFlip is engaged 2) Hardware overlays are available and being used (so MPOs) If MPOs were not available, you'd be under Hardware: Independent Flip (since there's no composition caused by Multi Plane Overlays) or Composed: Copy with CPU GDI (If Windows is unable to keep up DirectFlip engaged, ie: there's another window on top of the game's swapchain)

Second of all, with the game with no addons at all, being upgraded to Flip Model by Windows 11, causes this issue to show up

image

As you can see, there's no ReShade, Dalamud, or SpecialK injected into the game, and despite setting a background frame rate limit, it never gets engaged.

The only instances where i was able to get that background limit to engage, was by dropping out of DirectFlip and going into Composed: Copy with CPU GDI, or if I disable Windows's flip model override and used SpecialK's Flip Model override, that works for some reason.