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

fix(dashboard): 🐛 Fix SteamVR launch fail for dangling ADB process #2757

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

zmerp
Copy link
Member

@zmerp zmerp commented Mar 15, 2025

No description provided.

@zmerp zmerp changed the title fix(dashboard): 🐛 Fix SteamVR fail to launch for dangling ADB process fix(dashboard): 🐛 Fix SteamVR launch fail for dangling ADB process Mar 15, 2025
@zmerp zmerp force-pushed the kill-adb-on-launch branch 4 times, most recently from 79ddef4 to 3ea68c4 Compare March 15, 2025 19:16
@zmerp
Copy link
Member Author

zmerp commented Mar 16, 2025

Tested by @0JXI0, ready to review

@zmerp
Copy link
Member Author

zmerp commented Mar 19, 2025

As things stand, probably this PR shouldn't be merged. I could get some help making another PR fixing this the proper way, as suggested by @The-personified-devil

@The-personified-devil
Copy link
Collaborator

I mean I can take a look at it tmrw, but I'm not entirely sure how to ideally handle this yet

@zmerp zmerp marked this pull request as draft March 19, 2025 14:21
@zmerp
Copy link
Member Author

zmerp commented Mar 19, 2025

@The-personified-devil We would need to detect if the current alive adb server is spawned from the current process or not. if it's the local ADB installation it's always spawned by the driver, if not then it's safe to let the ADB instance live because it will not block SteamVR. the crate sysinfo should be able to tell if the parent process is SteamVR (check if adb is spawned by the current process)

@The-personified-devil The-personified-devil marked this pull request as ready for review March 19, 2025 21:28
Comment on lines +118 to +120
if let Some(path) = adb::get_adb_path(&crate::get_filesystem_layout()) {
adb::kill_server(&path).ok();
}
Copy link
Member Author

Choose a reason for hiding this comment

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

This is alright but it would unnecessarily kill a global adb server instance. Better would be to get only the local adb path and try to kill that. But better yet would be to get the current running adb processes and kill any that is child of SteamVR (vrserver). This last solution would also be resistant to edge cases where the users installs a global adb server while running SteamVR

Copy link
Collaborator

Choose a reason for hiding this comment

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

note though, i think you can't run two adb instances as well, so you kinda have to replace one instance with another anyway

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.

3 participants