17

There are many questions and answers about how to select nVidia discrete adapter on runtime on Windows platform. The easiest way is to export a NvOptimusEnablement variable like this:

extern "C" _declspec(dllexport) DWORD NvOptimusEnablement = 0x00000001;

I have the opposite requirement. I need to set the Integrated graphics in runtime for my application, no matter what is the Preferred graphic processor in NVIDIA control panel. This variable is not suitable for this. How can I make this?

Anton K
  • 4,658
  • 2
  • 47
  • 60
  • Why would your app be using the high performance graphics card unless you are using something like DirectX? If you are using DirectX, set your adapter to be the intel adapter and it won't use the nVidia one ... – Goz Nov 21 '14 at 09:18
  • I'd like to use DirectX, but on the integrated graphics adapter, since nVidia one doesn't work correctly on my task. Because of this, I want to programmatically select an integrated adapter until video driver is fixed – Anton K Nov 21 '14 at 18:47
  • So show us your DirectX initialisation. – Goz Nov 22 '14 at 04:36
  • Also check commment #4: https://code.google.com/p/chromium/issues/detail?id=106438 – Goz Nov 22 '14 at 04:36
  • @Goz This is the answer to your DirectX init question. Getting the correct device was the option I was doing. That's all OK. The problem is that if I select the device in this manner, I cannot access the required DirectX functionality. I can access it correctly only if I choose the integrated adapter in nVidia control panel. This is known driver bug for the equipment I use. So I have an option to choose integrated adapter in nVidia control panel on all computers, which use my program, or select the integrated adapter programmatically. – Anton K Nov 22 '14 at 18:35
  • I know this might be a dumb question, but have you asked nVidia directly? – BlamKiwi Nov 26 '14 at 03:41
  • It's not, but they are not so great answering on their support forum. Actually it has been finished by shipping the equipment to nVidia, where they found a bug in driver. However, if I had had the option as stated in the question, it would be a nice and easy workaround while waiting for the fix. – Anton K Nov 26 '14 at 18:31

1 Answers1

2

The code under sop - setoptimusprofile registers an application profile so the driver automatically selects the discrete card for the specified application. Maybe you can change it so that it uses the integrated one?

mirh
  • 514
  • 8
  • 14
Mark Jansen
  • 1,491
  • 12
  • 24