UnleashedRecomp icon indicating copy to clipboard operation
UnleashedRecomp copied to clipboard

VSync causes significant performance loss

Open skirlez opened this issue 10 months ago • 17 comments

Validation

  • [x] I have checked the Issues page to see if my problem has already been reported
  • [Irrelevant] I have confirmed that this bug does not occur in the original game running on original Xbox 360 hardware

Describe the Bug

In some areas, enabling VSync causes about a 25-30 FPS drop, testing with ShowFPS enabled.

Steps to Reproduce

Steps to reproduce the bug:

  1. Enable VSync
  2. All my frames gone ):

Expected Behavior

VSync shouldn't do that

Footage

VSync enabled: Image

VSync disabled: Image

Specifications

Fill out the following details:

  • CPU: AMD Ryzen 7 3700X
  • GPU: NVIDIA RTX 2070 Super
  • GPU Driver: NVIDIA driver 565.77
  • OS: NixOS 25.05 (Linux)
  • Version: 1.0.0

If I were to guess I'd say this is NVIDIA and Linux exclusive, otherwise I would have expected someone else to open an issue by now.

Also, this is anecdotal, but the framerate seems to be even lower than what's reported with VSync on, which is why I think I managed to catch this.

skirlez avatar Mar 02 '25 12:03 skirlez

I mean, Nvidia's vsync implementation on Linux has been abysmal from the start. This might as well be a driver issue.

I guess that's what they get for not using libVA unlike all sane linux gpu driver devs.

hourai-branch avatar Mar 02 '25 18:03 hourai-branch

this happens to me too i'm on windows 11 with a intel iris xe gpu i'm easly able to run the game at near 60 with vsync off, but when i turn it on my fps is capped at 30 if i had to guess this might have something to do with the triple buffering feature.

from my experience on a game like left4dead triple buffering enabled allows the game to run with vsync on at whatever refresh rate your monitor has (in my case 60hz) but when triple buffering is off it's stuck on 30

the unleashedrecomp has an option for triple buffering on it's config file, however i've tried everything i could think of ("enabled", "true", "on", etc) but i can't get it to be "on" it always resets to auto

it kinda sucks that i can't play with vsync on without it capping my fps to 30, i really hate screen tearing, having vsync off is out of the question for me

KayLilac avatar Mar 03 '25 02:03 KayLilac

Oh, the issue is vulkan then

hourai-branch avatar Mar 04 '25 16:03 hourai-branch

@KayLilac, I managed to get it to run at 60fps with vsync on, but you have to disable fullscreen mode.

Diego9028 avatar Mar 04 '25 16:03 Diego9028

Oh, the issue is vulkan then

now that you mention it... you're right!! it doesn't happen on directx12! wth XDDDD i've been playing this whole time on vulkan cuz i don't wanna get a seizure playing on directx12, i thought this would happen there too, but no, that's so weird

KayLilac avatar Mar 04 '25 16:03 KayLilac

@KayLilac, I managed to get it to run at 60fps with vsync on, but you have to disable fullscreen mode.

yeah, i can achieve the same but only when the window is super small, when it's on my native resolution (1080p) it plummets down to 30 btw what @EternallyEmber said there is right, this happens on vulkan, i tested on directx12 and my fps remained normal with vsync on

KayLilac avatar Mar 04 '25 16:03 KayLilac

directx12:

vsync off Image vsync on Image

vulkan

vsync on Image vsync off Image

KayLilac avatar Mar 04 '25 16:03 KayLilac

ohhh you're right, it's fixed using D3D12, thanks

Diego9028 avatar Mar 04 '25 17:03 Diego9028

@Diego9028 show me how to start game with d3d12 pls

shad3w2 avatar Mar 06 '25 08:03 shad3w2

@shad3w2 , using the Windows key + R and paste: %APPDATA%\UnleashedRecomp

Once you are in the game folder, look for the "config" file, scroll down until you find the video settings and in GraphicsAPI change "Auto" to "D3D12"

Image

Diego9028 avatar Mar 06 '25 12:03 Diego9028

@Diego9028 i use it but all game was black,just black textures

shad3w2 avatar Mar 06 '25 14:03 shad3w2

@shad3w2 Hmmm, sorry, I wouldn't know what to do in that case, it could be something with your GPU that happens specifically with D3D12

Diego9028 avatar Mar 06 '25 15:03 Diego9028

Hi, this is My experiencia to share: I tried all 3 types of GraphicsAPI and the one that worked best for me in terms of performance was DirectX12, but that didn't solve the fps drop with vsync activated, after DirectX12 I used D3D12, and it was the best one that helped me activate vsync without any problem, the problem with this one is that it has a lot of texture glitches when using it, which I don't know why, if anyone has information to share it would be amazing if they shared it to try to get the best experience in this game

Another problem I found is that when using DirectX12 after closing the app in the config.toml file it automatically changes to "Auto" I don't know if anyone has solved this.

InterZ1 avatar Mar 07 '25 04:03 InterZ1

Hi, I've already investigated more and from what I can understand, D3D12 gives many texture problems in the game (so it's something from the port that we just have to wait for them to fix)

InterZ1 avatar Mar 07 '25 04:03 InterZ1

this happens to me too i'm on windows 11 with a intel iris xe gpu i'm easly able to run the game at near 60 with vsync off, but when i turn it on my fps is capped at 30 if i had to guess this might have something to do with the triple buffering feature.

from my experience on a game like left4dead triple buffering enabled allows the game to run with vsync on at whatever refresh rate your monitor has (in my case 60hz) but when triple buffering is off it's stuck on 30

the unleashedrecomp has an option for triple buffering on it's config file, however i've tried everything i could think of ("enabled", "true", "on", etc) but i can't get it to be "on" it always resets to auto

it kinda sucks that i can't play with vsync on without it capping my fps to 30, i really hate screen tearing, having vsync off is out of the question for me

i can't believe it took this long... but hey! better late than never i guess

i managed to turn on triple buffering on vulkan and fix the problem turns out on the config file in order for the triple buffering to take effect you need to set it to on BUT the o need to be capital so basically = On

Image if it's not a capital O it will reset to auto

now vulkan can finally have the glory of no screen tearing and high frames

but seriously tho, why does the game not use triple buffering as default for vulkan? why does only dirextx12 gets that treatment? this is so freaking stupid a stupid fix, for a stupid problem

KayLilac avatar Apr 07 '25 01:04 KayLilac

Triple buffering only gets enabled for Vulkan on Auto if Present Wait is supported, you can see if it is from F1 profiler window.

blueskythlikesclouds avatar Apr 07 '25 07:04 blueskythlikesclouds

Triple buffering only gets enabled for Vulkan on Auto if Present Wait is supported, you can see if it is from F1 profiler window.

ah, i see! well, i can confirm here looking at the profiler info, it says present wait is "unsupported" however after i enabled tripple buffering through the config file it definitely seems to have worked, my frame rate is no longer capped at 30 on vulkan with vsync. honestly? i'm pretty lost XDDD

KayLilac avatar Apr 07 '25 14:04 KayLilac