Xiexe / XSOverlay-Issue-Tracker

This is a public repository for tracking issues with XSOverlay. There will be no other activity here other than bug reports / feature requests.
10 stars 4 forks source link

[SQU-299] Screen randomly goes gray when using overlay #100

Open Inverness opened 3 years ago

Inverness commented 3 years ago

Describe the bug in detail: A new issue has appeared since I upgraded from a GTX 1080 to a RTX 3080.

When showing an overlay of a specific window such as Discord, I begin to encounter an issue where the screen turns gray and I lose tracking in the headset for about a second. When it begins it can happen repeatedly as much as every second or even less, fast enough that the screen isn't restored before it happens again.

I've found the issue to most often occur when displaying a single window like Discord, or sometimes when opening the windows or monitors lists. I do not recall it happen simply when displaying an entire monitor.

The issue doesn't happen immediately when showing the window, but seems to be more likely to happen when moving the cursor to the edge of the window or opening the window list below it.

The issue can be stopped by deleting the overlay window, hiding it, or changing it to display something else. Looking away from where the overlay is also seems to make it less likely.

Provide steps to reproduce the bug: Steps to reproduce the behavior:

  1. Start SteamVR, Index HMD, and Index controllers
  2. While in SteamVR Home, use XSOverlay to create a new overlay window and set it to display only the Discord window.
  3. Move the cursor to the bottom edge of the window, or open and close the window list repeatedly.

Expected behavior: SteamVR and XSOverlay behave normally.

Output Log: uDesktopDuplication.log uWindowCapture.log output_log_censored.txt

The issue occurs at 12:48:40 and 12:54:02.

When looking at the output log I found it contained my user name and titles of windows, so I had to censor this personal information. I almost didn't catch this. Please note if you're going to request uploads of logs that might contain personal information.

Additional Information: While I've only found this issue to happen when using a specific feature of XSOverlay, I'm aware the issue might be outside of your control.

The vrserver log contains many messages such as "Assertion failed: Explicit right sync does not match pending frame", "Unexpected backwards sync", and "Unexpected sample before sync".

Searching has led me to find this is usually associated with USB issues and I've already followed troubleshooting steps such as changing the USB plug and using the option in SteamVR to reinstall USB devices, but that has not worked.

I am hoping some insight could be provided into what XSOverlay is doing that would cause this issue.

SQU-299

Xiexe commented 3 years ago

Unfortunately, XSOverlay isn't doing anything unique currently for window captures compared to other solutions.

As far as I'm aware, were all (me, OVRTK, etc etc) currently using some open source MIT wrapper for the bit blit windows stuff for window capture, and a wrapper for the Desktop Duplication APIs for monitor capture.

We do have our own solution in the works, but progress on that has been slow.

I'm unsure why capturing a window would cause issues with tracking specifically, unless you're ending up with GPU problems, such as a driver issue, or a faulty unit.

I will test your repro case later tonight when I'm in VR, as I have a 3090, and get back to you.

Inverness commented 3 years ago

After some more searching I discovered that the issue is instability when PCIe Gen 4 is enabled for the graphics card. This didn't happen before with the 1080 because it didn't support Gen 4.

The workaround was to manually set the graphics card to use PCIe Gen 3 in the BIOS. For reference my motherboard is an ASUS ROG Strix X570-E Gaming.

So yeah, not a problem with XSOverlay ultimately, despite it consistently being able to trigger the issue. I assume it had to do with the amount of bandwidth used for the window capturing.

Additionally, I did find last night that it could happen rarely in some other cases while playing VRChat, rather than just with XSOverlay as I had previously thought. It triggered a few times when someone switched to a particularly graphically intensive avatar.

I'll provide the references I used to find the solution. This might be helpful in case there are others that first encountered the issue with XSOverlay like I did: https://www.reddit.com/r/ValveIndex/comments/jjm23z/zotac_rtx_3080_trinity_oc_grey_screen_issue_while/ https://www.nvidia.com/en-us/geforce/forums/game-ready-drivers/13/403193/3090-index-major-tracking-disconnect-issues-in-s/

Xiexe commented 3 years ago

Interesting find, thanks for keeping me updated on that. It does make sense, capturing the desktop / windows does probably take a lot of bandwidth.

I'll keep this issue around in case someone else runs into the problem in the future!