doitsujin / dxvk

Vulkan-based implementation of D3D9, D3D10 and D3D11 for Linux / Wine
zlib License
12.25k stars 783 forks source link

EverQuest - Low FPS when in foreground. #4074

Open Czahrien opened 2 weeks ago

Czahrien commented 2 weeks ago

The one thing that has been preventing me from using DXVK with EverQuest is that my FPS when the game is in the foreground is very low, between 20 and 40 but the actual GPU and CPU utilization is in the single digits during this. So I am suspecting that something that the game is doing every frame when in the foreground has a sort of IO wait or a sleep that is slowing it down.

What is really odd though is that when I remove the game's background frame limiter in its advanced options (change it from Min CPU to Unlimited), the FPS jumps to what I would expect it to be (it remains over 100 even in busier areas) but only when the game does not have focus.

I originally was just having this issue on my Arch Linux desktop but after switching my laptop to Arch Linux last night I found that I was seeing the same issue on there - what is odd is that with Nobara running on this hardware I did not have the problem using the same version of DXVK and same version of Wine.

In the log file you'll see a bunch of message that look like this: 0418:fixme:system:NtUserQueryDisplayConfig flags 0x2, paths_count 0x7ffffe3fd778, paths 0x74462d446770, modes_count 0x7ffffe3fd77c, modes 0x74463ad51f80, topology_id (nil) semi-stub and debug: DXGI: For mode 3440x1440@175 found closest mode 3440x1440@175 These are only logged when the game is in the foreground.

I have no problem looking into this a bit more more on my own if the DXVK team has a few thoughts on what I could look at. I did spend some time trying to do an apitrace but could not get it to work with DXVK for some reason (I suspect that having details about which library functions are called and how long they take to execute would be incredibly useful for this particular issue).

Software information

EverQuest - Current version from Daybreak Frame limiter options are in Options -> Display -> Advanced -> Max Frames Per Second (set to Unlimited) and Max Brackground FPS (Set to Unlimited). Issue is not present when using WineD3D drivers. KDE 6, same behavior with Wayland and X11 (X11 has lower FPS in foreground though, instead of 20-40, single digits typical)

Desktop System information

Laptop System information

Log files

everquest.log

EDIT: Attached a new log - one with DXVK_LOG_LEVEL=debug

turol commented 2 weeks ago

Hotspot has a perf command and visualization mode for off-CPU profiling: https://github.com/KDAB/hotspot/?tab=readme-ov-file#off-cpu-profiling

But if the limiter is in the game code it probably won't tell you anything interesting.