Open rpavlik opened 4 years ago
Hi @rpavlik, have you managed to repro this problem on Windows 10 2004? I don't have a machine handy for testing 1909, but we couldn't repro it on 2004 or on the Windows 11 Insider Preview.
I think I managed to get past this (iirc, 2004 became our minimum-required spec because of this), but I'm still having the following issue pretty consistently: https://github.com/MicrosoftDocs/winrt-api/issues/1942 Hopefully you're the person who can help with this!
Based on Windows 11 Pro build 22000.51
I am trying to run this sample with a sample EDID+display attached. EDID indicates that it's a specialized one with 3rd party compositor flag=1 (refer https://docs.microsoft.com/en-us/windows-hardware/drivers/display/specialized-monitors-edid-extension). OS advanced page shows it as specialized and prevents desktop to getting attached to it (good), but the sample app's TryAcquireTargetsAndCreateEmptyState() keeps failing with error D0000022. Indicating as HMD works.
@zhuman Any comments?
Hi, I am exploring sample app: https://github.com/microsoft/Windows-classic-samples/tree/main/Samples/DisplayCoreCustomCompositor and it was failing in TryAcquireTargetsAndCreateEmptyState() with AccessDenied error. I tested it on Latest Windows11 insider Preview OS. Still saw the same issue.
Note: TryReadCurrentStateForAllTargets() is passing and could able to get targetPath by using stateCreationResult.State().GetPathForTarget(target);
TryAcquireTarget(), TryAcquireTargetsAndCreateSubstate(), TryAcquireTargetsAndReadCurrentState() these functions are giving AccessDenied error. error code: 2 extended error code: -805306334
@zhuman, Please provide any debug pointers to resolve this issue? Can we know the reason for AccessDenied??
Do you have a display that has the HMD flag set in EDID? If I remember correctly, you'll get access denied if you try to acquire some display that is not marked as a specialized display.
Thanks a lot for quick reply and providing the debug pointer. Currently, I tried on HDMI panel and HMD Flag wasn't set. Will try if I can reproduce the same with HMD Flag set in EDID.
I thought, it should be applicable for all the display types and a replacement for https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-setdisplayconfig
Hmm, didn't even know about that API. No, as far as I know it's only for specialized displays - stuff that shouldn't normally get the desktop extended to it.
Hmm, didn't even know about that API. No, as far as I know it's only for specialized displays - stuff that shouldn't normally get the desktop extended to it.
hi @rpavlik , i've attached a VR with HMD flag set in EDID, but still get error D0000022(access denied) in TryAcquireTargetsAndCreateEmptyState() . meet this error when code run to line 234 in DisplayCoreCustomCompositor.cpp // Create a state object for setting modes on the targets auto stateResult = manager.TryAcquireTargetsAndCreateEmptyState(myTargets);
Any ideas?
If it is a Windows MR HMD, I'm pretty sure it won't work, they have a separate flag for that. If it's not, then my best guess is that your EDID is not quite right. (You can't use an edid override to set the flag.) Either that or you are hitting the same issue I hit long ago when I filed this bug.
"Specialized display" will work only with Windows 10 Enterprise, Windows 10 Pro for Workstations, and Windows 10 IoT Enterprise. That's what I recall. Also documented under "https://learn.microsoft.com/en-us/windows-hardware/drivers/display/specialized-monitors#windows-10-version-2004"
That's if you want to manually flag a display as specialized. (e.g. for a digital display board, so your airport signage doesn't show a windows desktop...
)
Those flagged in the EDID with the HMD flag are available to this API in other editions: https://learn.microsoft.com/en-us/windows-hardware/drivers/display/specialized-monitors-compositor#hardware-and-software-requirements
I've been using this API in production for a couple years now. (windows 10/11 pro) I have not seen this particular error in some time, IIRC, the https://github.com/MicrosoftDocs/winrt-api/issues/1942 one is more persistent.
Thanks Ryan @rpavlik and Sameer @kpsam2000Intel a lot. After modifying the VSDB version as 0x2. The problem was resolved.
I have some HMDs that I've added the special EDID extension to mark them as non-WinMR HMDs, and I'm trying to use the sample provided in this repo. They are correctly recognized, but are triggering an hresult_error at one of a few places:
TryAcquireTargetsAndReadCurrentState
: https://github.com/microsoft/Windows-classic-samples/blob/340d6c8c537919663cb122d1a3cf76bed91c06f8/Samples/DisplayCoreCustomCompositor/cpp/DisplayCoreCustomCompositor.cpp#L283-L285TryApply
): https://github.com/microsoft/Windows-classic-samples/blob/340d6c8c537919663cb122d1a3cf76bed91c06f8/Samples/DisplayCoreCustomCompositor/cpp/DisplayCoreCustomCompositor.cpp#L279-L281In both cases, the hresult returned is "0xd00000f2" which is a complete dead-end when searching, and no further message is available through WinRT.
My system is running Windows 10 1909, on a Radeon RX580 graphics card (latest WHQL driver, Driver Version 19.50.29.27-200515a-355311C-RadeonSoftwareAdrenalin2020 ). The HMDs I'm trying are two modified OSVR HDK headsets (one v1.3 without HDCP, one HDK2 with HDCP), both with a modified EDID to add the non-WinMR HMD flag. Also tested on a Dell XPS13 9370 (Intel graphics) - same result for the HDK2, it can't see the HDK1.3 at all (which I think I expected). Also tested on an NVIDIA GTX1050 - same result for the HDK1.3, "no matching modes" for the HDK2 (which seems unrelated).
I'm currently updating the NVIDIA machine to test on 2004.