How should I package/boot my game to let windows default to a dedicated (vs integrated) graphics card?

I package my game. Then I launch it. Windows launches it using my laptop integrated graphics card. To use my dedicated nvidia, I have to manually select that option – either from my nvidia control panel or from windows apps graphics setting.

Indeed in those settings you can choose, for each app, whether to “let Windows decide” or have it in “High performance” (dedicated graphics card) or “Power saving” (integrated graphics card) mode:

Point is, for most games (see Outer Wilds in the example above) Windows defaults to “High Performance”. For whatever I package, it always end up running in Power Saving. Does anybody know what’s the alchemy that lets windows decide to default to high performance?

Any lead on this is greatly appreciated.

Cheers,
f

I believe thats based on your Energysaver-Settings. If you set them to HighPerfomance, it wil use it as default for any Application/Game you starting. Its a decision about what you want. If youre traveling or without recharger, i recommend the default. but if you on powerline you can choos something with more options. Reactivating the “Ultimate Power” can solve that.

Hope that Helps
greets DeepX

1 Like

Thanks for your answer @DeepX. My issue is not about setting the proper Windows settings; it’s how I let windows know that my game should be started in High Performance mode by default. Since I’ve noticed that, when power is set to “balanced” mode, some app default to High Performance and some other app to Power Saving. The only useful info I found so far is in the comments to this article: How to assign graphics performance preferences to Windows 11 programs - gHacks Tech News, suggesting that there’s some sort of “list” in the graphics card drivers? And that’s no way for you to write code that forces windows to default to one mode or the other.

For what is worth, I’ve now noticed that if I run my packaged game it defaults to Power Savings; but if run it from a Steam install, it correctly defaults to High Performance.

f

Hi.

On Laptops mostly two Graphiccards. The firts one is the “Integrated” and the other is the “real” one (sorry for my bad english). If you start the game it will use the default graphics, that is in most cases the integrated. On the other Hand if your using Steam it uses the “real” one so that its on highpower. with the ingame consolecommand r.GraphicsAdapter=1 you use the “real” one, and 0 is the use of the integrated Device. I hope you understand it and it works for you.

greets DeepX

This looks exactly like what I need! Thanks @DeepX!