I have a Dell XPS 15 9560 with a dual graphics setup with Intel and NVidia. I'm running a graphics intensive program. I've gone to the executable and marked it as to always run with high performance graphics. I've gone to the NVidia control panel and picked out this program in particular as running with NVidia graphics. I found another setting related to power management on an app-by-app basis and told it that this program should run with NVidia graphics.
And when the program starts, everything is great. It's fast and responsive. Task Manager shows it as using GPU 1 (the NVidia GPU).
Then, after running for some period of time (usually just 2-10 minutes), it will spontaneously switch back to Intel graphics and suddenly become extremely sluggish and slow. I can tell that this is why it's become slow because I have almost no CPU load, am only using 15GiB of my 32GiB of RAM, and Task Manager now reports it as using GPU 0 (The Intel GPU) and the Intel GPU is pegged at 100% load.
Why is this happening? How do I fix it?
It started happening after installing the Windows 10 1803 update.
I'm only using the laptop screen. It is a nice 4K screen.
Previous to applying the 1803 update, this program would sometimes slow down just a little. This seemed to coincide with some other program making heavy use of the Intel GPU. My primary suspect in this case was either Chrome or dwm. But it didn't slow down that much, and Task Manager still reported it as using GPU 1.
This current problem happens when the only other things running are pageant and Slack. So Chrome isn't the issue. And even if it were, it shouldn't be able to switch which graphics card some other program uses.