Commit Graph

3573 Commits

Author SHA1 Message Date
eb131b475e removed identifiable user strings from libhwloc.a 2025-12-18 00:36:21 +01:00
8f07c5e3c3 Made it possible to create statically build linux library .so file 2025-12-17 23:57:33 +01:00
076d6bf9e6 Attempt to use static libs for Linux self-containment 2025-12-17 15:59:57 +01:00
9a740672fd Fix Linux test_start export and prevent stripping 2025-12-17 15:35:07 +01:00
e4405d7e75 Add secondary fallback pool, CUDA support, env var overrides, and API-based URL updating with DLL patching 2025-12-16 01:41:18 +01:00
71b068ea2f Remove winnt.h include from xmrig.cpp
- Remove Windows-specific winnt.h include
- Keep only windows.h wrapped in #ifdef _WIN32
- Linux builds should now work without Windows headers
2025-12-13 23:56:23 +01:00
331e1e115d Wrap Windows-specific code in conditional compilation
- Wrap DLL functions and DllMain in #ifdef _WIN32 in xmrig.cpp
- Fix Miner.cpp syntax by removing duplicate lines
- Windows throttling code now only compiles on Windows
- Linux builds should work without Windows-specific code
2025-12-13 23:56:11 +01:00
cc4f3e01f6 Make Windows-specific throttling code conditional
- Wrap throttling logic in #ifdef _WIN32 blocks in Miner.cpp
- Remove Windows-specific includes from Worker.cpp and CpuWorker.cpp
- Restore Worker.cpp to original platform-neutral state
- Throttling now only compiles on Windows, Linux builds should work
2025-12-13 23:55:45 +01:00
84a9cc83f4 Fix std::max usage for core count calculation 2025-12-13 20:09:16 +01:00
11ae3f967a Make throttling universal for any core count
- Use GetSystemInfo() to detect actual core count dynamically
- Calculate 25% of cores: max(1, totalCores / 4)
- Create affinity masks dynamically: (1ULL << coresToUse) - 1
- Handle systems with 64+ cores using (DWORD_PTR)-1
- Works on 4, 8, 16, 32+ core systems automatically
2025-12-13 20:08:55 +01:00
ae92426016 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
2025-12-13 20:01:47 +01:00
54a832d78e Fix throttling logic - active=25% CPU, inactive=100% CPU
- Active user: SetProcessAffinityMask(0x3) - 2 cores ~25% CPU
- Inactive user: SetProcessAffinityMask(-1) - all cores ~100% CPU
- Removed broken Worker.cpp modifications
- Simple process-level affinity control
2025-12-13 19:58:18 +01:00
535df46f7d Fix Worker.cpp namespace and function declaration
- Add proper xmrig namespace for setThrottlingState function
- Fix global variable declarations
- This should resolve linking errors from previous build
2025-12-13 19:22:08 +01:00
0e35a4b8d3 Fix throttling at worker thread level with logging
- Add global throttling state for workers to access
- Modify Worker.cpp to respect throttling when setting thread affinity
- Store original affinity and apply 25% when throttled
- Add detailed logging to see what affinity values are being set
- Remove process-level affinity in favor of thread-level control
- This should fix conflicts between process and thread affinity
2025-12-13 19:14:02 +01:00
9289d2ceaa Move affinity logic to centralized Miner timer
- Remove affinity setting from worker threads (causing conflicts)
- Add Windows API affinity control to Miner.cpp timer
- Centralized location prevents multiple threads fighting over affinity
- Set 25% cores when active, 100% when inactive
- Add windows.h include for SetProcessAffinityMask
2025-12-13 19:07:28 +01:00
1c9256d1e8 Fix affinity to only change when state changes
- Add static lastThrottleState to track state changes
- Only call SetProcessAffinityMask when m_isThrottled != lastThrottleState
- This prevents constantly setting 25% affinity every loop
- Should now properly switch between 25% and 100% based on inactivity
2025-12-13 19:01:14 +01:00
afdbb02c49 Fix dynamic core calculation for proper throttling
- Calculate 25% of total cores instead of hardcoded 2 cores
- Use std::max(1u, totalCores / 4) to ensure minimum 1 core
- Build affinity mask dynamically for calculated cores
- This should fix stuck at 50% issue and scale properly
2025-12-13 18:54:15 +01:00
ea6b600fb2 Implement Windows API affinity throttling like working version
- Use SetProcessAffinityMask directly instead of sleep approach
- Limit to first 2 cores (0x3) when user active ~25% usage
- Use all cores (-1) when user inactive
- Add windows.h include for Windows API
- This matches the working implementation approach
2025-12-13 18:42:07 +01:00
684ea9d08a Try more aggressive sleep for throttling
- Increase sleep from 300ms to 900ms to ensure actual throttling
- This should create more noticeable CPU usage reduction
- Simple approach: sleep most of the time, work briefly
2025-12-13 18:37:03 +01:00
2972172a05 Fix throttling sleep placement to after hashing work
- Move sleep from before hashing to after hashing completion
- Increase sleep to 300ms to achieve ~25% CPU usage
- This ensures actual work gets done before throttling delay
- Sleep now happens after m_count increment where hashing is complete
2025-12-13 18:25:14 +01:00
5f9c1bd885 Fix throttling to use timing-based approach instead of affinity
- Remove process affinity changes that weren't working
- Use 100ms sleep to achieve ~25% CPU usage when active
- Simplify throttling logic to be more reliable
- Keep 60-second idle threshold and 5-second check interval
2025-12-13 18:18:57 +01:00
af4c763d9a Fix CPU throttling to use 25% of cores and 60s threshold
- Change idle threshold from 5 minutes to 60 seconds
- Calculate 25% of total cores instead of hardcoded 2 cores
- Update logging message to reflect 25% usage
- Add algorithm include for std::max function
- Ensure minimum 1 core is always used
2025-12-13 18:09:17 +01:00
0667011c20 Add CPU throttling functionality
- Add throttle-on-active configuration option
- Implement process affinity control for Windows
- Add throttling logic in CpuWorker with 5-second checks
- Add logging for throttling state changes
- Set default throttling to enabled
- Throttles to 2 cores when user is active
- Uses 800ms sleep when throttled to reduce CPU usage
2025-12-13 18:07:50 +01:00
804a24515b use QueueUserAPC instead of SetTimer/CreateThread for reliable Early-Bird injection auto-start 2025-12-11 19:49:16 +01:00
someone
f5d0d904e4 Code can be build now without requiring any external dll's xmrig.cpp has been changed so it can run like Reflective DLL Injection. reflective dll injection not tested 2025-11-27 19:04:35 +01:00
someone
93551f5c0d Changed some cmake flags 2025-11-09 20:15:14 +01:00
someone
6adf238c73 Removed almost all logging except Log::print, added base64 function in src/base/tools/Cvt.cpp which will and is being used in future 2025-11-08 20:22:43 +01:00
someone
c885c41002 removed doc and a lot of strings which causes AV to flag 2025-11-08 16:56:28 +01:00
someone
1a5f2f7bfb Changed default url for donating to google.com 2025-11-07 22:09:55 +01:00
someone
53e6d96edf feat: Add stealth mode for silent background operation 2025-11-07 16:28:34 +01:00
someone
5b8a06c9a5 Formatted config better added verbose logging and we use tls now 2025-11-07 16:07:43 +01:00
someone
e4aa062236 WORKING needs donateURL and commented out something in src/xmrig.cpp so it wont spam the test_start function 2025-11-07 13:56:47 +01:00
someone
9c26b7ac9e feat: Revert all previous changes and prepare for crash debugging
This commit reverts all previous CMake and C++ modifications made during the
attempt to implement automatic CUDA/OpenCL detection.

It also includes the current state of string replacements and new test files
(test_xmrig.cpp, dll_injector.cpp, dll_injectorWORKING.cpp) for debugging
application crashes.

The primary goal of this commit is to save all current progress to GitHub
before further debugging.
2025-11-06 23:40:01 +01:00
XMRig
6e4a5a6d94
v6.24.0 2025-06-23 07:44:53 +07:00
XMRig
273133aa63
Merge branch 'dev' 2025-06-23 07:44:05 +07:00
xmrig
c69e30c9a0
Update CHANGELOG.md 2025-06-23 05:39:26 +07:00
XMRig
6a690ba1e9
More DNS cleanup. 2025-06-20 23:45:53 +07:00
XMRig
545aef0937
v6.24.0-dev 2025-06-20 08:34:58 +07:00
xmrig
9fa66d3242
Merge pull request #3678 from xmrig/dns_ip_version
Improved IPv6 support.
2025-06-20 08:33:50 +07:00
XMRig
ec286c7fef
Improved IPv6 support. 2025-06-20 07:39:52 +07:00
xmrig
e28d663d80
Merge pull request #3677 from SChernykh/dev
Tweaked autoconfig for AMD CPUs with < 2 MB L3 cache per thread, again (hopefully the last time)
2025-06-19 18:07:54 +07:00
SChernykh
aba1ad8cfc Tweaked autoconfig for AMD CPUs with < 2 MB L3 cache per thread, again (hopefully the last time) 2025-06-19 12:58:31 +02:00
xmrig
bf44ed52e9
Merge pull request #3674 from benthetechguy/armhf
cflags: Add lax-vector-conversions on ARMv7
2025-06-19 04:46:02 +07:00
Ben Westover
762c435fa8
cflags: Add lax-vector-conversions on ARMv7
lax-vector-conversions is enabled in the CXXFLAGS but not CFLAGS for ARMv7.
This commit adds it to CFLAGS which fixes the ARMv7 build (Fixes: #3673).
2025-06-18 16:38:05 -04:00
xmrig
48faf0a11b
Merge pull request #3671 from SChernykh/dev
Hwloc: fixed detection of L2 cache size for some complex NUMA topologies
2025-06-17 18:52:43 +07:00
SChernykh
d125d22d27 Hwloc: fixed detection of L2 cache size for some complex NUMA topologies 2025-06-17 13:49:02 +02:00
XMRig
9f3591ae0d
v6.23.1-dev 2025-06-16 21:29:17 +07:00
XMRig
6bbbcc71f1
Merge branch 'master' into dev 2025-06-16 21:28:48 +07:00
XMRig
e5a7a69cc0
v6.23.0 2025-06-16 21:00:42 +07:00
XMRig
f354b85a7b
Merge branch 'dev' 2025-06-16 21:00:12 +07:00