diff --git a/asusd/src/aura_manager.rs b/asusd/src/aura_manager.rs index c5cf4bd2..b392cdd1 100644 --- a/asusd/src/aura_manager.rs +++ b/asusd/src/aura_manager.rs @@ -291,6 +291,7 @@ impl DeviceManager { // USB after, need to check if HID picked something up and if so, skip it let mut do_anime = true; let mut do_slash = true; + let mut do_kb_backlight = true; for dev in devices.iter() { if matches!(dev.device, DeviceHandle::Slash(_)) { do_slash = false; @@ -298,6 +299,9 @@ impl DeviceManager { if matches!(dev.device, DeviceHandle::AniMe(_)) { do_anime = false; } + if matches!(dev.device, DeviceHandle::Aura(_) | DeviceHandle::OldAura(_)) { + do_kb_backlight = false; + } } if do_slash { @@ -333,19 +337,25 @@ impl DeviceManager { } } - let board_name = DMIID::new().unwrap_or_default().board_name; - if board_name.contains("TUF") { + if do_kb_backlight { // 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, - }); + let product_name = DMIID::new().unwrap_or_default().product_name; + let product_family = DMIID::new().unwrap_or_default().product_family; + info!( + "No USB keyboard aura, system is {product_name}, try using sysfs backlight control" + ); + if product_name.contains("TUF") || product_family.contains("TUF") { + info!("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, + }); + } } } } diff --git a/rog-control-center/translations/en/rog-control-center.po b/rog-control-center/translations/en/rog-control-center.po index 841a57f1..2194c86b 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-24 08:49+0000\n" +"POT-Creation-Date: 2024-12-24 08:50+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n"