Stable frametime on Retroarch?

Hey, late reply, I know, but I tried limiting my FPS in NVCP to 3 fps below my refresh rate on my new TV (120 hz) to 117.

This results in my games in retroarch to play at 57/58 fps instead of 60, which introduces all the issues I previously described.

So it really seems that limiting the fps is a bad idea in general with emulators. Unless I’m still doing something wrong.

Why not set the limit to 120fps then? Or 60 or 61fps? Can’t you adjust the limit depending on what you’re running? Limiting frames isn’t only about getting the lowest possible latency by not being V-Sync’d. Some users simply use frame Limiters as a means of ensuring the best possible consistency, the smoothest possible gaming experience and keeping their GPU’s thermal performance and available headroom in check.

Well if that happens, no one is forcing you to play that way or leave it like that.

I don’t agree with that conclusion and I have no issues whatsoever regarding latency or frame pacing. What you might be doing wrong is trying to set a global limit for playing variable framerate PC games at the lowest latency possible and using that same philosophy for fixed framerate games running on an emulator.

Sometimes you need to adjust your settings to fit different scenarios. I’m not telling you how to use your machine or set things up. I am just sharing what works and has worked for me for years. Your mileage may vary but why make blanket and concrete sounding statements on the topic as if everyone is supposed to do things the same way?

In Nvidia control panel and the Nvidia App you can setup profiles for different apps. You can also do that using RTSS.

Some have discouraged the use of frame limiters in RetroArch due to RetroArch having its own frame pacing mechanisms while others have criticized the frame pacing in RetroArch or lack thereof.

I use what works for me and I’m happy with my experience. You now have enough information to choose how you want to go about your own setup.

Thx for the detailled reply @Cyber . I get that I need different solutions for different scenarios. That’s what I’ve been doing all along. I was just asking out of curiosity, because I’m not very knowledgeable about these things.

To recap, OP stzarted this thread saying:

“Hi folks, here are my settings regarding video in RA. I have an LG CX which is 120hz with VRR, I have capped it to 117 with Rivatuner as advised in various places for GSynch to perform best with my RTX 3070ti.(VSync is disabled in the NVidia app)”

That led me to write:

“I thought you were never ever supposed to hard cap the framerate for emulation. Whenever I tried this, the game would feel slowed down and choppy. […] Why would anyone cap max frame rate to 3 fps below max for emulation?”

To which you replied:

“I don’t see a problem once it’s at or above the framerate of the content or at or below the refresh rate of the display.”

This led me to believe that if I had a display that went above 60hz (which I now have) I could limit the max fps to 117 (like OP suggested), and not get the slowdowns in Retroarch.

But I’ve just confirmed that the slowdowns still happen, and I don’t see why they wouldn’t happen to OP as well.

So my original question still stands: Why would anyone cap their max frame rate for emulators like retroarch that seem to depend on an uncapped frame rate to run properly?

RetroArch doesn’t depend on an uncapped frame rate to run properly.

Most Retro games that were designed to run on CRT TVs run at or near 60fps. Setting an fps limit above that shouldn’t cause it to not work properly but you would lose any benefits of capping your framerate at the content fps would provide.

If using subframes for things like BFI or CRT Beam Simulator then you shouldn’t set a frame limit below the 120fps that it requires to work.

It’s very possible that you and the OP have been other settings which are the issue.

I posted my settings already but it is imperative to click on the “Set Display Reported Refresh Rate”.

@Cyber You say “RetroArch doesn’t depend on an uncapped frame rate to run properly.”

Then there is something fundamental that I don’t understand. Let me give a concrete example of what’s happening on my end:

If I start Mario Kart 64 with the mupen core and leave the NVCP frame limiter disabled, I get the game running normal at full speed. Retroarch reports 60fps once the game is launched.

Now let’s say I limit the the max fps in NVCP to 60 fps:

This will make Mario Kart 64 run at half speed. Retroarch reports 30fps.

So on my end, limiting the fps globally even by 1 frame below the refresh rate, will cause slowdonws in Retroarch. If I limit it to 60 fps (half my refresh rate) I will get the game running at half speed.

Does Retroarch behave differently for you?

Could you take a look at my settings and tell me if there is something wrong, please?

1 Like

Okay, I’m seeing some potential issues here:

I would disable Background Application Max Frame Rate if I were you, at least temporarily.

Same goes for Low Latency Mode. I don’t have that setting in my nVidia Control Panel but I know some of those “recent” latency reducing techniques discard frames which wouldn’t otherwise be seen by the user and stuff like that. So they interfere with frame pacing and are more geared towards variable frame rate PC games and not fixed frame rate games, where you want each and every frame to be presented and seen.

In RetroArch, VSync Swap Interval should be set to either Auto or 2 when running 60Hz content with the display refresh rate at 120Hz. Definitely not 1. Auto should be the safe bet.

If you’re after better latency, you can try lowering your Max Swapchain Images from 3 to 2.

I temporarily disabled RTSS frame limiter and tested the Nvidia frame limiter and both worked fine.

I had previously posted my settings but in case you missed them. Here they are:

1 Like

If you set the frame limit below 60, RetroArch’s vsync is going to drop it down to 30 FPS, yes, because it will miss every other swap.

1 Like

Thank you for your suggestions. I found the problem.

Turns out when Low Latency Mode in NVCP is set to “Ultra”, the issue I described occurs (“On” is fine).

Now I can set the global fps to 117 and don’t get slowdowns. However, I’m too inexperienced to tell why this is happening or which setting I should choose.

Should I leave global max frame rate at 120 fps / uncapped and leave Low Latency Mode on Ultra or should I disable Ultra and set global max frame rate at 117 fps? What would you suggest?

Also, I saw that you enabled adaptive Vsync in your settings. What does that do? I believe I read somewhere, that adaptive Vsync should not be used with Gsync. Don’t know why, though.

EDIT:

Limiting max frame rate to 120 fps (not uncapped) and leaving Low Latency Mode on Ultra also works.

Again don’t know why, don’t know what is the best setting. Setting up Gsync is really complicated when it comes to PC games. It’s even more complicated when emulators are involved.

1 Like

Great! I’m glad you sorted that out. Hopefully the OP can get their issues sorted out as well.

There are application profiles in NVCP and the Nvidia App. You can use them to set what’s optimal for specific scenarios like RetroArch.

It’s supposed to do what it says in the subtext - Disable VSync when the framerate can’t keep up with the refresh rate to avoid normal VSync behaviour, which is to drop it to half the framerate.

I suppose you’re right in that it might be redundant when using GSync. I’ve had no issues with it on though. I use VSync more so that games can run at their native refresh rates (Sync to content refresh rate) and to get better latency and not having to use frame delay because the frames are supposed to be immediately ready for presentation or something like that.

I’m not really thinking of using it to avoid large quantization drops to half the framerate as one who is playing variable framerate games would.

In my experience enabling GSync doesn’t completely eliminate tearing 100% of the time but VSync does this.

But what IS the optimal setting for Retroarch? LLM off and max frame rate cap to 117?

I found this forum post, which suggests that if the hardware is strong enough to run the game reaching the frame cap, LLM off is better. For other scenarios LLM Ultra is better. At least that’s what I think I understood. Since retroarch will in most cases reach the frame cap, LLM off should be better: https://forums.blurbusters.com/viewtopic.php?t=13642

But I think I could just leave LLM on Ultra and cap the frame rate at 120 fps, since that’s what works right now.

Stop confusing yourself and obsessing over low latency. In the past decade, I’ve seen year after year techniques for reducing latency and I personally am not a competitive gamer and I think most of them suck.

I don’t even care that GSync allows you to dip below 60fps while keeping things smooth. Give me all 60 of my frames every second please. I value consistency and in general 60fps is fine for me. I don’t want to spoil myself by getting hooked on 120Hz/fps+ then not be able to go back and have to keep spending more and more chasing my tail.

If you read over everything I posted over the last couple days you’ll see that I’ve posted my settings which I think are optimal for me in RetroArch. I already commented on your settings, including Ultra Low Latency Mode. So you can take all of that and make a profile with recommended settings in NVCP for RetroArch.

You can leave the ULL stuff in the global settings for variable framerate PC gaming.

1 Like

For Retroarch there is no need for frame limit. This is mostly for 3D games running above 60 fps. On Nvidia settings I have:

Max Frame Rate: off

Preferred Refresh Rate: application controlled

Vertical Sync: use 3d application setting

So Retroarch display the proper monitor refresh rate (100 in my case instead of 97)

There’s no need to cap the frame rate. It’s likely the frame rate limiting function is eating into the time margin per frame and leading to stuttering. ULL should work fine with RA. I use ULL globally.

I never used frame cap before. I was just curious that OP uses frame cap and why they don’t get the slowdowns I get when I enable frame cap.

Hey I disabled the global frame cap as it didn’t make much sense unless I was playing only pc games like Hades that easily reach the max frame rate without graphic settings trade offs and it wouldn’t make sense with a vrr display anyways since I can also play at 100 FPS for example and keep higher graphic settings. So I cap FPS on a game by game basis now.

So now for Retroarch I use 60 FPS cap via the Rtss capping option and it works great, frame time is perfectly steady now, just probably going to be bad for pal games limited to 50 FPS or other games limited to 30 FPS though. The Retroarch arch menu feels sluggish though at 60 FPS but I guess there’s not way around that. I removed the auto run ahead game and vsync.

1 Like

There are systems that run higher than 60 fps. I would cap to 61 for NES/SNES or 70 if you use DOSBOX.

1 Like

No Frame Limiter:

RTSS Frame Limiter at 60FPS:

RTSS Frame Limiter at 61FPS:

Seeing that different games and different systems operate at different sometimes non-standard (for modern displays) refresh rates, and system wide frame limiters only seem to offer custom profile granularity down to the application level (not different cores or games within a single app as with ReroArch).

I propose that RetroArch needs its own built-in frame limiter, which would operate in conjunction with the Sync To Content Refresh Rate Feature and set the appropriate frame limit to match the content refresh rate automatically.

While Sync to content refresh rate and VSync already offer relatively constant FPS, when a frame time graph is analyzed, it tends to show lots of inconsistency from frame to frame, within each frame.

This means that there is room for improvement in the emulation experience as these inconsistencies can sometimes affect gameplay and be seen, for example during sprite flickering effects which don’t look right.

RTSS Frame Limiter at 60FPS:

No Frame Limiter:

RTSS Frame Limiter at 54FPS:

RTSS Frame Limiter at 54FPS:

no Frame Limiter:

RTSS Frame Limiter at 53FPS:

RTSS Frame Limiter at 53FPS:

@hunterk, @Tatsuya79, @BarbuDreadMon, @MajorPainTheCactus

Is there any chance that we could get a built-in frame limiter so that we can have per game frame limiting and improved frame timing consistency based on the original frame/refresh rate of the content?

Currently if we have to use external frame limiters, they can only be applied to an entire application at a time, whereas for things to work optimally we would need to apply different limits to different content within RetroArch.

Have you compared frame time consistency with audio synchronization off?

1 Like

I don’t think a frame limiter is quite right/necessary, but I have actually been working on a busyloop model that should do basically what you’re wanting. I’ve replaced the threaded video functionality in this fork, if you can build and test it: https://github.com/hunterk/RetroArch (that is, for now, you would turn on ‘threaded video’ in the settings, but I completely re-worked what the setting actually does)

The goal for this was, after talking to blurbusters Mark, he was saying that at very high refresh rates, RetroArch’s frametimes aren’t consistent enough for un-flicker-y beam-sim effects, so one of the solutions would be to break the video presentation off to another thread that is decoupled from the content and is instead throttled by the swap timing.

My implementation there is a bit naive in that it doesn’t talk to the individual drivers to get the most precise times (e.g., via that new vulkan extension from Themaister and co. that was just merged into Mesa drivers), but it should theoretically be an improvement over the existing method as far as frametimes are concerned.

I don’t have a good setup for testing that sort of thing, though, and I’m not sensitive enough to it to tell just by looking, so I’ve been waiting for testing/feedback of this initial work before going any further with it.

3 Likes