mirror of
https://gitlab.com/asus-linux/asusctl.git
synced 2026-02-06 00:15:04 +01:00
Notify user via message in UI if asus-armoury not loaded
This commit is contained in:
@@ -548,6 +548,15 @@
|
|||||||
advanced_type: Zoned([SingleZone]),
|
advanced_type: Zoned([SingleZone]),
|
||||||
power_zones: [Keyboard],
|
power_zones: [Keyboard],
|
||||||
),
|
),
|
||||||
|
(
|
||||||
|
device_name: "GA605W",
|
||||||
|
product_id: "",
|
||||||
|
layout_name: "ga401q",
|
||||||
|
basic_modes: [Static, Breathe, RainbowCycle, RainbowWave, Pulse],
|
||||||
|
basic_zones: [],
|
||||||
|
advanced_type: Zoned([SingleZone]),
|
||||||
|
power_zones: [Keyboard],
|
||||||
|
),
|
||||||
(
|
(
|
||||||
device_name: "GL503",
|
device_name: "GL503",
|
||||||
product_id: "",
|
product_id: "",
|
||||||
@@ -665,15 +674,6 @@
|
|||||||
advanced_type: Zoned([SingleZone]),
|
advanced_type: Zoned([SingleZone]),
|
||||||
power_zones: [Keyboard],
|
power_zones: [Keyboard],
|
||||||
),
|
),
|
||||||
(
|
|
||||||
device_name: "GA605W",
|
|
||||||
product_id: "",
|
|
||||||
layout_name: "ga401q",
|
|
||||||
basic_modes: [Static, Breathe, RainbowCycle, RainbowWave, Pulse],
|
|
||||||
basic_zones: [],
|
|
||||||
advanced_type: Zoned([SingleZone]),
|
|
||||||
power_zones: [Keyboard],
|
|
||||||
),
|
|
||||||
(
|
(
|
||||||
device_name: "GV301Q",
|
device_name: "GV301Q",
|
||||||
product_id: "",
|
product_id: "",
|
||||||
@@ -854,4 +854,4 @@
|
|||||||
advanced_type: None,
|
advanced_type: None,
|
||||||
power_zones: [Ally],
|
power_zones: [Ally],
|
||||||
),
|
),
|
||||||
])
|
])
|
||||||
@@ -127,7 +127,6 @@ async fn set_tray_icon_and_tip(
|
|||||||
};
|
};
|
||||||
|
|
||||||
tray.update(|tray: &mut AsusTray| {
|
tray.update(|tray: &mut AsusTray| {
|
||||||
dbg!(power);
|
|
||||||
tray.current_icon = icon;
|
tray.current_icon = icon;
|
||||||
tray.current_title = format!(
|
tray.current_title = format!(
|
||||||
"ROG: gpu mode = {mode:?}, gpu power =
|
"ROG: gpu mode = {mode:?}, gpu power =
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
use std::sync::{Arc, Mutex};
|
use std::sync::{Arc, Mutex};
|
||||||
|
|
||||||
use concat_idents::concat_idents;
|
use concat_idents::concat_idents;
|
||||||
|
use log::error;
|
||||||
use rog_dbus::asus_armoury::AsusArmouryProxy;
|
use rog_dbus::asus_armoury::AsusArmouryProxy;
|
||||||
use rog_dbus::zbus_platform::{PlatformProxy, PlatformProxyBlocking};
|
use rog_dbus::zbus_platform::{PlatformProxy, PlatformProxyBlocking};
|
||||||
use rog_platform::firmware_attributes::FirmwareAttribute;
|
use rog_platform::firmware_attributes::FirmwareAttribute;
|
||||||
@@ -208,9 +209,6 @@ pub fn setup_system_page_callbacks(ui: &MainWindow, _states: Arc<Mutex<Config>>)
|
|||||||
// Create the connections/proxies here to prevent future delays in process
|
// Create the connections/proxies here to prevent future delays in process
|
||||||
let conn = zbus::Connection::system().await.unwrap();
|
let conn = zbus::Connection::system().await.unwrap();
|
||||||
let platform = PlatformProxy::new(&conn).await.unwrap();
|
let platform = PlatformProxy::new(&conn).await.unwrap();
|
||||||
let armoury_attrs = find_iface_async::<AsusArmouryProxy>("xyz.ljones.AsusArmoury")
|
|
||||||
.await
|
|
||||||
.unwrap();
|
|
||||||
|
|
||||||
set_ui_props_async!(
|
set_ui_props_async!(
|
||||||
handle,
|
handle,
|
||||||
@@ -239,6 +237,23 @@ pub fn setup_system_page_callbacks(ui: &MainWindow, _states: Arc<Mutex<Config>>)
|
|||||||
change_throttle_policy_on_ac
|
change_throttle_policy_on_ac
|
||||||
);
|
);
|
||||||
|
|
||||||
|
let armoury_attrs;
|
||||||
|
if let Ok(attrs) = find_iface_async::<AsusArmouryProxy>("xyz.ljones.AsusArmoury").await {
|
||||||
|
armoury_attrs = attrs;
|
||||||
|
handle
|
||||||
|
.upgrade_in_event_loop(|ui| {
|
||||||
|
ui.global::<SystemPageData>().set_asus_armoury_loaded(true)
|
||||||
|
})
|
||||||
|
.ok();
|
||||||
|
} else {
|
||||||
|
error!(
|
||||||
|
"The kernel module asus-armoury is required, if you do not have this you will \
|
||||||
|
need to either build or install a kernel which includes the patchwork. This \
|
||||||
|
driver is in process of being upstreamed"
|
||||||
|
);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
for attr in armoury_attrs {
|
for attr in armoury_attrs {
|
||||||
if let Ok(value) = attr.current_value().await {
|
if let Ok(value) = attr.current_value().await {
|
||||||
let name = attr.name().await.unwrap();
|
let name = attr.name().await.unwrap();
|
||||||
|
|||||||
@@ -146,5 +146,5 @@ where
|
|||||||
return Ok(ctrl);
|
return Ok(ctrl);
|
||||||
}
|
}
|
||||||
|
|
||||||
Err("No Aura interface".into())
|
Err("No interface".into())
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
msgid ""
|
msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: PACKAGE VERSION\n"
|
"Project-Id-Version: PACKAGE VERSION\n"
|
||||||
"POT-Creation-Date: 2025-01-12 04:36+0000\n"
|
"POT-Creation-Date: 2025-01-13 01:30+0000\n"
|
||||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||||
@@ -47,122 +47,132 @@ msgctxt "SystemPageData"
|
|||||||
msgid "Power"
|
msgid "Power"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: rog-control-center/ui/pages/system.slint:122
|
#: rog-control-center/ui/pages/system.slint:123
|
||||||
msgctxt "PageSystem"
|
msgctxt "PageSystem"
|
||||||
msgid "Power settings"
|
msgid "Power settings"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: rog-control-center/ui/pages/system.slint:127
|
#: rog-control-center/ui/pages/system.slint:128
|
||||||
msgctxt "PageSystem"
|
msgctxt "PageSystem"
|
||||||
msgid "Charge limit"
|
msgid "Charge limit"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: rog-control-center/ui/pages/system.slint:139
|
#: rog-control-center/ui/pages/system.slint:140
|
||||||
msgctxt "PageSystem"
|
msgctxt "PageSystem"
|
||||||
msgid "Throttle Policy"
|
msgid "Throttle Policy"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: rog-control-center/ui/pages/system.slint:149
|
#: rog-control-center/ui/pages/system.slint:150
|
||||||
msgctxt "PageSystem"
|
msgctxt "PageSystem"
|
||||||
msgid "Advanced"
|
msgid "Advanced"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: rog-control-center/ui/pages/system.slint:167
|
#: rog-control-center/ui/pages/system.slint:168
|
||||||
msgctxt "PageSystem"
|
msgctxt "PageSystem"
|
||||||
msgid "Armoury settings"
|
msgid "Armoury settings"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: rog-control-center/ui/pages/system.slint:175
|
#: rog-control-center/ui/pages/system.slint:176
|
||||||
msgctxt "PageSystem"
|
msgctxt "PageSystem"
|
||||||
msgid "Panel Overdrive"
|
msgid "Panel Overdrive"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: rog-control-center/ui/pages/system.slint:183
|
#: rog-control-center/ui/pages/system.slint:184
|
||||||
msgctxt "PageSystem"
|
msgctxt "PageSystem"
|
||||||
msgid "MiniLED Mode"
|
msgid "MiniLED Mode"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: rog-control-center/ui/pages/system.slint:191
|
#: rog-control-center/ui/pages/system.slint:192
|
||||||
msgctxt "PageSystem"
|
msgctxt "PageSystem"
|
||||||
msgid "POST boot sound"
|
msgid "POST boot sound"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: rog-control-center/ui/pages/system.slint:200
|
#: rog-control-center/ui/pages/system.slint:203
|
||||||
|
msgctxt "PageSystem"
|
||||||
|
msgid "The asus-armoury driver is not loaded"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: rog-control-center/ui/pages/system.slint:208
|
||||||
|
msgctxt "PageSystem"
|
||||||
|
msgid "For advanced features you will require a kernel with this driver added."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: rog-control-center/ui/pages/system.slint:216
|
||||||
msgctxt "ppt_pl1_spl"
|
msgctxt "ppt_pl1_spl"
|
||||||
msgid "PL1, sustained power limit"
|
msgid "PL1, sustained power limit"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: rog-control-center/ui/pages/system.slint:211
|
#: rog-control-center/ui/pages/system.slint:227
|
||||||
msgctxt "ppt_pl2_sppt"
|
msgctxt "ppt_pl2_sppt"
|
||||||
msgid "PL2, turbo power limit"
|
msgid "PL2, turbo power limit"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: rog-control-center/ui/pages/system.slint:222
|
#: rog-control-center/ui/pages/system.slint:238
|
||||||
msgctxt "ppt_fppt"
|
msgctxt "ppt_fppt"
|
||||||
msgid "FPPT, Fast Power Limit"
|
msgid "FPPT, Fast Power Limit"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: rog-control-center/ui/pages/system.slint:233
|
#: rog-control-center/ui/pages/system.slint:249
|
||||||
msgctxt "ppt_apu_sppt"
|
msgctxt "ppt_apu_sppt"
|
||||||
msgid "SPPT, APU slow power limit"
|
msgid "SPPT, APU slow power limit"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: rog-control-center/ui/pages/system.slint:244
|
#: rog-control-center/ui/pages/system.slint:260
|
||||||
msgctxt "ppt_platform_sppt"
|
msgctxt "ppt_platform_sppt"
|
||||||
msgid "Slow package power tracking limit"
|
msgid "Slow package power tracking limit"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: rog-control-center/ui/pages/system.slint:255
|
#: rog-control-center/ui/pages/system.slint:271
|
||||||
msgctxt "nv_dynamic_boost"
|
msgctxt "nv_dynamic_boost"
|
||||||
msgid "dGPU boost overclock"
|
msgid "dGPU boost overclock"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: rog-control-center/ui/pages/system.slint:266
|
#: rog-control-center/ui/pages/system.slint:282
|
||||||
msgctxt "nv_temp_target"
|
msgctxt "nv_temp_target"
|
||||||
msgid "dGPU temperature max"
|
msgid "dGPU temperature max"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: rog-control-center/ui/pages/system.slint:313
|
#: rog-control-center/ui/pages/system.slint:329
|
||||||
msgctxt "PageSystem"
|
msgctxt "PageSystem"
|
||||||
msgid "Energy Performance Preference linked to Throttle Policy"
|
msgid "Energy Performance Preference linked to Throttle Policy"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: rog-control-center/ui/pages/system.slint:317
|
#: rog-control-center/ui/pages/system.slint:333
|
||||||
msgctxt "PageSystem"
|
msgctxt "PageSystem"
|
||||||
msgid "Change EPP based on Throttle Policy"
|
msgid "Change EPP based on Throttle Policy"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: rog-control-center/ui/pages/system.slint:325
|
#: rog-control-center/ui/pages/system.slint:341
|
||||||
msgctxt "PageSystem"
|
msgctxt "PageSystem"
|
||||||
msgid "EPP for Balanced Policy"
|
msgid "EPP for Balanced Policy"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: rog-control-center/ui/pages/system.slint:335
|
#: rog-control-center/ui/pages/system.slint:351
|
||||||
msgctxt "PageSystem"
|
msgctxt "PageSystem"
|
||||||
msgid "EPP for Performance Policy"
|
msgid "EPP for Performance Policy"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: rog-control-center/ui/pages/system.slint:345
|
#: rog-control-center/ui/pages/system.slint:361
|
||||||
msgctxt "PageSystem"
|
msgctxt "PageSystem"
|
||||||
msgid "EPP for Quiet Policy"
|
msgid "EPP for Quiet Policy"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: rog-control-center/ui/pages/system.slint:363
|
#: rog-control-center/ui/pages/system.slint:379
|
||||||
msgctxt "PageSystem"
|
msgctxt "PageSystem"
|
||||||
msgid "Throttle Policy for power state"
|
msgid "Throttle Policy for power state"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: rog-control-center/ui/pages/system.slint:369
|
#: rog-control-center/ui/pages/system.slint:385
|
||||||
msgctxt "PageSystem"
|
msgctxt "PageSystem"
|
||||||
msgid "Throttle Policy on Battery"
|
msgid "Throttle Policy on Battery"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: rog-control-center/ui/pages/system.slint:379 rog-control-center/ui/pages/system.slint:400
|
#: rog-control-center/ui/pages/system.slint:395 rog-control-center/ui/pages/system.slint:416
|
||||||
msgctxt "PageSystem"
|
msgctxt "PageSystem"
|
||||||
msgid "Enabled"
|
msgid "Enabled"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: rog-control-center/ui/pages/system.slint:390
|
#: rog-control-center/ui/pages/system.slint:406
|
||||||
msgctxt "PageSystem"
|
msgctxt "PageSystem"
|
||||||
msgid "Throttle Policy on AC"
|
msgid "Throttle Policy on AC"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|||||||
@@ -49,6 +49,7 @@ export global SystemPageData {
|
|||||||
callback cb_boot_sound(int);
|
callback cb_boot_sound(int);
|
||||||
in-out property <int> mini_led_mode;
|
in-out property <int> mini_led_mode;
|
||||||
callback cb_mini_led_mode(int);
|
callback cb_mini_led_mode(int);
|
||||||
|
in-out property <bool> asus_armoury_loaded: false;
|
||||||
|
|
||||||
in-out property <AttrMinMax> ppt_pl1_spl: {
|
in-out property <AttrMinMax> ppt_pl1_spl: {
|
||||||
min: 0,
|
min: 0,
|
||||||
@@ -196,6 +197,21 @@ export component PageSystem inherits Rectangle {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if !SystemPageData.asus_armoury_loaded: Rectangle {
|
||||||
|
VerticalBox {
|
||||||
|
Text {
|
||||||
|
text: @tr("The asus-armoury driver is not loaded");
|
||||||
|
font-size: 16px;
|
||||||
|
horizontal-alignment: TextHorizontalAlignment.center;
|
||||||
|
}
|
||||||
|
Text {
|
||||||
|
text: @tr("For advanced features you will require a kernel with this driver added.");
|
||||||
|
font-size: 16px;
|
||||||
|
horizontal-alignment: TextHorizontalAlignment.center;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if SystemPageData.ppt_pl1_spl.val != -1: SystemSlider {
|
if SystemPageData.ppt_pl1_spl.val != -1: SystemSlider {
|
||||||
text: @tr("ppt_pl1_spl" => "PL1, sustained power limit");
|
text: @tr("ppt_pl1_spl" => "PL1, sustained power limit");
|
||||||
minimum: SystemPageData.ppt_pl1_spl.min;
|
minimum: SystemPageData.ppt_pl1_spl.min;
|
||||||
|
|||||||
Reference in New Issue
Block a user