<p>Ok so setting the "power management mode" to "prefer maximum performance" in the nvidia control panel seems to fix it. </p>

<p>Since I already create an optimus profile automatically through code all I had to do was to set this value as well.</p>

CC BY-SA 4.0
2019-11-12T20:11:00.063Z
2019-11-12T20:11:00.063Z
Tyron
<p>I'm out of my wits. I've been working an a voxel game for the last couple of years, written in C# and OpenTK (=OpenGL backend)</p>

<p>I've been struggling to achieve a stable frame rate and one of the major issues I can see after countless hours of frame profiling, is that the windows 10 nvidia graphics driver seems to act in some really strange ways.</p>

<p>It almost seems as if my card is in some sort of low power mode by default in which it renders at arbitrarily changing speeds, but once its put under load it renders reliably again.</p>

<p>I can reliably reproduce this by launching my game with non-demanding graphics setting, then up the GPU load with dynamic shadows, god rays and such, then lowering the demands again.</p>

<p>This is all with VSync enabled (and in the nvidia control panel the vsync option is set to "Let the application decide")</p>

<p>Here are some frame rate graphs:</p>

<p>Low gpu load, draw calls randomly take a few milliseconds longer, then it almost seems to overcompensate by drawing the next frame too fast.</p>

<p><a href="https://i.sstatic.net/odOeA.jpg" rel="nofollow noreferrer"><img src="https://i.sstatic.net/odOeA.jpg" alt="enter image description here"></a></p>

<p>Then I increase the gpu load for a few seconds and lower it again. The frame rate gets buttery smooth:</p>

<p><a href="https://i.sstatic.net/nLDtH.jpg" rel="nofollow noreferrer"><img src="https://i.sstatic.net/nLDtH.jpg" alt="enter image description here"></a></p>

<p>As mentioned I carefully profiled this issue and it always seems that the time is spend on various draw calls (usually GLMultiDrawElements), but highly inconsistent.</p>

<p>Anyone have an idea what the heck is going on here and how I can fix this?</p>

<p>Is there any call I could make to NVAPI to force it into this hypothetical high power mode?</p>

CC BY-SA 4.0
2019-11-13T14:01:10.767Z
This is speculation on my part, but is this a laptop or a desktop system? Laptops sometimes have two GPUs ( e.g. https://superuser.com/questions/908824/why-does-my-laptop-have-two-graphics-cards ).  Second idle thought is could it be using triple buffering? That might account for a later frame being displayed sooner than expected?
Simon F
CC BY-SA 4.0
2019-11-14T14:09:19.313Z
This could also occur if your thread has delays waking up from its wait-for-vsync.The next frames wait for vsync then starts earlier than expected, even though the 2 frames end up at the display evenly paced.
PaulHK
<opengl>
Strange VSync issues on a GTX 1060
Tyron
# Strange VSync issues on a GTX 1060

(Asked by: username_0 on 2019-11-12)

I'm out of my wits. I've been working an a voxel game for the last couple of years, written in C# and OpenTK (=OpenGL backend)

I've been struggling to achieve a stable frame rate and one of the major issues I can see after countless hours of frame profiling, is that the windows 10 nvidia graphics driver seems to act in some really strange ways.

It almost seems as if my card is in some sort of low power mode by default in which it renders at arbitrarily changing speeds, but once its put under load it renders reliably again.

I can reliably reproduce this by launching my game with non-demanding graphics setting, then up the GPU load with dynamic shadows, god rays and such, then lowering the demands again.

This is all with VSync enabled (and in the nvidia control panel the vsync option is set to "Let the application decide")

Here are some frame rate graphs:

Low gpu load, draw calls randomly take a few milliseconds longer, then it almost seems to overcompensate by drawing the next frame too fast.

[![enter image description here](https://i.sstatic.net/odOeA.jpg)](https://i.sstatic.net/odOeA.jpg)

Then I increase the gpu load for a few seconds and lower it again. The frame rate gets buttery smooth:

[![enter image description here](https://i.sstatic.net/nLDtH.jpg)](https://i.sstatic.net/nLDtH.jpg)

As mentioned I carefully profiled this issue and it always seems that the time is spend on various draw calls (usually GLMultiDrawElements), but highly inconsistent.

Anyone have an idea what the heck is going on here and how I can fix this?

Is there any call I could make to NVAPI to force it into this hypothetical high power mode?

**Tags:** opengl

> **Comments:**
> **username_1**: This is speculation on my part, but is this a laptop or a desktop system? Laptops sometimes have two GPUs ( e.g. https://superuser.com/questions/908824/why-does-my-laptop-have-two-graphics-cards ).  Second idle thought is could it be using triple buffering? That might account for a later frame being displayed sooner than expected?  
> **username_2**: This could also occur if your thread has delays waking up from its wait-for-vsync.The next frames wait for vsync then starts earlier than expected, even though the 2 frames end up at the display evenly paced.  

---

## 1 answers

### Answer by username_0 on 2019-11-12. Score: 1

Ok so setting the "power management mode" to "prefer maximum performance" in the nvidia control panel seems to fix it.

Since I already create an optimus profile automatically through code all I had to do was to set this value as well.


---

