Anonymous edits have been disabled on the wiki. If you want to contribute please login or create an account.

Difference between revisions of "Glossary:Vertical sync (Vsync)"

From PCGamingWiki, the wiki about fixing PC games
(→‎Override vertical sync (Vsync) behavior: On Windows, in windowed mode)
m (→‎Vendor agnostic solution: It supports ddraw1 too.)
 
(9 intermediate revisions by 5 users not shown)
Line 1: Line 1:
 
{{Video settings sidebar}}
 
{{Video settings sidebar}}
 
{{feature|vertical sync (Vsync)}}
 
{{feature|vertical sync (Vsync)}}
 +
{{Tocbox}}
  
Vertical synchronization is an option used to prevent screen tearing. Screen tearing is a graphical glitch which is perceived as straight horizontal lines across the monitor or as if the whole picture is stitched together by two or more separate pictures. This problem exists because the monitor and the graphics adapter normally works independently, so new frames may not be fully drawn when the monitor display them. Vsync makes the graphics adapter wait for the monitor to signal it's ready for the next frame to ensure all displayed frames are always fully drawn. This has the positive side effect of limiting the amount of frames per second the computer has to draw to the monitor refresh rate (the amount of frames per second the monitor is able to display) which saves resources. Unfortunately Vsync can also increase input lag.
+
'''Vertical synchronization (Vsync)''', also known through its shorthand "vertical sync," is the act of aligning the output of the next frame from the graphics card to the vertical blanking interval (''VBLANK''; ''VBI'') of the display. This is typically done to prevent screen tearing, as otherwise outputting the next frame in the middle of the scanout process of the display would result in a visible "tear" in the image. The presence of this graphical glitch is known as "screen tearing", and is perceived as one or more straight lines across the display as if the whole picture is stitched together by two or more separate pictures.
 +
 
 +
The problem of screen tearing occurs because the monitor and the graphics card normally works independently, so without some form of synchronization taking place the graphics card will output frames as they finish rendering, regardless of whether the display is ready for them or not. When performing vertical synchronization, the graphics adapter will instead wait for the monitor to signal it is ready for a new frame (the previously mentioned vertical blanking interval), at which point the graphics adapter will start sending the next frame to the display, if it has finished rendering. If the frame is not ready, the graphics card will re-send the previous frame to the display until the frame has finished rendering. In a similar manner, the graphics card may end up stalling with the rendering of new frames in situations where the graphics card renders faster than the time it takes to scan out the last rendered frame on the display.
 +
 
 +
Screen tearing is typically experienced as horizontal lines across the display, though this technically depends on the physical manufacturing and the current orientation of the display. On a typical computer monitor in a landscape orientation, the scanout is performed from left to right, top to bottom, and so a horizontal "screen tear" line is typically experienced when the display is in a normal orientation. Displays used in small handheld gaming devices, e.g. [[Steam Deck]], are often manufactured for and intended to be used in a portrait orientation, but is actually used in a landscape orientation when paired with a handheld gaming device. This combination would result in the screen tearing being experienced as vertical lines across the display, as opposed to the expected horizontal lines if the display was used in the original intended orientation it was manufactured for.
 +
 
 +
Because of how vertical synchronization imposes restrictions on the graphics card renders and outputs frames, it is influenced by other factors as well, perhaps most important among them the number of framebuffers a game might make use of and are able to render new frames into, also known as the "double buffering" and "triple buffering" modes of vsync.
 +
 
 +
{{ii}} Double buffering yields the most consistent frame rate while triple buffering can be slightly more responsive.
  
 
'''Resources'''
 
'''Resources'''
* [[wikipedia:Analog television#Vertical synchronization|Vertical sync (Vsync)]] on Wikipedia
+
:{{W|Analog television#Vertical synchronization|Vertical sync (Vsync)}}
* [https://www.anandtech.com/show/2794/2 What are Double Buffering, vsync and Triple Buffering?] on AnandTech
+
{{mm}} [https://www.anandtech.com/show/2794/2 What are Double Buffering, Vsync and Triple Buffering?] on AnandTech
* [https://www.anandtech.com/show/10325/the-nvidia-geforce-gtx-1080-and-1070-founders-edition-review/13 Fast Sync] on AnandTech
+
{{mm}} [https://www.anandtech.com/show/10325/the-nvidia-geforce-gtx-1080-and-1070-founders-edition-review/13 Fast Sync] on AnandTech
 +
 
 +
==Double-buffered vsync==
 +
'''Double-buffered vsync''' means to enforce vertical synchronization alongside two framebuffers used for rendering. With double buffering the graphics card has to wait for the most recently rendered frame to get displayed before it can begin work on the next frame, with the consequence of the frame rate being restricted/capped to the refresh rate of the display. Double buffering is known to negatively impact input latency of games, causing players to experience a sort of "mouse lag" feeling, with the visible frame being sometimes noticably delayed compared to when input for it was sampled.
 +
 
 +
Double buffering has two other major side effects depending on whether the system is capable of rendering frames faster than the refresh rate of the display:
 +
 
 +
* For systems where the frame rate is unable to reach the refresh rate, it creates a scenario where the graphics card can only finish a frame after multiple scanouts has occurred on the display, but still have to end up waiting for the current scanout to finish before sending the new frame. This results in the frame rate of the game being capped to a fraction of the refresh rate, such as 30, 20, or even 15 FPS on a 60 Hz display, depending on how slow the graphics card takes to render the frame.
 +
 
 +
* For systems where the theoretical maximum frame rate (as in, how many frames of the game the GPU can theoretically render in a second) is able to reach and exceeds the refresh rate of the display, it creates a sort of "back pressure" where input is sampled too early, but the graphics card still ends up having to wait for the current scanout of the previous frame to finish before displaying the new frame, also negatively impacting input latency.
 +
** Some of this input latency can be minimized by using an additional FPS limiter which targets just below the refresh rate, although at the potential cost of introducing a periodic stutter.<ref>{{Refsnip|url=https://www.youtube.com/watch?v=rs0PYCpBJjc&t=272|title=FPS Limiter Lag Analysis For G-Sync & V-Sync - YouTube|date=2018-09-15|snippet=But what if you don't have such a [G-Sync] monitor, and the only way you can get rid of tearing is by using V-Sync, which does add quite a bit of extra delay, especially at 60Hz? Some people claim that by simply limiting your framerate to 1 or 2 frames less than the active display refresh rate, you can eliminate the extra delay caused by double-buffer V-sync. <br> [...] This did, in fact, decrease the delay that you get with V-sync, even though it does not get as low as when you have V-Sync disabled. So, with this method, you get less delay when using V-Sync, while tearing is still avoided. But sadly, there is a drawback in the form of a periodic stutter, caused by the game's framerate being lower than the display refresh rate. How noticeable this effect is depends on your display refresh rate, your PC's ability to maintain this exact framerate, and the pace of the game.}}</ref>
 +
 
 +
{{mm}} Double buffered vsync should never be used during benchmarks due to how it influences the frame rate as any results from such a benchmark would be false and misleading.
 +
{{mm}} An unintended consequence that some players might appreciate is that as a result of the capped frame rate, the system will experience a lower power draw and therefor heat and noise as the system will not attempt to render more frames than what the monitor can display, though if screen tearing is not a concern it is recommended to use a [[Glossary:Frame rate (FPS)#Frame rate capping|normal FPS limiter]] in conjunction with vsync disabled.
  
==Properties==
+
==Triple-buffered vsync==
===Benefits===
+
In comparison to double-buffered vsync, '''triple-buffered vsync''' means to use vertical synchronization alongside three (or more) framebuffers. This allows the graphics card to lock one buffer for the current scanout of the display, use another buffer to hold the last rendered frame waiting for the upcoming vertical blanking interval, and still have one buffer available to continue rendering a new frame. This creates a setup where the graphics card is never forced to wait for the display scanout to finish before it can begin work on the next frame, and the frame rate is unconfined by the refresh rate, and the graphics card is allowed to work mostly unimpeded.
* Eliminates tearing by waiting for the monitor to signal it's ready for the next frame.
 
* Lower power consumption (and therefore heat and noise) by limiting FPS to what the monitor is able to display.
 
  
===Disadvantages===
+
The method of how triple buffering is implemented can differ between render APIs:
* Introduces extra input lag. Commonly experienced as "mouse lag". The higher the monitor's refresh rate, the less input lag there will be.
 
* May decrease performance if FPS falls below the monitor refresh rate.
 
  
===Limitations===
+
* With the "classic" form of triple buffering, the graphics card never stops working on new frames. If a new frame has finished rendering while an older frame is still waiting for vertical blanking interval to occur so it can be displayed, the older not-yet-displayed frame is discarded and the latest rendered frame takes its place to be displayed next.<ref name="AnandTech-FastSync-TripleBuffering">{{Refsnip|url=https://www.anandtech.com/show/10325/the-nvidia-geforce-gtx-1080-and-1070-founders-edition-review/13|title=AnandTech - Fast Sync & SLI Updates: Less Latency, Fewer GPUs|date=2018-09-01|snippet=It’s interesting to note that Fast Sync isn’t a wholly new idea, but rather a modern and more consistent take on an old idea: triple buffering. While in modern times triple buffering is just a 3-deep buffer that is run through as a sequential frame queue, in the days of yore some games and video cards handled triple buffering a bit differently. Rather than using the 3 buffers as a sequential queue, they would instead always overwrite the oldest buffer. This small change had a potentially significant impact on input lag, and if you’re familiar with old school triple buffering, then you know where this is going.<br><br>With Fast Sync, NVIDIA has implemented old school triple buffering at the driver level, once again making it usable with modern cards. The purpose of implementing Fast Sync is to reduce input lag in modern games that can generate a frame rate higher than the refresh rate, with NVIDIA specifically targeting CS:GO and other graphically simple twitch games.}}</ref>
* Only available in fullscreen exclusive mode (a borderless fullscreen window does not qualify).
 
* Not to be used when benchmarking since the FPS will be capped at the monitors refresh rate.
 
  
===Double buffering vs. Triple buffering===
+
* However with most modern DirectX games, the "triple buffering" option is instead typically implemented as a sequential frame queue,<ref name="AnandTech-FastSync-TripleBuffering"/> unless a specific flag is used to indicate that any outstanding queued presents should be discarded.<ref>{{Refcheck|user=Aemony|date=2023-10-27|comment=The flag is {{Code|DXGI_PRESENT_RESTART}}, available for DirectX 11 and 12 games, though developers may caution against using it as [https://discord.com/channels/590611987420020747/590965902564917258/1014658966464254013 a DirectX engineer] mentioned back in 2022 that their compositor team "regards it as a mistake".}}</ref>
With double buffering the GPU waits for the most recently rendered frame to get displayed before beginning work on the next frame. With the "older" form of triple buffering, the GPU starts working on the next frame after that in the third buffer and if that new frame completes first, that frame gets displayed next and the other frame in between gets discarded. However with most modern DirectX games, the "triple buffering" option is instead implemented as a sequential frame queue.<ref name="AnandTech-FastSync-TripleBuffering">{{Refsnip|url=https://www.anandtech.com/show/10325/the-nvidia-geforce-gtx-1080-and-1070-founders-edition-review/13|title=AnandTech - Fast Sync & SLI Updates: Less Latency, Fewer GPUs|date=2018-09-01|snippet=It’s interesting to note that Fast Sync isn’t a wholly new idea, but rather a modern and more consistent take on an old idea: triple buffering. While in modern times triple buffering is just a 3-deep buffer that is run through as a sequential frame queue, in the days of yore some games and video cards handled triple buffering a bit differently. Rather than using the 3 buffers as a sequential queue, they would instead always overwrite the oldest buffer. This small change had a potentially significant impact on input lag, and if you’re familiar with old school triple buffering, then you know where this is going.<br><br>With Fast Sync, NVIDIA has implemented old school triple buffering at the driver level, once again making it usable with modern cards. The purpose of implementing Fast Sync is to reduce input lag in modern games that can generate a frame rate higher than the refresh rate, with NVIDIA specifically targeting CS:GO and other graphically simple twitch games.}}</ref>
 
  
{{ii}} Double buffering yields the most consistent frame rate while triple buffering can be slightly more responsive.
+
Nvidia's '''Fast Sync''' is an implementation for DirectX applications of the "older" way of doing triple buffering, where the oldest buffer waiting to be displayed would always be overwritten by any newer frames that have finished rendering.<ref name="AnandTech-FastSync-TripleBuffering"/> AMD's equivalent is called '''Enhanced Sync''' which combines the triple buffering behavior with that of [[#Adaptive V-Sync|adaptive V-Sync]] behaviour.<ref name="AnandTech-EnahncedSync">{{Refsnip|url=https://www.anandtech.com/show/11664/amd-radeon-software-crimson-relive-edition-1772/6|title=AnandTech - AMD Releases Radeon Software Crimson ReLive Edition 17.7.2: ReLive Edition Refined for Gamers and Developers - Developing a Better V-Sync: AMD Enhanced Sync|date=2019-09-10|snippet=AMD did not clarify if Enhanced Sync was an implementation of triple buffering when asked, citing an upcoming whitepaper on the topic. But at a glance, Enhanced Sync appears similar to a combination of NVIDIA’s Fast Sync (introduced with Pascal) and Adaptive V-Sync (introduced with Kepler). Regarding the latter, Adaptive V-Sync operates by selectively disabling V-Sync, which appears to be exactly how Enhanced Sync operates when framerates are below the refresh rate. In which case if AMD's implementation does behave similarly to NVIDIA's, then as we've already found with Fast Sync, to make the most of the technology you will need a framerate 2x (or more) higher than the refresh rate. This is because the closer the frate rate is to the refresh rate, the fewer opportunities there will be to "jump ahead" by discarding frames.}}</ref>
{{mm}} Nvidia's '''Fast Sync''' is an implementation for DirectX applications of the "older" way of doing triple buffering, where the oldest buffer would always be overwritten.<ref name="AnandTech-FastSync-TripleBuffering"/> AMD's equivalent is called '''Enhanced Sync''', and combines the triple buffering behavior with that of an [[#Adaptive V-Sync|adaptive V-Sync]].<ref name="AnandTech-EnahncedSync">{{Refsnip|url=https://www.anandtech.com/show/11664/amd-radeon-software-crimson-relive-edition-1772/6|title=AnandTech - AMD Releases Radeon Software Crimson ReLive Edition 17.7.2: ReLive Edition Refined for Gamers and Developers - Developing a Better V-Sync: AMD Enhanced Sync|date=2019-09-10|snippet=AMD did not clarify if Enhanced Sync was an implementation of triple buffering when asked, citing an upcoming whitepaper on the topic. But at a glance, Enhanced Sync appears similar to a combination of NVIDIA’s Fast Sync (introduced with Pascal) and Adaptive V-Sync (introduced with Kepler). Regarding the latter, Adaptive V-Sync operates by selectively disabling V-Sync, which appears to be exactly how Enhanced Sync operates when framerates are below the refresh rate. In which case if AMD's implementation does behave similarly to NVIDIA's, then as we've already found with Fast Sync, to make the most of the technology you will need a framerate 2x (or more) higher than the refresh rate. This is because the closer the frate rate is to the refresh rate, the fewer opportunities there will be to "jump ahead" by discarding frames.}}</ref>
 
  
===Adaptive V-Sync===
+
==Adaptive V-Sync==
 
'''Adaptive V-Sync''' (''late V-Sync'', ''dynamic V-Sync'') is Nvidia's name for their technology that dynamically toggles V-Sync behavior on or off depending on the frame rate. When the frame rate reaches or exceeds the refresh rate, vertical sync is enabled to eliminate screen tearing at the cost of higher input latency. When the frame rate falls below the refresh rate, vertical sync is disabled to minimize stuttering and decrease input latency at the cost of screen tearing.
 
'''Adaptive V-Sync''' (''late V-Sync'', ''dynamic V-Sync'') is Nvidia's name for their technology that dynamically toggles V-Sync behavior on or off depending on the frame rate. When the frame rate reaches or exceeds the refresh rate, vertical sync is enabled to eliminate screen tearing at the cost of higher input latency. When the frame rate falls below the refresh rate, vertical sync is disabled to minimize stuttering and decrease input latency at the cost of screen tearing.
  
{{mm}} The closest AMD equivalent is their '''Enhanced Sync''' technology that combines the adaptive V-Sync behavior with that of [[#Double buffering vs. Triple buffering|triple buffering]] for DirectX-based games.<ref name="AnandTech-EnahncedSync"/>
+
{{mm}} The closest AMD equivalent is their '''Enhanced Sync''' technology that combines the adaptive V-Sync behavior with that of [[#Triple-buffered vsync|triple buffering]] for DirectX-based games.<ref name="AnandTech-EnahncedSync"/>
  
==So what's the best option?==
+
==Override vertical sync (Vsync) behavior==
There is none and results will vary between different games, systems and people. If you're bothered by tearing or want the best visual quality, enable Vsync. If you're bothered by input lag or have performance problems, try [[#Double buffering vs. Triple buffering|Triple buffering]] for reduced input lag or completely disable Vsync for no input lag. If you're playing first-person shooters competitively, always disable.
+
Due to the multi-faceted consequences of using vertical synchronization, there is no general override recommendation as results and preferences will vary between games, systems and individuals.
  
Using [[Glossary:Frame rate (FPS)#Frame rate capping|frame limiting]] 1-2 FPS below the refresh rate in conjunction with Vsync can also be used as a more responsive (for as much as imperfect) tearing solution, although at the potential cost of introducing a periodic stutter.<ref>{{Refsnip|url=https://www.youtube.com/watch?v=rs0PYCpBJjc&t=272|title=FPS Limiter Lag Analysis For G-Sync & V-Sync - YouTube|date=2018-09-15|snippet=But what if you don't have such a [G-Sync] monitor, and the only way you can get rid of tearing is by using V-Sync, which does add quite a bit of extra delay, especially at 60Hz? Some people claim that by simply limiting your framerate to 1 or 2 frames less than the active display refresh rate, you can eliminate the extra delay caused by double-buffer V-sync. <br> [...] This did, in fact, decrease the delay that you get with V-sync, even though it does not get as low as when you have V-Sync disabled. So, with this method, you get less delay when using V-Sync, while tearing is still avoided. But sadly, there is a drawback in the form of a periodic stutter, caused by the game's framerate being lower than the display refresh rate. How noticeable this effect is depends on your display refresh rate, your PC's ability to maintain this exact framerate, and the pace of the game.}}</ref>
+
* People bothered by screen tearing and/or a variable frame pacing can enable vsync to limit the FPS to the refresh rate and achieve a stable frame pacing.
  
Note that Vsync should not be used only as an FPS limit. If you only want to limit FPS drawn, for example to minimize heat and fan noise, but are not bothered by tearing and don't want to risk input lag, simply [[Glossary:Frame rate (FPS)#Frame rate capping|limit your FPS]] to that of your monitor's refresh rate or close to it. An FPS limit is often an option available as an in-game console command or similar.
+
* People bothered by input latency or experiences performance problems can try out [[#Triple-buffered vsync|triple-buffered vsync]] for reduced input latency, or even disable vsync for no input latency at the cost of screen tearing.
  
==Override vertical sync (Vsync) behavior==
 
 
===Vendor agnostic solution===
 
===Vendor agnostic solution===
 
{{Fixbox|description=D3DOverrider (Windows, DirectX)|fix=
 
{{Fixbox|description=D3DOverrider (Windows, DirectX)|fix=
Line 49: Line 62:
 
}}
 
}}
  
{{Fixbox|description=Force with [[DgVoodoo 2|dgVoodoo]] (Windows, DirectX 2-9/Glide)|ref=|fix=
+
{{Fixbox|description=Force with [[DgVoodoo 2|dgVoodoo]] (Windows, DirectX 1-9/Glide)|ref=|fix=
 
}}
 
}}
  
Line 75: Line 88:
 
===Nvidia===
 
===Nvidia===
 
{{ii}} The '''Triple buffering''' option in [[Nvidia Control Panel]] and [[Nvidia Profile Inspector]] only applies to OpenGL. Enable '''Fast Sync''' to get triple buffering in DirectX-based applications.<ref name="AnandTech-FastSync-TripleBuffering"/>
 
{{ii}} The '''Triple buffering''' option in [[Nvidia Control Panel]] and [[Nvidia Profile Inspector]] only applies to OpenGL. Enable '''Fast Sync''' to get triple buffering in DirectX-based applications.<ref name="AnandTech-FastSync-TripleBuffering"/>
{{--}} '''Fast Sync''' requires a frame rate at least 2x above the refresh rate of the monitor to prevent micro-stuttering.{{cn}}
+
{{--}} '''Fast Sync''' requires a frame rate at least 2x above the refresh rate of the monitor to prevent micro-stuttering.<ref>https://www.hardwaretimes.com/what-is-v-sync-should-you-turn-it-on-or-off/</ref>
  
 
{{Fixbox|description=Nvidia Control Panel (Windows)|fix=
 
{{Fixbox|description=Nvidia Control Panel (Windows)|fix=
Line 96: Line 109:
 
#* For triple buffered V-Sync in '''OpenGL''' games, set '''Vertical sync''' to <code>Force on</code> and '''Triple buffering''' to <code>On</code>.
 
#* For triple buffered V-Sync in '''OpenGL''' games, set '''Vertical sync''' to <code>Force on</code> and '''Triple buffering''' to <code>On</code>.
 
# Click on '''Apply changes''' to save the changes.
 
# Click on '''Apply changes''' to save the changes.
 +
}}
 +
 +
===Intel===
 +
 +
{{Fixbox|description=Intel Arc Control (Windows)|fix=
 +
# Download and run [[Intel Arc Control]].  This will work on all Intel GPUs.
 +
# Click on the Settings gear
 +
# Click on Global Game Settings
 +
# Click on the Frame Delivery tab
 +
# Under Tearing Mitigation Modes there are several options (available options depends on the GPU's capabilities)
 +
#* Application Choice (Up to the software to implement vsync)
 +
#* VSync On (Forces VSync On)
 +
#* Smooth Sync (Only on Intel Arc Graphics, Smooth Sync blends screen-tears for seamless visuals.)
 +
#* Smart VSync (also called Adaptive Sync) (Dynamically sync your frame rate with the display’s refresh rate to help provide a more fluid, stutter-free, tear-free experience.)
 
}}
 
}}
  
 
===Use windowed mode (Windows)===
 
===Use windowed mode (Windows)===
On Windows, when playing a game in [[Glossary:Windowed|windowed]] or [[Glossary:Borderless fullscreen windowed|borderless fullscreen windowed]] mode, Windows automatically applies VSync.<ref>[https://superuser.com/a/954330 ref 1]</ref><ref>[https://www.reddit.com/r/pcgaming/comments/6q7vn4/why_does_playing_in_windowed_mode_fix_screen/dkvleuv/?utm_source=reddit&utm_medium=web2x&context=3 ref 2]</ref>
+
When playing a game in [[Glossary:Windowed|windowed]] or [[Glossary:Borderless fullscreen windowed|borderless fullscreen windowed]] mode in Windows Vista or newer, the desktop window manager (DWM) of Windows automatically enforces vsync and eliminates any screen tearing.<ref>{{Refurl|url=https://superuser.com/a/954330|title=Super User - Is it possible to turn off V-sync in Windows 10 for windowed games?|date=2023-10-27}}</ref>
 +
<ref>{{Refurl|url=https://www.reddit.com/r/pcgaming/comments/6q7vn4/why_does_playing_in_windowed_mode_fix_screen/dkvleuv/?utm_source=reddit&utm_medium=web2x&context=3|title=Reddit - /r/pcgaming - Comment by @Nicholas-Steel|date=2023-10-27}}</ref> However this behaviour changed with the release of Windows 10 v1607 (the Anniversary Update) as DirectX 11 and 12 got support for enabling screen tearing even in window modes if the hardware supported it and games made use of it.<ref>{{Refurl|url=https://learn.microsoft.com/en-us/windows/win32/direct3ddxgi/variable-refresh-rate-displays|title=Microsoft Learn - DXGI - Variable refresh rate displays|date=2023-10-27}}</ref>
  
 
{{References}}
 
{{References}}

Latest revision as of 18:36, 27 October 2023

For a list of games, see List of games that support vertical sync (Vsync).

Vertical synchronization (Vsync), also known through its shorthand "vertical sync," is the act of aligning the output of the next frame from the graphics card to the vertical blanking interval (VBLANK; VBI) of the display. This is typically done to prevent screen tearing, as otherwise outputting the next frame in the middle of the scanout process of the display would result in a visible "tear" in the image. The presence of this graphical glitch is known as "screen tearing", and is perceived as one or more straight lines across the display as if the whole picture is stitched together by two or more separate pictures.

The problem of screen tearing occurs because the monitor and the graphics card normally works independently, so without some form of synchronization taking place the graphics card will output frames as they finish rendering, regardless of whether the display is ready for them or not. When performing vertical synchronization, the graphics adapter will instead wait for the monitor to signal it is ready for a new frame (the previously mentioned vertical blanking interval), at which point the graphics adapter will start sending the next frame to the display, if it has finished rendering. If the frame is not ready, the graphics card will re-send the previous frame to the display until the frame has finished rendering. In a similar manner, the graphics card may end up stalling with the rendering of new frames in situations where the graphics card renders faster than the time it takes to scan out the last rendered frame on the display.

Screen tearing is typically experienced as horizontal lines across the display, though this technically depends on the physical manufacturing and the current orientation of the display. On a typical computer monitor in a landscape orientation, the scanout is performed from left to right, top to bottom, and so a horizontal "screen tear" line is typically experienced when the display is in a normal orientation. Displays used in small handheld gaming devices, e.g. Steam Deck, are often manufactured for and intended to be used in a portrait orientation, but is actually used in a landscape orientation when paired with a handheld gaming device. This combination would result in the screen tearing being experienced as vertical lines across the display, as opposed to the expected horizontal lines if the display was used in the original intended orientation it was manufactured for.

Because of how vertical synchronization imposes restrictions on the graphics card renders and outputs frames, it is influenced by other factors as well, perhaps most important among them the number of framebuffers a game might make use of and are able to render new frames into, also known as the "double buffering" and "triple buffering" modes of vsync.

Double buffering yields the most consistent frame rate while triple buffering can be slightly more responsive.

Resources

Vertical sync (Vsync)
What are Double Buffering, Vsync and Triple Buffering? on AnandTech
Fast Sync on AnandTech

Double-buffered vsync

Double-buffered vsync means to enforce vertical synchronization alongside two framebuffers used for rendering. With double buffering the graphics card has to wait for the most recently rendered frame to get displayed before it can begin work on the next frame, with the consequence of the frame rate being restricted/capped to the refresh rate of the display. Double buffering is known to negatively impact input latency of games, causing players to experience a sort of "mouse lag" feeling, with the visible frame being sometimes noticably delayed compared to when input for it was sampled.

Double buffering has two other major side effects depending on whether the system is capable of rendering frames faster than the refresh rate of the display:

  • For systems where the frame rate is unable to reach the refresh rate, it creates a scenario where the graphics card can only finish a frame after multiple scanouts has occurred on the display, but still have to end up waiting for the current scanout to finish before sending the new frame. This results in the frame rate of the game being capped to a fraction of the refresh rate, such as 30, 20, or even 15 FPS on a 60 Hz display, depending on how slow the graphics card takes to render the frame.
  • For systems where the theoretical maximum frame rate (as in, how many frames of the game the GPU can theoretically render in a second) is able to reach and exceeds the refresh rate of the display, it creates a sort of "back pressure" where input is sampled too early, but the graphics card still ends up having to wait for the current scanout of the previous frame to finish before displaying the new frame, also negatively impacting input latency.
    • Some of this input latency can be minimized by using an additional FPS limiter which targets just below the refresh rate, although at the potential cost of introducing a periodic stutter.[1]
Double buffered vsync should never be used during benchmarks due to how it influences the frame rate as any results from such a benchmark would be false and misleading.
An unintended consequence that some players might appreciate is that as a result of the capped frame rate, the system will experience a lower power draw and therefor heat and noise as the system will not attempt to render more frames than what the monitor can display, though if screen tearing is not a concern it is recommended to use a normal FPS limiter in conjunction with vsync disabled.

Triple-buffered vsync

In comparison to double-buffered vsync, triple-buffered vsync means to use vertical synchronization alongside three (or more) framebuffers. This allows the graphics card to lock one buffer for the current scanout of the display, use another buffer to hold the last rendered frame waiting for the upcoming vertical blanking interval, and still have one buffer available to continue rendering a new frame. This creates a setup where the graphics card is never forced to wait for the display scanout to finish before it can begin work on the next frame, and the frame rate is unconfined by the refresh rate, and the graphics card is allowed to work mostly unimpeded.

The method of how triple buffering is implemented can differ between render APIs:

  • With the "classic" form of triple buffering, the graphics card never stops working on new frames. If a new frame has finished rendering while an older frame is still waiting for vertical blanking interval to occur so it can be displayed, the older not-yet-displayed frame is discarded and the latest rendered frame takes its place to be displayed next.[2]
  • However with most modern DirectX games, the "triple buffering" option is instead typically implemented as a sequential frame queue,[2] unless a specific flag is used to indicate that any outstanding queued presents should be discarded.[3]

Nvidia's Fast Sync is an implementation for DirectX applications of the "older" way of doing triple buffering, where the oldest buffer waiting to be displayed would always be overwritten by any newer frames that have finished rendering.[2] AMD's equivalent is called Enhanced Sync which combines the triple buffering behavior with that of adaptive V-Sync behaviour.[4]

Adaptive V-Sync

Adaptive V-Sync (late V-Sync, dynamic V-Sync) is Nvidia's name for their technology that dynamically toggles V-Sync behavior on or off depending on the frame rate. When the frame rate reaches or exceeds the refresh rate, vertical sync is enabled to eliminate screen tearing at the cost of higher input latency. When the frame rate falls below the refresh rate, vertical sync is disabled to minimize stuttering and decrease input latency at the cost of screen tearing.

The closest AMD equivalent is their Enhanced Sync technology that combines the adaptive V-Sync behavior with that of triple buffering for DirectX-based games.[4]

Override vertical sync (Vsync) behavior

Due to the multi-faceted consequences of using vertical synchronization, there is no general override recommendation as results and preferences will vary between games, systems and individuals.

  • People bothered by screen tearing and/or a variable frame pacing can enable vsync to limit the FPS to the refresh rate and achieve a stable frame pacing.
  • People bothered by input latency or experiences performance problems can try out triple-buffered vsync for reduced input latency, or even disable vsync for no input latency at the cost of screen tearing.

Vendor agnostic solution

D3DOverrider (Windows, DirectX)
  1. Download and extract D3DOverrider
  2. Open D3DOverrider.exe.
  3. Create a custom profile for your game.
  4. Configure Force triple buffering and Force VSync as desired.
Force with dgVoodoo (Windows, DirectX 1-9/Glide)
Force an override through Special K (Windows)
Strangle (Linux, OpenGL/Vulkan)
Also works for Wine
  1. Download or clone Strangle and compile it according to instructions
  2. Use strangle <number> path/to/game command to run a game at desired framerate.

Notes

  • You can also use VSYNC=<0/1 or higher> before using the strangle command to enable the VSync instead of setting up the desired framerate. Higher than 1 will cause the software to set up a lower FPS by multiplying it by 1/<number you set in VSync>. So when it's set to 2 for example on a 120 Hz monitor, the software will run at 60 FPS, setting it to 4 will run the program at 30 FPS etc.
  • Not confirmed, but according to the Readme of the software, setting it to -1 will use the Adaptive VSync.
  • Can be also used on Steam via Set Launch Options.... Keep in mind that it won't work when Steam Overlay is enabled, unless it's placed at the end of LD_PRELOAD.

AMD

Radeon Settings
  1. Access the AMD Radeon Settings by right-clicking the desktop wallpaper and selecting the option, or by other means.
  2. Click on the Gaming tab.
  3. Provided the game is not listed, click on Add in the top right corner, then Browse to locate and select the executable of the game.
  4. In the main application window, click on Wait for Vertical Refresh and configure as desired.

Nvidia

The Triple buffering option in Nvidia Control Panel and Nvidia Profile Inspector only applies to OpenGL. Enable Fast Sync to get triple buffering in DirectX-based applications.[2]
Fast Sync requires a frame rate at least 2x above the refresh rate of the monitor to prevent micro-stuttering.[5]
Nvidia Control Panel (Windows)
  1. Open the Nvidia Control Panel.
  2. Navigate to Manage 3D settings.
  3. Switch to the Program Settings tab and select or add the relevant application.
  4. Configure the following settings as desired:
    • For no V-Sync in either DirectX or OpenGL applications, set Vertical sync to Off.
    • For double buffered V-Sync in both DirectX and OpenGL applications, set Vertical sync to On.
    • For triple buffered V-Sync in DirectX applications, set Vertical sync to Fast Sync.
    • For triple buffered V-Sync in OpenGL applications, set both Vertical sync and Triple buffering to On.
  5. Click on Apply to save the changes.
Nvidia Profile Inspector (Windows)
  1. Download and run Nvidia Profile Inspector.
  2. When the relevant application profile is selected, configure the following settings as desired:
    • For double buffered V-Sync in both DirectX and OpenGL, set Vertical sync to Force on.
    • For triple buffered V-Sync in DirectX applications, set Vertical sync to Fast Sync.
    • For triple buffered V-Sync in OpenGL games, set Vertical sync to Force on and Triple buffering to On.
  3. Click on Apply changes to save the changes.

Intel

Intel Arc Control (Windows)
  1. Download and run Intel Arc Control. This will work on all Intel GPUs.
  2. Click on the Settings gear
  3. Click on Global Game Settings
  4. Click on the Frame Delivery tab
  5. Under Tearing Mitigation Modes there are several options (available options depends on the GPU's capabilities)
    • Application Choice (Up to the software to implement vsync)
    • VSync On (Forces VSync On)
    • Smooth Sync (Only on Intel Arc Graphics, Smooth Sync blends screen-tears for seamless visuals.)
    • Smart VSync (also called Adaptive Sync) (Dynamically sync your frame rate with the display’s refresh rate to help provide a more fluid, stutter-free, tear-free experience.)

Use windowed mode (Windows)

When playing a game in windowed or borderless fullscreen windowed mode in Windows Vista or newer, the desktop window manager (DWM) of Windows automatically enforces vsync and eliminates any screen tearing.[6] [7] However this behaviour changed with the release of Windows 10 v1607 (the Anniversary Update) as DirectX 11 and 12 got support for enabling screen tearing even in window modes if the hardware supported it and games made use of it.[8]


References

  1. FPS Limiter Lag Analysis For G-Sync & V-Sync - YouTube - last accessed on 2018-09-15
    "But what if you don't have such a [G-Sync] monitor, and the only way you can get rid of tearing is by using V-Sync, which does add quite a bit of extra delay, especially at 60Hz? Some people claim that by simply limiting your framerate to 1 or 2 frames less than the active display refresh rate, you can eliminate the extra delay caused by double-buffer V-sync.
    [...] This did, in fact, decrease the delay that you get with V-sync, even though it does not get as low as when you have V-Sync disabled. So, with this method, you get less delay when using V-Sync, while tearing is still avoided. But sadly, there is a drawback in the form of a periodic stutter, caused by the game's framerate being lower than the display refresh rate. How noticeable this effect is depends on your display refresh rate, your PC's ability to maintain this exact framerate, and the pace of the game.
    "
  2. 2.0 2.1 2.2 2.3 AnandTech - Fast Sync & SLI Updates: Less Latency, Fewer GPUs - last accessed on 2018-09-01
    "It’s interesting to note that Fast Sync isn’t a wholly new idea, but rather a modern and more consistent take on an old idea: triple buffering. While in modern times triple buffering is just a 3-deep buffer that is run through as a sequential frame queue, in the days of yore some games and video cards handled triple buffering a bit differently. Rather than using the 3 buffers as a sequential queue, they would instead always overwrite the oldest buffer. This small change had a potentially significant impact on input lag, and if you’re familiar with old school triple buffering, then you know where this is going.

    With Fast Sync, NVIDIA has implemented old school triple buffering at the driver level, once again making it usable with modern cards. The purpose of implementing Fast Sync is to reduce input lag in modern games that can generate a frame rate higher than the refresh rate, with NVIDIA specifically targeting CS:GO and other graphically simple twitch games.
    "
  3. Verified by User:Aemony on 2023-10-27
    The flag is DXGI_PRESENT_RESTART, available for DirectX 11 and 12 games, though developers may caution against using it as a DirectX engineer mentioned back in 2022 that their compositor team "regards it as a mistake".
  4. 4.0 4.1 AnandTech - AMD Releases Radeon Software Crimson ReLive Edition 17.7.2: ReLive Edition Refined for Gamers and Developers - Developing a Better V-Sync: AMD Enhanced Sync - last accessed on 2019-09-10
    "AMD did not clarify if Enhanced Sync was an implementation of triple buffering when asked, citing an upcoming whitepaper on the topic. But at a glance, Enhanced Sync appears similar to a combination of NVIDIA’s Fast Sync (introduced with Pascal) and Adaptive V-Sync (introduced with Kepler). Regarding the latter, Adaptive V-Sync operates by selectively disabling V-Sync, which appears to be exactly how Enhanced Sync operates when framerates are below the refresh rate. In which case if AMD's implementation does behave similarly to NVIDIA's, then as we've already found with Fast Sync, to make the most of the technology you will need a framerate 2x (or more) higher than the refresh rate. This is because the closer the frate rate is to the refresh rate, the fewer opportunities there will be to "jump ahead" by discarding frames."
  5. https://www.hardwaretimes.com/what-is-v-sync-should-you-turn-it-on-or-off/
  6. Super User - Is it possible to turn off V-sync in Windows 10 for windowed games? - last accessed on 2023-10-27
  7. Reddit - /r/pcgaming - Comment by @Nicholas-Steel - last accessed on 2023-10-27
  8. Microsoft Learn - DXGI - Variable refresh rate displays - last accessed on 2023-10-27