ScreenRecorderLib icon indicating copy to clipboard operation
ScreenRecorderLib copied to clipboard

Suggestion: fix DXGI_ERROR_UNSUPPORTED when run against discrete GPU

Open name1ess0ne opened this issue 3 years ago • 2 comments

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

name1ess0ne avatar Mar 09 '21 07:03 name1ess0ne

Hey, thanks for the suggestion! I'll look into incorporating this into the next major release that i'm working on.

sskodje avatar Mar 13 '21 12:03 sskodje

Thank you!

name1ess0ne avatar Mar 16 '21 22:03 name1ess0ne