diff --git a/asusd/src/aura_manager.rs b/asusd/src/aura_manager.rs index be09bf8e..c5cf4bd2 100644 --- a/asusd/src/aura_manager.rs +++ b/asusd/src/aura_manager.rs @@ -6,6 +6,7 @@ use std::sync::Arc; +use dmi_id::DMIID; use futures_lite::future::block_on; use log::{debug, error, info, warn}; use mio::{Events, Interest, Poll, Token}; @@ -163,7 +164,7 @@ impl DeviceManager { } // AURA LAPTOP DEVICE if let Ok(dev_type) = DeviceHandle::maybe_laptop_aura( - dev, + Some(dev), usb_id.to_str().unwrap_or_default(), ) .await @@ -332,6 +333,23 @@ impl DeviceManager { } } + let board_name = DMIID::new().unwrap_or_default().board_name; + if board_name.contains("TUF") { + // TUF AURA LAPTOP DEVICE + info!("Seems to be a TUF laptop, try using sysfs backlight control"); + if let Ok(dev_type) = DeviceHandle::maybe_laptop_aura(None, "tuf").await { + if let DeviceHandle::Aura(aura) = dev_type.clone() { + let path = dbus_path_for_tuf(); + let ctrl = AuraZbus::new(aura); + ctrl.start_tasks(connection, path.clone()).await.unwrap(); + devices.push(AsusDevice { + device: dev_type, + dbus_path: path, + }); + } + } + } + if let Ok(devs) = &mut Self::init_all_scsi(connection).await { devices.append(devs); } diff --git a/asusd/src/aura_types.rs b/asusd/src/aura_types.rs index c12cfc36..edc75e43 100644 --- a/asusd/src/aura_types.rs +++ b/asusd/src/aura_types.rs @@ -168,7 +168,7 @@ impl DeviceHandle { } pub async fn maybe_laptop_aura( - device: Arc>, + device: Option>>, prod_id: &str, ) -> Result { debug!("Testing for laptop aura"); @@ -194,7 +194,7 @@ impl DeviceHandle { let mut config = AuraConfig::load_and_update_config(prod_id); config.led_type = aura_type; let aura = Aura { - hid: Some(device), + hid: device, backlight, config: Arc::new(Mutex::new(config)), }; diff --git a/rog-control-center/translations/en/rog-control-center.po b/rog-control-center/translations/en/rog-control-center.po index 0d41770b..9bbafc66 100644 --- a/rog-control-center/translations/en/rog-control-center.po +++ b/rog-control-center/translations/en/rog-control-center.po @@ -2,7 +2,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2024-12-22 03:56+0000\n" +"POT-Creation-Date: 2024-12-23 23:59+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n"