There's a problem that can happen in Monogame on Laptop systems with an on-board intel HD chip and a mobile GPU. Nvidia has this system called Optimus that renders the screen using the intel GPU and then only switches on the Nvidia GPU when needed for high-load games, and the Nvidia GPU then passes its output to the intel GPU for drawing to the screen. AMD has its own version of this called PowerXpress.
The problem is that some games don't use the real GPU unless the user manually creates a profile for the game and tells it to run in high performance mode. While that solution works, we can't exactly just tell all affected players to follow a complex set of instructions to fix this problem as some players won't be computer literate. Nvidia and AMD have both released simple fixes for this that involve exporting a global keyword from the executable which the driver will pick up on, and the C++ code for that is very simple:
__declspec(dllexport) DWORD NvOptimusEnablement = 0x00000001;
__declspec(dllexport) int AmdPowerXpressRequestHighPerformance = 1;
The problem is, there doesn't appear to be any way to do this in C#, or at least I can't for the life of me figure it out. The global reportedly has to be exported directly from the game executable rather than a DLL too, so we can't do it that way. The one way that seems to work is this one ( http://lucasmagder.com/blog/2014/05/exporting-data-symbols-in-c-for-nvidia-optimus/ ), which uses a dirty post-compile hack that takes several minutes to execute and stops you from using breakpoints and debug tools.
Optimus has been mentioned a few times over the years online (including on this forum) but there doesn't seem to be a solution posted for this yet. Has anyone managed to find a fix for this? I wouldn't be so concerned if this were just a matter of performance, it's actually causing frequent DXGI_ERROR_DEVICE_REMOVED crashes for at least one player on parts of the code that send info to the GPU such as creating vertex buffers or calling DrawUserIndexedPrimitives.