-
-
Notifications
You must be signed in to change notification settings - Fork 10
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
Power management doesn't work #36
Comments
Are you sure it has zero elements after extend?
You can just define it, settings file only has settings that were already set. Whole vivepro2 section is defined by this driver |
I applied this: diff --git a/bin/driver-proxy/src/driver/server_tracked_provider.rs b/bin/driver-proxy/src/driver/server_tracked_provider.rs
index c793cd8..36992c0 100644
--- a/bin/driver-proxy/src/driver/server_tracked_provider.rs
+++ b/bin/driver-proxy/src/driver/server_tracked_provider.rs
@@ -83,8 +83,11 @@ impl IServerTrackedDeviceProvider for ServerTrackedProvider {
StationControl::new(manager.clone(), name.to_owned(), StationState::On)
})
.collect();
- info!("enabled power management for {} stations", stations.len());
+ println!("enabled power management for {} stations", stations.len());
self.stations.lock().expect("lock").extend(stations);
+
+ println!("actual enabled power management for {} stations",
+ self.stations.lock().expect("lock").len());
}
}; and it gives me this:
This makes me think that there is a problem with ownership.
When I'm enabling station power management in the SteamVR UI, SteamVR adds new Could you please clarify what do you mean by "You can just define it"? What, where and why to define? SteamVR wipes |
No, that's something else, rust ownership system is compile-time only. Don't you have "disconnecting from base stations" message somewhere in between?.. Or maybe SteamVR thread safety guarantees are changed, and there is an UB now (this code is not particularly safe, because SteamVR api guarantees are not properly documented, and this driver has some expectations on how those methods are called).
It only wipes it on syntax error, seems like you're adding it wrong. |
Doesn't look related to threading. I replaced
Right, there was a syntax error. Now stations are powering up when |
Rust has no such magic, collect collects iterator into a vec, and vec.extend extends vector by iterator, something nasty is happening here, either the system is being destroyed (which you can see by "disconnecting from base stations" message in logs if it happens), or there is an UB, which may be caused by this driver not using SteamVR threading correctly. |
There is no "disconnecting from base stations". StationControl connects and waits for commands. |
To make it more clear, "disconnecting from base stations" happens only on the SteamVR exit. |
Two problems:
stations
that are added toself.stations
, apparently something is wrong with ownership here:VivePro2-Linux-Driver/bin/driver-proxy/src/driver/server_tracked_provider.rs
Line 87 in 8982075
the
stations
vec has 2 elements, butself.stations
has 0 after.extend
is invoked. I'm not fluent in Rust, please help fixing it.vivepro2
doesn't havebasestationPowerManagement
setting insteamvr.vrsettings
, thesteamvr
has itVivePro2-Linux-Driver/bin/driver-proxy/src/driver/server_tracked_provider.rs
Line 28 in 8982075
i.e. the fix is:
Maybe this setting depends on a steamvr version? I'm using today's latest beta v2.6.2
The text was updated successfully, but these errors were encountered: