mirror of
https://gitlab.com/asus-linux/asusctl.git
synced 2026-02-06 00:15:04 +01:00
Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 9faebe9e38 | |||
| 2e2d5cb46b | |||
| 4e3a610a0f |
Generated
+13
-13
@@ -199,7 +199,7 @@ checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711"
|
||||
|
||||
[[package]]
|
||||
name = "asusctl"
|
||||
version = "5.0.8"
|
||||
version = "5.0.10"
|
||||
dependencies = [
|
||||
"asusd",
|
||||
"cargo-husky",
|
||||
@@ -219,7 +219,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "asusd"
|
||||
version = "5.0.8"
|
||||
version = "5.0.10"
|
||||
dependencies = [
|
||||
"cargo-husky",
|
||||
"concat-idents",
|
||||
@@ -244,7 +244,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "asusd-user"
|
||||
version = "5.0.8"
|
||||
version = "5.0.10"
|
||||
dependencies = [
|
||||
"cargo-husky",
|
||||
"config-traits",
|
||||
@@ -847,7 +847,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "config-traits"
|
||||
version = "5.0.8"
|
||||
version = "5.0.10"
|
||||
dependencies = [
|
||||
"cargo-husky",
|
||||
"log",
|
||||
@@ -900,7 +900,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "cpuctl"
|
||||
version = "5.0.8"
|
||||
version = "5.0.10"
|
||||
|
||||
[[package]]
|
||||
name = "cpufeatures"
|
||||
@@ -1024,7 +1024,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "dmi_id"
|
||||
version = "5.0.8"
|
||||
version = "5.0.10"
|
||||
dependencies = [
|
||||
"log",
|
||||
"udev",
|
||||
@@ -2834,7 +2834,7 @@ checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f"
|
||||
|
||||
[[package]]
|
||||
name = "rog-control-center"
|
||||
version = "5.0.8"
|
||||
version = "5.0.10"
|
||||
dependencies = [
|
||||
"asusd",
|
||||
"cargo-husky",
|
||||
@@ -2867,7 +2867,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "rog_anime"
|
||||
version = "5.0.8"
|
||||
version = "5.0.10"
|
||||
dependencies = [
|
||||
"cargo-husky",
|
||||
"dmi_id",
|
||||
@@ -2884,7 +2884,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "rog_aura"
|
||||
version = "5.0.8"
|
||||
version = "5.0.10"
|
||||
dependencies = [
|
||||
"cargo-husky",
|
||||
"dmi_id",
|
||||
@@ -2898,7 +2898,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "rog_dbus"
|
||||
version = "5.0.8"
|
||||
version = "5.0.10"
|
||||
dependencies = [
|
||||
"asusd",
|
||||
"cargo-husky",
|
||||
@@ -2911,7 +2911,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "rog_platform"
|
||||
version = "5.0.8"
|
||||
version = "5.0.10"
|
||||
dependencies = [
|
||||
"cargo-husky",
|
||||
"concat-idents",
|
||||
@@ -2928,7 +2928,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "rog_profiles"
|
||||
version = "5.0.8"
|
||||
version = "5.0.10"
|
||||
dependencies = [
|
||||
"cargo-husky",
|
||||
"log",
|
||||
@@ -2942,7 +2942,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "rog_simulators"
|
||||
version = "5.0.8"
|
||||
version = "5.0.10"
|
||||
dependencies = [
|
||||
"glam",
|
||||
"log",
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@ default-members = ["asusctl", "asusd", "asusd-user", "cpuctl", "rog-control-cent
|
||||
resolver = "2"
|
||||
|
||||
[workspace.package]
|
||||
version = "5.0.9"
|
||||
version = "5.0.10"
|
||||
rust-version = "1.75"
|
||||
|
||||
[workspace.dependencies]
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
use std::path::PathBuf;
|
||||
use std::sync::Arc;
|
||||
use std::thread::sleep;
|
||||
use std::time::Duration;
|
||||
|
||||
use config_traits::{StdConfig, StdConfigLoad};
|
||||
use futures_lite::StreamExt;
|
||||
@@ -65,6 +67,7 @@ impl CtrlFanCurveZbus {
|
||||
if config.profiles.balanced.is_empty() || !config.file_path().exists() {
|
||||
info!("{MOD_NAME}: Fetching default fan curves");
|
||||
|
||||
let current = platform.get_throttle_thermal_policy()?;
|
||||
for this in [
|
||||
ThrottlePolicy::Balanced,
|
||||
ThrottlePolicy::Performance,
|
||||
@@ -73,19 +76,16 @@ impl CtrlFanCurveZbus {
|
||||
// For each profile we need to switch to it before we
|
||||
// can read the existing values from hardware. The ACPI method used
|
||||
// for this is what limits us.
|
||||
let next = ThrottlePolicy::next(this);
|
||||
platform.set_throttle_thermal_policy(next.into())?;
|
||||
platform.set_throttle_thermal_policy(this.into())?;
|
||||
let mut dev = find_fan_curve_node()?;
|
||||
fan_curves.set_active_curve_to_defaults(this, &mut dev)?;
|
||||
|
||||
let active = platform
|
||||
.get_throttle_thermal_policy()
|
||||
.map_or(ThrottlePolicy::Balanced, |t| t.into());
|
||||
fan_curves.read_from_dev_profile(active, &find_fan_curve_node()?)?;
|
||||
|
||||
info!("{MOD_NAME}: {active:?}:");
|
||||
for curve in fan_curves.get_fan_curves_for(active) {
|
||||
info!("{MOD_NAME}: {this:?}:");
|
||||
for curve in fan_curves.get_fan_curves_for(this) {
|
||||
info!("{}", String::from(curve));
|
||||
}
|
||||
}
|
||||
platform.set_throttle_thermal_policy(current)?;
|
||||
config.profiles = fan_curves;
|
||||
config.write();
|
||||
} else {
|
||||
|
||||
+10
-10
@@ -69,6 +69,16 @@ async fn start_daemon() -> Result<(), Box<dyn Error>> {
|
||||
|
||||
// supported.add_to_server(&mut connection).await;
|
||||
|
||||
match CtrlFanCurveZbus::new() {
|
||||
Ok(ctrl) => {
|
||||
let sig_ctx = CtrlFanCurveZbus::signal_context(&connection)?;
|
||||
start_tasks(ctrl, &mut connection, sig_ctx).await?;
|
||||
}
|
||||
Err(err) => {
|
||||
error!("FanCurves: {}", err);
|
||||
}
|
||||
}
|
||||
|
||||
match CtrlPlatform::new(
|
||||
config.clone(),
|
||||
&cfg_path,
|
||||
@@ -83,16 +93,6 @@ async fn start_daemon() -> Result<(), Box<dyn Error>> {
|
||||
}
|
||||
}
|
||||
|
||||
match CtrlFanCurveZbus::new() {
|
||||
Ok(ctrl) => {
|
||||
let sig_ctx = CtrlFanCurveZbus::signal_context(&connection)?;
|
||||
start_tasks(ctrl, &mut connection, sig_ctx).await?;
|
||||
}
|
||||
Err(err) => {
|
||||
error!("FanCurves: {}", err);
|
||||
}
|
||||
}
|
||||
|
||||
match CtrlAnime::new(AnimeConfig::new().load()) {
|
||||
Ok(ctrl) => {
|
||||
let zbus = CtrlAnimeZbus(Arc::new(Mutex::new(ctrl)));
|
||||
|
||||
Reference in New Issue
Block a user