CPU doesn't focus on background/non-focused programs

MythyMoo

Prominent
May 13, 2017
11
0
520
Basically I stream on Twitch with OBS Studio and it has never been a problem until a few days ago.

The problem: Every time I press record/stream in OBS and then alt-tab into the game, OBS will start having like 10-50fps while the game is fine. If I tab back into OBS again the lag is gone for BOTH OBS and the game is still fine. Another thing to note is that I can see that the CPU usage goes down in OBS when I tab into the game to about 2-3% and when I tab back into OBS the usage goes up to 5-6% (while being idle in-game).

I came as far as to know that the problem is that my CPU doesn't care about background apps and only focuses on the currently active window. Again, this has never been a problem before but just started happening randomly a few days ago.

So I've up to this point tried: disabling game DVR, defragging, prioritizing in task manager, assigning cores, reinstalling NVIDIA drivers, updating Windows, changing refresh rate on screens and uninstalling GeForce Experience. Nothing has worked.

I then discovered something weird. If I press record in OBS and tab into the game, OBS will start lagging like it does. BUT if I then press F11 or go into fullscreen inside the game, then tab out of the game and back into the game, the lag is completely gone in both the game and on OBS (OBS is actually using 12-15% CPU now as it should).
I can then change back into borderless window mode (which is very vital when streaming) and everything will still be fine, but the second I tab into OBS and back into the game, the lag is back and unwatchable in OBS.

Is there a way to make my CPU actually focus on more than just the game as it used to? Bare in mind that while streaming the CPU, GPU, Memory and Disk usage are all still below 30%.

PC Specs:
GTX1080 GPU
Intel Core i7-6800K 3.40GHz Processor
32GB RAM

Any help is appreciated.

SOLUTION:
Avast has this thing called "Game Mode" too which as well as the Windows one only uses CPU on the games rather than background processes.

Disabling it fixed my problem!
 
Solution
I found the solution to my problem.

Avast has this thing called "Game Mode" too which as well as the Windows one only uses CPU on the games rather than background processes.

Disabling it fixed my problem!
You could try setting the priority in task manager for OBS to "above normal" or "high". There is also a setting in computer -> properties -> advanced system settings -> advanced to focus on background programs rather than foreground, but I'm not sure how negatively that would impact your performance otherwise.

Did you notice any change in your system's behavior after the latest Windows Update or something?
 

MythyMoo

Prominent
May 13, 2017
11
0
520
Already tried both of those with no luck. I actually didn't see any changes other than when I'm playing games (mostly games made with Unreal Engine) other background windows such as Chrome (watching a video) will start stuttering until I press on the window.

Thank you though.
 

MythyMoo

Prominent
May 13, 2017
11
0
520
I found the solution to my problem.

Avast has this thing called "Game Mode" too which as well as the Windows one only uses CPU on the games rather than background processes.

Disabling it fixed my problem!
 
Solution


I use Avast too and did not know this. Excellent.