1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Requesting Scanline Sync Tutorial

Discussion in 'Rivatuner Statistics Server (RTSS) Forum' started by StephenEnzor, Nov 2, 2018.

  1. RealNC

    RealNC Ancient Guru

    Messages:
    2,797
    Likes Received:
    1,080
    GPU:
    EVGA GTX 980 Ti FTW
    It will try and sync to a scanline rather than a time interval, and as such can reduce microstutter, which is important when using enhanced sync. Enhanced sync already has microstutter issues, and using a normal 30FPS RTSS cap will just make it worse. x/2 s-sync should make the microstutter more tolerable.

    It's much lower, at least compared to vsync without any FPS cap. 60FPS uncapped vsync can have 100ms or more of total latency. With s-sync and enhanced sync, you should be getting 60ms or less of total latency.

    However, you should be able to achieve the same input lag reduction using normal vsync with a "Hz - 0.01" cap. But I haven't tested. But s-sync + enhanced sync has better latency consistency. The -0.01 cap with vsync has the issue of latency oscillation, because the 0.01 cap will result in each frame being synced a bit later every time, so the sync position crawls across the screen from top to bottom, and so latency varies by 16.7ms over time. With s-sync + enhanced sync, this is improved and the latency does not vary as much, depending on how well RTSS can sync to the target scanline.

    Anyway, that's a bit too much detail to worry about, really. You should simply prefer what feels and looks best to you. If normal vsync with a -0.01 cap feels better to you, use that. If s-sync with enhanced sync looks better, use that.
     
    yobooh likes this.
  2. belmonkey

    belmonkey Member

    Messages:
    14
    Likes Received:
    0
    GPU:
    Rx 470
    @RealNC I'll try testing out 30 fps caps some more. So do you think there is an ideal sort of setup for 60 / 30 fps gaming with smooth frametimes, reduced / no tearing, and minimum input lag? This is what I had in mind from another post elsewhere:

    "60 fps: RTSS 60 fps cap + Enhanced / Fast sync* to reduce tearing.

    30 fps: RTSS 30 fps cap + in-game V-sync**.

    30 fps (old / non-demanding games) : RTSS 30 fps cap + Scanline Sync = -1***"

    Would something like this be accurate, or are there better settings for the smoothest picture with the lowest input lag?
     
  3. yobooh

    yobooh Master Guru

    Messages:
    223
    Likes Received:
    3
    GPU:
    Gigabyte 970 G1 @1500mhz

    1) 30 fps: RTSS 30 fps cap + in-game V-sync**. <-- This for me works but has highest Input Lag

    2) Nvidia Profile Inspector set 1/2 refresh rate Vsync + Max Pre Rendered frame=1 (for a bit reduced Lag)

    3) Just use Scanline Sync 1/2 alone with -5 / - 20 until you don't see tearing, best solution if GPU use below 80-70%
     
  4. RealNC

    RealNC Ancient Guru

    Messages:
    2,797
    Likes Received:
    1,080
    GPU:
    EVGA GTX 980 Ti FTW
    The perfect solution is a VRR display (FreeSync/G-Sync.)

    The next best solution is scanline sync, if the GPU doesn't get too much load and can't maintain accurate tearline positioning.

    Other than that, for 30FPS, 1/2 vsync with NVidia cards and a Hz / 2 - 0.01 RTSS cap is the third best choice. But as you can guess it's an NVidia thing. At least I'm not aware of AMD drivers having an option for 1/2 vsync. Sometimes refuses to work though; 1/2 vsync sometimes just doesn't want to apply correctly. Maybe driver bug.

    That always gave me some microstutter. If that's fine with you, then use it of course. I instead was using normal vsync with a Hz - 0.01 RTSS cap, which is perfectly smooth.

    This will give some microstutter. Cannot be avoided. To get rid of the microstutter, you need 1/2 vsync, which as mentioned above seems to be an NVidia-only setting.

    There is no such thing as "RTSS 30FPS cap + scanline sync" :) It's either a 30FPS RTSS cap or scanline sync.
     

  5. AsiJu

    AsiJu Ancient Guru

    Messages:
    5,548
    Likes Received:
    1,129
    GPU:
    MSI RTX 2070 Armor
    Hey this is great information! Was interested in s-sync but as OP wasn't sure how to start using it.

    Question: is there a limit to the number of invisible scanlines and if so, does the target wrap around back to top of the screen if you set too low a negative value?

    Also if I understood correctly, in theory:

    for best possible performance / tearline invisibility one would set flush to 0 and attempt to target the "lowest" negative scanline (to give "margin of error" for latching inaccuracy / tearline to remain off screen)?
     
  6. RealNC

    RealNC Ancient Guru

    Messages:
    2,797
    Likes Received:
    1,080
    GPU:
    EVGA GTX 980 Ti FTW
    You can see how many there are. I think you need to put this in the [OSD] section (NOT in the [Framerate] section) of the profile file:

    SyncInfo=1

    If it says for example 1200, and your monitor is a 1080p screen, then you have 120 invisible scanlines (1200 - 1080.)

    Yes. I think. Although why would you put such a low negative value? To wrap around in this case, you'd have to use -1200. That's way too much. You normally need something between -20 and -150.

    Performance is not affected by the scanline value.

    Flush 1 is actually the best setting, if the game uses DX10, DX11 or OpenGL. It stabilizes the tear line better without affecting performance. For DX9, DX12 and Vulkan games, you need choose between flush 0 and 2 (if you use 1, it's treated as 2), and 2 will result in stutter if you don't have enough GPU load headroom.
     
    AsiJu likes this.
  7. AsiJu

    AsiJu Ancient Guru

    Messages:
    5,548
    Likes Received:
    1,129
    GPU:
    MSI RTX 2070 Armor
    Thanks a lot!

    Asked about the amount of scanlines as per my idea to find the "lowest" one but if flush = 1 is best performancewise as well then I wouldn't need to find such a "low" scanline :)
     
  8. xvt

    xvt Member

    Messages:
    37
    Likes Received:
    0
    GPU:
    MSI GTX 1070 Z
    What's the expected behaviour of scanline sync regarding frametimes? Should it be all over the place?
     
  9. RealNC

    RealNC Ancient Guru

    Messages:
    2,797
    Likes Received:
    1,080
    GPU:
    EVGA GTX 980 Ti FTW
    Frame times should be exactly the same as a normal cap. If you're on a 60Hz monitor, scanline sync should have exactly the same frame times as a 60FPS cap. If that's not the case, then probably your GPU ran out of headroom for s-sync.
     
  10. xvt

    xvt Member

    Messages:
    37
    Likes Received:
    0
    GPU:
    MSI GTX 1070 Z
    Thanks for the reply.
    I'm having "jumpy" frametimes, no matter the GPU load.
    HPET was off in the BIOS and it normalized frametimes when I enabled it back while using the usual RTSS framerate cap, but no such luck with s-sync.

    My setup consists of a monitor with a custom refresh rate of 60.010Hz (I've been using your previous suggestion to great effect for a while now, thanks for that!) and leave in-game caps (if available) at 60 flat.

    Would the fact that my monitor is using an "odd" refresh rate such as 60.010Hz be affecting s-sync frametimes to some extent or decimal values have no impact on this method?

    The other method I've tried has been the one suggested here by Chief Blur Buster (tl;dr: fast sync+RTSS framerate cap+in-game vsync), but since I can't seem to be able to make an account in that forum, maybe you have an answer: does Maximum pre-rendered frames have any impact on this?
     

  11. RealNC

    RealNC Ancient Guru

    Messages:
    2,797
    Likes Received:
    1,080
    GPU:
    EVGA GTX 980 Ti FTW
    No.

    What you can do is try the different SyncFlush values (0, 1 and 2.)

    You can't have fast sync + vsync. It's one or the other.

    I don't think MPRF affects any of this.
     
  12. xvt

    xvt Member

    Messages:
    37
    Likes Received:
    0
    GPU:
    MSI GTX 1070 Z
    Another couple of questions:

    Does the SyncFlush setting have any effect when using s-sync in conjunction with fast sync?

    What causes that sometimes you get a reading of 60fps and 33.333ms frametimes? Been running the nvidia gsync demo just to test s-sync, since it's a low GPU load scenario (~19%), yet I get these jumps in frametimes between 16.67 and 33.33ms. Also, when the framerate drops to 58fps, frametimes go straight to 33.33ms, instead of the expected 17.24ms.

    edit:
    check this out:
    [​IMG]

    57.2ms for 49fps and the GPU load is through the roof, SyncFlush was 0 in this case. Not seen: CPU usage is 9%.

    And finally, there's a stat that reads "Sync calibration" in the OSD when you enable the "Show own statistics" setting in RTSS, any idea what it does? Just curious, since I haven't seen it mentioned in the main RTSS beta forum thread.

    Sorry to bombard you with all these questions, appreciate the time you take to answer them.
     
    Last edited: Nov 29, 2018
  13. RealNC

    RealNC Ancient Guru

    Messages:
    2,797
    Likes Received:
    1,080
    GPU:
    EVGA GTX 980 Ti FTW
    @xvt

    I don't know the answers :p If you get stutters even with low GPU load, I don't know why that is or how to fix it. I also don't know what sync calibration does.
     
  14. mdrejhon

    mdrejhon Active Member

    Messages:
    99
    Likes Received:
    55
    GPU:
    4 Flux Capacitors in SLI
    I am going to write a Scanline Sync tutorial in the near future.

    However, I can only write so much at once. Hope Guru3D doesn't mind when I ask (because it brings more publicity to Guru3D and RTSS!) but I'm also recruiting a guest writer for Blur Busters on freelance basis for an RTSS Scanline Sync article. Reimbursed.

    Are any one of you willing to write an RTSS Scanline Sync tutorial? Send me a message.
     
    Last edited: Nov 30, 2018
  15. mdrejhon

    mdrejhon Active Member

    Messages:
    99
    Likes Received:
    55
    GPU:
    4 Flux Capacitors in SLI
    Recalibrate your tearline upwards. Bigger negative offsets.

    1. Use VSYNC OFF first
    2. Calibrate scanline sync (via keyboard shortcut) until you've got a vibrating tearline that NEVER goes below the bottom edge of the screen.
    3. Go back to Fast Sync
    4. You'll see it stay more consistently at 16.67ms.

    In VSYNC OFF, if the "tearline" goes below the bottom edge of the screen, that's the sudden 33ms frametimes if you were using Fast Sync -- because that's a missed VSYNC. That's why if I recommend if you combine RTSS Scanline Sync with NVIDIA Fast Sync -- you must calibrate tearline position to the point where it permanently stays above the bottom edge of the screen. If it vibrates crazily, raise the tearline higher (bigger negative scanline offset). So that tearlines never, never, never touches the blanking interval (except during rare framerate dips). You want to get tearlines as close as possible to bottom edge of screen, but never reaching the blanking interval (A.K.A. tearline occasionally going below bottom edge of screen).

    The ideal calibration will vary from game to game. If you need a universal calibration, have a generous offset (e.g. 25% earlier). That said, 25% earlier means 1/4th more frame lag (e.g. 4ms lag at 60Hz) but it can be pretty much is solid in most games. The bigger the safety margin, the less likely you get lag spikes.

    A perfect 18-20ms lag glassfloor is always better than 16.7ms with lots of 33ms spikes. So raise the tearline further above bottom edge. Remember that screenheight is lag; 1/4th screen height above bottom edge is 1/4th refresh cycle extra lag added, but that absorbs a hell of a lot of VSYNC OFF tearline vibrations (vibrations = frame timing error. microseconds become human visible -- at 100KHz scanrate, 10 microseconds means tearline moves downwards by 1 pixel. That's why tearline vibrations are so amazing to watch, it's microseconds becoming human visible!)

    You can use large positive scanline offsets but negative scanline offsets are vertical-resolution-independent (and more friendly to lag-reduction tricks via Large Vertical Totals / Quick Frame Transport (QFT) tricks).

    That's how you can get low-lag perfect refresh-rate-synchronized Fast Sync -- keeping tearline above bottom edge of screen.

    Strafe left/right in a game with vertical wall edges, to look for tearline positions. Use the RTSS hotkeys to calibrate tearline position.

    Calibration & Tuning Mantra: Always calibrate RTSS Scanline Sync using VSYNC OFF first before turning VSYNC ON / Enhanced Sync / NVIDIA Fast Sync!
    The tearline position is a wonderfully excellent visual calibration indicator.

    Combining RTSS ScanLine Sync with your preferred sync mode:
    VSYNC OFF:
    Calibrate tearline offscreen
    VSYNC ON: Calibrate tearline to stay permanently above bottom edge
    Fast Sync: Calibrate tearline to stay permanently above bottom edge
    Enhanced Sync: Calibrate tearline to stay permanently above bottom edge
    Once you finish calibrating, switch to your preferred sync mode.

    Tearline vibrates too much? (e.g. 1/4th screen height vibrations or worse)? Move the tearline onscreen and work hard to calm down your tearline first! Temporarily ignore the lag during this calibration stage, and focus on calming down the tearline first. Try increasing SyncFlush numbers by 1. Use SyncFlush 1. Also, lower refresh rates produce calmer tearlines. And lower CPU%, lower GPU% utilization will produce calmer tearlines too. Turning off certain features like AA will also produce calmer tearlines. If you are running very old games that always stay well below GPU 50%, try SyncFlush 2 as that produces very tranquil & calm tearlines. (Don't worry, the crazy increase in GPU% will be more than compensated by the complete lack of lag spikes; keep reading. That shiny glass floor lag beckons!). Remember, the calmer the tearline, the more likely it stays permanently near one location. Fiddle until you see your tearline calm down (vibrating consistently in a reasonably tight vertical space rather than all over the vertical dimension of the screen). The calmer the tearline, the more likely it stays permanently away from the bottom edge of screen. Thereby avoiding lag spikes if using another sync mode than VSYNC OFF. Tearlines that dips below bottom edge of screen exactly equals a latency spike if you were running FastSync instead of VSYNC OFF.

    Framerates often below Hz: If your game cannot sustain framerate equal refresh rate, you WILL get lag spikes (with accompanying microstutter), no matter what. So lower your refresh rate and/or upgrade your GPU and/or adjust game detail and/or reduce AA.

    Occasional framerate dips: In practice, it is okay if there's occasional framerate dips -- such as disk access -- e.g. you're able to sustain full framerate matching refresh rate 90%+ to 95%+ of the time, so just aim for the 90th or 95th percentile of permanence. For emulators or older games, it's easy to aim at the 99th+ percentile though, but for newer games, just merely getting 90th percentile can sometimes be hard. A stutter will be a visual indicator of a lag spike, so if you're getting stutters during competitive-critical gameplay, then you definitely want to calibrate for framerate permanence above that, to improve aiming during critical heated moments. You might not be able to do anything about those disk access stutters, but at least you've calibrated for your critical moments.

    Extra safety margin: For all of modes other than VSYNC OFF -- I recommend moving the tearline least 1/10th screen height above the bottommost visible tearline (where the tearline vibrates downwards to). Basically you should have a 1/10th area above bottom edge of screen that you've never seen the tearline vibrate downwards to. This gives you "padding". This adds 1/10th refresh cycle extra lag (~1.6ms at 60Hz) but will eliminate your lag spikes during Fast Sync, etc. If you're trying to synchronize at 120Hz or 144Hz, try 1/5th screen height of padding above bottom edge of screen.

    --easy stuff ends--
    This ends the easy stuff above. Now for the more advanced (engineering-esqe) stuff below:
    --hard stuff begins--

    What about SyncScanLine1 for twice framerate versus refresh rate?:

    - If unfamiliar with this, keep SyncScanLine1 setting to 0. Worry only about one tearline (SyncScanLine0 or via GUI)
    - Even if you do this, please do the easy stuff first before attempting this

    If your game is ultra-low GPU (e.g. Quake Live or CS:GO) combined with motion blur reduction, this can reduce strobe lag a further (e.g. 240fps at 120Hz, or 200fps at 100Hz). First, calibrate using VSYNC OFF. You may use two tearlines with Enhanced Sync or Fast Sync -- but not with VSYNC ON (that will frame-throttle you badly). Calibrate the middle tearline to middle of screen (slightly above middle is ideal, to keep it equidistant with the bottommost tearline, but position of middle tearline matters less than the bottommost tearline) but focus on carefully calibrating the bottommost tearline to stay permanently above bottom edge of screen. Ideally, they should be signal-equidistant from each other (half Vertical Total apart, taking into account of VBI versus visible vertical resolution). But this is less critical than keeping the bottommost tearline permanently above bottom edge of screen, in order to avoid those lag spikes during Fast Sync and Enhanced Sync.

    Advanced-User Large blanking interval trick for DIY Quick Frame Transport (QFT):
    - Do not bother with below trick doing this unless you're a CRU Wizard.
    - Do not bother with below trick unless you know your monitor supports ultralarge blanking intervals larger than the vertical resolution, such as "Vertical Total 2200" for 1080p.
    - Do not bother with below trick if you don't understand "Vertical Total" or "Front Porch" or
    "Back Porch" or "Horizontal Scan Rate".
    - QFT behavior is already built into VRR, so use VRR instead. It's easier to use GSYNC or FreeSync as a much easier QFT method (e.g. 60fps cap at 240Hz) since the VRR provides a very easy natural QFT mechanism. That's why lag is very low on GSYNC/FreeSync since all refresh cycles (no matter the current Hz=fps) are always delivered at max-Hz velocity.

    Very few monitors support large VBIs at their maximum non-VRR refresh rate. However, a few of them do -- e.g. delivering a 60Hz refresh cycle in 1/120sec on a monitor that doesn't support 120Hz. (This is rare, but occasionally happens). Alternatively, if you're using large blanking intervals to reduce strobe crosstalk (squeezing LCD GtG into VBI to reduce artifacts with a blur reduction backlight) -- then it may be more favourable to use VSYNC OFF and adjust scan line sync late into VBI. This creates a "Quick Frame Transport" effect. Normally, Microsoft and graphics drivers does frame presentation at end of refresh cycle (bottom edge of screen), rather than beginning of refresh cycle (top edge of screen). By delaying input reads-render-present late into a superlarge VBI, via RTSS scanline frame rate capping late into VBI (small negative offsets), one can reduce lag further thanks to the Quick Frame Transport effect of the use of an ultralarge blanking interval (Example: 60Hz refresh cycles transmitted over the cable in 1/120sec via the use of an ultralarge VBI the same size of the visible image). Quick Frame Transport (QFT) is part of the HDMI 2.1 specification but is possible to DIY on any cable with Custom Resolution + Large VBI + RTSS scanline sync. Displays that are intentionally designed to support QFT works best with this trick, but I've run into some displays that have undocumented QFT capability on one of its inputs, e.g. certain 60Hz HDTVs that supports 120Hz input but the panel can't support 120Hz. (Basically frameskips, as in only displays 60 frames out of 120 per second); those displays can often be tricked into a QFT 60Hz signal (via ultralarge VBI -- maintaining same exact 135KHz horizontal scanrate but halving the vertical refresh rate from 120Hz to 60Hz) -- that speeds up delivery of 60Hz refresh cycles to 1/120sec -- reducing frame delivery latency by 8ms. If you shift your inputread-render-deliver pipeline to align with the frame transmission (presenting framebuffer very late in VBI, right on time for visible frame transmission), that reduces the input lag of VSYNC ON / Fast Sync / Enhanced Sync by 8ms without raising refresh rate on displays that supports a 2x QFT acceleration factor (documented or undocumented). First, play with custom resolutions until you've got the biggest supernova-sized galactic-sized blanking interval your monitor will sync to -- a blanking interval big enough to drive a battlecruiser through. Next, start your game, make sure it's correctly using that hacked custom frankenstein signal timings & resolution you created, THEN finally calibrate RTSS until your tearline shows up near top edge of screen, THEN calibrate it until it barely disappears above top edge. Now you've created a fixed-Hz QFT sync mode!

    (Hmmm. It appears I wrote a mini-guide. Maybe I'll copy and paste into the Blur Busters article, but I'm still recruiting assistance on writing a ScanLine Sync HOWTO (graphics, expanded article, etc) since I'm spread between so many things)
     
    Last edited: Dec 8, 2018
    Unwinder likes this.

  16. dezo

    dezo Member

    Messages:
    18
    Likes Received:
    2
    GPU:
    GTX 1080
    After some testing on my 1440p 60Hz VA crap from BenQ I must say that this is indeed incredible. Practically all my older games can be set to use this new scanline sync method with no input lag and no tearing. I used the low input lag method before (VSync + frame limiter 0.01 bellow refresh), but this is just better. It works wonders for old OGL titles like Doom3, Q3A, Quake4, Prey, RTCW and many others old DX/OGL games with tragic VSync/buffering implementation.

    I use these settings:
    - VSync off
    - aero/composition off (on win7)
    - exclusive fullscreen only
    - rtss framerate limit = 0
    - rtss scanline sync = -50 (or less for some games)
    - nvidia power management per game profile = prefer maximum performance
    The last one is somehow important on my setup. Don't know if anyone mentioned it, but with power management adaptive/optimal the tearline position was unstable - I think because the frequent GPU power state changes with undemanding games. With max. performance mode and stable power state the tearline is invisible pretty much all the time. So thanks to everybody who participated on this feature and especially to Unwinder for implementing it into rtss.
     
  17. bapt33

    bapt33 Member

    Messages:
    18
    Likes Received:
    0
    GPU:
    GTX 1060 6GB
    hey,
    i'm now tryin to make the tearing disappear in scanline x2 (120 fps) mode, for CS GO, but what ever value i set (-60 -150 -300 or even -1000) the 2 line tear nerver disappear, my gpu usage is like 20% sometimes 40% always low
    So is there a way to hide this two linetear?

    Thanks.
     
    Last edited: Dec 8, 2018
  18. RealNC

    RealNC Ancient Guru

    Messages:
    2,797
    Likes Received:
    1,080
    GPU:
    EVGA GTX 980 Ti FTW
    I don't think so. The second scanline cannot be configured in the RTSS UI, you need to edit the profile file. But even then, you can't hide both tear lines. If they're too close together, there's no time left to render the frame.

    You should probably use fast sync (nvidia) or enhanced sync (amd.) I'm not sure myself what the use of 2x scanline sync actually is. The intention doesn't seem to be the elimination of tearing.
     
  19. bapt33

    bapt33 Member

    Messages:
    18
    Likes Received:
    0
    GPU:
    GTX 1060 6GB
    I agree, the two tearline are to close. I gonna try with fast sync yes, thanks.
     
  20. bapt33

    bapt33 Member

    Messages:
    18
    Likes Received:
    0
    GPU:
    GTX 1060 6GB
    hey im back again, ive got a strange problem, i just buy insurgency sandstorm, vsync off no frame limit, i use scanline method as usual, set to -60.
    The problem is ive got 2 tearline on the screen @60 fps ! one fix tearline at the bottom of the screen, and another one on the top of the screen movin a little down sometimes ...
    How can i have two tearline in normal scanline sync? (60fps) thats really weird ...
     

Share This Page