From ccfadc2fcb30507ea775498ab78da55ab1eff7be Mon Sep 17 00:00:00 2001 From: "Luke D. Jones" Date: Sat, 28 Aug 2021 11:47:01 +1200 Subject: [PATCH] Updates to asusctl cli app --- README.md | 17 +++++++---------- asusctl/src/main.rs | 12 ++++++++---- rog-profiles/src/error.rs | 2 +- 3 files changed, 16 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index 4a7ea678..7fe5370d 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,11 @@ `asusd` is a utility for Linux to control many aspects of various ASUS laptops but can also be used with non-asus laptops with reduced features. +## Kernel patches required + +1. https://lkml.org/lkml/2021/8/20/232 +2. https://lkml.org/lkml/2021/8/18/1022 + ## Goals 1. To provide an interface for rootless control of some system functions most users wish to control such as fan speeds, keyboard LEDs, graphics modes. @@ -48,12 +53,9 @@ will probably suffer another rename once it becomes generic enough to do so. - [X] Per-key LED setting - [X] Fancy LED modes (See examples) (currently being reworked) - [X] Saving settings for reload -- [X] Logging - required for journalctl -- [X] AniMatrix display on G14 models that include it (currently being reworked) +- [X] AniMatrix display on G14 models that include it - [X] Set battery charge limit (with kernel supporting this) -- [X] Fan curve control on G14 + G15 thanks to @Yarn1 -- [X] Graphics mode switching between iGPU, dGPU, on-demand, and vfio (for VM pass-through) - + [X] Requires only a logout/login +- [X] Fan curve control on G14 + G15. Requires kernel patch (should reach 5.15 kernel) - [X] Toggle bios setting for boot/POST sound - [X] Toggle bios setting for "dedicated gfx" mode on supported laptops (g-sync) @@ -84,11 +86,6 @@ $ systemctl daemon-reload && systemctl restart asusd You may also need to activate the service for debian install. If running Pop!_OS, I suggest disabling `system76-power` gnome-shell extension and systemd service. -If you would like to run this daemon on another non-ASUS laptop you can. You'll -have all features available except the LED and AniMe control (further controllers -can be added on request). You will need to install the alternative service from -`data/asusd-alt.service`. - ## Uninstalling Run `sudo make uninstall` in the source repo, and remove `/etc/asusd/`. diff --git a/asusctl/src/main.rs b/asusctl/src/main.rs index 2e67f67f..072a25cc 100644 --- a/asusctl/src/main.rs +++ b/asusctl/src/main.rs @@ -146,6 +146,8 @@ fn main() -> Result<(), Box> { .get_supported_functions() .map_err(|e| { println!("\nIs asusd running?\n\n{}", e); + println!(); + println!("Please use `journalctl -b -u asusd` and `systemctl status asusd` for more information"); e })?; @@ -162,6 +164,8 @@ fn main() -> Result<(), Box> { print_laptop_info(); println!(); println!("Supported laptop functions:\n\n{}", supported); + println!(); + println!("Please use `journalctl -b -u asusd` and `systemctl status asusd` for more information") } Ok(()) @@ -195,11 +199,11 @@ fn do_parsed( dbus: &RogDbusClient, ) -> Result<(), Box> { match &parsed.command { - Some(CliCommand::LedMode(mode)) => handle_led_mode(dbus, &supported.keyboard_led, &mode)?, - Some(CliCommand::Profile(cmd)) => handle_profile(dbus, &supported.platform_profile, &cmd)?, + Some(CliCommand::LedMode(mode)) => handle_led_mode(dbus, &supported.keyboard_led, mode)?, + Some(CliCommand::Profile(cmd)) => handle_profile(dbus, &supported.platform_profile, cmd)?, Some(CliCommand::Graphics(cmd)) => do_gfx(cmd)?, - Some(CliCommand::Anime(cmd)) => handle_anime(dbus, &supported.anime_ctrl, &cmd)?, - Some(CliCommand::Bios(cmd)) => handle_bios_option(dbus, &supported.rog_bios_ctrl, &cmd)?, + Some(CliCommand::Anime(cmd)) => handle_anime(dbus, &supported.anime_ctrl, cmd)?, + Some(CliCommand::Bios(cmd)) => handle_bios_option(dbus, &supported.rog_bios_ctrl, cmd)?, None => { if (!parsed.show_supported && parsed.kbd_bright.is_none() diff --git a/rog-profiles/src/error.rs b/rog-profiles/src/error.rs index baa11c2c..d80f8551 100644 --- a/rog-profiles/src/error.rs +++ b/rog-profiles/src/error.rs @@ -32,4 +32,4 @@ impl From for ProfileError { fn from(err: std::io::Error) -> Self { ProfileError::Io(err) } -} \ No newline at end of file +}