Poor mans G-Sync/Freesync

I remember an old thread over at nogripracing where people discussed how to achieve smooth gameplay with minimal input lag in rFactor and what gave the best results was Vsync ON and cap the framerate to your monitors frequency -1. But this would give you a skipped frame once every second so it turned most people off.
Now with new technology we can cap the framerate at a much higher precision (down to 3 decimal points) which in theory will eliminate this problem.

I came across a thread browsing the guru3d forums last night and a guy named RealNC made a great guide on the subject.

Credit goes to RealNC over at guru3d.com
Here is the actual thread https://forums.guru3d.com/threads/the-truth-about-pre-rendering-0.365860/page-12#post-5380262
I highly recommend reading the entire thread for more insight.

You want to use RTSS (Riva Tuner Statistics Server) to cap your framerate as it's the only tool (that I know of) that have sub ms accuracy.

Ok here we go!

---------------------------------------------------------------------------------------------------------------------------------

Vsync does not actually cap the frame rate. This is a popular misconception about vsync. What it does is syncing the output of new frames to the monitor's "vblank" signal (the point between the monitor having finished scanning out the current frame and is preparing to scan out the next.) The frame rate not exceeding the refresh rate is just a side effect of that. There's no actual frame capping involved.

Because there is no frame cap, the game is preparing new frames as fast as it can. Once all possible frame buffers and all pre-render queues have been filled, only then will the game stop queuing more frames to be displayed. That means when all these buffered and queued frames are displayed later on, they're based on old input. Meaning input lag.

Setting pre-rendered frames to 1 means less queued work is waiting to be processed. The game stops trying to output more frames sooner. Meaning you get less input lag. However, this doesn't help with queued frames that have already been rendered but have accumulated in the output buffers. You still get more input lag that needed.

You can fix this issue by using a frame cap that's set at almost the exact same value as your refresh rate. Something like 0.01FPS below refresh rate works fine (RTSS is accurate enough to allow for this kind of frame limiter accuracy.) Note that "0.01" is just a ballpark number. Anything between 0.007 and 0.015 or so should work fine. Too low and the trick doesn't work anymore, too high and you get repeated frames that result in "hiccups".

Please note that all this is for vsync. You don't need to do any of this when using G-Sync or FreeSync. For those two sync methods, just cap to 3FPS below your refresh rate and you're done! Also note that all this also doesn't apply to vsync off. This guide really, really is just for non-gsync, non-freesync monitors with vsync enabled. (Or if you for some reason disabled gsync/freesync on your monitor and want to use plain vsync.)

Step 1: Find out your real refresh rate

Nope, your real refresh rate is in the majority of cases not 60 nor 59. It's usually fractional. Most monitors use 59.94Hz for "60Hz" and 119.982Hz for "120Hz". You can detect your real refresh rate on these sites:

http://www.testufo.com/#test=refreshrate
https://www.vsynctester.com

Let the test run for a while (around 2 or 3 minutes should be enough.) Do not run both tests at the same time. Do not have any background tasks running.

If both sites give you results very close to each other, then you can be confident that the number you got is pretty accurate and very close to your real refresh rate.

It's important to use a browser that works (Chrome and Firefox should be OK), and that if you're using Windows 7, Aero must be enabled (the test needs Aero's vsync in order to detect your refresh rate.) You also need to make sure that GPU acceleration is enabled in your browser, otherwise you'll get wrong results.

You only need the first three decimals of the detected number. If the result is something like "59.940875" for example, you can consider "59.940" as the important part for simplicity.

Step 2: Use RTSS's new fractional frame cap feature

Unless you're using a very old RTSS version (so please make sure you have a recent version) you can set a denominator for the frame cap. For a 59.940Hz monitor, you'd cap to 59.930FPS (59.940 - 0.01 = 59.930). For a 119.982Hz monitor, you'd cap to 119.972FPS (119.982 - 0.01 = 119.972).

Do do this, you need to edit the profile file of RTSS (to set this globally, you need to edit the "Global" file inside the "Profiles" folder of your RTSS installation directory.) There's no GUI for this. For a 119.972FPS cap, you would need this in the profile file:
Code:
[Framerate]
Limit=119972
LimitDenominator=1000

For a 59.930FPS cap, you'd use:
Code:
[Framerate]
Limit=59930
LimitDenominator=1000

Step 2 different method: Using CRU

Instead of using a fractional RTSS frame rate limit, you can instead continue using the default frame cap, but instead modify your monitor's refresh rate slightly. You can do that using CRU:

https://www.monitortests.com/forum/Thread-Custom-Resolution-Utility-CRU

For example, if you want to cap to 60FPS, modify your 60Hz mode to 60.01Hz. For 120FPS, modify your refresh rate to 120.01Hz. Please note that it's usually not possible to get exactly that number! Again: 0.01 is just a ballpark number. If 60.01Hz or 120.01Hz are rounded off by CRU to 60.008 or 60.012 for example, or 120.009 or 120.013 in the 120Hz case, that's fine! Just use a number between 0.007 and 0.015 and it will be fine.

The downside to using CRU for this is that you need to re-apply your edits every time you upgrade your GPU drivers. Fortunately that's easy since CRU has an "export" button where you can save your custom resolutions to a file and then use "import" after driver updates.

After you've edited and activated your tweaked refresh rate, you should now go to the refresh rate testing sites mentioned previously and verify that your new refresh rate actually works.

If all went well, you can now just cap normally with RTSS. For 60.01Hz cap to 60FPS, for 120.01Hz cap to 120FPS. Obviously you can do this for any refresh rate you want. Cap to 75FPS if you've added a 75.01Hz mode, 90FPS for 90.01Hz, etc. The only important part is that "0.01" difference.

Result

This will keep the pre-render and other frame buffers empty by stopping the game from rendering frames faster than your refresh rate. And empty frame buffers means no added latency due to buffering.

If you don't do the above, then setting pre-rendered frames higher than 1 will result in more input lag, and can result in bad frame pacing in some games.

And even if you do the above, setting this value to 1 still helps as a guard against temporary framerate fluctuations (no frame capper is perfect), giving a more consistent input lag value.

Keep in mind that all this requires a PC that's able to render frames fast enough. Since the above keeps render/frame buffers empty, it means there's no guard against frame rendering time spikes. If your PC can't maintain a solid 60FPS (or whatever your refresh is), then you might be better off not doing any of this.

If your PC is fast enough though, then this is an excellent way of minimizing vsync input lag and maximizing smoothness by having good frame pacing (meaning frame times that match your refresh rate.)
 
BTW, I wasn't aware of this until today, but in the past few betas, Rivatuner has added some more options to controlling vsync and/or tearing, most importantly a new "scanline sync" option that basically tries to lock the tearing position into place. It seems to require less than 70 % GPU usage to work correctly, though, so not for situations where you're nearing the limit of your GPU.

Some more info can be found here (contains links that contain links...I haven't read all of that myself):

https://www.resetera.com/threads/tearingless-vsync-off-now-possible-with-rtss-beta.51587/
 
Upvote 0
Hmmm...
I've been battling with some weird CPU spikes in Raceroom lately. Couldn't figure out what's going on, but pretty much by chance I've noticed it might have something to do with this. I've done some testing today and it seems that if I limit my framerate to less than 62 fps with vsync enabled, I get noticeably higher CPU usage (despite the framerate obviously not exceeding 60 fps due to vsync) compared with CPU usage I get with vsync off and uncapped (which is also pretty high - Raceroom's CPU usage seems to scale quite significantly with framerate). So if I cap my framerate to 59.94 as per this tip (my refresh rate is 59.95 Hz), I get around 20 % higher CPU usage compared to uncapped vsync. More so, it seems that in this state, if I turn my wheel, the CPU usage also spikes a lot, often reaching pretty much 100 % - this again goes away if I just remove the framerate cap or set it to 62 or higher.

In other words, it's all quite weird. Anybody care to test this to see if it's just my setup or if it's a universal thing with Raceroom?
 
Upvote 0
Very interesting!
Not really into Raceroom currently but I'll do a quick test tomorrow!
You say it's only with vsyn active? Otherwise it would be a lot easiert to test:
Figure out the fps value that hits the CPU limit and then limit there with riva tuner. If the fps drop down, it's Riva.
With vsync you need to find settings that hit the CPU limit and around 60-65 fps. 100 AI at the Nords should do the job though hehe! :p

I'll also try Assetto Corsa!

Could you share your on-screen-display settings? Vector 2D, 3D, Raster 3D etc. Just a screenshot :)
 
Upvote 0
I recently got a lot of stuttering after playing for about 10mins in Raceroom, but I disabled Win10 game hub in the settings and my stuttering disappeared. Very weird indeed! I don't know if it's got something to do with RTSS as I tried to close that and I still got stuttering.
 
Upvote 0
I need to do more tests on this myself. I like to be thorough, so it takes time, and I still don't exactly understand what am I seeing here. I did some recording to compare, but I'm not sure yet if I can trust the results, I need to verify it. But it seems it's not caused by Rivatuner or Afterburner - I've been getting these spikes in the past without running these and with limiting the framerate just through the nVidia drivers (via Inspector).
 
Upvote 0
I've tried to close Rivatuner and run Raceroom but that didn't work. I tried to uninstall afterburner and reinstall it again but no luck. I tried multiple different nvidia drivers, again, no luck. Lastly I disabled windows game mode and played in borderless windowed mode and my pc stopped getting stutters and lag.

Tested on both 1803 and 1809 win10. I had same issues on both. I will test raceroom on fullscreen with 411.70 driver. I'm on 399.24 now.
 
Upvote 0
So I did some tests with Raceroom, driving the WTCR Honda Civic around Imola (1 lap each) in practice mode without any AI. i5 2500k @ 4.5 GHz, GTX 970, Win 10. Without the game running, CPU usage was around 10 - 12 % (I had some stuff running in the background I couldn't close).

Please note that this is just what happens on my PC, I'm not saying this is what generally happens on every PC, that would obviously require way more testing on multiple PCs.

So:

Vsync off, no framerate cap - average 75 % CPU usage, spikes to over 90 %
Vsync off, framerate cap at 60 fps - average 55 % CPU usage, spikes to over 70 %
Vsync on, no framerate cap - average 35 % CPU usage
Vsync on, framerate cap at 59.94 fps - average 55 % CPU usage, spikes to over 70 %
Fast vsync on, no framerate cap - average 40 % CPU usage
Fast vsync on, framerate cap at 59.94 fps - average 55 % CPU usage, spikes to over 70 %

When it comes to input lag, vsync off and both versions of vsync on with cap at 59.94 produced no visible lag. This was followed by fast vsync with no cap, which produced moderate lag, and the worst was (unsurprisingly) vsync on without any framerate cap.

As for tearing, the only time it was visible was both the vsync off options, again quite unsurprisingly.

So basically it seems that capping the framerate at 59.94 causes the same CPU usage as if you just use vsync off capped at 60 fps, and that generates noticeably higher CPU usage than just uncapped vsync on. Which is kinda surprising to me - I would expect vsync on to be fairly equal to vsync off with 60 fps cap when it comes to CPU usage, but it doesn't seem to be so, using vsync seems to lower the CPU usage significantly. When we add input lag to the equation, it seems like the best option might be uncapped fast vsync.

All of the capped options also seem to generate random spikes to noticeably higher CPU usage that I can't really explain.
 
Upvote 0
Oh, and I've also tried running it without Afterburner/Rivatuner and limiting the framerate directly via the nVidia driver, and the results were exactly the same, if not worse.
 
Upvote 0
BTW, I wasn't aware of this until today, but in the past few betas, Rivatuner has added some more options to controlling vsync and/or tearing, most importantly a new "scanline sync" option that basically tries to lock the tearing position into place. It seems to require less than 70 % GPU usage to work correctly, though, so not for situations where you're nearing the limit of your GPU.

Some more info can be found here (contains links that contain links...I haven't read all of that myself):

https://www.resetera.com/threads/tearingless-vsync-off-now-possible-with-rtss-beta.51587/

I know this is kind of old but did not tried until today. I first though it was something similar to framerate limit. I found using scanline sync x/2 at 144hz results in 72 fps with almost no screen tearing and input lag very close to no-vsync. This on AC. On ACC for some reason uses 120hz, scanline sync x/2 runs at 60fps, resulting not as smooth as AC but still way less tear than no-vsync and input lag very close to it too. Big plus are the GPU is not overtaxed with unlimited fps, resulting also in more constant fps.

I finally found something that takes me closer to best of both worlds. Still need to do more in depth testing, but its looking good.
 
Upvote 0
Hi @Martin Fiala

On the same link you posted, I believe it was updated with new functionality for the scanline sync, which you can set to 2x and x/2 as well. https://www.resetera.com/threads/tearingless-vsync-off-now-possible-with-rtss-beta.51587/

5xAqv7l
https://imgur.com/5xAqv7l

An interesting thread about the topic

https://forums.guru3d.com/threads/requesting-scanline-sync-tutorial.423722/
 
Upvote 0
Ah right, I completely forgot about that. It's been a few months, and quite "interesting" ones at that. Sorry. (Plus it's not really useful to me with my 60 Hz monitor.)
 
Last edited:
Upvote 0
Yep, it comes handy if you have a high frequency monitor (144hz and up) and your video card cannot render at those high frequencies, which is my actual situation.
I could make ACC work now at 144hz, sls x/2, 70~fps, tearing still a bit noticeable but way smoother that fastsync and lag very close to no-vsync.
 
Upvote 0
I've been curious about how much this method actually helps so I did a test similar to what Niels Heusinkveld did in this video. I don't have a 120fps camera so 60 had to do.


And here are the results.
Code:
vsync    limit    latency
on       on       4
on       off      7
off      off      3
off      on       3

Looks like it only adds one frame (16.7ms) of latency. Totally worth it in my book, as I get a super smooth experience.

So I did some tests with Raceroom, driving the WTCR Honda Civic around Imola (1 lap each) in practice mode without any AI. i5 2500k @ 4.5 GHz, GTX 970, Win 10. Without the game running, CPU usage was around 10 - 12 % (I had some stuff running in the background I couldn't close).

Please note that this is just what happens on my PC, I'm not saying this is what generally happens on every PC, that would obviously require way more testing on multiple PCs.

So:

Vsync off, no framerate cap - average 75 % CPU usage, spikes to over 90 %
Vsync off, framerate cap at 60 fps - average 55 % CPU usage, spikes to over 70 %
Vsync on, no framerate cap - average 35 % CPU usage
Vsync on, framerate cap at 59.94 fps - average 55 % CPU usage, spikes to over 70 %
Fast vsync on, no framerate cap - average 40 % CPU usage
Fast vsync on, framerate cap at 59.94 fps - average 55 % CPU usage, spikes to over 70 %

When it comes to input lag, vsync off and both versions of vsync on with cap at 59.94 produced no visible lag. This was followed by fast vsync with no cap, which produced moderate lag, and the worst was (unsurprisingly) vsync on without any framerate cap.

As for tearing, the only time it was visible was both the vsync off options, again quite unsurprisingly.

So basically it seems that capping the framerate at 59.94 causes the same CPU usage as if you just use vsync off capped at 60 fps, and that generates noticeably higher CPU usage than just uncapped vsync on. Which is kinda surprising to me - I would expect vsync on to be fairly equal to vsync off with 60 fps cap when it comes to CPU usage, but it doesn't seem to be so, using vsync seems to lower the CPU usage significantly. When we add input lag to the equation, it seems like the best option might be uncapped fast vsync.

All of the capped options also seem to generate random spikes to noticeably higher CPU usage that I can't really explain.

Adding to the discussion...

Blur Busters has a comparison between different fps-capping tools: in-game (when available), RTSS, and Nvidia Inspector. Here's the link: https://www.blurbusters.com/gsync/gsync101-input-lag-tests-and-settings/12/

Some of the observations regarding the Riva Tuner option in the article are quite interesting. The first one is that RTSS limits the framerate at the CPU level, which might explain the spikes in CPU usage Martin Fiala noticed in his tests. The second one is that it introduces 1 frame of input lag, maybe the one Martin Vindis measured above the no Vsync case. And this last one makes me wonder what the result would be input lag-wise if the in-game frame limiters were used instead...

Anyway, excelent topic!
 
Upvote 0
This website shares informative content. Thank you for sharing. Nice content. Keep it up. You should also double-check the integrity of your monitor cable. A damaged monitor cable may cause monitor ghosting; in this case, replace the monitor cable and test to see if the problem persists. If you want to know how to fix the monitor ghosting problem then go through this article to get information on What Is Monitor Ghosting and How to Fix It?
 
Upvote 0
Back
Top