From b8b25b1654ef6ac1c1421900132bd978bbfb8e16 Mon Sep 17 00:00:00 2001 From: "NGnius (Graham)" Date: Mon, 2 May 2022 14:10:54 -0400 Subject: [PATCH] Make SMT detection 100% reliable --- main.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/main.py b/main.py index c005088..3c84787 100644 --- a/main.py +++ b/main.py @@ -43,7 +43,10 @@ class Plugin: return online_count async def get_smt(self) -> bool: - return status_cpu(1) == status_cpu(2) and status_cpu(3) == status_cpu(4) + for cpu in range(1, self.CPU_COUNT, 2): + if (not status_cpu(cpu)) and status_cpu(cpu+1): + return False + return True async def set_boost(self, enabled: bool) -> bool: write_to_sys("/sys/devices/system/cpu/cpufreq/boost", int(enabled))