ValveSoftware / Proton

Compatibility tool for Steam Play based on Wine and additional components
Other
24.36k stars 1.06k forks source link

White Day VR: The Courage Test (1442650) #5192

Open Patola opened 3 years ago

Patola commented 3 years ago

Compatibility Report

System Information

I confirm:

Symptoms

Input for this game doesn't work; the hand positions are shown, gripping works, trigger works, even the menu button works; but turning and walking does not. Calling the steamVR overlay to set up the controls, the game name appears as "OPENXR TEST INSTANCE", like many other VR games.

Why?

Never had a good explanation about this. This happened on Walking Dead: Saints & Sinners and stopped happening after a while, this happened in A Fisherman's Tale (and apparently is fixed now), this happens in Groundhog Day and so many others.

In none of these tickets there is any explanation whatsoever about what that means. When the game is stuck as being recognized only as "OPENXR TEST INSTANCE", it seems the controls cannot upgrade from being "legacy", and they don't really work and there are no actions from the game for us to map to the controls. Is the "actions.json" needed for that? Under the game's directory "White Day VR Courage Test" there's a file "Engine/Config/controller.vdf" with null mappings for almost everything, is that the culprit?

In this game at least I can get to the edit binding window. In the other occurrences of this issue, I couldn't even edit anything, the overlay choices wouldn't activate and there was a monumental lag when something would click. This was never explained.

Please, at least explain what's going on! I've opened several bug reports already about very similar issues and the lack of comments or feedback is maddening.

Reproduction

Just run the game. You can't walk or turn.

steam-1442650.log

Patola commented 3 years ago

On the SteamVR for Linux tracker, there is a bug report about this, no explanation on what is going on: https://github.com/ValveSoftware/SteamVR-for-Linux/issues/403

gofman commented 3 years ago

I didn't look yet what specifically is really going on here but might have some guess.

"OpenXR Test Instance" is the app name from Proton's wineopenxr which wineopenxr uses when connects to OpenXR to query required Vulkan extensions. Unfortunately this has to be done when d3d device is created before the application creates an OpenXR instance (and before we know that the app is going to do that at all). Then this connection is closed, but it seems that SteamVR doesn't bear VR connection teardown and restart well and has some leftovers which I don't know how to properly clean up (more exactly, not sure if it is possible without doing something on the Linux SteamVR side). The similar issues were there for OpenVR but I think I was able to workaround that in Proton by moving the "service" OpenVR initialization to Proton's steam.exe, which helped a bunch of games. Except for those games which tear down and recreate SteamVR connection themselves after drawing something using the first one (like Until You Fall) which hang SteamVR. This can unlikely be fixed in any sane way on Proton side (although Until You Fall seems to work without this issue on Nvidia for some reason).

Then, I didn't know OpenXR "openxr test instance" creation is the same way harmful, there might be specifics here to be looked at (as apparently not every openxr game suffers from "openxr test instance"). I think I might look at some point and, depending what is the specifics there, maybe the same trick moving this part to a separate process initialization will help here as well.

If you are up for trying something yourselves with this game can be checked whether the test instance creation is the only culprit here by hacking load_host_openxr_loader() in wineopenxr/openxr.c: looking which strings end up in g_instance_extensions and g_device_extensions after this function successfully completes and then replacing everything this function does by copying the hardcoded values to these variables (still returning XR_SUCCESS). If this will help then it will confirm some of these guesses. While hardcoding those values doesn't look like a viable fix we might find a way to query that at a time and place where it will not interfere that much.

Patola commented 3 years ago

Thank you very much, for both the explanations and directions on what to do. Middle of the week is difficult for me but I'll sure be trying this in the coming weeks, and will report anything I find that I think is of interest.

gofman commented 3 years ago

@Patola I took a look at the game and didn't spot any issue with default controllers config (btw it turned to be OpenVR, not OpenXR games). The movement is not available at start but it is the same on Windows, movement is possible a bit later into the tutorial when you get into the room. I didn't try the game further but movement worked,

However, I do see the issue with "openxr test instance" appearing in controller bindings menu which maybe affects manual configuration. I am attaching the patches which more the "openxr test instance" creation and destruction into Proton's steam.exe process like was previously done for OpenVR (though it is a bit more quirky in this case). With these patches I see the name of the game correctly displayed in the SteamVR ingame menu. If you can check if that fully works / helps with this and the other games you mentioned elsewhere that would be great.

I also put the Experimental build with these patches on top here: https://www.codeweavers.com/xfer/gofman/builds/ (file: experimental-6.3-MR31-1193-20211005-p665b03-we63982-dfd20a0.tar.zst password: testbuild).

patches.zip

Patola commented 3 years ago

Thanks, I will try it. I have played the game far beyond the tutorial, it's only after that, when the girl asks me to go somewhere, that I tried to move.

gofman commented 3 years ago

Have you tried to move when you get into the room with a lot of stuff in there alone? At game start the girl asked me to follow her but the character is moving without pressing anywhere, the controls still don't work. Then after taking the torch and pressing something you get into the room and see the tutorial screen explaining how to move with the left joystick, and since then the left joystick works. I played up to this place both on Windows and Proton and it was the same. But maybe you played it further and there are some issues with movement later. Then it is even more interesting if these patches change anything.

Patola commented 3 years ago

Yes, I can move forward and back but can't turn. I've seen that I've written that walking doesn't work, sorry, that was a mistake from my part because I was testing a handful of games in tandem and have written from memory.

Your patch worked for correctly showing the game name. I will test with other games, is that hardwired for this one? I quickly tested "Nevermind" (appid 342260) that has the same issue on controllers (can't turn on Index, only walk and strafe, but the developer acknowledged this so it's the same for Linux and Windows) and was also displaying "OpenXR Test Instance" as the game name and now with your build it also appeared correctly. I will be testing this proton build with other games where I see this problem and will report it accordingly, thanks.

Not sure it will be needed, but I am attaching the log for your proton build on this issue. If you need any other data, please let me know. steam-1442650-proton-MR31-gofman.log

gofman commented 3 years ago

But with White Day I could not turn in the room with controllers on Windows as well. Maybe I didn't find how but the tutorial didn't show any controller key to turn and I was under impression I am supposed to turn myself (as previously in the game) and not using the controller for that. Are you sure that works different on Windows? Without a clear evidence what is going wrong compared to Windows and exact instructions how to reproduce the (potential) issue I am not sure I have anything to look at here.

No, the patches are not hardwired to any specific game.

You mentioned that there were problems editing controller bindings (probably caused by the game detection mess related to "openxr test instance"), is it solved?

Patola commented 3 years ago

You are right. I've just searched through the forums and turning is an issue for Windows too. Which is quite odd, if press the controller button and see the help on controllers, it clearly states there is turning.

So, this issue is "resolved" (there was not an issue in the first place -- sorry for that), and at least we have your patch for correctly showing the game name on the bindings screen. I do think this one will be useful, will it get to mainstream proton?

And editting the controller bindings worked for both the games I just tested -- White Day VR and Nevermind. But I haven't done extensive tests, I did not check the actions, will see into that, and for other games too.

Note: also, I will try and grab a Windows license to send better quality reports, and being able to compare to Linux.

gofman commented 3 years ago

I think we will have solution eventually, but not immediately sure this thing with 64 bit Steam.exe is good (I don't see immediate problems but...) and will go right away and as is. That's partially why I am curious if that affects anything besides the name (which is the issue by itself of course), like actual possibility to work with controller bindings through UI.

yamosin commented 2 years ago

Had the exact same problem, unfortunately after all this time there is still no exact cause or solution, tried rebooting, reinstalling steamvr (including removing all related configuration), running in admin mode, closing steam cloud storage, entering or exiting the beta branch