Skip to content

Conversation

@Meister1593
Copy link
Collaborator

@Meister1593 Meister1593 commented Jun 8, 2025

Was dependent on WilliamVenner/steamlocate-rs#94
Closes #2777

Also started adding tests, thought it's better late than never to do it

@Meister1593 Meister1593 self-assigned this Jun 8, 2025
@Meister1593 Meister1593 marked this pull request as ready for review June 8, 2025 11:51
@zmerp
Copy link
Member

zmerp commented Jun 8, 2025

This is brilliant, do you think the steamlocate crate could be used to simplify some other code in alvr_server_io? (Especially the one that is common between windows and linux)

@Meister1593
Copy link
Collaborator Author

This is brilliant, do you think the steamlocate crate could be used to simplify some other code in alvr_server_io? (Especially the one that is common between windows and linux)

Definitely can try doing so, yeah, it should work on both platforms.

@Meister1593 Meister1593 marked this pull request as draft June 8, 2025 18:45
@Meister1593 Meister1593 marked this pull request as ready for review June 9, 2025 16:09
@Meister1593
Copy link
Collaborator Author

Meister1593 commented Jun 9, 2025

Took way longer than i expected lol...
i tried to make test for new method, not realizing that i'm trying to test functionality of steamlocate-rs (which is already tested from within steamlocate-rs)

@Meister1593
Copy link
Collaborator Author

I have maybe only one concern (which is probably not an issue) - is that, if steamvr is on multiple drives, this would get first available and use it
But technically, steam makes a lot of efforts to keep steamvr in only one place and doesn't like when it's not launched from default locations
so... not an issue?

@zmerp
Copy link
Member

zmerp commented Jun 11, 2025

This seems such a weird edge case. I'm sure a lot of other stuff breaks if this is the case

@shinyquagsire23
Copy link
Contributor

I would also vote on angrily shaking fists at anyone with SteamVR on two drives

@The-personified-devil
Copy link
Collaborator

At least on linux I know that steam forces steamvr to be installed in the main steam location, not in a secondary one. Tho I'm not sure if that's guaranteed to be the main drive.

Err(e) => {
error!("Couldn't detect openvr or steamvr files. \
Please make sure you have installed and ran SteamVR at least once. \
Or if you're using Flatpak Steam, make sure to use ALVR Dashboard from Flatpak ALVR. {e}");
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm really not happy with losing the flatpak steam information, because I feel that that's quite useful. We should find some way to still print it.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or actually, would two competing installations of flatpak steam steamvr and normal steamvr trip up steamlocate?
Since we need to make sure it'll find the directory of the one from flatpak steam, and this is actually realistic enough to occur on linux with users fucking around to see what actually works

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gonna test specifically flatpak usecase, but steamlocate-rs does support finding even multiple installations, including flatpak (i thought it will probably find it relative to $home first, not from flatpak, but will check anyway)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i realized that we might have a problem/solution for the flatpak problem

So in a nutshell, steamlocate-rs finds flatpak steam first, instead of native.
And we can launch either native or flatpak alvr (driver) from dashboard (which can be also launched from either flatpak or natively)
i wonder if we should allow user to choose from where to launch it?...

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i will make quick poc in this pr and see you opinion about this

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

...not gonna make a quick poc, because RLS is not recognizing types for steamlocate::SteamDir::locate_multiple and even specifying them manually, doesn't make it work still... (compiler does work fine though)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So in a nutshell, steamlocate-rs finds flatpak steam first, instead of native.

Does this also occur if ran from native and not just in flatpak? If so that's a straight up blocker (at least for using it to locate the steamvr root, failing to do mess around with the unblocking isn't too bad)

Comment on lines +38 to +41
debug!(
"steamvr_vrsettings_path: {}",
steamvr_vrsettings_path.display()
);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't know if we should be keeping this debug print and if we do we should add some more context.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

main purpose for debug prints is to debug it with users if they are wrong later on (like, user downloads debug build and tests his issue with it - has this print and developer already knows required details).
This one specifically useful if one of the paths were used, but missing, and leading to an error.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well you should make it a bit nicer, this feels very temp debug thrown in, e.g. Found steamvr.vrsettings with path {}

@zmerp
Copy link
Member

zmerp commented Jun 16, 2025

Sorry if I missed this in the comments, but why was the test removed?

@Meister1593
Copy link
Collaborator Author

Sorry if I missed this in the comments, but why was the test removed?

it was testing mostly std filesystem and steamlocate-rs crate instead of alvr functionality

@zmerp
Copy link
Member

zmerp commented Jun 16, 2025

it was testing mostly std filesystem and steamlocate-rs crate instead of alvr functionality

I don't think this is a bad idea, since we rely on this working properly. Maybe the test could be moved to steamlocate-rs itself but we need to make a PR to it.

@Meister1593
Copy link
Collaborator Author

it was testing mostly std filesystem and steamlocate-rs crate instead of alvr functionality

I don't think this is a bad idea, since we rely on this working properly. Maybe the test could be moved to steamlocate-rs itself but we need to make a PR to it.

Issue IMO is that... test basically created own conditions for own satisfaction to test that filesystem, some files exist

Most of this (except for specifically steamvrsettings) is just testing filesystem existence for something

@Meister1593
Copy link
Collaborator Author

Meister1593 commented Jun 16, 2025

All other tests (related to finding steam, steamvr (specifically - any app really)) are already in steamlocate-rs crate

@zmerp
Copy link
Member

zmerp commented Jun 16, 2025

Got it, it's cool then

Copy link
Member

@zmerp zmerp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good on my side, waiting for @The-personified-devil 's comment threads

@Meister1593 Meister1593 marked this pull request as draft June 22, 2025 22:40
@Meister1593
Copy link
Collaborator Author

Needs a bit of rework considering issues with finding incorrect stuff in different places, might scale down pr a bit

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug (steamvr, linux): Unblocking driver fails to unblock due to incorrect paths on some distros

4 participants