protonscr

METAL GEAR RISING: REVENGEANCE FPS drop on certain conditions

dxvkclosed
doitsujin/dxvk#3604 · opened 2023-08-07 by mrvictory1 · updated 2023-08-10 · 15 comments · github
Mmrvictory1 2023-08-07 github

METAL GEAR RISING: REVENGEANCE takes a performance hit in certain conditions. When the hit occurs, FPS quickly drops to around 10 and returns to 30-40 after a few seconds. This issue is reproducible:

  • After intro videos performance will be normal until game logo is displayed, FPS drops to 10-12 when game logo appears, stays low for around 5 seconds and returns to 30-40 even if I don't do anything.
  • In chapter R-06, performance is good when game starts, FPS drops to 10-12 if I do ninja run during the beginning of Raiden's animation for a second or two then FPS returns to 30-40 even if I keep running.
  • Some scenes ie. Monsoon fight are always at low FPS.

This issue does not occur on Windows (without DXVK) and with Gallium Nine. When FPS drops, so does GPU usage. (from around %60 to %30) I have failed to find any bottleneck like CPU, GPU, RAM or VRAM. I tried disabling esync and fsync, playing with Proton 7.0 and 6.3 and got the same results with DXVK.

Software information

METAL GEAR RISING: REVENGEANCE (Steam ID: 235460)
Pop OS 22.04 LTS
Kernel: 6.2.6-76060206-generic

System information

  • GPU: Intel HD 520
  • CPU: Intel Core i3-6100U
  • RAM: 8 GB
  • Driver: Intel Mesa 22.3.5
  • Proton version: 8.0-3
  • DXVK version: 2.2-153-gcbda22a0

Apitrace file(s)

With apitrace, the gets stuck at Konami logo. I patched .exe to skip intro videos (guide link) and got stuck at a black screen this time. I tried creating apitrace with Proton, not on Windows.

Log files

https://gist.github.com/mrvictory1/934644c5b09ccfbd06e428605246a79c
Launch options used for generating log file: DXVK_HUD=full PROTON_LOG=1 %command% The game is binary patched for skipping intro videos.
DXVK HUD: https://drive.proton.me/urls/RDT77X00SM#d8WIOk3DMdJu

BBlisto91 2023-08-07 github

Hi there
Does Graphics Pipelines go up when it happens or do they stay the same in the dxvk hud.

Edit: I would guess not from how you describe it.

Mmrvictory1 2023-08-07 github

It doesn't. Starts at 319 when I reach title screen and stays the same ingame.

BBlisto91 2023-08-07 github

Ok i will try to check it out. Are you able to share save games of some of the problematic ingame sections?

Mmrvictory1 2023-08-07 github

https://drive.proton.me/urls/TA78Q3WQDR#FsymT4XSPCio - Save Data
https://drive.proton.me/urls/VMF1PZNF9G#BFuyW2Q5baXL - Graphic Options (I set to all low)
2 files go to /drive_c/users/steamuser/Documents/MGR/SaveData/
The save file has 3 saves. Start the game, pick 1st save, go to story -> chapters, choose r-06 with arrow keys and hit enter. Perf will be fine at the beginning, run at any direction (wasd) while holding ctrl. FPS should drop for 1-2 secs and stabilize. Also when Sam attacks you, or you attack Sam, there should be FPS drop. I should add that I played this on a much better PC (i5-11400H + RTX 3050 Mobile + 16 GB RAM) and didn't have these problems.

BBlisto91 2023-08-07 github

Thanks. Will check it out here later when i have some time.

when Sam attacks you

I hate it when my Smart access memory attacks me. shakes fist

Mmrvictory1 2023-08-08 github

I found out that v1.8.1 does not have this issue while v1.9 does. Tested on Proton 8.0-3 with launch opts
DXVK_HUD=full MESA_SHADER_CACHE_DISABLE=true %command%
Are there any prebuilt binaries between these versions or do I compile myself to find the commit at this point?

BBlisto91 2023-08-08 github

You'll have to self compile.
Why are you disabling the shader cache.

Mmrvictory1 2023-08-08 github

I thought that shader cache from new DXVK may "confuse" old versions so I disabled it. Is it safe to enable?

BBlisto91 2023-08-08 github

Yes. dxvk doesn't keep any actual shader cache for itself. They are all with the driver.

Mmbriar 2023-08-08 github

DXVK never had a shader cache to begin with, only a state cache. Yes, you should absolutely keep the driver shader cache enabled. With regard to the rest of this issue, I doubt anyone will be able to reproduce anything on hardware other than low power, old intel igpus.

BBlisto91 2023-08-08 github

So i do see that the visual effects while fighting and doing other stuff can make the GPU utilization go up, but to notice this on my own setup i have to use my weak Zen 4 iGPU and put the settings to high so I'm close to the edge of being fully GPU bound. When at low and I'm not near being GPU bound i don't see any drops. I'm not sure i see much of a difference between 1.8.1 and 2.2 either.
Tho if it is the same i not sure why your GPU utilization would go down instead of staying at 100% unless you are compiling shaders each time.

Might be interesting if you could try a newer driver, but I'm not convinced that would do much.

Mmrvictory1 2023-08-08 github

And the Oscar goes to...
https://github.com/doitsujin/dxvk/commit/b9512a40630c1e9030aa7958ce2456664bc3b059
This is the bad commit, the commit right before that https://github.com/doitsujin/dxvk/commit/bb11d7dee8d634c02fd920797b3de770c53f27ab works flawlessly. Tested on Proton 8.0-3 with only DXVK HUD enabled, no env var for disabling shader cache.

KK0bin maintainer 2023-08-09 github

image

I can't reproduce the problem. I loaded up your save and changed settings to the max (does this fucking game really not support resolutions higher than 1080p?!). There are no queue syncs and performance is as expected.

Mmrvictory1 2023-08-09 github

I have RTX 3050 mobile on another PC and it doesn't reproduce there either with max settings iirc.

Mmrvictory1 2023-08-10 github

Resolved after Mesa update, so user error. :man_facepalming: It actually runs at 60 FPS now instead of around 40.
https://imgur.com/a/RZM0KPF