Strange VSync issues on a GTX 1060
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.