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

Stutter at high frame rates #2354

Open
spoty123 opened this issue Jan 21, 2024 · 13 comments
Open

Stutter at high frame rates #2354

spoty123 opened this issue Jan 21, 2024 · 13 comments
Labels
bug documentation triage Needs a preliminary assessment to determine the urgency and required action

Comments

@spoty123
Copy link
Contributor

spoty123 commented Jan 21, 2024

What happened?

The game stutters when running at frame rates above ~140 fps, forcing players with (high-end) PCs to limit their fps via external software.

I'm aware that disabling the audio frame limiter via the FiveM settings should fix this issue, but it doesn't.

Expected result

The game should not stutter at high frame rates.

Reproduction steps

  1. Launch FiveM with a PC which is capable of running GTA 5 at a framerate higher than ~140.
  2. Join any server (without any "frame consuming" scripts that would lower your fps below ~140)
  3. Your game should now stutter pretty frequently while playing.
  4. Limit your fps to 140 or below via an external software and the issue should now be "resolved".

Importancy

There's a workaround

Area(s)

FiveM

Specific version(s)

Not specific (to my knowledge)

Additional information

Please let me know if any additional data could be provided.

@spoty123 spoty123 added bug triage Needs a preliminary assessment to determine the urgency and required action labels Jan 21, 2024
@Vivi4n
Copy link

Vivi4n commented Jan 21, 2024

Hi @spoty123,

This has already been addressed in a commit a while ago tied to g_audUseFrameLimiter.

frame limiter

You might be able to find more info here as well:

bool g_audUseFrameLimiterConVar;

Essentially would just be a bug in the base game causing stutters at a higher FPS.

@spoty123
Copy link
Contributor Author

spoty123 commented Jan 21, 2024

Hi @Vivi4n,

As I've stated in the initial message, this specific setting currently doesn't solve the issue.

@mcNuggets1
Copy link

I have the same issue with my pc, have to limit to 144

@blattersturm
Copy link
Contributor

blattersturm commented Jan 21, 2024

I can't reproduce this - even at 187 FPS (or even 200+, with synchronous audio toggled) I'm not experiencing this. Can you upload a trace of the issue occurring?

@FlawwsX
Copy link

FlawwsX commented Jan 21, 2024

Apparently, this is linked to monitor refresh rate.

I get this on both of my monitors, one being 165hz and the other 144hz.

@mcNuggets1
Copy link

mcNuggets1 commented Jan 21, 2024

I

Even happens in default GTA Online or GTA V.
I've tested it with running default GTA V (no FiveM) and running with 180~ fps I've encountered 0.5s-1s lags every few seconds.
With capping it to 144, it solves this problem completely.

It is related to monitor hz rate. That is true.
If you have a 120 fps < monitor, you won't encounter this problem much.

There was a reddit thread about it, with the solution being limiting fps.

@xDope7137
Copy link

This can be only reproduced if you have two or more monitors with different refresh rates + windowed borderless.
Once your graphics card reaches 90% usage, it will stutter for 1-2 seconds every 60 seconds or so.

Looped threads in scripts dont help.

I had a full video demonstrating this issue but I lost it somewhere. It was pretty bad for me.

@blattersturm
Copy link
Contributor

This sounds like something that'll be fixed in Windows 11 24H2 whenever it releases as it has a lot of graphics subsystem improvements including native support for monitors with different refresh rates.

Still a curious issue however...

@gottfriedleibniz
Copy link
Contributor

@spoty123 do the above points on multi-monitors + multi-refresh-rates apply to you?

Another subset of this problem was posted on the forums: https://forum.cfx.re/t/fivem-recursive-freezes-hitching-on-clients/4923060/17 and your trace exhibits many similar properties as the one posted there. Things here are a bit difficult to confirm ... and debug for that matter.

@spoty123
Copy link
Contributor Author

spoty123 commented Feb 8, 2024

Hi @gottfriedleibniz, thank you for the response.
That's correct, the "tested setup" I could repro it on is a dual monitor, one with 240Hz and one with 170Hz.
(Note that the trace I sent did not come from said "tested setup")

@gottfriedleibniz
Copy link
Contributor

gottfriedleibniz commented Feb 10, 2024

Until those 24H2 changes arrive, it would be quite nice to get this issue documented somewhere given how frequent it seems to be reported.

Note that the trace I sent did not come from said "tested setup"

Ah. Would you happen to know if that trace came from a similar setup (multi-monitors, etc)? Otherwise, that forum thread contains some relevant insight.

@gottfriedleibniz gottfriedleibniz added documentation triage Needs a preliminary assessment to determine the urgency and required action and removed triage Needs a preliminary assessment to determine the urgency and required action labels Feb 10, 2024
@spoty123
Copy link
Contributor Author

Would you happen to know if that trace came from a similar setup (multi-monitors, etc)?

Hi @gottfriedleibniz, I just checked and the answer is yes,
that setup has two monitors, one 165Hz and the other 144Hz.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug documentation triage Needs a preliminary assessment to determine the urgency and required action
Projects
None yet
Development

No branches or pull requests

7 participants