ScreenRecorderLib
ScreenRecorderLib copied to clipboard
Suggestion: fix DXGI_ERROR_UNSUPPORTED when run against discrete GPU
Hello guys,
ScreenRecorderLib fails on some machines with DXGI_ERROR_UNSUPPORTED error. That happens because of Desktop Duplication API cannot work on discrete GPU in hybrid systems. https://docs.microsoft.com/en-US/troubleshoot/windows-client/shell-experience/error-when-dda-capable-app-is-against-gpu https://www.freemancw.com/2020/11/desktop-duplication-on-hybrid-graphics-systems/
I have spent some time investigating this issue and maybe there could be programmatic solution starting from Window 10 v1803.
https://docs.microsoft.com/en-us/windows/win32/api/dxgi1_6/nf-dxgi1_6-idxgifactory6-enumadapterbygpupreference
The trick is to use EnumAdapterByGpuPreference
with DXGI_GPU_PREFERENCE_MINIMUM_POWER
instead of EnumAdapters
. That will not solve the problem for all users, but at least it helps those who use latest versions of Windows 10.
Originally posted by @name1ess0ne in https://github.com/sskodje/ScreenRecorderLib/issues/63#issuecomment-787564840
Hey, thanks for the suggestion! I'll look into incorporating this into the next major release that i'm working on.
Thank you!