protonscr

Legend of Heroes: Trails of Cold Steel 2 - low framerate despite low GPU load

dxvkclosed not our bug
doitsujin/dxvk#2508 · opened 2022-02-21 by kozross · updated 2022-02-21 · 7 comments · github
1 matching comments, n / p to jump
Kkozross 2022-02-21 github

In large or 'busy' areas, my FPS drops to around 50 and stubbornly refuses to consistently go much higher, sometimes dipping into the high 30s or low 40s. This doesn't happen in smaller and simpler areas.

Software information

Legend of Heroes: Trails of Cold Steel 2, GOG version.

System information

  • GPU: AMD Radeon RX 5700 XT
  • Driver: xf86-video-amdgpu 21.0.0 with amdvlk 2022.Q1.2
  • Wine version: 7.2
  • DXVK version: 1.9.4, but I tested master as well, with the same outcomes

Log files

Ddoitsujin maintainer 2022-02-21 github

CPU limit? The game isn't exactly super efficient or anything, and you're using the proprietary driver which has much more overhead than RADV in some games, so this is probably to be expected.

Kkozross 2022-02-21 github

amdgpu is the open-source driver - you're thinking of AMDGPU-PRO. The CPU is not loaded anywhere near its capacity during gameplay - it's an AMD Ryzen 9 5900X, and even during heavy scenes, I don't even hit 50% CPU load.

Edit: I tested vulkan-radeon (RADV) instead of amdvlk, and I found the same behaviour exactly, except the 'settled' framerate is even worse: mid-30s or low-40s, rather than low 50s. This also happens on the proprietary Vulkan implementation, but is even less consistent.

Ddoitsujin maintainer 2022-02-21 github

Are you on wayland playing in windowed mode or something? Can you be more precise about which areas of the game are slow? Are you using an esync- or fsync-enabled wine build?

I can't reproduce this here, even with the renderer being a bit weird it never drops below 200 FPS.

you're thinking of AMDGPU-PRO

Yes, I am thinking of that that because the Vulkan driver is the component that matters here, not the Xorg display driver thing. AMDVLK wasn't mentioned anywhere at the time, and it really doesn't make a difference since the code base is literally the same.

Ddoitsujin maintainer 2022-02-21 github

ok, I tried this with the standard wineserver synchronization and no restrictions on how many threads the game can run on, and the game drops into the 70s in Ymir as opposed to >250. This is almost certainly your problem, not a DXVK issue.

Kkozross 2022-02-21 github

I haven't even heard of esync or fsync in relation to Wine, so I can confirm that I wasn't using it. The main area that runs slowly is the Nord Highlands' large open area: my framerate dives pretty much as soon as I enter it.

Ddoitsujin maintainer 2022-02-21 github

wine-staging should at least have esync, which can then be enabled by setting the environment variable WINEESYNC=1, so I suggest you use that. If it works it should print something along the lines of esync: up and running on the terminal when starting the game.

Just tested this here as well to confirm, 38 FPS without it, well over 200 with it enabled.

TL;DR is that wine's upstream implementation of thread synchronization primitives is extremely slow under heavy contention, and this game seems to create one worker thread per logical CPU core which then all spend most of their time waiting for the same set of sync primitives. This affects many games in one way or another, and gets worse the more cores your CPU has.

Kkozross 2022-02-21 github

@doitsujin - thank you, your suggestion works like a charm!

Launch options