Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(steamvr): auto-unblock ALVR driver on startup #2708

Merged
merged 1 commit into from
Feb 26, 2025

Conversation

skryvel
Copy link
Contributor

@skryvel skryvel commented Feb 16, 2025

I'm really not sure what the path is on Windows. I found some references but not a full path, and especially it varies.

This will go into steamvr.vrsettings and toggle blocked_by_safe_mode if needed for the ALVR driver. Should fail gracefully as long as the file exists.

Windows is not implemented because:

  • on Discord the point was raised that Windows SteamVR gets/causes much less trouble with this;
  • the path gets more complicated and no source of truth on the web was found that felt safe to quickly implement.

@skryvel skryvel force-pushed the steamvr-unblock-alvr branch 7 times, most recently from d6827e3 to 9c7f08b Compare February 16, 2025 21:43
@skryvel skryvel changed the title wip: feat(steamvr): auto-unblock ALVR driver on startup feat(steamvr): auto-unblock ALVR driver on startup Feb 16, 2025
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.

To avoid crashes, all unwrap()s should be removed and replaced with proper error handling

@skryvel skryvel force-pushed the steamvr-unblock-alvr branch from 9c7f08b to 3f8bfaf Compare February 19, 2025 15:41
@skryvel
Copy link
Contributor Author

skryvel commented Feb 19, 2025

To avoid crashes, all unwrap()s should be removed and replaced with proper error handling

Fixed. Feel free to point me to any other samples or let me know of any nits -- I'm relatively new to Rust in such a code-base.

@skryvel skryvel force-pushed the steamvr-unblock-alvr branch from 3f8bfaf to b90bb09 Compare February 19, 2025 17:15
zmerp
zmerp previously approved these changes Feb 19, 2025
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.

Overall this looks good to me. Someone else on linux like @Meister1593 should also review and test this PR before merging.

Copy link
Collaborator

@Meister1593 Meister1593 left a comment

Choose a reason for hiding this comment

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

Simulated scenario (put crash state into same file), works fine, though i rarely get any real crash events nowadays.
Only small changes needed, otherwise looks good

@skryvel skryvel force-pushed the steamvr-unblock-alvr branch 2 times, most recently from 64661e7 to 2dd763b Compare February 25, 2025 21:34
Goes into `steamvr.vrsettings` and unblocks ALVR if it is blocked.
@skryvel skryvel force-pushed the steamvr-unblock-alvr branch from 2dd763b to 20a9955 Compare February 25, 2025 21:37
@Meister1593 Meister1593 self-requested a review February 25, 2025 22:00
Copy link
Collaborator

@The-personified-devil The-personified-devil left a comment

Choose a reason for hiding this comment

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

Haven't tested it (and I honestly can't be bothered to force steamvr to crash), but lgtm (tho quite verbose, which might honestly be good considering this is messing with steamvr's rather fragile internals).

@The-personified-devil The-personified-devil merged commit e26062f into alvr-org:master Feb 26, 2025
8 checks passed
@gabriele2000
Copy link

Simulated scenario (put crash state into same file), works fine, though i rarely get any real crash events nowadays. Only small changes needed, otherwise looks good

Rarely?
SteamVR is as fragile as touching 20 year-old code, it crashes a lot, it's riddled with issues... consider yourself lucky

zmerp pushed a commit that referenced this pull request Mar 9, 2025
Goes into `steamvr.vrsettings` and unblocks ALVR if it is blocked.
@zmerp zmerp mentioned this pull request Mar 9, 2025
zmerp pushed a commit that referenced this pull request Mar 11, 2025
Goes into `steamvr.vrsettings` and unblocks ALVR if it is blocked.
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.

5 participants