bloxstrap icon indicating copy to clipboard operation
bloxstrap copied to clipboard

Renaming SteamVR folder on launch?

Open sylviiu opened this issue 10 months ago • 13 comments

There has been a long-lasting issue with Roblox where regardless if the player has VR mode enabled or disabled, SteamVR would launch with Roblox (even when Steam itself is closed!!), causing an inconvenience to users using lighthouse-based tracking (turning on and off the base stations repeatedly can considerably shorten the lifespan).

This has been reported to Roblox for a while now (like this post on devforum in 2022), but the issue keeps appearing or related fixes causing other regressions with VR support in general.

https://github.com/pizzaboxer/bloxstrap/assets/95180094/fca887ce-79a5-4fbf-badb-0c813a2a90ac

Would it be possible to implement a native toggle for renaming the SteamVR folder on launch? This would especially be useful regardless if you want to use desktop or VR since SteamVR locks the path when running, so you can actually start SteamVR on your own accord.

Thanks in advance.

sylviiu avatar Aug 15 '23 20:08 sylviiu

Maybe not renaming the folder, I wouldn't expect that to be very reliable. However, you could try setting your rendering mode as Vulkan through the Bloxstrap menu? It wouldn't be the best solution as Roblox would crash when you minimize, but it would work for now. I could take a look into what else can be done.

pizzaboxer avatar Aug 15 '23 20:08 pizzaboxer

Renaming the folder is what other clients unrelated to Roblox (e.g., BSManager) do, but I can try running on Vulkan.

sylviiu avatar Aug 15 '23 21:08 sylviiu

Using Vulkan does fix the issue of launching Roblox without SteamVR, but also seems to break VR functionality altogether. When launching the client, a stretched VR-like loading screen will appear, but then show the desktop view (no output to VR)

image

sylviiu avatar Aug 15 '23 21:08 sylviiu

but also seems to break VR functionality altogether.

Yeah, I kinda thought that was the goal...

Renaming it may work, but things can become ugly if it's not cleaned up properly, like if Bloxstrap encounters an exception, doesn't exit properly, etc. Also, it would mean for Bloxstrap to stay running in the background until Roblox is closed. I'm sure there's at least some better way to do it.

pizzaboxer avatar Aug 15 '23 21:08 pizzaboxer

Yeah, I kinda thought that was the goal...

Maaaaaybe for some people, but I do like using Roblox VR sometimes unfortunately 😭

For what it's worth, in my testing renaming the SteamVR folder back to "SteamVR" after the Roblox client itself has launched works fine, even when it goes back into the desktop app view and joining another experience. It's just on initial startup of the Roblox client would the folder need to be renamed. Not sure if that'd help any?

sylviiu avatar Aug 15 '23 21:08 sylviiu

in my testing renaming the SteamVR folder back to "SteamVR" after the Roblox client itself has launched works fine

Oh, that's great then. My last concern would've been filesystem permissions, but that might not be a problem since all system users appear to have full access to it. Shouldn't be too hard to add this as a feature.

pizzaboxer avatar Aug 15 '23 21:08 pizzaboxer

Can confirm full control is given to all users.

image

Thank you so much!!

sylviiu avatar Aug 15 '23 21:08 sylviiu

This would be a big hack. I'd prefer finding a better solution than going through with this.

bluepilledgreat avatar Jan 21 '24 01:01 bluepilledgreat

This would be a big hack.

On the other hand, if we can make this approach stable enough then it shouldn't be a problem.

pizzaboxer avatar Jan 21 '24 12:01 pizzaboxer

This would be a big hack.

On the other hand, if we can make this approach stable enough then it shouldn't be a problem.

I would kill the SteamVR process instead of renaming the SteamVR folder. If Bloxstrap unexpectedly crashes/closes, chances are that the SteamVR folder will not be renamed back.

bluepilledgreat avatar Jan 21 '24 12:01 bluepilledgreat

The last I looked into this problem, it was that Roblox will launch SteamVR if it's not running, and killing the process for it while it had already registered with Roblox wouldn't cause things to play out nicely. If I'm misremembering or if it's changed now and killing the process doesn't cause any issues, then we'll go with that.

pizzaboxer avatar Jan 21 '24 14:01 pizzaboxer

killing the process for it while it had already registered with Roblox wouldn't cause things to play out nicely.

That's unfortunately how it is. That's how it works with all VR programs (if I'm not mistaken, the Oculus client does this too for other apps, but otherwise that's definitely how SteamVR functions).

If Bloxstrap crashing is a concern, you can probably make a detached console process that waits a certain amount of time before renaming the folder back? Probably far fetched, but just an idea lol

sylviiu avatar Jan 22 '24 14:01 sylviiu

We could, but then what if the system unexpectedly shuts down in the middle of gameplay? Then there'll be nothing to change it back afterwards.

Y'know, it's been so long that I've completely forgotten the details of this issue, and so I've completely forgotten that none of this is really an issue, because as you've said:

renaming the SteamVR folder back to "SteamVR" after the Roblox client itself has launched works fine

It would only need to be renamed back like a few seconds after Roblox has launched.

pizzaboxer avatar Jan 22 '24 14:01 pizzaboxer