Force to use integrated (Intel) graphic card on Microsoft Hybrid system

本秂侑毒 提交于 2021-01-21 10:49:26

问题


I use Microsoft Desktop Duplication API and if my code runs on the Integrated (Intel) graphic card then everything works fine. But if I run on the dedicated card, I get an error.

I found that Microsoft does not support this usage on a dedicated card on Microsoft Hybrid system

DXGI_ERROR_UNSUPPORTED

Similar questions without solution for my needs:

  • DirectX11 Desktop duplication not working with NVIDIA
  • Desktop Duplication API & switchable graphics

The workaround is to launch the program on the Integrated card.

I would like to solve this from code.
I found that NVIDIA / AMD card can be forced from my code

extern "C" { // Hint to Hybrid laptop drivers that our app would really rather use the NVidia/AMD GPU that you've got sitting over there rather than Intel Graphics...
    _declspec(dllexport) DWORD NvOptimusEnablement = 0x00000001;
    _declspec(dllexport) int AmdPowerXpressRequestHighPerformance = 1;
}
  1. Is there a similar option for the Intel card?
  2. Or is it possible to change the NVIDIA / AMD card settings from my code to run next time on Integrated GPU? I mean: start my app, which check the NVIDIA / AMD settings, and if it's not forced to use Integrated graphic (when available), then modify this setting and restart my application.
  3. Any other solution to use Integrated card? (not a manual solution)

回答1:


Although you can use NVAPI to create an application profile and set a specific flag to make your application run on the integrated chip, newer versions of Windows may override your preference. Thus, the most reliable/easy way to do it is to set a registry value that was introduced in Windows 10 build 17093.

Or is it possible to change the NVIDIA / AMD card settings from my code to run next time on Integrated GPU? I mean: start my app, which check the NVIDIA / AMD settings, and if it's not forced to use Integrated graphic (when available), then modify this setting and restart my application.

You can do this with the registry value, yes. I'm using this approach in practice and wrote an overview of how I chose to do the GPU check. I believe Roman Ryltsov did something similar in his DxgiTakeSnapshot application (he has a bunch of posts on the subject worth reading).



来源:https://stackoverflow.com/questions/56645153/force-to-use-integrated-intel-graphic-card-on-microsoft-hybrid-system

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!