How to make Unity build use main graphic card instead of integrated one.

Hello,

As topic says, most of PC users are not that experienced they know/will to set graphic card on Nvidia panel as our game launches with integrated card on default for many users.

This is a BIG part of our total refunds, people launch the game - we show them message “You are using integrated graphics, please set your default graphic card on Nvidia panel” but of course they don’t give a snap and refund with negative comment saying that the game is not optimized at all.

Is there any way to prevent that? I cannot belive that we are unable to set some kind of flag which would make the game start with main graphics by default.

See that topic for example:

1 Like

Hi,

From experience, it’s more like a Windows/DirectX issue than Unity itself.

From what I observed, it will depend on what graphic card your screen is connected.
If you have two screen, one connected to the integrated one and the other to the PCI graphic card, the perf will always the weakest card.

Probably because windows have to synchronize them, like two DDR RAM running on different speed.

This topic may help you: http://www.tomshardware.co.uk/answers/id-2701252/monitors-intel-nvidia-gpu.html

Out of interest, how are you detecting whether they’re using an integrated (and also have a dedicated) GPU? I’ve encountered this issue in my game as well and haven’t found a good solution.

if (SystemInfo.graphicsDeviceName.Contains(“Intel”) || SystemInfo.graphicsDeviceName.Contains(“Integrated”) || SystemInfo.graphicsDeviceName.Contains(“0D”))
{
//Show Debug
}

of course its not 100% reliable

2 Likes

The experience I’ve had playing higher end games on my PC - the game usually has suggested graphic settings based on my system. Previous post mentions the game does this hardware scan.
Couldn’t the game have a little popup that states - you have two graphics cards - it is suggested to use this one instead of that one to get the best visual experience?

Got it from here : How to do I make a windows build default to using nVidia instead of integrated on a Windows laptop? - Questions & Answers - Unity Discussions

haven’t tried it though, since I havent build any pc game using Unity atm…

Anyone got this working yet?
I run into a similar problem recently where it is picking the low end card.
The thing is that on Mac i have a dropdown menu to choose the card but not in windows.

Same here – in the resolution dialog, it defaults to the integrated card, not the dedicated card. Did you figure that out?

I’m struggling with this issue too, and I’m on Unity 5.6, which doesn’t even list the GPU choices in the resolutions dialog. Many devs would prefer to disable that placeholder launcher anyway.

After a fair amount of research, it looks like we’re at the mercy of the OS / drivers to determine default GPU in these situations.

According to Nvidia and AMD documentation, some versions of their drivers look for hints of various kinds to make this determination, but in general will default to the integrated (low power / low performance) chip. You can see a few of the options that developers have with Nvidia Optimus drivers, for example.

I’ve tried all of the self-serve options described in there and none worked for me. These were all a pain because they’re well outside the normal dev process that most Unity developers are used to (requiring C++ externs, linking static libraries, etc.). It’s quite an old doc, but it’s the best I could find. I don’t even know if modern Nvidia drivers use “optimus” tech or these mechanisms for taking GPU hints anymore.

Interestingly, it looks like Unity tries one of the self-serve options for us to get a good GPU choice. Your standalone builds should have certain external values automatically set for those drivers to notice, which you can see with the VS dumpbin tool.

Cross reference those names to the documentation and you’ll see that this is what their drivers supposedly look for to give you the good GPU by default.

My best hope at this point may be to petition Nvidia to include my game’s specs in their drivers, which might work for release, but is likely impractical for pre-release builds for beta testers and press.

Would be really nice to get a Team Unity response on this issue that people have been fussing over forever without direction.

1 Like

I did try this and it didn’t work. I’m not sure that alone causes linking of the static library anyway. Does it?

Bump, is there are improvement on that matter in next versions of Unity? I feel we are missing something, but seeing analytics how many players running the game on integrated GPU without even knowing that is very weird.

Under System > Display > Graphics, you can set which graphics adapter should be used for your game.
9840735--1415895--upload_2024-5-17_7-55-47.png
Maybe the installer could create an entry?

Alternatively, you could create a bootstrap program for the Unity player which detects the correct graphics adapter and passes it via the -force-device-index command line parameter.