mirror of
https://gitlab.com/asus-linux/asusctl.git
synced 2026-02-06 00:15:04 +01:00
Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 6f4a7e16dc | |||
| f64253d633 | |||
| 124c17aadc | |||
| ab40f9fcbf | |||
| 5cdfa5a8d4 |
@@ -0,0 +1,24 @@
|
|||||||
|
## Issue description
|
||||||
|
|
||||||
|
(Summarize the bug encountered)
|
||||||
|
|
||||||
|
## Steps to reproduce
|
||||||
|
|
||||||
|
(How can the issue be reproduced)
|
||||||
|
|
||||||
|
## What is the current bug behavior?
|
||||||
|
|
||||||
|
(What actually happens)
|
||||||
|
|
||||||
|
## What is the expected correct behavior?
|
||||||
|
|
||||||
|
(What you should see instead)
|
||||||
|
|
||||||
|
## Relevant logs and/or screenshots
|
||||||
|
|
||||||
|
(run `journalctl -b -u supergfxd > ~/supergfxd.log` and attach `~/supergfxd.log`)
|
||||||
|
|
||||||
|
(Paste any relevant logs - use code blocks (```) to format console output, logs, and code, as
|
||||||
|
it's very hard to read otherwise.)
|
||||||
|
|
||||||
|
/label ~bug ~reproducable ~needs-investigation
|
||||||
@@ -6,6 +6,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||||||
|
|
||||||
## [Unreleased]
|
## [Unreleased]
|
||||||
|
|
||||||
|
## [v5.0.7]
|
||||||
|
### Changed
|
||||||
|
- Fix to suspend process in anime thread to let custom anims run on wake.
|
||||||
|
- Fix to reload the fan curves correctly on boot.
|
||||||
|
- Add new config option `platform_policy_linked_epp` to set if energy_performance_preference should be paired with platform_profile/throttle_thermal_policy
|
||||||
|
- Small fixes to rog-control-center
|
||||||
|
|
||||||
## [v5.0.6]
|
## [v5.0.6]
|
||||||
- Revert egui update due to a lot of issues arising from window closing.
|
- Revert egui update due to a lot of issues arising from window closing.
|
||||||
|
|
||||||
|
|||||||
Generated
+14
-14
@@ -199,7 +199,7 @@ checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "asusctl"
|
name = "asusctl"
|
||||||
version = "5.0.6"
|
version = "5.0.7"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"asusd",
|
"asusd",
|
||||||
"cargo-husky",
|
"cargo-husky",
|
||||||
@@ -218,7 +218,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "asusd"
|
name = "asusd"
|
||||||
version = "5.0.6"
|
version = "5.0.7"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"async-trait",
|
"async-trait",
|
||||||
"cargo-husky",
|
"cargo-husky",
|
||||||
@@ -226,7 +226,7 @@ dependencies = [
|
|||||||
"config-traits",
|
"config-traits",
|
||||||
"dmi_id",
|
"dmi_id",
|
||||||
"env_logger",
|
"env_logger",
|
||||||
"futures-lite 2.1.0",
|
"futures-lite 1.13.0",
|
||||||
"log",
|
"log",
|
||||||
"logind-zbus",
|
"logind-zbus",
|
||||||
"rog_anime",
|
"rog_anime",
|
||||||
@@ -243,7 +243,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "asusd-user"
|
name = "asusd-user"
|
||||||
version = "5.0.6"
|
version = "5.0.7"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"cargo-husky",
|
"cargo-husky",
|
||||||
"config-traits",
|
"config-traits",
|
||||||
@@ -846,7 +846,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "config-traits"
|
name = "config-traits"
|
||||||
version = "5.0.6"
|
version = "5.0.7"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"cargo-husky",
|
"cargo-husky",
|
||||||
"log",
|
"log",
|
||||||
@@ -899,7 +899,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "cpuctl"
|
name = "cpuctl"
|
||||||
version = "5.0.6"
|
version = "5.0.7"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "cpufeatures"
|
name = "cpufeatures"
|
||||||
@@ -1026,7 +1026,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "dmi_id"
|
name = "dmi_id"
|
||||||
version = "5.0.6"
|
version = "5.0.7"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"log",
|
"log",
|
||||||
"udev",
|
"udev",
|
||||||
@@ -2836,7 +2836,7 @@ checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "rog-control-center"
|
name = "rog-control-center"
|
||||||
version = "5.0.6"
|
version = "5.0.7"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"asusd",
|
"asusd",
|
||||||
"cargo-husky",
|
"cargo-husky",
|
||||||
@@ -2869,7 +2869,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "rog_anime"
|
name = "rog_anime"
|
||||||
version = "5.0.6"
|
version = "5.0.7"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"cargo-husky",
|
"cargo-husky",
|
||||||
"dmi_id",
|
"dmi_id",
|
||||||
@@ -2886,7 +2886,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "rog_aura"
|
name = "rog_aura"
|
||||||
version = "5.0.6"
|
version = "5.0.7"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"cargo-husky",
|
"cargo-husky",
|
||||||
"dmi_id",
|
"dmi_id",
|
||||||
@@ -2900,7 +2900,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "rog_dbus"
|
name = "rog_dbus"
|
||||||
version = "5.0.6"
|
version = "5.0.7"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"asusd",
|
"asusd",
|
||||||
"cargo-husky",
|
"cargo-husky",
|
||||||
@@ -2913,7 +2913,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "rog_platform"
|
name = "rog_platform"
|
||||||
version = "5.0.6"
|
version = "5.0.7"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"cargo-husky",
|
"cargo-husky",
|
||||||
"concat-idents",
|
"concat-idents",
|
||||||
@@ -2930,7 +2930,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "rog_profiles"
|
name = "rog_profiles"
|
||||||
version = "5.0.6"
|
version = "5.0.7"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"cargo-husky",
|
"cargo-husky",
|
||||||
"log",
|
"log",
|
||||||
@@ -2944,7 +2944,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "rog_simulators"
|
name = "rog_simulators"
|
||||||
version = "5.0.6"
|
version = "5.0.7"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"glam",
|
"glam",
|
||||||
"log",
|
"log",
|
||||||
|
|||||||
+1
-1
@@ -4,7 +4,7 @@ default-members = ["asusctl", "asusd", "asusd-user", "cpuctl", "rog-control-cent
|
|||||||
resolver = "2"
|
resolver = "2"
|
||||||
|
|
||||||
[workspace.package]
|
[workspace.package]
|
||||||
version = "5.0.6"
|
version = "5.0.7"
|
||||||
|
|
||||||
[workspace.dependencies]
|
[workspace.dependencies]
|
||||||
async-trait = "^0.1"
|
async-trait = "^0.1"
|
||||||
|
|||||||
+51
-6
@@ -1,4 +1,4 @@
|
|||||||
use config_traits::{StdConfig, StdConfigLoad2};
|
use config_traits::{StdConfig, StdConfigLoad3};
|
||||||
use rog_platform::platform::PlatformPolicy;
|
use rog_platform::platform::PlatformPolicy;
|
||||||
use serde_derive::{Deserialize, Serialize};
|
use serde_derive::{Deserialize, Serialize};
|
||||||
|
|
||||||
@@ -13,9 +13,7 @@ pub struct Config {
|
|||||||
pub disable_nvidia_powerd_on_battery: bool,
|
pub disable_nvidia_powerd_on_battery: bool,
|
||||||
pub ac_command: String,
|
pub ac_command: String,
|
||||||
pub bat_command: String,
|
pub bat_command: String,
|
||||||
/// Restored on boot as well as when power is plugged
|
pub platform_policy_linked_epp: bool,
|
||||||
#[serde(skip)]
|
|
||||||
pub platform_policy_to_restore: PlatformPolicy,
|
|
||||||
pub platform_policy_on_battery: PlatformPolicy,
|
pub platform_policy_on_battery: PlatformPolicy,
|
||||||
pub platform_policy_on_ac: PlatformPolicy,
|
pub platform_policy_on_ac: PlatformPolicy,
|
||||||
//
|
//
|
||||||
@@ -50,9 +48,56 @@ impl StdConfig for Config {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl StdConfigLoad2<Config462, Config472> for Config {}
|
impl StdConfigLoad3<Config462, Config472, Config506> for Config {}
|
||||||
|
|
||||||
#[derive(Deserialize, Serialize, Default, Debug)]
|
#[derive(Deserialize, Serialize)]
|
||||||
|
pub struct Config506 {
|
||||||
|
/// Save charge limit for restoring on boot
|
||||||
|
pub charge_control_end_threshold: u8,
|
||||||
|
pub panel_od: bool,
|
||||||
|
pub mini_led_mode: bool,
|
||||||
|
pub disable_nvidia_powerd_on_battery: bool,
|
||||||
|
pub ac_command: String,
|
||||||
|
pub bat_command: String,
|
||||||
|
/// Restored on boot as well as when power is plugged
|
||||||
|
#[serde(skip)]
|
||||||
|
pub platform_policy_to_restore: PlatformPolicy,
|
||||||
|
pub platform_policy_on_battery: PlatformPolicy,
|
||||||
|
pub platform_policy_on_ac: PlatformPolicy,
|
||||||
|
//
|
||||||
|
pub ppt_pl1_spl: Option<u8>,
|
||||||
|
pub ppt_pl2_sppt: Option<u8>,
|
||||||
|
pub ppt_fppt: Option<u8>,
|
||||||
|
pub ppt_apu_sppt: Option<u8>,
|
||||||
|
pub ppt_platform_sppt: Option<u8>,
|
||||||
|
pub nv_dynamic_boost: Option<u8>,
|
||||||
|
pub nv_temp_target: Option<u8>,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl From<Config506> for Config {
|
||||||
|
fn from(c: Config506) -> Self {
|
||||||
|
Self {
|
||||||
|
charge_control_end_threshold: c.charge_control_end_threshold,
|
||||||
|
panel_od: c.panel_od,
|
||||||
|
disable_nvidia_powerd_on_battery: c.disable_nvidia_powerd_on_battery,
|
||||||
|
ac_command: c.ac_command,
|
||||||
|
bat_command: c.bat_command,
|
||||||
|
mini_led_mode: c.mini_led_mode,
|
||||||
|
platform_policy_linked_epp: true,
|
||||||
|
platform_policy_on_battery: c.platform_policy_on_battery,
|
||||||
|
platform_policy_on_ac: c.platform_policy_on_ac,
|
||||||
|
ppt_pl1_spl: c.ppt_pl1_spl,
|
||||||
|
ppt_pl2_sppt: c.ppt_pl2_sppt,
|
||||||
|
ppt_fppt: c.ppt_fppt,
|
||||||
|
ppt_apu_sppt: c.ppt_apu_sppt,
|
||||||
|
ppt_platform_sppt: c.ppt_platform_sppt,
|
||||||
|
nv_dynamic_boost: c.nv_dynamic_boost,
|
||||||
|
nv_temp_target: c.nv_temp_target,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#[derive(Deserialize, Serialize)]
|
||||||
pub struct Config472 {
|
pub struct Config472 {
|
||||||
/// Save charge limit for restoring on boot
|
/// Save charge limit for restoring on boot
|
||||||
pub bat_charge_limit: u8,
|
pub bat_charge_limit: u8,
|
||||||
|
|||||||
@@ -277,16 +277,8 @@ impl crate::CtrlTask for CtrlAnimeZbus {
|
|||||||
async move {
|
async move {
|
||||||
let lock = inner.lock().await;
|
let lock = inner.lock().await;
|
||||||
if lock.config.display_enabled {
|
if lock.config.display_enabled {
|
||||||
lock.node
|
|
||||||
.write_bytes(&pkt_set_enable_powersave_anim(
|
|
||||||
!(sleeping && lock.config.off_when_suspended),
|
|
||||||
))
|
|
||||||
.map_err(|err| {
|
|
||||||
warn!("create_sys_event_tasks::off_when_suspended {}", err);
|
|
||||||
})
|
|
||||||
.ok();
|
|
||||||
|
|
||||||
lock.thread_exit.store(true, Ordering::Release); // ensure clean slate
|
lock.thread_exit.store(true, Ordering::Release); // ensure clean slate
|
||||||
|
|
||||||
lock.node
|
lock.node
|
||||||
.write_bytes(&pkt_set_enable_display(
|
.write_bytes(&pkt_set_enable_display(
|
||||||
!(sleeping && lock.config.off_when_suspended),
|
!(sleeping && lock.config.off_when_suspended),
|
||||||
@@ -296,7 +288,21 @@ impl crate::CtrlTask for CtrlAnimeZbus {
|
|||||||
})
|
})
|
||||||
.ok();
|
.ok();
|
||||||
|
|
||||||
if !sleeping && !lock.config.builtin_anims_enabled {
|
if lock.config.builtin_anims_enabled {
|
||||||
|
lock.node
|
||||||
|
.write_bytes(&pkt_set_enable_powersave_anim(
|
||||||
|
!(sleeping && lock.config.off_when_suspended),
|
||||||
|
))
|
||||||
|
.map_err(|err| {
|
||||||
|
warn!("create_sys_event_tasks::off_when_suspended {}", err);
|
||||||
|
})
|
||||||
|
.ok();
|
||||||
|
} else if !sleeping && !lock.config.builtin_anims_enabled {
|
||||||
|
// Run custom wake animation
|
||||||
|
lock.node
|
||||||
|
.write_bytes(&pkt_set_enable_powersave_anim(false))
|
||||||
|
.ok(); // ensure builtins are disabled
|
||||||
|
|
||||||
CtrlAnime::run_thread(inner.clone(), lock.cache.wake.clone(), true)
|
CtrlAnime::run_thread(inner.clone(), lock.cache.wake.clone(), true)
|
||||||
.await;
|
.await;
|
||||||
}
|
}
|
||||||
|
|||||||
+12
-10
@@ -296,16 +296,18 @@ impl CtrlTask for CtrlFanCurveZbus {
|
|||||||
impl crate::Reloadable for CtrlFanCurveZbus {
|
impl crate::Reloadable for CtrlFanCurveZbus {
|
||||||
/// Fetch the active profile and use that to set all related components up
|
/// Fetch the active profile and use that to set all related components up
|
||||||
async fn reload(&mut self) -> Result<(), RogError> {
|
async fn reload(&mut self) -> Result<(), RogError> {
|
||||||
// let active = self.platform.get_throttle_thermal_policy()?.into();
|
let active = self.platform.get_throttle_thermal_policy()?.into();
|
||||||
// if let Ok(mut device) = find_fan_curve_node() {
|
if let Ok(mut device) = find_fan_curve_node() {
|
||||||
// // There is a possibility that the curve was default zeroed, so this call
|
// There is a possibility that the curve was default zeroed, so this call
|
||||||
// // initialises the data from system read and we need to save it
|
// initialises the data from system read and we need to save it
|
||||||
// // after
|
// after
|
||||||
// self.fan_curves
|
loop {
|
||||||
// .lock()
|
if let Ok(mut curves) = self.fan_curves.try_lock() {
|
||||||
// .await
|
curves.write_profile_curve_to_platform(active, &mut device)?;
|
||||||
// .write_profile_curve_to_platform(active, &mut device)?;
|
break;
|
||||||
// }
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+25
-12
@@ -180,7 +180,11 @@ impl CtrlPlatform {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn check_and_set_epp(&self, profile: PlatformPolicy) {
|
fn check_and_set_epp(&self, profile: PlatformPolicy, change_epp: bool) {
|
||||||
|
if !change_epp {
|
||||||
|
info!("PlatformPolicy unlinked from EPP");
|
||||||
|
return;
|
||||||
|
}
|
||||||
info!("PlatformPolicy setting EPP");
|
info!("PlatformPolicy setting EPP");
|
||||||
if let Some(cpu) = self.cpu_control.as_ref() {
|
if let Some(cpu) = self.cpu_control.as_ref() {
|
||||||
if let Ok(epp) = cpu.get_available_epp() {
|
if let Ok(epp) = cpu.get_available_epp() {
|
||||||
@@ -197,7 +201,7 @@ impl CtrlPlatform {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async fn update_policy_ac_or_bat(&self, power_plugged: bool) {
|
async fn update_policy_ac_or_bat(&self, power_plugged: bool, change_epp: bool) {
|
||||||
let profile = if power_plugged {
|
let profile = if power_plugged {
|
||||||
self.config.lock().await.platform_policy_on_ac
|
self.config.lock().await.platform_policy_on_ac
|
||||||
} else {
|
} else {
|
||||||
@@ -206,7 +210,7 @@ impl CtrlPlatform {
|
|||||||
self.platform
|
self.platform
|
||||||
.set_throttle_thermal_policy(profile.into())
|
.set_throttle_thermal_policy(profile.into())
|
||||||
.ok();
|
.ok();
|
||||||
self.check_and_set_epp(profile);
|
self.check_and_set_epp(profile, change_epp);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -340,14 +344,14 @@ impl CtrlPlatform {
|
|||||||
let policy = PlatformPolicy::next(&policy);
|
let policy = PlatformPolicy::next(&policy);
|
||||||
|
|
||||||
if self.platform.has_throttle_thermal_policy() {
|
if self.platform.has_throttle_thermal_policy() {
|
||||||
self.check_and_set_epp(policy);
|
let change_epp = self.config.lock().await.platform_policy_linked_epp;
|
||||||
|
self.check_and_set_epp(policy, change_epp);
|
||||||
self.platform
|
self.platform
|
||||||
.set_throttle_thermal_policy(policy.into())
|
.set_throttle_thermal_policy(policy.into())
|
||||||
.map_err(|err| {
|
.map_err(|err| {
|
||||||
warn!("RogPlatform: throttle_thermal_policy {}", err);
|
warn!("RogPlatform: throttle_thermal_policy {}", err);
|
||||||
FdoErr::Failed(format!("RogPlatform: throttle_thermal_policy: {err}"))
|
FdoErr::Failed(format!("RogPlatform: throttle_thermal_policy: {err}"))
|
||||||
})?;
|
})?;
|
||||||
self.config.lock().await.platform_policy_to_restore = policy;
|
|
||||||
Ok(self.throttle_thermal_policy_changed(&ctxt).await?)
|
Ok(self.throttle_thermal_policy_changed(&ctxt).await?)
|
||||||
} else {
|
} else {
|
||||||
Err(FdoErr::NotSupported(
|
Err(FdoErr::NotSupported(
|
||||||
@@ -366,8 +370,8 @@ impl CtrlPlatform {
|
|||||||
async fn set_throttle_thermal_policy(&mut self, policy: PlatformPolicy) -> Result<(), FdoErr> {
|
async fn set_throttle_thermal_policy(&mut self, policy: PlatformPolicy) -> Result<(), FdoErr> {
|
||||||
// TODO: watch for external changes
|
// TODO: watch for external changes
|
||||||
if self.platform.has_throttle_thermal_policy() {
|
if self.platform.has_throttle_thermal_policy() {
|
||||||
self.check_and_set_epp(policy);
|
let change_epp = self.config.lock().await.platform_policy_linked_epp;
|
||||||
self.config.lock().await.platform_policy_to_restore = policy;
|
self.check_and_set_epp(policy, change_epp);
|
||||||
self.platform
|
self.platform
|
||||||
.set_throttle_thermal_policy(policy.into())
|
.set_throttle_thermal_policy(policy.into())
|
||||||
.map_err(|err| {
|
.map_err(|err| {
|
||||||
@@ -534,7 +538,9 @@ impl crate::Reloadable for CtrlPlatform {
|
|||||||
|
|
||||||
if let Ok(power_plugged) = self.power.get_online() {
|
if let Ok(power_plugged) = self.power.get_online() {
|
||||||
if self.platform.has_throttle_thermal_policy() {
|
if self.platform.has_throttle_thermal_policy() {
|
||||||
self.update_policy_ac_or_bat(power_plugged > 0).await;
|
let change_epp = self.config.lock().await.platform_policy_linked_epp;
|
||||||
|
self.update_policy_ac_or_bat(power_plugged > 0, change_epp)
|
||||||
|
.await;
|
||||||
}
|
}
|
||||||
self.run_ac_or_bat_cmd(power_plugged > 0).await;
|
self.run_ac_or_bat_cmd(power_plugged > 0).await;
|
||||||
}
|
}
|
||||||
@@ -614,7 +620,11 @@ impl CtrlTask for CtrlPlatform {
|
|||||||
}
|
}
|
||||||
if let Ok(power_plugged) = platform1.power.get_online() {
|
if let Ok(power_plugged) = platform1.power.get_online() {
|
||||||
if !sleeping && platform1.platform.has_throttle_thermal_policy() {
|
if !sleeping && platform1.platform.has_throttle_thermal_policy() {
|
||||||
platform1.update_policy_ac_or_bat(power_plugged > 0).await;
|
let change_epp =
|
||||||
|
platform1.config.lock().await.platform_policy_linked_epp;
|
||||||
|
platform1
|
||||||
|
.update_policy_ac_or_bat(power_plugged > 0, change_epp)
|
||||||
|
.await;
|
||||||
}
|
}
|
||||||
if !sleeping {
|
if !sleeping {
|
||||||
platform1.run_ac_or_bat_cmd(power_plugged > 0).await;
|
platform1.run_ac_or_bat_cmd(power_plugged > 0).await;
|
||||||
@@ -648,7 +658,10 @@ impl CtrlTask for CtrlPlatform {
|
|||||||
// power change
|
// power change
|
||||||
async move {
|
async move {
|
||||||
if platform3.platform.has_throttle_thermal_policy() {
|
if platform3.platform.has_throttle_thermal_policy() {
|
||||||
platform3.update_policy_ac_or_bat(power_plugged).await;
|
let change_epp = platform3.config.lock().await.platform_policy_linked_epp;
|
||||||
|
platform3
|
||||||
|
.update_policy_ac_or_bat(power_plugged, change_epp)
|
||||||
|
.await;
|
||||||
}
|
}
|
||||||
platform3.run_ac_or_bat_cmd(power_plugged).await;
|
platform3.run_ac_or_bat_cmd(power_plugged).await;
|
||||||
}
|
}
|
||||||
@@ -697,8 +710,8 @@ impl CtrlTask for CtrlPlatform {
|
|||||||
error!("Platform: get_throttle_thermal_policy error: {e}");
|
error!("Platform: get_throttle_thermal_policy error: {e}");
|
||||||
})
|
})
|
||||||
{
|
{
|
||||||
ctrl.check_and_set_epp(profile);
|
let change_epp = ctrl.config.lock().await.platform_policy_linked_epp;
|
||||||
ctrl.config.lock().await.platform_policy_to_restore = profile;
|
ctrl.check_and_set_epp(profile, change_epp);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -15,7 +15,7 @@ use asusd::ctrl_aura::trait_impls::CtrlAuraZbus;
|
|||||||
use asusd::ctrl_fancurves::CtrlFanCurveZbus;
|
use asusd::ctrl_fancurves::CtrlFanCurveZbus;
|
||||||
use asusd::ctrl_platform::CtrlPlatform;
|
use asusd::ctrl_platform::CtrlPlatform;
|
||||||
use asusd::{print_board_info, CtrlTask, Reloadable, ZbusRun, DBUS_NAME};
|
use asusd::{print_board_info, CtrlTask, Reloadable, ZbusRun, DBUS_NAME};
|
||||||
use config_traits::{StdConfig, StdConfigLoad2};
|
use config_traits::{StdConfig, StdConfigLoad2, StdConfigLoad3};
|
||||||
use log::{error, info, warn};
|
use log::{error, info, warn};
|
||||||
use rog_aura::aura_detection::LaptopLedData;
|
use rog_aura::aura_detection::LaptopLedData;
|
||||||
use tokio::time::sleep;
|
use tokio::time::sleep;
|
||||||
|
|||||||
@@ -71,6 +71,14 @@
|
|||||||
advanced_type: None,
|
advanced_type: None,
|
||||||
power_zones: [Keyboard],
|
power_zones: [Keyboard],
|
||||||
),
|
),
|
||||||
|
(
|
||||||
|
board_name: "FX705D",
|
||||||
|
layout_name: "fx505d",
|
||||||
|
basic_modes: [Static, Breathe, Strobe, Pulse],
|
||||||
|
basic_zones: [],
|
||||||
|
advanced_type: None,
|
||||||
|
power_zones: [Keyboard],
|
||||||
|
),
|
||||||
(
|
(
|
||||||
board_name: "G512",
|
board_name: "G512",
|
||||||
layout_name: "g512",
|
layout_name: "g512",
|
||||||
|
|||||||
+1
-2
@@ -10,10 +10,9 @@ pub mod effects;
|
|||||||
pub mod advanced;
|
pub mod advanced;
|
||||||
/// Convert the `RgbAddress` to `&str` labels
|
/// Convert the `RgbAddress` to `&str` labels
|
||||||
pub mod advanced_to_str;
|
pub mod advanced_to_str;
|
||||||
pub mod error;
|
|
||||||
pub use advanced_to_str::*;
|
|
||||||
/// Helper for detecting what is available
|
/// Helper for detecting what is available
|
||||||
pub mod aura_detection;
|
pub mod aura_detection;
|
||||||
|
pub mod error;
|
||||||
/// Helpers for consructing keyboard layouts for UI use and effects
|
/// Helpers for consructing keyboard layouts for UI use and effects
|
||||||
pub mod layouts;
|
pub mod layouts;
|
||||||
pub mod usb;
|
pub mod usb;
|
||||||
|
|||||||
@@ -62,8 +62,8 @@ fn main() -> Result<()> {
|
|||||||
let native_options = eframe::NativeOptions {
|
let native_options = eframe::NativeOptions {
|
||||||
vsync: true,
|
vsync: true,
|
||||||
hardware_acceleration: HardwareAcceleration::Preferred,
|
hardware_acceleration: HardwareAcceleration::Preferred,
|
||||||
// min_window_size: Some(egui::vec2(960.0, 670.0)),
|
min_window_size: Some(egui::vec2(980.0, 670.0)),
|
||||||
// max_window_size: Some(egui::vec2(960.0, 670.0)),
|
max_window_size: Some(egui::vec2(980.0, 670.0)),
|
||||||
run_and_return: true,
|
run_and_return: true,
|
||||||
..Default::default()
|
..Default::default()
|
||||||
};
|
};
|
||||||
@@ -186,6 +186,13 @@ fn main() -> Result<()> {
|
|||||||
&config,
|
&config,
|
||||||
)?;
|
)?;
|
||||||
|
|
||||||
|
if cli_parsed.board_name.is_some() || cli_parsed.layout_viewing {
|
||||||
|
if let Ok(mut lock) = states.lock() {
|
||||||
|
lock.run_in_bg = false;
|
||||||
|
running_in_bg.store(false, Ordering::Release);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if config.enable_tray_icon {
|
if config.enable_tray_icon {
|
||||||
init_tray(supported_properties, states.clone());
|
init_tray(supported_properties, states.clone());
|
||||||
}
|
}
|
||||||
@@ -212,7 +219,7 @@ fn main() -> Result<()> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if let Ok(lock) = states.try_lock() {
|
if let Ok(lock) = states.try_lock() {
|
||||||
if !lock.run_in_bg || cli_parsed.board_name.is_some() || cli_parsed.layout_viewing {
|
if !lock.run_in_bg {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -3,9 +3,3 @@ mod app_settings;
|
|||||||
mod aura_page;
|
mod aura_page;
|
||||||
mod fan_curve_page;
|
mod fan_curve_page;
|
||||||
mod system_page;
|
mod system_page;
|
||||||
|
|
||||||
pub use anime_page::*;
|
|
||||||
pub use app_settings::*;
|
|
||||||
pub use aura_page::*;
|
|
||||||
pub use fan_curve_page::*;
|
|
||||||
pub use system_page::*;
|
|
||||||
|
|||||||
@@ -15,5 +15,3 @@ pub use aura_power::*;
|
|||||||
pub use fan_graph::*;
|
pub use fan_graph::*;
|
||||||
pub use keyboard_layout::*;
|
pub use keyboard_layout::*;
|
||||||
pub use rog_bios::*;
|
pub use rog_bios::*;
|
||||||
pub use side_panel::*;
|
|
||||||
pub use top_bar::*;
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
use egui::{vec2, Align2, FontId, Id, Sense};
|
use egui::{vec2, Align2, Button, FontId, Id, Rect, RichText, Sense, Vec2};
|
||||||
|
|
||||||
use crate::{RogApp, VERSION};
|
use crate::{RogApp, VERSION};
|
||||||
|
|
||||||
@@ -33,15 +33,14 @@ impl RogApp {
|
|||||||
FontId::proportional(height - 2.0),
|
FontId::proportional(height - 2.0),
|
||||||
text_color,
|
text_color,
|
||||||
);
|
);
|
||||||
// // Add the close button:
|
// Add the close button:
|
||||||
// let close_response = ui.put(
|
let close_response = ui.put(
|
||||||
// Rect::from_min_size(titlebar_rect.right_top(),
|
Rect::from_min_size(titlebar_rect.right_top(), Vec2::splat(height)),
|
||||||
// Vec2::splat(height)),
|
Button::new(RichText::new("❌").size(height - 4.0)).frame(false),
|
||||||
// Button::new(RichText::new("❌").size(height -
|
);
|
||||||
// 4.0)).frame(false), );
|
if close_response.clicked() {
|
||||||
// if close_response.clicked() {
|
frame.close();
|
||||||
// frame.close();
|
}
|
||||||
// }
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user