mirror of
https://gitlab.com/asus-linux/asusctl.git
synced 2026-01-22 09:23:19 +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]),
|
||||
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",
|
||||
product_id: "",
|
||||
@@ -665,15 +674,6 @@
|
||||
advanced_type: Zoned([SingleZone]),
|
||||
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",
|
||||
product_id: "",
|
||||
@@ -854,4 +854,4 @@
|
||||
advanced_type: None,
|
||||
power_zones: [Ally],
|
||||
),
|
||||
])
|
||||
])
|
||||
@@ -127,7 +127,6 @@ async fn set_tray_icon_and_tip(
|
||||
};
|
||||
|
||||
tray.update(|tray: &mut AsusTray| {
|
||||
dbg!(power);
|
||||
tray.current_icon = icon;
|
||||
tray.current_title = format!(
|
||||
"ROG: gpu mode = {mode:?}, gpu power =
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
use std::sync::{Arc, Mutex};
|
||||
|
||||
use concat_idents::concat_idents;
|
||||
use log::error;
|
||||
use rog_dbus::asus_armoury::AsusArmouryProxy;
|
||||
use rog_dbus::zbus_platform::{PlatformProxy, PlatformProxyBlocking};
|
||||
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
|
||||
let conn = zbus::Connection::system().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!(
|
||||
handle,
|
||||
@@ -239,6 +237,23 @@ pub fn setup_system_page_callbacks(ui: &MainWindow, _states: Arc<Mutex<Config>>)
|
||||
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 {
|
||||
if let Ok(value) = attr.current_value().await {
|
||||
let name = attr.name().await.unwrap();
|
||||
|
||||
@@ -146,5 +146,5 @@ where
|
||||
return Ok(ctrl);
|
||||
}
|
||||
|
||||
Err("No Aura interface".into())
|
||||
Err("No interface".into())
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"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"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
@@ -47,122 +47,132 @@ msgctxt "SystemPageData"
|
||||
msgid "Power"
|
||||
msgstr ""
|
||||
|
||||
#: rog-control-center/ui/pages/system.slint:122
|
||||
#: rog-control-center/ui/pages/system.slint:123
|
||||
msgctxt "PageSystem"
|
||||
msgid "Power settings"
|
||||
msgstr ""
|
||||
|
||||
#: rog-control-center/ui/pages/system.slint:127
|
||||
#: rog-control-center/ui/pages/system.slint:128
|
||||
msgctxt "PageSystem"
|
||||
msgid "Charge limit"
|
||||
msgstr ""
|
||||
|
||||
#: rog-control-center/ui/pages/system.slint:139
|
||||
#: rog-control-center/ui/pages/system.slint:140
|
||||
msgctxt "PageSystem"
|
||||
msgid "Throttle Policy"
|
||||
msgstr ""
|
||||
|
||||
#: rog-control-center/ui/pages/system.slint:149
|
||||
#: rog-control-center/ui/pages/system.slint:150
|
||||
msgctxt "PageSystem"
|
||||
msgid "Advanced"
|
||||
msgstr ""
|
||||
|
||||
#: rog-control-center/ui/pages/system.slint:167
|
||||
#: rog-control-center/ui/pages/system.slint:168
|
||||
msgctxt "PageSystem"
|
||||
msgid "Armoury settings"
|
||||
msgstr ""
|
||||
|
||||
#: rog-control-center/ui/pages/system.slint:175
|
||||
#: rog-control-center/ui/pages/system.slint:176
|
||||
msgctxt "PageSystem"
|
||||
msgid "Panel Overdrive"
|
||||
msgstr ""
|
||||
|
||||
#: rog-control-center/ui/pages/system.slint:183
|
||||
#: rog-control-center/ui/pages/system.slint:184
|
||||
msgctxt "PageSystem"
|
||||
msgid "MiniLED Mode"
|
||||
msgstr ""
|
||||
|
||||
#: rog-control-center/ui/pages/system.slint:191
|
||||
#: rog-control-center/ui/pages/system.slint:192
|
||||
msgctxt "PageSystem"
|
||||
msgid "POST boot sound"
|
||||
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"
|
||||
msgid "PL1, sustained power limit"
|
||||
msgstr ""
|
||||
|
||||
#: rog-control-center/ui/pages/system.slint:211
|
||||
#: rog-control-center/ui/pages/system.slint:227
|
||||
msgctxt "ppt_pl2_sppt"
|
||||
msgid "PL2, turbo power limit"
|
||||
msgstr ""
|
||||
|
||||
#: rog-control-center/ui/pages/system.slint:222
|
||||
#: rog-control-center/ui/pages/system.slint:238
|
||||
msgctxt "ppt_fppt"
|
||||
msgid "FPPT, Fast Power Limit"
|
||||
msgstr ""
|
||||
|
||||
#: rog-control-center/ui/pages/system.slint:233
|
||||
#: rog-control-center/ui/pages/system.slint:249
|
||||
msgctxt "ppt_apu_sppt"
|
||||
msgid "SPPT, APU slow power limit"
|
||||
msgstr ""
|
||||
|
||||
#: rog-control-center/ui/pages/system.slint:244
|
||||
#: rog-control-center/ui/pages/system.slint:260
|
||||
msgctxt "ppt_platform_sppt"
|
||||
msgid "Slow package power tracking limit"
|
||||
msgstr ""
|
||||
|
||||
#: rog-control-center/ui/pages/system.slint:255
|
||||
#: rog-control-center/ui/pages/system.slint:271
|
||||
msgctxt "nv_dynamic_boost"
|
||||
msgid "dGPU boost overclock"
|
||||
msgstr ""
|
||||
|
||||
#: rog-control-center/ui/pages/system.slint:266
|
||||
#: rog-control-center/ui/pages/system.slint:282
|
||||
msgctxt "nv_temp_target"
|
||||
msgid "dGPU temperature max"
|
||||
msgstr ""
|
||||
|
||||
#: rog-control-center/ui/pages/system.slint:313
|
||||
#: rog-control-center/ui/pages/system.slint:329
|
||||
msgctxt "PageSystem"
|
||||
msgid "Energy Performance Preference linked to Throttle Policy"
|
||||
msgstr ""
|
||||
|
||||
#: rog-control-center/ui/pages/system.slint:317
|
||||
#: rog-control-center/ui/pages/system.slint:333
|
||||
msgctxt "PageSystem"
|
||||
msgid "Change EPP based on Throttle Policy"
|
||||
msgstr ""
|
||||
|
||||
#: rog-control-center/ui/pages/system.slint:325
|
||||
#: rog-control-center/ui/pages/system.slint:341
|
||||
msgctxt "PageSystem"
|
||||
msgid "EPP for Balanced Policy"
|
||||
msgstr ""
|
||||
|
||||
#: rog-control-center/ui/pages/system.slint:335
|
||||
#: rog-control-center/ui/pages/system.slint:351
|
||||
msgctxt "PageSystem"
|
||||
msgid "EPP for Performance Policy"
|
||||
msgstr ""
|
||||
|
||||
#: rog-control-center/ui/pages/system.slint:345
|
||||
#: rog-control-center/ui/pages/system.slint:361
|
||||
msgctxt "PageSystem"
|
||||
msgid "EPP for Quiet Policy"
|
||||
msgstr ""
|
||||
|
||||
#: rog-control-center/ui/pages/system.slint:363
|
||||
#: rog-control-center/ui/pages/system.slint:379
|
||||
msgctxt "PageSystem"
|
||||
msgid "Throttle Policy for power state"
|
||||
msgstr ""
|
||||
|
||||
#: rog-control-center/ui/pages/system.slint:369
|
||||
#: rog-control-center/ui/pages/system.slint:385
|
||||
msgctxt "PageSystem"
|
||||
msgid "Throttle Policy on Battery"
|
||||
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"
|
||||
msgid "Enabled"
|
||||
msgstr ""
|
||||
|
||||
#: rog-control-center/ui/pages/system.slint:390
|
||||
#: rog-control-center/ui/pages/system.slint:406
|
||||
msgctxt "PageSystem"
|
||||
msgid "Throttle Policy on AC"
|
||||
msgstr ""
|
||||
|
||||
@@ -49,6 +49,7 @@ export global SystemPageData {
|
||||
callback cb_boot_sound(int);
|
||||
in-out property <int> mini_led_mode;
|
||||
callback cb_mini_led_mode(int);
|
||||
in-out property <bool> asus_armoury_loaded: false;
|
||||
|
||||
in-out property <AttrMinMax> ppt_pl1_spl: {
|
||||
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 {
|
||||
text: @tr("ppt_pl1_spl" => "PL1, sustained power limit");
|
||||
minimum: SystemPageData.ppt_pl1_spl.min;
|
||||
|
||||
Reference in New Issue
Block a user