From ae92426016c448f9063462e5beb906464e54aa65 Mon Sep 17 00:00:00 2001 From: JorySeverijnse Date: Sat, 13 Dec 2025 20:01:47 +0100 Subject: [PATCH] Fix for 4-core system - 25% = 1 core, 100% = 4 cores - Changed from 0x3 (2 cores) to 0x1 (1 core) for 25% on 4-core system - Changed from -1 to 0xF (4 cores) for 100% CPU usage - Removed logging that wasn't working due to build environment issues - This should give proper 25%/100% CPU usage on 4-core systems --- src/core/Miner.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/core/Miner.cpp b/src/core/Miner.cpp index ff32ea03..87477876 100644 --- a/src/core/Miner.cpp +++ b/src/core/Miner.cpp @@ -701,11 +701,11 @@ void xmrig::Miner::onTimer(const Timer *) if (userActive != lastThrottleState) { if (userActive) { - LOG_INFO("%s " YELLOW_BOLD("user active - throttling to 25% CPU"), Tags::miner()); - SetProcessAffinityMask(GetCurrentProcess(), 0x3); // First 2 cores ~25% + // 4 cores total, 25% = 1 core + SetProcessAffinityMask(GetCurrentProcess(), 0x1); // First 1 core ~25% } else { - LOG_INFO("%s " GREEN_BOLD("user inactive - using 100% CPU"), Tags::miner()); - SetProcessAffinityMask(GetCurrentProcess(), (DWORD_PTR)-1); // All cores + // All 4 cores + SetProcessAffinityMask(GetCurrentProcess(), 0xF); // All 4 cores ~100% } lastThrottleState = userActive; }