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: Remove SteamVR driver registration modes #2755

Merged
merged 4 commits into from
Mar 19, 2025
Merged

Conversation

zmerp
Copy link
Member

@zmerp zmerp commented Mar 14, 2025

At SteamVR launch, unconditionally register the ALVR driver. Also remove driver list backup.

In this PR I implement some sanity checks, that are now necessary since there is no unregistration of the driver:

  • Before launching SteamVR from the dashboard, we unregister any ALVR driver which is not from the current instance
  • Bail out at driver entry point (HmdDriverFactory) if we detect a running dashboard not from the same installation
  • At dashboard launch, kill every other dashboard instance.
    This should be sufficient to handle multiple ALVR installations (Steam release or not).

This PR should be merged only after #2754 and #2757

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.

I just realized the (i forgor)

Comment on lines 34 to 47
// Kill any other dashboard instance
let self_path = std::env::current_exe().unwrap();
for proc in sysinfo::System::new_all().processes_by_name(OsStr::new(&afs::dashboard_fname())) {
if let Some(other_path) = proc.exe() {
if other_path == self_path {
proc.kill();
}
}
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

I get the rough intent, but what exactly would the conflict be, as long as both aren't starting an instance of steamvr?

Copy link
Member Author

@zmerp zmerp Mar 19, 2025

Choose a reason for hiding this comment

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

This is helpful for a check I added on the driver side, to cancel driver startup if the driver instance does not correspond to the current opened dashboard. This is because by not unregistering the ALVR driver, multiple ALVR drivers might attempt loading. And we still want to support the use case of switching between multiple ALVR versions.
Since only one driver is allowed to start at any given moment, then we should also force to have only one dashboard

Copy link
Collaborator

Choose a reason for hiding this comment

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

I guess it's fine, I think we should probably output a warning when doing that so it's less confusing

@The-personified-devil
Copy link
Collaborator

Also fix the failing checks, ideally using the path shortcut thingy from the adb pr

@zmerp zmerp force-pushed the remove-driver-reg-opts branch 2 times, most recently from a3392f3 to a1a42a0 Compare March 19, 2025 15:00
@zmerp zmerp force-pushed the remove-driver-reg-opts branch from a1a42a0 to faf414b Compare March 19, 2025 15:06
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.

The one comment + the failure on linux

@zmerp zmerp force-pushed the remove-driver-reg-opts branch 4 times, most recently from 9e9226e to 9102c12 Compare March 19, 2025 18:12
@zmerp zmerp force-pushed the remove-driver-reg-opts branch from 9102c12 to 42289f9 Compare March 19, 2025 18:15
@zmerp zmerp merged commit 6545e89 into master Mar 19, 2025
9 checks passed
@zmerp zmerp deleted the remove-driver-reg-opts branch March 19, 2025 19:44
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.

2 participants