Saturday 20 June 2015

FreeSync and G-Sync explained

G-Sync

Why we need variable refresh rate technology, and how it works

Pradically every display today runs at a fixed refresh rate, typically 60Hz. However, LCD panels don't require a fixed refresh rate to function; this standard is simply a legacy that dates back to vacuum tube-based televisions and CRT monitors. For gamers, fixed refresh rates are a problem - while the panel updates its image at fixed intervals, GPUs deliver frames at varying intervals, as the work required per frame changes constantly. If a frame is delivered mid-refresh, you get screen tearing, a phenomenon caused by the monitor displaying part of the old frame and part of the new one. It's particularly evident in scenes with lots of motion, and it can be very distracting.


Vertical sync, or vsync, solves this issue by synchronising the GPU to the monitor's refresh rate, forcing it to wait until the start of a screen refresh cycle, also known as the vertical blanking (VBLANK) interval, before delivering a frame. Vsync ensures that only full frames are ever displayed, eliminating tearing.

Vsync, however, introduces its own problems. If the GPU takes too long to render a frame, missing the refresh cycle, the screen simply repeats the previous frame, introducing visible stuttering and input lag. Even if the GPU renders a frame quickly enough, input lag can be an issue with vsync, as it will hold frames until the refresh period, meaning you're not being shown the latest information as soon as possible.

Higher refresh rate panels (such as 144Hz) help to combat these issues - the shorter wait between refreshes means tearing, input lag and stutter are harder to detect, but you need to be running at very high frame rates to get the most benefit, and the problems are lessened, not solved. However, variable refresh rate (VRR) technology, such as FreeSync and G-Sync, directly addresses and fixes these issues by making the GPU the master, synchronising and varying the refresh rate to match the render rate.

How G-Sync works


G-Sync uses a proprietary module developed by Nvidia that replaces a monitor's scaler, although it has no true scaling hardware of its own, passing scaling duties to the GPU. As a result, G-Sync monitors often feature just a single Display Port 1.2 input with no audio capabilities and reduced colour processing features. Extra inputs and features can be added by using a secondary, legacy scaler, although it adds to the cost.

G-Sync manipulates the panel's VBLANK period. If a frame takes longer than expected to render, the interval is extended and the screen refresh delayed until the new frame is ready. Alternatively, if it arrives quicker, G-Sync will shorten the VBLANK period and trigger the screen refresh immediately. The result is no torn frames, no repeated frames and user inputs translated into on-screen action as soon as possible.

Of course, G-Sync is still bound by panel limitations. All screens have a maximum refresh rate, and if you render faster than this rate, G-Sync resorts to standard vsync behaviour so you still avoid tearing.

More interesting is the lower limit. LCD panels must be refreshed a minimum number of times per second to prevent flicker, typically around 30Hz - VBLANK can't be extended indefinitely. However, if yourframe rate does drop below 30fps, G-Sync still keeps the display running as smoothly as possible. A G-Sync module includes 768MB of DDR3 memory, which the logic uses to maintain a moving average of the past few frame times in order to estimate the next interval. If the interval is expected to exceed the panel's maximum permitted refresh time, G-Sync switches to a refresh rate that's a multiple of the incoming frame rate. For example, at 28fps, G-Sync can switch to 56Hz. This situation does lead to a repeated frame, but it's only shown for the shortest time possible before the next one is ready.

With G-Sync replacing a panel's scaler, it becomes responsible for ghosting too, where the on-board memory comes into play. Using a feature called G-Sync Variable Overdrive, the module increases overdrive when a frame is predicted to arrive early, and does the opposite when it's likely to be late. The module can also be fine-tuned for each panel.

Nvidia hardware has wide support for G-Sync - every GPU from the GTX 650 Ti Boost upwards fully supports the technology, including in SLI configurations. Note that Kepler and first-generation Maxwell cards have slight latency when using G-Sync (1-3 per cent), as they have to poll the module after rendering a frame to see if the monitor is ready for it. This latency has been all but eliminated in second-generation Maxwell cards (GTX 900-series), which have updated display hardware.

FreeSync

How FreeSync works


FreeSync aims to do the same job as G-Sync but without using a proprietary module, and relying on open industry standards instead. AMD worked with VESA to add a new optional component to the DisplayPort 1.2 specification in 2014 called DisplayPort Adaptive-Sync. It works similarly to G-Sync, expanding the potential VBLANK timings of a display, and automatically ending VBLANK as soon as the GPU is ready with a frame.

While the new specification means FreeSync still requires a monitor upgrade, neither AMD nor VESA receive any money from manufacturers who opt to support DisplayPort Adaptive-Sync. As an extension of the DisplayPort specification, Adaptive-Sync is easy to integrate into existing designs, as it doesn't replace any other features, so multiple inputs, custom OSDs and image processing features can all be maintained. That said, it does put the onus of developing an overdrive system onto panel makers, since there's no custom logic involved to predict frame times.

While the specification can technically support 9-240Hz, FreeSync has similar limits to G-Sync, with panels capping out at 144Hz. This upper limit is handled slightly differently, though, as vsync can be switched on or off when using FreeSync, depending on user preference. The current lower limit of FreeSync is 40Hz. Annoyingly, it isn't fully clear how FreeSync handles the synchronisation when a card renders below the lowest supported refresh rate. AMD refused to explain it to us for 'patent application reasons', stating only that FreeSync 'can tune the low render rate behaviour for each display to accommodate the particulars of certain scaler/LCD combinations'.

Worryingly, the best available evidence suggests that, should the frame rate drop below the minimum refresh rate (such as 40Hz), not only does FreeSync behaviour and the accompanying smoothness stop, but the panel sticks at this lowest rate until it's exceeded again - basically, it waits until the maximum VBLANK interval has expired and is then forced to repeat a frame. This system results in screen tears at such frame rates (if vsync is disabled) or stutter/input lag (if it's enabled) being more apparent than on a fixed refresh rate screen, as the wait between frames is even longer than on a standard 60Hz panel.

Presently, only a limited selection of AMD GPUs support FreeSync: the R9 290-series, R9 285, R7 260 and R7 260X, as well as the 2014 A-Series Kaveri, Temash and Kabini APUs. Sadly, CrossFire isn't yet supported either. MATTHEW LAMBERT