Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Grand Theft Auto V runs at 10 FPS with vsync enabled #1314

Closed
mrpippy opened this issue Jan 3, 2020 · 8 comments
Closed

Grand Theft Auto V runs at 10 FPS with vsync enabled #1314

mrpippy opened this issue Jan 3, 2020 · 8 comments

Comments

@mrpippy
Copy link

mrpippy commented Jan 3, 2020

Starting with DXVK 1.5, Grand Theft Auto V's opening movie (Rockstar logo) and menus always run at 8-10 FPS. With VSync enabled, the game itself also runs at 10 FPS. With VSync disabled, the game runs normally (60-80 FPS for me). Some people have also found that the borderless window setting restores normal performance: ValveSoftware/Proton#37 (comment).

I was able to bisect the problem down to commit aa40dec.
I can post an apitrace tomorrow.

Software information

Grand Theft Auto V, from Steam. Build 1868, Online 1.50.
DirectX 11 mode.

System information

  • GPU: GTX 1060 3GB
  • Driver: 440.44.0
  • Wine version: Proton 4.11-11
  • DXVK version: 1.4.6 works normally. 1.5 and master have the problem

Apitrace file(s)

  • Put a link here

Log files

@doitsujin
Copy link
Owner

doitsujin commented Jan 3, 2020

Sounds like the game thinks it's minimized for whatever reason. Not sure if there's much I can do there. Unfortunately I can't test the game right now due to a) the launcher being constantly broken and b) not having access to my work PC at the moment.

I know that GTA V uses PRESENT_TEST before every "real" present, but that should still work just fine.

In general, Vsync-related problems are almost never DXVK bugs, but it's weird that the commit you mentioned would cause a regression like this since we only return DXGI_STATUS_OCCLUDED if there's literally no way we can present anything.

@doitsujin
Copy link
Owner

doitsujin commented Jan 3, 2020

Can you test if this branch fixes the problem?

We should never return DXGI_STATUS_OCCLUDED to the application unless the application window is minimized, but this should fully restore the behaviour before aa40dec.

@aufkrawall
Copy link

I can't confirm this issue with DXVK git-master in wine-tkg (75Hz):
Screenshot_20200103_183406

But the in-game vsync option is heavily bugged and may jump to half rate, which capped it to 39fps for me (something seems odd about that math), despite of forcing vsync via DXVK. I had to set it to off and restart the game to make it work.

@doitsujin The non-Steam version with just Rockstar Game Launcher should work with the corresponding community patches for wine-tkg:
https://github.com/Tk-Glitch/PKGBUILDS/tree/master/community-patches/wine-tkg-git

@mrpippy
Copy link
Author

mrpippy commented Jan 3, 2020

Can you test if this branch fixes the problem?

We should never return DXGI_STATUS_OCCLUDED to the application unless the application window is minimized, but this should fully restore the behaviour before aa40dec.

I tried the branch, it didn't fix the issue. I tried reverting other parts of the patch though, and found that adding the PRESENT_TEST check back into DxgiSwapChain::Present1 does fix it: aa40dec#diff-ba6fe080f093adac8573732dd035e363

Without that, the while loop in PresentImage is regularly looping because of status == VK_NOT_READY

@doitsujin
Copy link
Owner

I'm not sure I understand. PresentImage is never called when PRESENT_TEST is being used.

doitsujin added a commit that referenced this issue Jan 4, 2020
Otherwise, the following sequence leads to the Vulkan
swap chain being recreated once per frame:

  swapchain->Present(0, DXGI_PRESENT_TEST);
  swapchain->Present(1, 0);

Found while investigating #1314.
@doitsujin
Copy link
Owner

doitsujin commented Jan 4, 2020

Does ae01bd8 fix the problem? I don't know if the game runs into that issue but it's a genuine bug regardless.

@andrew-mcmahon
Copy link

andrew-mcmahon commented Jan 4, 2020

I believe that fixes V-Sync for me - at least with VSync = On.
https://imgur.com/a/HikXstk

I removed the dxvk.conf workaround.
I've compiled the latest and replaced the DXVK files Proton-4.21-GE-2 comes bundled with - those are found in:

/home/mwnn/.steam/steam/compatibilitytools.d/Proton-4.21-GE-2/dist/lib64/wine/dxvk/
/home/mwnn/.steam/steam/compatibilitytools.d/Proton-4.21-GE-2/dist/lib/wine/dxvk/

I don't need to apply the workaround with the dxvk.conf file any longer.
60 Hz is the max on my ASUS PB238Q.
GTA V settings.txt

Others may wish to confirm that though.
It's practically miraculous what you clever lot are doing.

EDIT: This is a better proof - a one handed video on my Galaxy S5 Neo:
https://drive.google.com/open?id=1-q-NCiy7FRKWZXjovef-1_zmVKRUswRS

EDIT2: Just to be thorough - VSync Half @ 30 fps:
https://imgur.com/a/owsaQyq

@mrpippy
Copy link
Author

mrpippy commented Jan 4, 2020

Does ae01bd8 fix the problem? I don't know if the game runs into that issue but it's a genuine bug regardless.

Yep that fixes the problem for me too, thanks!

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

No branches or pull requests

4 participants