-
-
Notifications
You must be signed in to change notification settings - Fork 529
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: do not use idle disable when hyper threading is enabled
- Loading branch information
Showing
1 changed file
with
27 additions
and
5 deletions.
There are no files selected for viewing
32 changes: 27 additions & 5 deletions
32
...ecutables/Atlas/3. Configuration/1. General Configuration/Power/CPU Idle/Disable Idle.cmd
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,37 @@ | ||
@echo off | ||
setlocal EnableDelayedExpansion | ||
|
||
whoami /user | find /i "S-1-5-18" > nul 2>&1 || ( | ||
call RunAsTI.cmd "%~f0" "%*" | ||
exit /b | ||
|
||
:: Check if hyper threading is enabled | ||
for /f "tokens=2 delims==" %%a in ('wmic cpu get NumberOfCores /value') do set PHYSICAL_CORES=%%a | ||
for /f "tokens=2 delims==" %%a in ('wmic cpu get NumberOfLogicalProcessors /value') do set LOGICAL_CORES=%%a | ||
|
||
if "%LOGICAL_CORES%" GTR "%PHYSICAL_CORES%" ( | ||
call :hyperThreading | ||
) | ||
|
||
echo THIS WILL CAUSE YOUR CPU USAGE TO *DISPLAY* AS 100% IN TASK MANAGER. ENABLE IDLE IF THIS IS AN ISSUE. | ||
echo This will make your Task Manager display CPU usage as 100% (visual bug). It does not occur in Process Explorer. | ||
powercfg /setacvalueindex scheme_current sub_processor 5d76a2ca-e8c0-402f-a133-2158492d58ad 1 | ||
powercfg /setactive scheme_current | ||
|
||
echo Finished, changes have been applied. | ||
pause | ||
exit /b | ||
exit /b | ||
|
||
:hyperThreading | ||
mode con: cols=46 lines=14 | ||
chcp 65001 > nul | ||
echo] | ||
echo [32m Hyper Threading Detected | ||
echo ──────────────────────────────────────────[0m | ||
echo Detected Hyper Threading feature enabled. | ||
echo] | ||
echo You [1mshould not disable idle states [0mwhen | ||
echo this feature is enabled as it makes | ||
echo the single-threaded performance worse. | ||
echo] | ||
echo It can be disabled by using BIOS or GRUB. | ||
echo] | ||
echo [1m[33mPress any key to exit... [?25l | ||
pause > nul | ||
exit /b 1 |