onivim / oni2

Native, lightweight modal code editor
https://v2.onivim.io
MIT License
7.84k stars 282 forks source link

Screen flicker and mouse lag on G-SYNC display #3028

Open mfish38 opened 3 years ago

mfish38 commented 3 years ago

Whenever Oni2 is focused on my primary G-SYNC display my entire screen starts a very subtle flicker and my mouse cursor movement starts lagging (moving at a much lower framerate), even when it is not over the Oni2 window. This will go away after keeping my cursor off of the window for around 3 seconds. Keeping the mouse cursor still over the window for over 3 or for seconds will make the screen stop flickering.

Oddly, if the mouse cursor is moving over an open buffer the mouse lag goes away while it is over the buffer, but the screen still flickers.

If Oni2 is open but not in focus both of these issues go away. There are also no issues if i move the window to my non-G-Sync secondary monitor, or disable G-SYNC.

System Details:

bryphe commented 3 years ago

Thanks for logging the issue and the details @mfish38 - it does seem like there is a bug here in terms of how we are integrating with g-sync. One issue that comes up with g-sync is flicker during loading screens or times of variable framerate.

I wonder if setting Onivim's vsync configuration setting changes the behavior? It'd be interesting to see if setting "vsync": true in configuration.json (will need to close & re-open Onivim after changing"vsync") has different behavior.

Would be helpful to know also:

mfish38 commented 3 years ago

@bryphe unfortunately setting "vsync": true and restarting the app does not change the behavior.

Launching the app with G-Sync in the NVIDIA control panel set to be for full screen mode only does make the issue go away, but I would assume this means G-Sync would then not work for games and apps that run as full screened windows.

More system details: