elvissteinjr / DesktopPlus

Advanced desktop access for OpenVR
GNU General Public License v3.0
454 stars 29 forks source link

Desktop+ window always closes after ~30 seconds #66

Open tliron opened 8 months ago

tliron commented 8 months ago

If I put the VR controllers aside and try to just work with the Desktop+ overlay, the overlay always closes after ~30 seconds.

There doesn't seem to be any setting in Desktop+ related to this. Could it be something in Steam VR? I could not find a solution.

elvissteinjr commented 8 months ago

There's indeed no such setting within the application, though it's also not something I've experienced before. And I definitely set aside the controllers quite often during development at least.

Is this within the SteamVR dashboard? If so, does the dashboard disappear or does just the Desktop+ tab disappear from the dashboard? Officially there's no function for third-party applications to close the dashboard in the OpenVR API, for what it's worth. Without checking I don't know if it's even applicable, but do you happen to have controller standby enabled in SteamVR perhaps?

What headset is this on? If it has a side-button (Index/Vive have them), does it also happen if the dashboard is opened through taht system button instead? How about the debug dashboard toggle url (vrmonitor://debugcommands/system_dashboard_toggle)?

I hope we can figure this out.

tliron commented 8 months ago

Thanks for the quick response!

I am using a Bigscreen Beyond headset with Index controllers. I'm using it inside the Steam VR dashboard: I get two icons there, one for the regular Desktop (which I assume Steam VR provides) and one for Desktop+. When I use it this way, the Desktop+ overlay floats above my Steam VR home. And it just ... disappears within ~30 seconds if I don't use the controller (e.g. just watch a movie). Is there another way to launch Desktop+ other than from the dashboard?

elvissteinjr commented 8 months ago

The application mostly lives in the dashboard, but overlays can also be set to show up in-game or attached to controllers, etc, disregarding dashboard state. The user guide can help here, but I'd honestly recommend the NewUI builds nowadays even if they're not feature complete yet. Way simpler to use. In the NewUI build you'd just add a new overlay and drag it where you want. New overlays are always visible by default.

Neither build should make a change here however. Running with SteamVR Home isn't exactly recommended as it uses adaptive quality and may hog the GPU a lot (though not so much if the dashboard is active), but it shouldn't impact this... should. I haven't been in there in ages (disabled it in the SteamVR settings). Will try it when I have the time.

I'd be surprised if this issue was headset specific in this case (Beyond is using the lighthouse drivers for input and tracking from what I can tell), but can't fully deny it either. Hasn't popped up on Steam hardware survey data I have, but nobody complained yet either, so no clue if anyone else used this app with that headset so far. Still, seems very unlikely.

I would still like to see if manual dashboard toggle via the debug command (you can use the url I posted or bring up Debug Commands in SteamVR via the Developer menu). Oh, and does this happen if any other dashboard tab is active instead? It does sound a lot like a general SteamVR issue, unless I did something to upset it and close the dashboard specifically for my program. It can a quirky piece of software after all. But I'd still want to help figuring this out either way.

tliron commented 8 months ago

I disabled Steam VR home, but the issue is the same. (BTW, should I really be worried about GPU resources if I have a 4090? I'm not being facetious, I'm really wondering if I should bother disabling it.)

It might be worth mentioning that in the Desktop+ overlay I am actually running a non-VR Steam game. (To get this working properly I had to disable Steam VR Theater mode for that game.) I can try to experiment with non-Steam apps to see if it's a Steam issue.

Technical questions (sorry for being a such a newb):

1) What is the "NewUI" build? Where do I get it? 2) How do I use the URL you mentioned?

elvissteinjr commented 8 months ago

How do I use the URL you mentioned?

For the url, you can put that in the Windows run dialog for example (Explorer works too, web browsers may, but mine doesn't do it). SteamVR is set up to handle that url schema, resulting in it executing the debug command.

What is the "NewUI" build? Where do I get it?

Latest NewUI build on GitHub is here: https://github.com/elvissteinjr/DesktopPlus/releases/tag/NewUI-Preview-12.1 If you are running Desktop+ through Steam, you can switch to the NewUI Preview beta branch in the app properties in the Steam client.

I did just test the Home thing myself. Controller standby only goes down to 5 minutes in the settings UI actually, but even with the controllers turning off from it, the dashboard stayed up.

It might be worth mentioning that in the Desktop+ overlay I am actually running a non-VR Steam game

Shouldn't make any difference, at least to Desktop+. However, you're not in the current SteamVR Beta, right? They introduced a new theater screen there, which may interfere despite the setting being off (also needs Steam Client Beta iirc). There's currently also a beta branch for SteamVR that allows rolling back to the previous stable build for testing ("temp_v1.27.5"). Might be worth checking as well just to make sure.

I did stumble upon something that seems useful for this issue actually. SteamVR appears to log dashboard visibility changes with great detail. The relevant log file should be in "C:\Program Files (x86)\Steam\logs" by default, "vrcompositor.txt". Can you post the contents of yours?

Also no worries for asking questions. If anything, tell me if something goes over your head here. I usually assume a bit too much knowledge when people come to the GitHub issue tracker instead of like the Steam discussion board.

Edit: I did mess up quote formatting there, oops

tliron commented 8 months ago

Luckily this issue is easily reproducible. I made a pristine log to isolate it, attached. The relevant message seems to be this:

[Warning] - Access to desktop duplication lost for desktop 1.

vrdashboard.txt

This made me think of another issue I've seen that may be related. When I try to switch Desktop+ capture mode from "Desktop Duplication" to "Graphics Capture" sometimes I get an exception. Could this be a capture issue with Desktop+? (I stayed with "Desktop Duplication" for this log and also using the non-beta Steam version).

elvissteinjr commented 8 months ago

It's worth noting this log file and its desktop messages are solely by SteamVR itself, with its own desktop overlays. Mostly independent unless it takes down the rest of SteamVR somehow, but haven't seen that yet.

Your vrdashboard logs caught me off guard, but the warning message seems to be harmless. I got these in my as well. Took me a bit to realize it wasn't actually the file I was asking about. vrcompositor.txt has the dashboard visibility logging, even if it might be confusing at first.

For the Graphics Capture, exceptions should ideally not happen. Did this result in a soft failure or did it manage to crash the application? I hadn't asked for Desktop+ log files since they didn't seem related so far, but they might help here. If we do want go there, the NewUI builds has some more detailed logging, while the stable branch only logs fatal errors, so I'd need you to run the NewUI build at least briefly. The logs files are DesktopPlus.log & DesktopPlusUI.log in the application directory.

BTW, should I really be worried about GPU resources if I have a 4090?

(forgot to respond to this last time) It... depends. I'm on a much slower GPU still, but as far as I understand the adaptive quality in SteamVR Home, it tries to go up to 1.4x of your SteamVR render resolution with multiple anti-alias and detail levels. It's very much possible that you have a good bit of headroom, but the Beyond also has quite the display resolution, so I'm not sure overall. If you're just watching movies or doing light gaming on the overlay it won't matter. I'd worry about more demanding games or similar however. At least when the dashboard isn't active (active dashboard makes SteamVR Home render at lower resolution).

That being said, Desktop+ has the Performance Monitor you can use to check if you were really maxing out something. VR can be surprisingly demanding at times and some games just don't run well, period.

Thanks for your support btw, it's appreciated.

tliron commented 8 months ago

I am suddenly unable to recreate the bug. :/ Several reboots later, maybe something else happened. If you don't mind, let's keep this issue open for now and I will update it with (the right) logs if this happens again.