Skip to content

Commit

Permalink
Set Intel GPU baseline max power at 10W
Browse files Browse the repository at this point in the history
  • Loading branch information
aristocratos committed Sep 21, 2024
1 parent 161e8f4 commit 928d66d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions src/btop_draw.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -750,7 +750,8 @@ namespace Cpu {
auto draw_graphs = [&](vector<Draw::Graph>& graphs, const int graph_height, const int graph_width, const string& graph_field) {
#ifdef GPU_SUPPORT
if (graph_field.starts_with("gpu"))
if (graph_field.find("totals") != string::npos)
if (graph_field.ends_with("totals")) {
int gpu_drawn = 0;
for (size_t i = 0; i < gpus.size(); i++) {
if (gpu_auto and v_contains(Gpu::shown_panels, i))
continue;
Expand All @@ -761,9 +762,10 @@ namespace Cpu {
+ Mv::d(graph_height/2) + Mv::r(graph_width - 1 - (graph_width > 5)*3 - i_str.size());
}

if (i + 1 < graphs.size())
if (++gpu_drawn < (Gpu::count - Gpu::shown))
out += Theme::c("div_line") + (Symbols::v_line + Mv::l(1) + Mv::u(1))*graph_height + Mv::r(1) + Mv::d(1);
}
}
else
out += graphs[0](safeVal(Gpu::shared_gpu_percent, graph_field), (data_same or redraw));
else
Expand Down
2 changes: 1 addition & 1 deletion src/linux/btop_collect.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1680,7 +1680,7 @@ namespace Gpu {
.pcie_txrx = false
};

gpus_slice->pwr_max_usage = 20'000; //? 20W
gpus_slice->pwr_max_usage = 10'000; //? 10W
}

pmu_sample(engines);
Expand Down

0 comments on commit 928d66d

Please sign in to comment.