I attach my system configuration image. (6th generation CPU and Windows 10 OS)
Currently I am connecting both the monitors on external graphic card and extending those the monitors.
When I encode in Mpeg or H264 (using Hardware nased encoder), its fails in initialization.
mfxIMPL impl = MFX_IMPL_HARDWARE_ANY;
sts = m_mfxSession.Init(impl, &min_version);
I also try with MFX_IMPL_HARDWARE and MFX_IMPL_HARDWARE2 option also. But with those option also encoder initialization fails.
If I connect single monitor in External graphic card then encoding started. Problem is with 2 monitor connected in extending mode.
In Windows 7 with same configuration and with 2 monitors (both connected on external graphic card) encoding in Mpeg and H264 is working.
Currently I am using Intel media_sdk_22.214.171.1248 and Intel Media Samples 126.96.36.199.
It's good news that you were able to get Media SDK working with at least some of your graphics configurations.
Multiple monitors and switchable graphics can be very tricky, as the answer quite often turns out to be very specific to your system.
For example, depending on your BIOS you may be able to select primary and secondary displays. I see from your screenshot that Intel graphics is second. There may be an option which makes Intel graphics primary, but that is likely to take some investigation on your part.
Also, depending on your OEM you may be able to update to the newest graphics driver -- or you may already be at the latest version available.
You may also have better luck in DX11, but no guarantees.
Sorry to say that there may not be a single definitive answer. However, I hope that at least one of these suggestions helps.