# Disabling Control Flow Guard (CFG), an exploit protection feature in Windows 10 fixes various games stuttering



## Khonjel (Sep 1, 2019)

Came up across *this* in Nvidia subreddit. While I'm always suspicious of any claim by DSOG, seems like many people are posting positive results. And while he claims it helps for DX12, some people are also claiming it helps in Witcher 3, Final Fantasy XV and Far Cry 5 which are DX11 titles.

One of the replies said this about the feature : 





			
				notgreat said:
			
		

> It's a security thing that makes it so that malicious input causing a buffer overflow (or similar attacks) will crash the program rather than execute malicious code. Basically, don't disable it for anything connected to the internet and you'll probably be fine. (But it's still stripping away a layer of useful security)



While the DSOG author cites Resetera as source, the Resetera member sources his findings to a *forum thread* in Guru3D.

Here is the OG OP:





			
				gerardfraser said:
			
		

> 1.Search and Open Exploit Protection
> 2.Click On the Program Settings Tab
> 3.Click On The + Add Programs To Customise
> 4.Click On Choose Exact File Path
> ...



Here are some documentations about Control Flow Guard:
* Official Microsoft doc
* The Windows Club article on the feature
* Wikipedia
* CFG causes performance degradation for Chromium based browsers
* 




__
		https://www.reddit.com/r/https%3A//www.reddit.com/r/PUBATTLEGROUNDS/comments/8jgz6g/disabling_control_flow_guard_in_windows_defender/dyzxvw8/


----------



## Bill_Bright (Sep 1, 2019)

I think if disabling Exploit fixes the game, the game has a bug and needs to be fixed.


----------



## eidairaman1 (Sep 1, 2019)

Bill_Bright said:


> I think if disabling Exploit fixes the game, the game has a bug and needs to be fixed.


Should be reported, however just like AVs, some have caused games to run like crap or suddenly start a scan.


----------



## Bill_Bright (Sep 1, 2019)

eidairaman1 said:


> however just like AVs, some have caused games to run like crap or suddenly start a scan.


True - but if 1/2 dozen 3rd party games and AVs out of 100s of games, security and other applications cause problems, I would point fingers at the 1/2 dozen 3rd party programs. 

So yeah, "should be reported".


----------



## SomeOne99h (Sep 1, 2019)

Bill_Bright said:


> security and other applications cause problems, I would point fingers at the 1/2 dozen 3rd party programs.


I have learned through out the years that even if I disabled the real time scanner/scanners of an AV, it could still bug app/s or the OS. I have this tendency to read the change log of a new update for various AVs to see what get fixed to learn what kind of bugs they can inflect.

Oh, and video codecs that gets installed on the system could also make troubles and having various GPU control apps running in the same time.


----------



## Vayra86 (Sep 1, 2019)

Trying this now. Looks interesting, somewhat credible.


----------



## gerardfraser (Sep 1, 2019)

Khonjel said:


> Came up across this in Nvidia subreddit. While I'm always suspicious of any claim done by DSOG seems like many people are posting positive results. And while he claims it helps for DX12, some people are also claiming it helps in Witcher 3, Final Fantasy XV and Far Cry 5 which are DX11 titles.
> 
> One of the replies said this about it :
> I can't check it  atm and I don't have or remember any particular game that's a stuttery mess. So what you guys think?


Yeah I did up that guide last year or something for people to try.Some say placebo ,some say it works.I did notice since Control came out a few people referenced the guide.To the nutbars I did not invent this thing ,just was trying to help people out especially on Nvidia with DX12.There cards are terrible in most DX12 games,DX11 way better.


----------



## Vayra86 (Sep 1, 2019)

So far, good results. Lichdom Battlemage had a specific stutter issue (very infrequent) that I have yet to encounter with setting CFG off. Installing TW3 now for a stroll through Novigrad...

EDIT: butter smooth in TW3. Something definitely feels different and if I watch the framerate, I'm simply stuck at 120 (yes even in Novigrad, but that wasn't new) and anytime there's a minute drop, its not a wild chase through 119-117-115 FPS, but a single more pronounced one to 110 FPS - and does not exhibit stuttery behaviour. Can definitely see some minor differences in how the game handles sudden CPU load spikes. No single stutter observed... but this needs more playtime to really prove itself, TW3 ran just fine for me prior to the change. Turning CFG on again and rebooting, back into Novigrad I did encounter two minor stutters... 

As always very hard to grasp these things (is it real or not) but I'm slowly becoming a believer here.


----------



## jaggerwild (Sep 2, 2019)

What is the "Exploit Protection" in windows? Sorry blonde moment.............


----------



## Khonjel (Sep 2, 2019)

Vayra86 said:


> So far, good results. Lichdom Battlemage had a specific stutter issue (very infrequent) that I have yet to encounter with setting CFG off. Installing TW3 now for a stroll through Novigrad...
> 
> EDIT: butter smooth in TW3. Something definitely feels different and if I watch the framerate, I'm simply stuck at 120 (yes even in Novigrad, but that wasn't new) and anytime there's a minute drop, its not a wild chase through 119-117-115 FPS, but a single more pronounced one to 110 FPS - and does not exhibit stuttery behaviour. Can definitely see some minor differences in how the game handles sudden CPU load spikes. No single stutter observed... but this needs more playtime to really prove itself, TW3 ran just fine for me prior to the change. Turning CFG on again and rebooting, back into Novigrad I did encounter two minor stutters...
> 
> As always very hard to grasp these things (is it real or not) but I'm slowly becoming a believer here.


This gives me hope. Lemme check if it fixes Deus Ex MD and RotTR this weekend. Though I think it's mostly because of low framerate tbh.



Bill_Bright said:


> I think if disabling Exploit fixes the game, the game has a bug and needs to be fixed.


My understanding is that Windows 10 features are not letting the game reach their full potential. There's so many things in Windows 10 that people suggest if turned off supposedly increase performance. There's also Full Screen Optimization. Even though you set your game full screen it's actually not. You can easily check this by changing volume by Fn + F3/F2 if your keyboard has the function. In newer games a slider shows up. In older games (in my experience Insurgency 2014) it does not. Also alt + tabing is seamless in games with FSO layer. Almost like borderless window even though fullscreen has been set in in-game settings.

Plus there are so many people claiming it fixes stuttering in that reddit thread plus the resetera thread too. So...


----------



## Mussels (Sep 2, 2019)

I had to look up what this even was - perhaps add to the OP what exploit protection *is* and how to disable it for people who end up here by google searches?


----------



## moproblems99 (Sep 2, 2019)

Mussels said:


> I had to look up what this even was - perhaps add to the OP what exploit protection *is* and how to disable it for people who end up here by google searches?



I had to look it up as well.  Will definitely look into this more.  Seems like you can set preferences per application and it doesn't have to be an all or nothing affair.


----------



## natr0n (Sep 2, 2019)

Windows 10 is not worth the hassle.

 With DX 12 coming to Win 7 soon people can play games hassle free like the good old days.


----------



## phanbuey (Sep 2, 2019)

this definitely helps - I tested with HT OFF (which causes massive hitching) and while it still dropped a frame here and there it was 99% smoother. 

Going to do this for all my problematic games. thanks!


----------



## Khonjel (Sep 2, 2019)

natr0n said:


> Windows 10 is not worth the hassle.
> 
> With DX 12 coming to Win 7 soon people can play games hassle free like the good old days.


Lol. This is what I was thinking too. And since after this year W7 won't get any updates anymore I'll just dual boot Linux and Windows 7.


----------



## biffzinker (Sep 2, 2019)

Mussels said:


> I had to look up what this even was - perhaps add to the OP what exploit protection *is* and how to disable it for people who end up here by google searches?


If you want to navigate by GUI it's click Settings, click Update & Security, click Windows Security, on the right click App & browser control, scroll down to Exploit Protection, and click Exploit protection settings.


----------



## Chomiq (Sep 2, 2019)

In before someone exploits this workaround to inject malware into "backup" exe file.


----------



## Bill_Bright (Sep 2, 2019)

Khonjel said:


> My understanding is that Windows 10 features are not letting the game reach their full potential


Got a link? I know of no Windows "feature" that hinders the performance of any application - and games are applications too. Security programs in general (regardless of maker) can impact the performance of a computer (where computer = hardware + OS). But that's not the fault of the OS. That's the fault of the bad guys. 

I say again, if the vast majority of applications work just fine, but a small hand-full of programs don't, it most likely is not the fault of the OS.


natr0n said:


> With DX 12 coming to Win 7 soon


Don't get too excited about this. It currently is only for World fo Warcraft and is NOT slated to be fully implemented with W7. See https://www.anandtech.com/show/14078/microsoft-brings-dx12-to-windows-7

Migrating to W10 is still the best option in the long run.


----------



## Mussels (Sep 3, 2019)

Ignore the anti W10 trolls, we've found a bug in a security program that causes stutter - they're the antivaxxers of the computer world "I WONT GET INFECTED! MY PC HAS NATURAL IMMUNITY!"


----------



## sjpowa (Feb 9, 2021)

THIS IS A HUGE FIX FOR ME!!!

I got a RTX 2060 to play smooth on fps like cod and bfv on a 144hz monitor and i got micro stuttering all the time.

If i set my monitor at 60hz or 75hz the stuttering is higher and the v-sync doesn't help, but now just disabling this thing globally i can play smooth on even 60fps or 75 + the v-sync or without.... before was impossible and i was giving the fault at my monitor.

This is crazy


----------



## gerardfraser (Feb 9, 2021)

sjpowa said:


> THIS IS A HUGE FIX FOR ME!!!
> 
> I got a RTX 2060 to play smooth on fps like cod and bfv on a 144hz monitor and i got micro stuttering all the time.
> 
> ...


I done up the guide so you can pick single programs. Just some friendly advice DO NOT DISABLE the setting globally but I can not tell you what to do and if your fine with it disabled globally ,chances are nothing will happen


----------



## R-T-B (Feb 9, 2021)

Can't believe I didn't see this earlier.

Things like this exist in linux land too, and have for a while.  They are known there as "stack canaries."  The principal is most likely the same here:  The idea is to write a "canary" byte every so often with a known value (the term canary comes from the birds that miners would use as sacrifical detectors to find out when they were entering an area with low oxygen or toxic gas, fun factoid).  If a stack overflow exploit happens, the program detects the change in the canary value and halts execution (crashes) rather than execute malicious code.

The drawback is decreased code density (which means slower execution) and raised memory usage, the memory usage can go up by a factor of as little as a few to as much as 30% increase depending on how agressive the canaries are applied.  I imagine windows must be doing it agressively, hence you guys getting benefits from disabling it.

Just a little explanation for you guys as to how this stuff works.


----------



## P4-630 (Feb 9, 2021)

R-T-B said:


> Just a little explanation for you guys as to how this stuff works.


----------



## oobymach (Feb 9, 2021)

Mussels said:


> Ignore the anti W10 trolls, we've found a bug in a security program that causes stutter - they're the antivaxxers of the computer world "I WONT GET INFECTED! MY PC HAS NATURAL IMMUNITY!"


Immunity is relative, if you take your pc onto darkweb you're just asking for trouble, but if you only browse a handful of sites you're probably ok. I would recommend any third party security over windows, the first thing a hacker learns on is windows built in software.


----------



## ThrashZone (Feb 9, 2021)

Hi,
Window is not the only security in existence lol 
Think this windows defender setting is a ms account perk though thankfully I use local account and use third party security.
Game bar and gaming mode has always been best to disable.


----------



## sjpowa (Feb 10, 2021)

ThrashZone said:


> Hi,
> Window is not the only security in existence lol
> Think this windows defender setting is a ms account perk though thankfully I use local account and use third party security.
> Game bar and gaming mode has always been best to disable.


Well i have to quote this because sometimes when i check the EVENT VIEWER i see some errors made by this xbox bar, errors about something that this thing can't do and idk what.

ps. i don't use xbox bar


----------

