Updates to asusctl cli app

This commit is contained in:
Luke D. Jones
2021-08-28 11:47:01 +12:00
parent c6cc304a42
commit ccfadc2fcb
3 changed files with 16 additions and 15 deletions

View File

@@ -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/`.

View File

@@ -146,6 +146,8 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
.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<dyn std::error::Error>> {
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<dyn std::error::Error>> {
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()

View File

@@ -32,4 +32,4 @@ impl From<std::io::Error> for ProfileError {
fn from(err: std::io::Error) -> Self {
ProfileError::Io(err)
}
}
}