From b48835e8d5edda0f2cbe043d583d4ae276e7f982 Mon Sep 17 00:00:00 2001 From: Drath Date: Tue, 7 Oct 2025 18:30:38 +0200 Subject: [PATCH] comment out unused sensors for SPEED --- include/gpu.hpp | 6 +++--- src/gpu.cpp | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/include/gpu.hpp b/include/gpu.hpp index de2d9b4..6d952ae 100644 --- a/include/gpu.hpp +++ b/include/gpu.hpp @@ -24,12 +24,12 @@ struct gpuSensors { uint16_t clock_core = 0; uint16_t clock_mem = 0; - uint8_t fan_pwm = 0; + // uint8_t fan_pwm = 0; uint16_t fan_speed = 0; uint16_t power_avg = 0; uint16_t power_cap = 0; - uint16_t power_cap_max = 0; + // uint16_t power_cap_max = 0; uint8_t temp_edge = 0; uint8_t temp_hotspot = 0; @@ -43,7 +43,7 @@ struct gpuSensors { uint8_t usage_umc = 0; uint64_t vram_used = 0; - uint64_t vram_total = 0; + // uint64_t vram_total = 0; }; void detectHwmon(gpuSensors* target, std::string pci); diff --git a/src/gpu.cpp b/src/gpu.cpp index 3a9cae7..14517c2 100644 --- a/src/gpu.cpp +++ b/src/gpu.cpp @@ -17,15 +17,15 @@ void detectHwmon(gpuSensors* target, std::string pci) { } } -/* some metrics are missing in gpu_metrics, we always fill them from fs */ +/* some metrics are missing in gpu_metrics, we always fill them from fs, unused metrics are commented out */ void fillMissingMetrics(gpuSensors* g) { g->vcore = std::stol(readFile(g->hwmon + "/in0_input", 4)) / 1000.0f; - g->fan_pwm = std::stoi(readFile(g->hwmon + "/pwm1", 4)) * 100 / 256; + // g->fan_pwm = std::stoi(readFile(g->hwmon + "/pwm1", 4)) * 100 / 256; g->fan_speed = std::stol(readFile(g->hwmon + "/fan1_input", 4)); g->power_cap = std::stol(readFile(g->hwmon + "/power1_cap", 16)) / 1000000; - g->power_cap_max = std::stol(readFile(g->hwmon + "/power1_cap_max", 16)) / 1000000; + // g->power_cap_max = std::stol(readFile(g->hwmon + "/power1_cap_max", 16)) / 1000000; g->vram_used = std::stoul(readFile(g->hwmon + "/../../mem_info_vram_used", 16)); - g->vram_total = std::stoul(readFile(g->hwmon + "/../../mem_info_vram_total", 16)); + // g->vram_total = std::stoul(readFile(g->hwmon + "/../../mem_info_vram_total", 16)); } /* get sensors for pre-vega cards (rx480/580) */