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

Very bad FPS stability. #27211

Closed
simpleyo opened this issue Mar 18, 2019 · 29 comments · Fixed by #33414
Closed

Very bad FPS stability. #27211

simpleyo opened this issue Mar 18, 2019 · 29 comments · Fixed by #33414
Labels

Comments

@simpleyo
Copy link

simpleyo commented Mar 18, 2019

Godot version:
Godot_v3.1-rc3_win64
Godot_v3.1-stable_win64

OS/device including version:
Windows 7 Ultimate x64
Ryzen 7 1700.
Radeon RX 550 with newest drivers.
Benq 2460HM connected with HDMI cable.

Issue description:
Running a simple project (like TestFPS) in the editor (or exported for windows desktop debug or release), the fps fluctuate persistently between 50 and 60. This makes the sprite (which moves one pixel horizontally per frame) not move smoothly. If the window is minimized the fps reach the value of 125 and remain fixed there. If the window is completely covered, but not minimized, the fps reach the value of 60 and remain fixed there.

Minimal reproduction project:
TestFPS.zip

test

@qarmin
Copy link
Contributor

qarmin commented Mar 18, 2019

I have almost always stable 60 fps on Linux Mint 19 HD 3000

Can you try to update Godot version to stable and if it is any difference?
Which graphics card do you have? Try to install the newest possible graphics driver.

@simpleyo
Copy link
Author

simpleyo commented Mar 18, 2019

I have tried with Godot_v3.1-rc3_win64 and and Godot_v3.1-stable_win64 and the same thing happens.
I have a Radeon RX 550 with newest drivers.

@girng
Copy link

girng commented Mar 18, 2019

gtx 950, windows 10 here. stable 144 fps, can't reproduce

what is your CPU?

@rogeriodec
Copy link

I've tried with 3.1 official in a Windows 10 x64 / NVIDIA GeForce GTX 1060 6GB, I got 60 fps almost all the time.
But the visual is not completely smooth.

@simpleyo
Copy link
Author

gtx 950, windows 10 here. stable 144 fps, can't reproduce

what is your CPU?

Ryzen 7 1700.

@girng
Copy link

girng commented Mar 18, 2019

try speed * delta (for smoothness)

@simpleyo
Copy link
Author

simpleyo commented Mar 18, 2019

try speed * delta (for smoothness)

The problem is the instability of FPS. Trying to put solution to the lack of smoothness of the sprite does not solve the instability of fps. The sprite is only to show the instability of fps.

It is not reasonable that, with such a simple project, fps fluctuate so much. There must be a bug somewhere.

@simpleyo simpleyo changed the title Very bad FPS stability. Impossible to move a sprite smoothly. Very bad FPS stability. Mar 18, 2019
@Calinou
Copy link
Member

Calinou commented Mar 18, 2019

See Fixing jitter and stutter in the documentation. This is expected on Windows if the project runs in a window, but should be much less apparent when running the project in fullscreen.

@simpleyo
Copy link
Author

simpleyo commented Mar 18, 2019

I have been testing and FPS instability do not happens using GLES2 renderer (with Radeon RX550).
I have also tried to change the graphic card (HD5770) and FPS instability do not happens (using GLES3 or GLES2). The trinity GLES3, RX550, godot is what seems to be failing somewhere.

@simpleyo
Copy link
Author

simpleyo commented Mar 18, 2019

See Fixing jitter and stutter in the documentation. This is expected on Windows if the project runs in a window, but should be much less apparent when running the project in fullscreen.

I do not agree with that. It is not reasonable that, with such a simple project, fps fluctuate so much. What information do you rely on to be able to say that it is expected on Windows if the project (a really simple project) runs in a window?

@girng
Copy link

girng commented Mar 18, 2019

I have been testing and FPS instability do not happens using GLES2 renderer (with Radeon RX550).
I have also tried to change the graphic card (HD5770) and FPS instability do not happens (using GLES3 or GLES2). The trinity GLES3, RX550, godot is what seems to be failing somewhere.

imo, most likely an edge case with those specific drivers, for that card..
might have to wait for lead devs to take a stab at it, however, not sure if they have your specific hardware.
also, if someone who has the RX550 and is on Windows 10, and the fluctuation doesn't happen, it could be isolated to Windows 7?

@Akira1San
Copy link

Tested it, got 75 stable in window and fullscreen. But if i change the settings to: render - threads to Multi-Threaded and i see jumpings and the fps is not stable..

@Zireael07
Copy link
Contributor

@simpleyo are you using multi-threaded?

@simpleyo
Copy link
Author

simpleyo commented Mar 19, 2019

@simpleyo are you using multi-threaded?

No.

@Zylann
Copy link
Contributor

Zylann commented Mar 19, 2019

Wild guess: what happens if you add the following scene as child of your root? (nevermind what it does, check your fps)
emitter.zip

Also, did you try with Godot 3.1 stable?

@simpleyo
Copy link
Author

simpleyo commented Mar 19, 2019

Wild guess: what happens if you add the following scene as child of your root? (nevermind what it does, check your fps)
emitter.zip

Also, did you try with Godot 3.1 stable?

I just tried it (with Godot_v3.1-rc3_win64 and Godot_v3.1-stable_win64.exe) and the fluctuations are still there.

If I use the GLES2 renderer the fluctuations are gone and the particles too.

@simpleyo
Copy link
Author

simpleyo commented Mar 19, 2019

I tried it in Linux (Ubuntu 18.04.1 with the same hardware) and there is no FPS instability (GLES2 and GLES3). Using the Zylann project, particles are not showing when using GLES2.

@Zylann
Copy link
Contributor

Zylann commented Mar 19, 2019

@simpleyo I was trying to see if you were affected by driver shenanigans such as those I found in a similar existing issue, where stressing it just enough makes it enter "fluid mode". It's ok if those particles don't show in GLES2 because they are GPU ones, GLES2 doesn't implement them.
There are various open issues about FPS instability and reactivity that are due to OS-specific graphics drivers themselves, or compositing performed by the windowing system, so it's problems that pops up often to almost never be resolved...

I assume turning v-sync off makes the fluctuation go away?

@simpleyo
Copy link
Author

simpleyo commented Mar 19, 2019

There are various open issues about FPS instability and reactivity that are due to OS-specific graphics
drivers themselves, or compositing performed by the windowing system, so it's problems that pops up
often to almost never be resolved...

I assume turning v-sync off makes the fluctuation go away?

Yes, the problem appears when v-sync on and only when using GLES3 renderer (not with GLES2). It may be due to the RX 550 drivers but it may also be that it is not. If the problem only appears with the RX550 (which I do not know) then it is very likely that the drivers are the culprits.

@simpleyo
Copy link
Author

simpleyo commented Mar 19, 2019

I've tried it with Windows 10 and there's no instability of the fps. The problem happens specifically with Windows 7, RX550 and GLES3.

@Megalomaniak
Copy link

Megalomaniak commented Mar 20, 2019

Have you made sure that Radeon chill and any other variable frame rate controlling settings in AMD's Radeon Settings are off? Note that you should be able to add the game engine and runtime as specific applications to control each individually. Downside is you would likely have to create a new profile for each exported game.

Edit: I have a RX 470 and Ryzen 1600 CPU, but currently not in the same system, I'll see about moving the GPU over to the system hopefully sometime this week and run your test project to see what I can find.

@simpleyo
Copy link
Author

Have you made sure that Radeon chill and any other variable frame rate controlling settings in AMD's Radeon Settings are off? Note that you should be able to add the game engine and runtime as specific applications to control each individually. Downside is you would likely have to create a new profile for each exported game.

I was trying several combinations and the result was always the same.

@Megalomaniak
Copy link

Couldn't replicate on Ryzen 5 1600 and RX 470. Using Radeon's adrenalin-2019-edition-19.2.3-feb25 driver.

@girng
Copy link

girng commented Mar 25, 2019

@Megalomaniak OS, Windows 10 I assume?
If so, then yeah this is Windows 7 only

@Megalomaniak
Copy link

Megalomaniak commented Mar 25, 2019

I'm also running windows 7(64bit).

In the console output the only fluctuation I saw was from tabbing out to close the full screen, in windowed mode I had 60 constantly.

@girng
Copy link

girng commented Mar 25, 2019

@Megalomaniak Oh really? Hmm...

@Megalomaniak
Copy link

Megalomaniak commented Mar 29, 2019

Maybe a monitor difference? Probably not since you seem to be looking at the fps numbers in output too. Specific to the RX 550 then perhaps?

@TerminalJack
Copy link
Contributor

This might be the same problem discussed over in this thread. See this comment for a possible solution.

I tried your project with both the latest alpha build (3.2 alpha2) and with a test build that has a fix for syncing via the Windows compositor and I could see an improvement with the test build. The project running under the alpha build would jitter slightly and the frame rate could be disturbed simply by moving the mouse around. The frame rate with the test build was very stable.

@Calinou
Copy link
Member

Calinou commented Nov 30, 2019

I'll close this issue as it appears to be a duplicate of #19783. Please test the builds containing @TerminalJack's pull request: #33414

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet