mirror of
https://github.com/ilya-zlobintsev/LACT.git
synced 2026-08-19 01:14:43 -05:00
fix: make trying to apply missing hardware options on intel non-fatal
This commit is contained in:
@@ -13,7 +13,7 @@ use crate::{
|
||||
},
|
||||
};
|
||||
use amdgpu_sysfs::{gpu_handle::power_profile_mode::PowerProfileModesTable, hw_mon::Temperature};
|
||||
use anyhow::{anyhow, Context};
|
||||
use anyhow::{anyhow, bail, Context};
|
||||
use futures::future::LocalBoxFuture;
|
||||
use lact_schema::{
|
||||
config::GpuConfig, ClocksInfo, ClocksTable, ClockspeedStats, DeviceInfo, DeviceStats,
|
||||
@@ -628,18 +628,39 @@ impl GpuController for IntelGpuController {
|
||||
fn apply_config<'a>(&'a self, config: &'a GpuConfig) -> LocalBoxFuture<'a, anyhow::Result<()>> {
|
||||
Box::pin(async {
|
||||
if let Some(max_clock) = config.clocks_configuration.max_core_clock {
|
||||
self.write_freq(FrequencyType::Max, max_clock)
|
||||
.context("Could not set max clock")?;
|
||||
if self.read_freq(FrequencyType::Max).is_some() {
|
||||
self.write_freq(FrequencyType::Max, max_clock)
|
||||
.context("Could not set max clock")?;
|
||||
} else {
|
||||
error!("could not apply configured maximum frequency {max_clock}, no maximum frequency file is present");
|
||||
}
|
||||
}
|
||||
|
||||
if let Some(min_clock) = config.clocks_configuration.min_core_clock {
|
||||
self.write_freq(FrequencyType::Min, min_clock)
|
||||
.context("Could not set min clock")?;
|
||||
if self.read_freq(FrequencyType::Min).is_some() {
|
||||
self.write_freq(FrequencyType::Min, min_clock)
|
||||
.context("Could not set min clock")?;
|
||||
} else {
|
||||
error!("could not apply configured minimum frequency {min_clock}, no minimum frequency file is present");
|
||||
}
|
||||
}
|
||||
|
||||
if let Some(cap) = config.power_cap {
|
||||
self.write_hwmon_file(POWER_CAP_NAMES, &((cap * 1_000_000.0) as u64).to_string())
|
||||
if self.get_power_cap().is_some() {
|
||||
if let Some(max_cap) = self.get_power_cap_max() {
|
||||
if cap > max_cap {
|
||||
bail!("Specified cap {cap} is greated than maximum allowed {max_cap}");
|
||||
}
|
||||
}
|
||||
|
||||
self.write_hwmon_file(
|
||||
POWER_CAP_NAMES,
|
||||
&((cap * 1_000_000.0) as u64).to_string(),
|
||||
)
|
||||
.context("Could not set power cap")?;
|
||||
} else {
|
||||
error!("could not apply power cap, no power limit functionality available");
|
||||
}
|
||||
}
|
||||
|
||||
Ok(())
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
226:1
|
||||
@@ -0,0 +1 @@
|
||||
1
|
||||
@@ -0,0 +1 @@
|
||||
0
|
||||
@@ -0,0 +1 @@
|
||||
0
|
||||
@@ -0,0 +1 @@
|
||||
1
|
||||
@@ -0,0 +1 @@
|
||||
0
|
||||
@@ -0,0 +1 @@
|
||||
0x030000
|
||||
Binary file not shown.
@@ -0,0 +1 @@
|
||||
46
|
||||
@@ -0,0 +1 @@
|
||||
2.5 GT/s PCIe
|
||||
@@ -0,0 +1 @@
|
||||
1
|
||||
@@ -0,0 +1 @@
|
||||
1
|
||||
@@ -0,0 +1 @@
|
||||
0xe20b
|
||||
@@ -0,0 +1 @@
|
||||
46
|
||||
@@ -0,0 +1 @@
|
||||
(null)
|
||||
@@ -0,0 +1 @@
|
||||
1
|
||||
@@ -0,0 +1 @@
|
||||
0
|
||||
@@ -0,0 +1 @@
|
||||
card
|
||||
@@ -0,0 +1 @@
|
||||
29523753173
|
||||
@@ -0,0 +1 @@
|
||||
pkg
|
||||
@@ -0,0 +1 @@
|
||||
0
|
||||
@@ -0,0 +1 @@
|
||||
418
|
||||
@@ -0,0 +1 @@
|
||||
0
|
||||
@@ -0,0 +1 @@
|
||||
xe
|
||||
@@ -0,0 +1 @@
|
||||
disabled
|
||||
@@ -0,0 +1 @@
|
||||
auto
|
||||
+1
@@ -0,0 +1 @@
|
||||
0
|
||||
+1
@@ -0,0 +1 @@
|
||||
0
|
||||
+1
@@ -0,0 +1 @@
|
||||
disabled
|
||||
+1
@@ -0,0 +1 @@
|
||||
unsupported
|
||||
+1
@@ -0,0 +1 @@
|
||||
0
|
||||
+1
@@ -0,0 +1 @@
|
||||
0
|
||||
@@ -0,0 +1 @@
|
||||
380000000
|
||||
@@ -0,0 +1 @@
|
||||
card
|
||||
@@ -0,0 +1 @@
|
||||
46000
|
||||
@@ -0,0 +1 @@
|
||||
pkg
|
||||
@@ -0,0 +1 @@
|
||||
48000
|
||||
@@ -0,0 +1 @@
|
||||
vram
|
||||
+1
@@ -0,0 +1 @@
|
||||
disabled
|
||||
+1
@@ -0,0 +1 @@
|
||||
auto
|
||||
+1
@@ -0,0 +1 @@
|
||||
0
|
||||
+1
@@ -0,0 +1 @@
|
||||
0
|
||||
+1
@@ -0,0 +1 @@
|
||||
disabled
|
||||
+1
@@ -0,0 +1 @@
|
||||
unsupported
|
||||
+1
@@ -0,0 +1 @@
|
||||
0
|
||||
+1
@@ -0,0 +1 @@
|
||||
0
|
||||
@@ -0,0 +1,2 @@
|
||||
DRIVER=pmt_crashlog
|
||||
MODALIAS=auxiliary:intel_vsec.crashlog
|
||||
+1
@@ -0,0 +1 @@
|
||||
0x1e2f8201
|
||||
+1
@@ -0,0 +1 @@
|
||||
144
|
||||
+1
@@ -0,0 +1 @@
|
||||
disabled
|
||||
+1
@@ -0,0 +1 @@
|
||||
auto
|
||||
+1
@@ -0,0 +1 @@
|
||||
0
|
||||
+1
@@ -0,0 +1 @@
|
||||
0
|
||||
+1
@@ -0,0 +1 @@
|
||||
disabled
|
||||
+1
@@ -0,0 +1 @@
|
||||
unsupported
|
||||
+1
@@ -0,0 +1 @@
|
||||
0
|
||||
+1
@@ -0,0 +1 @@
|
||||
0
|
||||
+1
@@ -0,0 +1 @@
|
||||
4096
|
||||
BIN
Binary file not shown.
+1
@@ -0,0 +1 @@
|
||||
0x5e2f8211
|
||||
+1
@@ -0,0 +1 @@
|
||||
144
|
||||
+1
@@ -0,0 +1 @@
|
||||
disabled
|
||||
+1
@@ -0,0 +1 @@
|
||||
auto
|
||||
+1
@@ -0,0 +1 @@
|
||||
0
|
||||
+1
@@ -0,0 +1 @@
|
||||
0
|
||||
+1
@@ -0,0 +1 @@
|
||||
disabled
|
||||
+1
@@ -0,0 +1 @@
|
||||
unsupported
|
||||
+1
@@ -0,0 +1 @@
|
||||
0
|
||||
+1
@@ -0,0 +1 @@
|
||||
0
|
||||
+1
@@ -0,0 +1 @@
|
||||
4096
|
||||
BIN
Binary file not shown.
+1
@@ -0,0 +1 @@
|
||||
disabled
|
||||
+1
@@ -0,0 +1 @@
|
||||
auto
|
||||
+1
@@ -0,0 +1 @@
|
||||
0
|
||||
+1
@@ -0,0 +1 @@
|
||||
0
|
||||
+1
@@ -0,0 +1 @@
|
||||
disabled
|
||||
+1
@@ -0,0 +1 @@
|
||||
unsupported
|
||||
+1
@@ -0,0 +1 @@
|
||||
0
|
||||
+1
@@ -0,0 +1 @@
|
||||
0
|
||||
@@ -0,0 +1,2 @@
|
||||
DRIVER=pmt_telemetry
|
||||
MODALIAS=auxiliary:intel_vsec.telemetry
|
||||
@@ -0,0 +1 @@
|
||||
74
|
||||
@@ -0,0 +1 @@
|
||||
0
|
||||
@@ -0,0 +1 @@
|
||||
0-15
|
||||
@@ -0,0 +1 @@
|
||||
ffff
|
||||
@@ -0,0 +1 @@
|
||||
2.5 GT/s PCIe
|
||||
@@ -0,0 +1 @@
|
||||
1
|
||||
@@ -0,0 +1 @@
|
||||
pci:v00008086d0000E20Bsv00008086sd00001100bc03sc00i00
|
||||
@@ -0,0 +1 @@
|
||||
1
|
||||
@@ -0,0 +1 @@
|
||||
-1
|
||||
@@ -0,0 +1 @@
|
||||
enabled
|
||||
@@ -0,0 +1 @@
|
||||
auto
|
||||
@@ -0,0 +1 @@
|
||||
0
|
||||
@@ -0,0 +1 @@
|
||||
1282295
|
||||
@@ -0,0 +1 @@
|
||||
enabled
|
||||
@@ -0,0 +1 @@
|
||||
active
|
||||
@@ -0,0 +1 @@
|
||||
0
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user