Visual framerate does not match reported framerate

Need help running G/Q/ZDoom/ECWolf/Zandronum/3DGE/EDuke32/Raze? Did your computer break? Ask here.

Moderator: GZDoom Developers

Forum rules
Contrary to popular belief, we are not all-knowing-all-seeing magical beings!

If you want help you're going to have to provide lots of info. Like what is your hardware, what is your operating system, what version of GZDoom/LZDoom/whatever you're using, what mods you're loading, how you're loading it, what you've already tried for fixing the problem, and anything else that is even remotely relevant to the problem.

We can't magically figure out what it is if you're going to be vague, and if we feel like you're just wasting our time with guessing games we will act like that's what you're really doing and won't help you.
User avatar
Caligari87
Admin
Posts: 6196
Joined: Thu Feb 26, 2004 3:02 pm
Preferred Pronouns: He/Him

Visual framerate does not match reported framerate

Post by Caligari87 »

So this is going to be sticky since I'm not sure how I can "reproduce" it in a verifiable manner. I can try to record a video later and see if it properly illustrates the issue.

Relevant info:
  • cl_capfps = false
  • vid_maxfps = 120 (double my refresh rate)
  • vid_vsync = off
  • Linux Mint 19, Cinnamon Edition
  • nVidia GTX1070 (8GB VRAM)
  • Driver version 415.27 (as reported by nvidia-smi)
  • Intel Core i7-3770
  • 16GB RAM
  • Multiple GZDoom stable versions
In short, GZDoom's reported framerate does not match what I see on my screen. The FPS counter says I'm usually hitting a consistent 120, but visually it seems to fluctuate between 40-50 in most circumstances. I've tried:
  • Enabling vsync
  • toggling page flipping in nvidia-settings
  • toggling sync to v-blank in nvidia-settings
  • forcing composition pipeline in nvidia-settings
  • Using a different desktop environment / compositor (OpenBox and i3)
None of the above seem to help. This only seems to happen with GZDoom. Other games look smooth at 60+ FPS (limit of my monitor refresh). I've mentioned this in Discord before, and I seem to recall something about the GZDoom FPS counter being known inaccurate for some reason, but I can't recall. The recommended step at the time was changing my desktop compositor, which didn't really improve things.

8-)
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49194
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Visual framerate does not match reported framerate

Post by Graf Zahl »

What happens if you disable vid_maxfps and enable vid_vsync?
dpJudas
 
 
Posts: 3147
Joined: Sat May 28, 2016 1:01 pm

Re: Visual framerate does not match reported framerate

Post by dpJudas »

Last time I tried GZDoom on Linux is ran rather uneven exactly like you describe. High frame rates yet somehow the visual output is not. At the time I figured it was a problem with my Linux setup, but I didn't try it with any other OpenGL program/game to confirm that.

As for the FPS counter, it is somewhat inaccurate due to the two points in time it is measuring between (making it look like a frame rate is less stable than it actually is), but it wouldn't be so off that 45 fps could ever be printed out as 120.

What is more likely is that it renders a lot of frames really fast, then there's a single frame occasionally that takes forever.
User avatar
Rachael
Posts: 13856
Joined: Tue Jan 13, 2004 1:31 pm
Preferred Pronouns: She/Her

Re: Visual framerate does not match reported framerate

Post by Rachael »

Another thing to consider is that X11 is an indirect renderer.

GZDoom may well be pushing as many frames as it says, but your desktop environment might not be seeing it. The only way to fix that is to disable Window composition.

@Cali - you use Linux Mint, right? You can't disable composition on the Cinnamon environment, as far as I know - however, you can install Openbox and log in using that, instead. The frame rate should be a lot faster because Openbox does not include composition by default (it has to be enabled by a separate program).

One thing that might speed up composition at the very least is if you close some windows. If you're like me you have between 10-20 windows open at a given moment. That might be a bit shitty for X.

Another thing you can do - but this works for fullscreen only - is to skip X entirely - run GZDoom in one of the switchable terminals (ctrl-alt-f1 to f6, f7 should be your X server) - and run it there. However, I've had mixed experiences with getting this kind of a setup to work. Be prepared to SSH into your box remotely if you try this - you might have to force kill the process.

Return to “Technical Issues”