From 51cad9ea7ea40f20f880de9452df413c5b1b74ec Mon Sep 17 00:00:00 2001 From: Denis Benato Date: Thu, 16 Oct 2025 15:17:27 +0200 Subject: [PATCH 01/11] chore: make the startup more verbose --- asusd/src/daemon.rs | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/asusd/src/daemon.rs b/asusd/src/daemon.rs index 455b7c89..696483bd 100644 --- a/asusd/src/daemon.rs +++ b/asusd/src/daemon.rs @@ -20,6 +20,8 @@ use zbus::fdo::ObjectManager; #[tokio::main] async fn main() -> Result<(), Box> { + println!("Starting asusd daemon..."); + // console_subscriber::init(); let mut logger = env_logger::Builder::new(); logger @@ -83,7 +85,10 @@ async fn start_daemon() -> Result<(), Box> { ) .await { - Ok(registry) => registry, + Ok(registry) => { + info!("attribute on zbus initialized"); + registry + }, Err(e) => { error!("Failed to initialize firmware attributes over zbus: {e:?}"); ArmouryAttributeRegistry::default() @@ -92,8 +97,10 @@ async fn start_daemon() -> Result<(), Box> { match CtrlFanCurveZbus::new() { Ok(ctrl) => { + info!("FanCurves: found supported fancurves"); let sig_ctx = CtrlFanCurveZbus::signal_context(&server)?; start_tasks(ctrl, &mut server, sig_ctx).await?; + info!("FanCurves: initialized"); } Err(err) => { error!("FanCurves: {}", err); @@ -102,8 +109,10 @@ async fn start_daemon() -> Result<(), Box> { match CtrlBacklight::new(config.clone()) { Ok(backlight) => { + info!("Backlight: found supported backlight"); backlight.start_watch_primary().await?; backlight.add_to_server(&mut server).await; + info!("Backlight: initialized"); } Err(err) => { error!("Backlight: {}", err); @@ -121,8 +130,10 @@ async fn start_daemon() -> Result<(), Box> { armoury_registry, ) { Ok(ctrl) => { + info!("CtrlPlatform: initialized"); let sig_ctx = CtrlPlatform::signal_context(&server)?; start_tasks(ctrl, &mut server, sig_ctx).await?; + info!("CtrlPlatform: tasks started"); } Err(err) => { error!("CtrlPlatform: {}", err); @@ -130,11 +141,13 @@ async fn start_daemon() -> Result<(), Box> { } let _ = DeviceManager::new(server.clone()).await?; + + info!("DeviceManager initialized"); // Request dbus name after finishing initalizing all functions server.request_name(DBUS_NAME).await?; - info!("Startup success, begining dbus server loop"); + info!("Startup success on dbus name {DBUS_NAME}: begining dbus server loop"); loop { // This is just a blocker to idle and ensure the reator reacts server.executor().tick().await; From 9785eafd533b007888e94cd12dbb24742a2eb3fd Mon Sep 17 00:00:00 2001 From: Denis Benato Date: Sun, 19 Oct 2025 20:45:49 +0200 Subject: [PATCH 02/11] Modified to README.md to not mislead users attempting to compile it --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 6d4b4116..de536b26 100644 --- a/README.md +++ b/README.md @@ -82,7 +82,9 @@ A gui is now in the repo - ROG Control Center. At this time it is still a WIP, b # BUILDING -Rust and cargo are required, they can be installed from [rustup.rs](https://rustup.rs/) or from the distro repos if newer than 1.75. +Rust and cargo are required, they can be installed from [rustup.rs](https://rustup.rs/). + +Distro repos probably won't work (unless rustup is shipped like in the case of archlinux) as nightly is needed. **fedora:** From 78c574b76168f3469b8cec4e8bd11545de544ef4 Mon Sep 17 00:00:00 2001 From: Denis Benato Date: Sun, 19 Oct 2025 21:27:33 +0200 Subject: [PATCH 03/11] chore_ add supprot for GU605CR --- rog-aura/data/aura_support.ron | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/rog-aura/data/aura_support.ron b/rog-aura/data/aura_support.ron index 96f0ad81..f07064f0 100644 --- a/rog-aura/data/aura_support.ron +++ b/rog-aura/data/aura_support.ron @@ -692,6 +692,15 @@ advanced_type: Zoned([SingleZone]), power_zones: [Keyboard], ), + ( + device_name: "GU605C", + product_id: "", + layout_name: "ga401q", + basic_modes: [Static, Breathe, RainbowCycle, RainbowWave, Pulse], + basic_zones: [], + advanced_type: Zoned([SingleZone]), + power_zones: [Keyboard], + ), ( device_name: "GU605M", product_id: "", From 4faa96298ad5a612518657c305f9b74cee3f8a0a Mon Sep 17 00:00:00 2001 From: Denis Benato Date: Sun, 19 Oct 2025 22:26:55 +0200 Subject: [PATCH 04/11] Chore: Added supprot for G614JIR --- rog-aura/data/aura_support.ron | 139 ++++++++++++++++++--------------- 1 file changed, 74 insertions(+), 65 deletions(-) diff --git a/rog-aura/data/aura_support.ron b/rog-aura/data/aura_support.ron index f07064f0..65a28da7 100644 --- a/rog-aura/data/aura_support.ron +++ b/rog-aura/data/aura_support.ron @@ -5,7 +5,7 @@ layout_name: "fa506i", basic_modes: [Static, Breathe, RainbowCycle, RainbowWave, Pulse], basic_zones: [], - advanced_type: None, + advanced_type: r#None, power_zones: [Keyboard], ), ( @@ -14,7 +14,7 @@ layout_name: "fa506i", basic_modes: [Static, Breathe, RainbowCycle], basic_zones: [], - advanced_type: None, + advanced_type: r#None, power_zones: [Keyboard], ), ( @@ -23,7 +23,7 @@ layout_name: "fa506i", basic_modes: [Static, Breathe, RainbowCycle, RainbowWave, Pulse], basic_zones: [], - advanced_type: None, + advanced_type: r#None, power_zones: [Keyboard], ), ( @@ -32,7 +32,7 @@ layout_name: "fa507", basic_modes: [Static, Breathe, RainbowCycle, RainbowWave, Pulse], basic_zones: [], - advanced_type: None, + advanced_type: r#None, power_zones: [Keyboard], ), ( @@ -41,7 +41,7 @@ layout_name: "fx505d", basic_modes: [Static, Breathe, Pulse], basic_zones: [], - advanced_type: None, + advanced_type: r#None, power_zones: [Keyboard], ), ( @@ -50,7 +50,7 @@ layout_name: "fx505d", basic_modes: [Static, Breathe, RainbowCycle, RainbowWave, Pulse], basic_zones: [], - advanced_type: None, + advanced_type: r#None, power_zones: [Keyboard], ), ( @@ -59,7 +59,7 @@ layout_name: "fa506i", basic_modes: [Static, Breathe, RainbowCycle, RainbowWave, Pulse], basic_zones: [], - advanced_type: None, + advanced_type: r#None, power_zones: [Keyboard], ), ( @@ -68,7 +68,7 @@ layout_name: "fa506i", basic_modes: [Static, Breathe, RainbowCycle, RainbowWave, Pulse], basic_zones: [], - advanced_type: None, + advanced_type: r#None, power_zones: [Keyboard], ), ( @@ -77,7 +77,7 @@ layout_name: "fa506i", basic_modes: [Static, Breathe, Pulse], basic_zones: [], - advanced_type: None, + advanced_type: r#None, power_zones: [Keyboard], ), ( @@ -86,7 +86,7 @@ layout_name: "fa506i", basic_modes: [Static, Breathe, Pulse], basic_zones: [], - advanced_type: None, + advanced_type: r#None, power_zones: [Keyboard], ), ( @@ -95,7 +95,7 @@ layout_name: "fa506i", basic_modes: [Static, Breathe, Pulse], basic_zones: [], - advanced_type: None, + advanced_type: r#None, power_zones: [Keyboard], ), ( @@ -104,16 +104,16 @@ layout_name: "fx505d", basic_modes: [Static, Breathe, RainbowCycle, RainbowWave, Pulse], basic_zones: [], - advanced_type: None, + advanced_type: r#None, power_zones: [Keyboard], ), - ( + ( device_name: "FX706H", product_id: "", layout_name: "fx505d", basic_modes: [Static, Breathe, RainbowCycle], basic_zones: [], - advanced_type: None, + advanced_type: r#None, power_zones: [Keyboard], ), ( @@ -122,7 +122,7 @@ layout_name: "g512", basic_modes: [Static, Breathe, RainbowCycle, RainbowWave, Pulse], basic_zones: [Key1, Key2, Key3, Key4], - advanced_type: None, + advanced_type: r#None, power_zones: [Keyboard, Lightbar], ), ( @@ -140,7 +140,7 @@ layout_name: "g513i", basic_modes: [Static, Breathe, RainbowCycle, RainbowWave, Pulse], basic_zones: [Key1, Key2, Key3, Key4], - advanced_type: None, + advanced_type: r#None, power_zones: [Keyboard, Lightbar], ), ( @@ -185,7 +185,7 @@ layout_name: "gx502", basic_modes: [Static, Breathe, RainbowCycle, RainbowWave, Pulse], basic_zones: [Key1, Key2, Key3, Key4], - advanced_type: None, + advanced_type: r#None, power_zones: [Keyboard], ), ( @@ -194,7 +194,7 @@ layout_name: "gx502", basic_modes: [Static, Breathe, RainbowCycle, RainbowWave, Star, Rain, Highlight, Laser, Ripple, Pulse, Comet, Flash], basic_zones: [Key1, Key2, Key3, Key4], - advanced_type: None, + advanced_type: r#None, power_zones: [Keyboard], ), ( @@ -239,7 +239,16 @@ layout_name: "g634j-per-key", basic_modes: [Static, Breathe, RainbowCycle, RainbowWave, Pulse], basic_zones: [], - advanced_type: None, + advanced_type: r#None, + power_zones: [Keyboard, Lightbar], + ), + ( + device_name: "G614JIR", + product_id: "", + layout_name: "g513i-per-key", + basic_modes: [Static, Breathe, RainbowCycle, RainbowWave, Star, Rain, Highlight, Laser, Ripple, Pulse, Comet, Flash], + basic_zones: [], + advanced_type: PerKey, power_zones: [Keyboard, Lightbar], ), ( @@ -248,7 +257,7 @@ layout_name: "g634j-per-key", basic_modes: [Static, Breathe, RainbowCycle, RainbowWave, Pulse], basic_zones: [Key1, Key2, Key3, Key4], - advanced_type: None, + advanced_type: r#None, power_zones: [Keyboard, Lightbar], ), ( @@ -257,7 +266,7 @@ layout_name: "g634j-per-key", basic_modes: [Static, Breathe, RainbowCycle, RainbowWave, Pulse], basic_zones: [Key1, Key2, Key3, Key4], - advanced_type: None, + advanced_type: r#None, power_zones: [Keyboard, Lightbar], ), ( @@ -275,7 +284,7 @@ layout_name: "gl503", basic_modes: [Static, Breathe, RainbowCycle, RainbowWave, Pulse], basic_zones: [], - advanced_type: None, + advanced_type: r#None, power_zones: [Keyboard], ), ( @@ -284,7 +293,7 @@ layout_name: "ga401q", basic_modes: [Static, Breathe, RainbowCycle, RainbowWave, Pulse], basic_zones: [Key1, Key2, Key3, Key4], - advanced_type: None, + advanced_type: r#None, power_zones: [Keyboard], ), ( @@ -293,7 +302,7 @@ layout_name: "ga401q", basic_modes: [Static, Breathe, RainbowCycle, RainbowWave, Pulse], basic_zones: [Key1, Key2, Key3, Key4], - advanced_type: None, + advanced_type: r#None, power_zones: [Keyboard], ), ( @@ -302,7 +311,7 @@ layout_name: "gx502", basic_modes: [Static, Breathe, RainbowCycle, RainbowWave, Pulse], basic_zones: [Key1, Key2, Key3, Key4], - advanced_type: None, + advanced_type: r#None, power_zones: [Keyboard, Lightbar], ), ( @@ -311,7 +320,7 @@ layout_name: "ga401q", basic_modes: [Static, Breathe, RainbowCycle, RainbowWave, Pulse], basic_zones: [Key1, Key2, Key3, Key4], - advanced_type: None, + advanced_type: r#None, power_zones: [Keyboard, Lightbar], ), ( @@ -320,7 +329,7 @@ layout_name: "gx502", basic_modes: [Static, Breathe, RainbowCycle, RainbowWave, Pulse], basic_zones: [Key1, Key2, Key3, Key4], - advanced_type: None, + advanced_type: r#None, power_zones: [Keyboard, Lightbar], ), ( @@ -329,7 +338,7 @@ layout_name: "gx502", basic_modes: [Static, Breathe, RainbowCycle, RainbowWave, Pulse], basic_zones: [Key1, Key2, Key3, Key4], - advanced_type: None, + advanced_type: r#None, power_zones: [Keyboard, Lightbar], ), ( @@ -365,7 +374,7 @@ layout_name: "ga401q", basic_modes: [Static, Breathe, RainbowCycle, RainbowWave, Pulse], basic_zones: [Key1, Key2, Key3, Key4], - advanced_type: None, + advanced_type: r#None, power_zones: [Keyboard], ), ( @@ -383,7 +392,7 @@ layout_name: "ga401q", basic_modes: [Static, Breathe, RainbowCycle, RainbowWave, Pulse], basic_zones: [Key1, Key2, Key3, Key4, BarLeft, BarRight], - advanced_type: None, + advanced_type: r#None, power_zones: [Keyboard, Lightbar], ), ( @@ -401,7 +410,7 @@ layout_name: "g533q", basic_modes: [Static, Breathe, RainbowCycle, RainbowWave, Pulse], basic_zones: [], - advanced_type: None, + advanced_type: r#None, power_zones: [Keyboard], ), ( @@ -410,7 +419,7 @@ layout_name: "g533q", basic_modes: [Static, Breathe, RainbowCycle, RainbowWave, Pulse], basic_zones: [Key1, Key2, Key3, Key4], - advanced_type: None, + advanced_type: r#None, power_zones: [Keyboard], ), ( @@ -419,7 +428,7 @@ layout_name: "g533q", basic_modes: [Static, Breathe, RainbowCycle, RainbowWave, Pulse], basic_zones: [Key1, Key2, Key3, Key4], - advanced_type: None, + advanced_type: r#None, power_zones: [Keyboard], ), ( @@ -482,7 +491,7 @@ layout_name: "ga401q", basic_modes: [Static, Breathe, Pulse], basic_zones: [], - advanced_type: None, + advanced_type: r#None, power_zones: [Keyboard], ), ( @@ -491,7 +500,7 @@ layout_name: "ga401q", basic_modes: [Static, Breathe, Pulse], basic_zones: [], - advanced_type: None, + advanced_type: r#None, power_zones: [Keyboard], ), ( @@ -500,7 +509,7 @@ layout_name: "ga401q", basic_modes: [Static, Breathe, RainbowCycle, RainbowWave, Pulse], basic_zones: [], - advanced_type: None, + advanced_type: r#None, power_zones: [Keyboard], ), ( @@ -509,7 +518,7 @@ layout_name: "ga401q", basic_modes: [Static, Breathe, Pulse], basic_zones: [], - advanced_type: None, + advanced_type: r#None, power_zones: [Keyboard], ), ( @@ -518,7 +527,7 @@ layout_name: "ga401q", basic_modes: [Static, Breathe, RainbowCycle, RainbowWave, Pulse], basic_zones: [], - advanced_type: None, + advanced_type: r#None, power_zones: [Keyboard], ), ( @@ -527,7 +536,7 @@ layout_name: "ga401q", basic_modes: [Static, Breathe, RainbowCycle, RainbowWave, Pulse], basic_zones: [], - advanced_type: None, + advanced_type: r#None, power_zones: [Keyboard], ), ( @@ -536,7 +545,7 @@ layout_name: "ga401q", basic_modes: [Static, Breathe, Pulse], basic_zones: [], - advanced_type: None, + advanced_type: r#None, power_zones: [Keyboard], ), ( @@ -545,7 +554,7 @@ layout_name: "ga401q", basic_modes: [Static, Breathe, Pulse], basic_zones: [], - advanced_type: None, + advanced_type: r#None, power_zones: [Keyboard], ), ( @@ -554,7 +563,7 @@ layout_name: "ga401q", basic_modes: [Static, Breathe, RainbowCycle, RainbowWave, Pulse], basic_zones: [], - advanced_type: None, + advanced_type: r#None, power_zones: [Keyboard], ), ( @@ -563,7 +572,7 @@ layout_name: "ga401q", basic_modes: [Static, Breathe, Pulse], basic_zones: [], - advanced_type: None, + advanced_type: r#None, power_zones: [Keyboard], ), ( @@ -572,7 +581,7 @@ layout_name: "ga401q", basic_modes: [Static, Breathe, RainbowCycle, RainbowWave, Pulse], basic_zones: [], - advanced_type: None, + advanced_type: r#None, power_zones: [Keyboard], ), ( @@ -590,7 +599,7 @@ layout_name: "gl503", basic_modes: [Static, Breathe, RainbowCycle, RainbowWave, Pulse], basic_zones: [Key1, Key2, Key3, Key4], - advanced_type: None, + advanced_type: r#None, power_zones: [Keyboard], ), ( @@ -599,7 +608,7 @@ layout_name: "gl503", basic_modes: [Static, Breathe, RainbowCycle, RainbowWave, Pulse], basic_zones: [Key1, Key2, Key3, Key4], - advanced_type: None, + advanced_type: r#None, power_zones: [Keyboard], ), ( @@ -608,7 +617,7 @@ layout_name: "gl503", basic_modes: [Static, Breathe, RainbowCycle, RainbowWave, Pulse], basic_zones: [Key1, Key2, Key3, Key4, Logo, BarLeft, BarRight], - advanced_type: None, + advanced_type: r#None, power_zones: [Keyboard], ), ( @@ -626,7 +635,7 @@ layout_name: "g533q", basic_modes: [Static, Breathe, RainbowCycle, RainbowWave, Pulse], basic_zones: [Key1, Key2, Key3, Key4], - advanced_type: None, + advanced_type: r#None, power_zones: [Keyboard], ), ( @@ -635,7 +644,7 @@ layout_name: "gl503", basic_modes: [Static, Breathe, RainbowCycle, RainbowWave, Pulse], basic_zones: [], - advanced_type: None, + advanced_type: r#None, power_zones: [Keyboard], ), ( @@ -644,7 +653,7 @@ layout_name: "fa507", basic_modes: [Static, Breathe, RainbowCycle, RainbowWave, Pulse], basic_zones: [Key1, Key2, Key3, Key4], - advanced_type: None, + advanced_type: r#None, power_zones: [Keyboard], ), ( @@ -716,7 +725,7 @@ layout_name: "ga401q", basic_modes: [Static, Breathe, Pulse], basic_zones: [], - advanced_type: None, + advanced_type: r#None, power_zones: [Keyboard], ), ( @@ -725,7 +734,7 @@ layout_name: "ga401q", basic_modes: [Static, Breathe, Pulse], basic_zones: [], - advanced_type: None, + advanced_type: r#None, power_zones: [Keyboard], ), ( @@ -734,7 +743,7 @@ layout_name: "ga401q", basic_modes: [Static, Breathe, Pulse], basic_zones: [], - advanced_type: None, + advanced_type: r#None, power_zones: [Keyboard], ), ( @@ -743,7 +752,7 @@ layout_name: "ga401q", basic_modes: [Static, Breathe, RainbowCycle, RainbowWave, Pulse], basic_zones: [], - advanced_type: None, + advanced_type: r#None, power_zones: [Keyboard], ), ( @@ -761,7 +770,7 @@ layout_name: "ga401q", basic_modes: [Static, Breathe, RainbowCycle, RainbowWave, Pulse], basic_zones: [], - advanced_type: None, + advanced_type: r#None, power_zones: [Keyboard], ), ( @@ -779,7 +788,7 @@ layout_name: "gx531-per-key", basic_modes: [Static, Breathe, RainbowCycle, RainbowWave, Pulse], basic_zones: [Key1, Key2, Key3, Key4], - advanced_type: None, + advanced_type: r#None, power_zones: [Keyboard], ), ( @@ -833,7 +842,7 @@ layout_name: "gx531-per-key", basic_modes: [Static, Breathe, RainbowCycle, RainbowWave, Star, Rain, Highlight, Laser, Ripple, Pulse, Comet, Flash], basic_zones: [], - advanced_type: None, + advanced_type: r#None, power_zones: [Keyboard], ), ( @@ -842,7 +851,7 @@ layout_name: "ga401q", basic_modes: [Static, Breathe, Pulse], basic_zones: [], - advanced_type: None, + advanced_type: r#None, power_zones: [Keyboard], ), ( @@ -851,7 +860,7 @@ layout_name: "ga401q", basic_modes: [Static, Breathe, Pulse], basic_zones: [], - advanced_type: None, + advanced_type: r#None, power_zones: [Keyboard], ), ( @@ -860,8 +869,8 @@ layout_name: "", basic_modes: [Static, Breathe, Pulse], basic_zones: [], - advanced_type: None, - power_zones: [None], + advanced_type: r#None, + power_zones: [r#None], ), ( device_name: "GZ301Z", @@ -869,7 +878,7 @@ layout_name: "ga401q", basic_modes: [Static, Breathe, Pulse], basic_zones: [], - advanced_type: None, + advanced_type: r#None, power_zones: [Keyboard], ), ( @@ -878,7 +887,7 @@ layout_name: "ga401q", basic_modes: [Static, Breathe, RainbowCycle, RainbowWave, Pulse], basic_zones: [], - advanced_type: None, + advanced_type: r#None, power_zones: [Ally], ), ( @@ -887,7 +896,7 @@ layout_name: "ga401q", basic_modes: [Static, Breathe, RainbowCycle, RainbowWave, Pulse], basic_zones: [], - advanced_type: None, + advanced_type: r#None, power_zones: [Ally], ), -]) +]) \ No newline at end of file From 834464a527847540bbb24d29415b804e940ca616 Mon Sep 17 00:00:00 2001 From: Denis Benato Date: Sun, 19 Oct 2025 23:00:23 +0200 Subject: [PATCH 05/11] Fix: fixed ac_command/bat_command --- asusd/src/ctrl_platform.rs | 2 +- rog-control-center/src/notify.rs | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/asusd/src/ctrl_platform.rs b/asusd/src/ctrl_platform.rs index 65e57c5f..a36328a7 100644 --- a/asusd/src/ctrl_platform.rs +++ b/asusd/src/ctrl_platform.rs @@ -167,7 +167,7 @@ impl CtrlPlatform { .map(|s| s.to_string()) .collect() }; - if prog.len() > 1 { + if (!prog.is_empty()) && (!prog[0].is_empty()) { let mut cmd = Command::new(&prog[0]); for arg in prog.iter().skip(1) { cmd.arg(arg); diff --git a/rog-control-center/src/notify.rs b/rog-control-center/src/notify.rs index f7128a8f..3302b51e 100644 --- a/rog-control-center/src/notify.rs +++ b/rog-control-center/src/notify.rs @@ -116,26 +116,26 @@ pub fn start_notifications( if p == 0 && p != last_state { let prog: Vec<&str> = bat.split_whitespace().collect(); - if prog.len() > 1 { + if (!prog.is_empty()) && (!prog[0].is_empty()) { let mut cmd = Command::new(prog[0]); for arg in prog.iter().skip(1) { cmd.arg(*arg); } cmd.spawn() - .map_err(|e| error!("AC command error: {e:?}")) + .map_err(|e| error!("Battery power command error: {e:?}")) .ok(); } } else if p != last_state { let prog: Vec<&str> = ac.split_whitespace().collect(); - if prog.len() > 1 { + if (!prog.is_empty()) && (!prog[0].is_empty()) { let mut cmd = Command::new(prog[0]); for arg in prog.iter().skip(1) { cmd.arg(*arg); } cmd.spawn() - .map_err(|e| error!("AC command error: {e:?}")) + .map_err(|e| error!("AC power command error: {e:?}")) .ok(); } } From d8f06230fa0b47b1c2b8b3c90ef607e79c8276ca Mon Sep 17 00:00:00 2001 From: Denis Benato Date: Sun, 19 Oct 2025 23:02:15 +0200 Subject: [PATCH 06/11] Chore: Added support for FX607J --- asusd/src/daemon.rs | 4 ++-- rog-aura/data/aura_support.ron | 9 +++++++++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/asusd/src/daemon.rs b/asusd/src/daemon.rs index 696483bd..0eae0326 100644 --- a/asusd/src/daemon.rs +++ b/asusd/src/daemon.rs @@ -88,7 +88,7 @@ async fn start_daemon() -> Result<(), Box> { Ok(registry) => { info!("attribute on zbus initialized"); registry - }, + } Err(e) => { error!("Failed to initialize firmware attributes over zbus: {e:?}"); ArmouryAttributeRegistry::default() @@ -141,7 +141,7 @@ async fn start_daemon() -> Result<(), Box> { } let _ = DeviceManager::new(server.clone()).await?; - + info!("DeviceManager initialized"); // Request dbus name after finishing initalizing all functions diff --git a/rog-aura/data/aura_support.ron b/rog-aura/data/aura_support.ron index 65a28da7..b47545ad 100644 --- a/rog-aura/data/aura_support.ron +++ b/rog-aura/data/aura_support.ron @@ -89,6 +89,15 @@ advanced_type: r#None, power_zones: [Keyboard], ), + ( + device_name: "FX607J", + product_id: "", + layout_name: "fa506i", + basic_modes: [Static, Breathe, Pulse], + basic_zones: [], + advanced_type: r#None, + power_zones: [Keyboard], + ), ( device_name: "FX617X", product_id: "", From 60fce30a06e3f781837747a4007aab2696107b6e Mon Sep 17 00:00:00 2001 From: Denis Benato Date: Mon, 20 Oct 2025 00:39:17 +0200 Subject: [PATCH 07/11] Chore: flush out requirement for nightly --- .cargo-husky/hooks/pre-commit | 4 ++-- .cargo-husky/hooks/pre-push | 4 ++-- .gitlab-ci.yml | 13 ++++++------- Makefile | 9 +++++++++ README.md | 2 +- asusd/src/aura_laptop/config.rs | 17 +++++++++++++++++ rog-control-center/Cargo.toml | 2 +- 7 files changed, 38 insertions(+), 13 deletions(-) diff --git a/.cargo-husky/hooks/pre-commit b/.cargo-husky/hooks/pre-commit index baed3cf7..070d97b2 100755 --- a/.cargo-husky/hooks/pre-commit +++ b/.cargo-husky/hooks/pre-commit @@ -1,6 +1,6 @@ #!/bin/sh set -e -echo '+cargo +nightly fmt --all -- --check' -cargo +nightly fmt --all -- --check +echo '+cargo fmt --all -- --check' +cargo fmt --all -- --check git add -u diff --git a/.cargo-husky/hooks/pre-push b/.cargo-husky/hooks/pre-push index b47ed1ad..62ed288a 100755 --- a/.cargo-husky/hooks/pre-push +++ b/.cargo-husky/hooks/pre-push @@ -2,8 +2,8 @@ set -e -echo '+cargo +nightly fmt --all -- --check' -cargo +nightly fmt --all -- --check +echo '+cargo fmt --all -- --check' +cargo fmt --all -- --check echo '+cargo clippy --all -- -D warnings' cargo clippy --all -- -D warnings echo '+cargo cranky' diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 198cba7a..176b3dcc 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -31,8 +31,7 @@ format: - tags <<: *rust_cache script: - - echo "nightly" > rust-toolchain - - rustup component add rustfmt + - rustup component add rustfmt || true - cargo fmt --check check: @@ -40,8 +39,8 @@ check: - tags <<: *rust_cache script: - - rustup component add clippy - - cargo check + - rustup component add clippy || true + - cargo check --locked --workspace # deny currently catches too much #- cargo install cargo-deny && cargo deny - cargo install cargo-cranky && cargo cranky @@ -52,7 +51,7 @@ test: <<: *rust_cache script: - mkdir -p .git/hooks > /dev/null - - cargo test --all -- --test-threads=1 + - cargo test --locked --all release: only: @@ -60,7 +59,7 @@ release: <<: *rust_cache script: - cargo install cargo-vendor-filterer - - make && make vendor + - make FROZEN=1 && make vendor artifacts: paths: - vendor_asusctl*.tar.xz @@ -72,7 +71,7 @@ pages: - tags <<: *rust_cache script: - - cargo doc --document-private-items --no-deps --workspace + - cargo doc --locked --document-private-items --no-deps --workspace - rm -rf public - mkdir public - cp -R target/doc/* public diff --git a/Makefile b/Makefile index 60540fcf..6db2b96c 100644 --- a/Makefile +++ b/Makefile @@ -37,6 +37,15 @@ ifeq ($(X11),1) ARGS += --features "rog-control-center/x11" endif +# Always use the versions in Cargo.lock by default +ARGS += --locked + +# Allow optionally freezing the build to avoid any network access and enforce Cargo.lock strictly +FROZEN ?= 0 +ifeq ($(FROZEN),1) + ARGS += --frozen +endif + VENDORED ?= 0 ifeq ($(VENDORED),1) ARGS += --frozen diff --git a/README.md b/README.md index de536b26..d3e1071d 100644 --- a/README.md +++ b/README.md @@ -84,7 +84,7 @@ A gui is now in the repo - ROG Control Center. At this time it is still a WIP, b Rust and cargo are required, they can be installed from [rustup.rs](https://rustup.rs/). -Distro repos probably won't work (unless rustup is shipped like in the case of archlinux) as nightly is needed. +Distro packaging should work with the stable toolchain. If your distro does not provide a recent Rust toolchain, install rustup and use the stable toolchain. **fedora:** diff --git a/asusd/src/aura_laptop/config.rs b/asusd/src/aura_laptop/config.rs index 326602af..43f535a0 100644 --- a/asusd/src/aura_laptop/config.rs +++ b/asusd/src/aura_laptop/config.rs @@ -231,6 +231,8 @@ impl AuraConfig { #[cfg(test)] mod tests { + use std::sync::{Mutex, MutexGuard, OnceLock}; + use rog_aura::keyboard::AuraPowerState; use rog_aura::{ AuraEffect, AuraModeNum, AuraZone, Colour, Direction, LedBrightness, PowerZones, Speed, @@ -238,8 +240,20 @@ mod tests { use super::AuraConfig; + // Global mutex to serialize tests that rely on process-wide environment + // variables + static TEST_MUTEX: OnceLock> = OnceLock::new(); + + fn test_lock() -> MutexGuard<'static, ()> { + TEST_MUTEX + .get_or_init(|| Mutex::new(())) + .lock() + .expect("TEST_MUTEX poisoned") + } + #[test] fn set_multizone_4key_config() { + let _guard = test_lock(); std::env::set_var("BOARD_NAME", ""); let mut config = AuraConfig::new("19b6"); @@ -319,6 +333,7 @@ mod tests { #[test] fn set_multizone_multimode_config() { + let _guard = test_lock(); std::env::set_var("BOARD_NAME", ""); let mut config = AuraConfig::new("19b6"); @@ -367,6 +382,7 @@ mod tests { #[test] fn verify_0x1866_g531i() { + let _guard = test_lock(); std::env::set_var("BOARD_NAME", "G513I"); let mut config = AuraConfig::new("1866"); @@ -392,6 +408,7 @@ mod tests { #[test] fn verify_0x19b6_g634j() { + let _guard = test_lock(); std::env::set_var("BOARD_NAME", "G634J"); let mut config = AuraConfig::new("19b6"); diff --git a/rog-control-center/Cargo.toml b/rog-control-center/Cargo.toml index 8a7318ab..bf505f37 100644 --- a/rog-control-center/Cargo.toml +++ b/rog-control-center/Cargo.toml @@ -12,7 +12,7 @@ edition.workspace = true default = [] mocking = [] x11 = ["slint/backend-winit-x11"] -# Requires RUSTFLAGS="--cfg tokio_unstable" +# Optional tokio debug feature does not require nightly; remove RUSTFLAGS note. tokio-debug = ["console-subscriber"] [dependencies] From 415712143b6238546abcd8b06551a5f5fdd06768 Mon Sep 17 00:00:00 2001 From: Denis Benato Date: Mon, 20 Oct 2025 02:08:59 +0200 Subject: [PATCH 08/11] Feat: add screen_auto_brightness --- rog-control-center/src/ui/setup_system.rs | 6 +++++ rog-control-center/ui/pages/system.slint | 10 ++++++++ rog-platform/src/asus_armoury.rs | 30 ++++++++++++++++++++--- 3 files changed, 42 insertions(+), 4 deletions(-) diff --git a/rog-control-center/src/ui/setup_system.rs b/rog-control-center/src/ui/setup_system.rs index e7d9f7f9..aa03bf74 100644 --- a/rog-control-center/src/ui/setup_system.rs +++ b/rog-control-center/src/ui/setup_system.rs @@ -40,6 +40,7 @@ pub fn setup_system_page(ui: &MainWindow, _config: Arc>) { ui.global::().set_platform_profile(-1); ui.global::().set_panel_overdrive(-1); ui.global::().set_boot_sound(-1); + ui.global::().set_screen_auto_brightness(-1); ui.global::().set_mini_led_mode(-1); ui.global::().set_screenpad_brightness(-1); ui.global::().set_ppt_pl1_spl(MINMAX); @@ -666,6 +667,11 @@ pub fn setup_system_page_callbacks(ui: &MainWindow, _states: Arc>) setup_callback!(boot_sound, handle, attr, i32); setup_external!(boot_sound, i32, handle, attr, value) } + FirmwareAttribute::ScreenAutoBrightness => { + init_property!(screen_auto_brightness, handle, value, i32); + setup_callback!(screen_auto_brightness, handle, attr, i32); + setup_external!(screen_auto_brightness, i32, handle, attr, value) + } FirmwareAttribute::McuPowersave => {} FirmwareAttribute::PanelOverdrive => { init_property!(panel_overdrive, handle, value, i32); diff --git a/rog-control-center/ui/pages/system.slint b/rog-control-center/ui/pages/system.slint index 328c2735..3d842ada 100644 --- a/rog-control-center/ui/pages/system.slint +++ b/rog-control-center/ui/pages/system.slint @@ -51,6 +51,8 @@ export global SystemPageData { callback cb_panel_overdrive(int); in-out property boot_sound; callback cb_boot_sound(int); + in-out property screen_auto_brightness; + callback cb_screen_auto_brightness(int); in-out property mini_led_mode; callback cb_mini_led_mode(int); @@ -300,6 +302,14 @@ export component PageSystem inherits Rectangle { SystemPageData.cb_boot_sound(SystemPageData.boot_sound) } } + + if SystemPageData.screen_auto_brightness != -1: SystemToggleInt { + text: @tr("Screen Auto Brightness"); + checked_int <=> SystemPageData.screen_auto_brightness; + toggled => { + SystemPageData.cb_screen_auto_brightness(SystemPageData.screen_auto_brightness) + } + } } if (SystemPageData.ppt_pl1_spl.max > 0 && SystemPageData.ppt_pl1_spl.current != -1) || (SystemPageData.ppt_pl2_sppt.max > 0 && SystemPageData.ppt_pl2_sppt.current != -1) || (SystemPageData.ppt_pl3_fppt.max > 0 && SystemPageData.ppt_pl3_fppt.current != -1) || (SystemPageData.ppt_fppt.max > 0 && SystemPageData.ppt_fppt.current != -1) || (SystemPageData.ppt_apu_sppt.max > 0 && SystemPageData.ppt_apu_sppt.current != -1) || (SystemPageData.nv_temp_target.max > 0 && SystemPageData.nv_temp_target.current != -1) || (SystemPageData.nv_dynamic_boost.max > 0 && SystemPageData.nv_dynamic_boost.current != -1): HorizontalLayout { diff --git a/rog-platform/src/asus_armoury.rs b/rog-platform/src/asus_armoury.rs index b0dd2834..037d6fb0 100644 --- a/rog-platform/src/asus_armoury.rs +++ b/rog-platform/src/asus_armoury.rs @@ -272,10 +272,29 @@ macro_rules! define_attribute_getters { } define_attribute_getters!( - apu_mem, cores_performance, cores_efficiency, ppt_pl1_spl, ppt_pl2_sppt, ppt_apu_sppt, - ppt_platform_sppt, ppt_fppt, nv_dynamic_boost, nv_temp_target, dgpu_base_tgp, dgpu_tgp, - charge_mode, boot_sound, mcu_powersave, panel_od, panel_hd_mode, egpu_connected, egpu_enable, - dgpu_disable, gpu_mux_mode, mini_led_mode + apu_mem, + cores_performance, + cores_efficiency, + ppt_pl1_spl, + ppt_pl2_sppt, + ppt_apu_sppt, + ppt_platform_sppt, + ppt_fppt, + nv_dynamic_boost, + nv_temp_target, + dgpu_base_tgp, + dgpu_tgp, + charge_mode, + boot_sound, + mcu_powersave, + panel_od, + panel_hd_mode, + egpu_connected, + egpu_enable, + dgpu_disable, + gpu_mux_mode, + mini_led_mode, + screen_auto_brightness ); /// CamelCase names of the properties. Intended for use with DBUS @@ -322,6 +341,7 @@ pub enum FirmwareAttribute { PendingReboot = 23, PptEnabled = 24, None = 25, + ScreenAutoBrightness = 26, } impl FirmwareAttribute { @@ -375,6 +395,7 @@ impl From<&str> for FirmwareAttribute { "gpu_mux_mode" => Self::GpuMuxMode, "mini_led_mode" => Self::MiniLedMode, "pending_reboot" => Self::PendingReboot, + "screen_auto_brightness" => Self::ScreenAutoBrightness, _ => { error!("Invalid firmware attribute: {}", s); Self::None @@ -411,6 +432,7 @@ impl From for &str { FirmwareAttribute::GpuMuxMode => "gpu_mux_mode", FirmwareAttribute::MiniLedMode => "mini_led_mode", FirmwareAttribute::PendingReboot => "pending_reboot", + FirmwareAttribute::ScreenAutoBrightness => "screen_auto_brightness", FirmwareAttribute::None => "none", } } From a345b09ce16e8461cc1bb9ce9f1a06874cc9f8e7 Mon Sep 17 00:00:00 2001 From: Denis Benato Date: Mon, 20 Oct 2025 02:46:07 +0200 Subject: [PATCH 09/11] Chore: type abttery -> battery --- rog-control-center/src/ui/setup_system.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rog-control-center/src/ui/setup_system.rs b/rog-control-center/src/ui/setup_system.rs index aa03bf74..b4fda51c 100644 --- a/rog-control-center/src/ui/setup_system.rs +++ b/rog-control-center/src/ui/setup_system.rs @@ -520,7 +520,7 @@ pub fn setup_system_page_callbacks(ui: &MainWindow, _states: Arc>) set_ui_callbacks!(handle, SystemPageData(as i32), platform_copy.platform_profile_on_battery(.into()), - "Throttle policy on abttery set to {}", + "Throttle policy on battery set to {}", "Setting Throttle policy on battery failed" ); set_ui_callbacks!(handle, From 90b3f43a36d671b403212f57c062fb11f49f0ea3 Mon Sep 17 00:00:00 2001 From: Denis Benato Date: Mon, 20 Oct 2025 02:49:47 +0200 Subject: [PATCH 10/11] Chore: add more debugging --- rog-control-center/src/ui/setup_system.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/rog-control-center/src/ui/setup_system.rs b/rog-control-center/src/ui/setup_system.rs index b4fda51c..9b0158a3 100644 --- a/rog-control-center/src/ui/setup_system.rs +++ b/rog-control-center/src/ui/setup_system.rs @@ -309,6 +309,7 @@ pub fn setup_system_page_callbacks(ui: &MainWindow, _states: Arc>) let platform_copy = platform.clone(); if let Ok(mut value) = platform.platform_profile_choices().await { + debug!("Available platform profile choices: {:?}", value); handle .upgrade_in_event_loop(move |handle| { value.sort(); From 151d681e1692242463bf575afb6ab1b0094c064a Mon Sep 17 00:00:00 2001 From: Denis Benato Date: Mon, 20 Oct 2025 03:47:09 +0200 Subject: [PATCH 11/11] feat: expose MCU Powersave toggle on rogcc --- rog-control-center/src/ui/setup_system.rs | 7 ++++++- rog-control-center/ui/pages/system.slint | 10 ++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/rog-control-center/src/ui/setup_system.rs b/rog-control-center/src/ui/setup_system.rs index 9b0158a3..c0953417 100644 --- a/rog-control-center/src/ui/setup_system.rs +++ b/rog-control-center/src/ui/setup_system.rs @@ -41,6 +41,7 @@ pub fn setup_system_page(ui: &MainWindow, _config: Arc>) { ui.global::().set_panel_overdrive(-1); ui.global::().set_boot_sound(-1); ui.global::().set_screen_auto_brightness(-1); + ui.global::().set_mcu_powersave(-1); ui.global::().set_mini_led_mode(-1); ui.global::().set_screenpad_brightness(-1); ui.global::().set_ppt_pl1_spl(MINMAX); @@ -673,7 +674,11 @@ pub fn setup_system_page_callbacks(ui: &MainWindow, _states: Arc>) setup_callback!(screen_auto_brightness, handle, attr, i32); setup_external!(screen_auto_brightness, i32, handle, attr, value) } - FirmwareAttribute::McuPowersave => {} + FirmwareAttribute::McuPowersave => { + init_property!(mcu_powersave, handle, value, i32); + setup_callback!(mcu_powersave, handle, attr, i32); + setup_external!(mcu_powersave, i32, handle, attr, value) + } FirmwareAttribute::PanelOverdrive => { init_property!(panel_overdrive, handle, value, i32); setup_callback!(panel_overdrive, handle, attr, i32); diff --git a/rog-control-center/ui/pages/system.slint b/rog-control-center/ui/pages/system.slint index 3d842ada..788d8c16 100644 --- a/rog-control-center/ui/pages/system.slint +++ b/rog-control-center/ui/pages/system.slint @@ -53,6 +53,8 @@ export global SystemPageData { callback cb_boot_sound(int); in-out property screen_auto_brightness; callback cb_screen_auto_brightness(int); + in-out property mcu_powersave; + callback cb_mcu_powersave(int); in-out property mini_led_mode; callback cb_mini_led_mode(int); @@ -310,6 +312,14 @@ export component PageSystem inherits Rectangle { SystemPageData.cb_screen_auto_brightness(SystemPageData.screen_auto_brightness) } } + + if SystemPageData.mcu_powersave != -1: SystemToggleInt { + text: @tr("MCU Powersave"); + checked_int <=> SystemPageData.mcu_powersave; + toggled => { + SystemPageData.cb_mcu_powersave(SystemPageData.mcu_powersave) + } + } } if (SystemPageData.ppt_pl1_spl.max > 0 && SystemPageData.ppt_pl1_spl.current != -1) || (SystemPageData.ppt_pl2_sppt.max > 0 && SystemPageData.ppt_pl2_sppt.current != -1) || (SystemPageData.ppt_pl3_fppt.max > 0 && SystemPageData.ppt_pl3_fppt.current != -1) || (SystemPageData.ppt_fppt.max > 0 && SystemPageData.ppt_fppt.current != -1) || (SystemPageData.ppt_apu_sppt.max > 0 && SystemPageData.ppt_apu_sppt.current != -1) || (SystemPageData.nv_temp_target.max > 0 && SystemPageData.nv_temp_target.current != -1) || (SystemPageData.nv_dynamic_boost.max > 0 && SystemPageData.nv_dynamic_boost.current != -1): HorizontalLayout {