G-sync/Freesync modification for Retroarch, please test


Got a G-Sync screen recently and I’m trying to make it work with RA.

The settings to get the right refresh without modification seems to be:

-Video->Vertical Refresh Rate at your monitor frequency
(I just used “set display reported freq” that gives me near 120Hz which is my desktop freq)
-Frame Throttle->Maximum Run Speed x1.0

But then you can’t fast forward anymore.

So I modified RA loop to add that: it will run at x1 while still using the max speed ratio you choose for fast forward, and disable audio sync internally and enable audio sync a bit later than the video to keep it smooth when leaving FF.

The option to activate it is in Settings->Frame Throttle->VRR Runloop.
(Better close/restart the core when changing it.)

PR is here (updated)

edit: merged, in the nightly build now

Please tell me if everything works fine for you, if it’s still smooth when leaving fast forward or rewind, if the refresh is right.
MAME needs “Enable Throttle” in core options (cores need to send the exact right timing).


Appears to be working fine for me with a quick test, though fast forward is not a feature I ever used to notice any problems with it before.


It was losing the sync with the screen before, but that’s because audio sync was interfering.
With it set to Off it should stay smooth.


For me its smoother with Audio Sync on.


What did you test and what is your GPU/monitor tech?


Alundra on Beetle PSX, GTX1080, G-sync.


Hardware rendered stuff with variable fps isn’t really covered by this test, it’s just applying the timing the core asks for.
Not sure what we can do for that case yet.

edit: thinking about it again that should be doing that already. :thinking:


Well, turns out G-Sync isn’t working for me at all with the Vulkan driver. I turned the indicator on, then ran Beetle PSX with Vulkan and the indicator goes off. With OpenGL, the indicator stays on, but I still get screen tearing.

Of course, windowed G-Sync is currently fucked in the 1803 build of Windows, and I’m pretty sure RetroArch is always windowed in Windows, so…


You need settings->Video->Windowed Fullscreen Mode to Off for fullscreen G-Sync.
But I’m testing beetle_PSX software and I already see some strangeness, refresh rate changing sometimes when audio sync in On…


Yes I have settings->Video->Windowed Fullscreen Mode set to OFF.

What I don’t get is why my G-Sync indicator shows with GL, but not with Vulkan (in both Beetle hardware and software cores). I mean, even in software you still need a hardware renderer to handle shaders and stuff.


Beetle PSX is definitely an exception: audio sync off is making the sound crackles while On fixes that and doesn’t seem to cause much stutter…
It has some internal audio buffering system acting up or something.

Other standard cores like snes9x, fceumm, gpgx, px68k, etc are better with audio sync Off here.


But can you at least confirm whether G-Sync activates for you in Beetle PSX using Vulkan? As in, turn on the G-Sync indicator in the Nvidia Control Panel, then run a game in that core and see if that indicator appears on-screen? For me it does not (Windows 10 1803).


It appears and stays on.

Beetle PSX software & hardware, vulkan, GTX770 driver 397.34 win7 x64.


Guess this is one of the many Win 10 1803 G-Sync bugs then :roll_eyes:


I have just tested your build but Fast Forward does not work with it. I hit “Space” but it stays at same speed.

Edit : but maybe the thing is too keep “Fast Forward” to 0 in the menu ?


Frame throttle->Maximum Run Speed
Put anything you want there, 0 for uncapped fast forward, or x2, x5, whatever.

Anything but x1 as that will do nothing at all.
(it already does x1 internally unless you push the fast forward key where it will honour that max speed)


Oh wait - G-Sync DOES come on with your build, but not with official RetroArch. Why is that? GL works in official, but not Vulkan. Vulkan works in your build though. I don’t get it!

EDIT: and what’s also interesting is that Windows volume overlay doesn’t appear in your build, but does in official.

EDIT: are we supposed to have vsync enabled in your build? Or should both that AND audio sync be off?


Vsync on in RA works fine.


I’ve played for a few hours now using your build, in Beetle HW and software. No problems and works great. I’ll probably play bsnes-mercury this weekend too.

You should do a PR for this.


There’s a PR already to discuss it.
But for me I disable that VRR mode for beetle PSX (it’s now an option in the PR).