Skip to content

Commit

Permalink
Added the functionality for the automatic resuming of the script when…
Browse files Browse the repository at this point in the history
… a crash/reboot has happened

Added a startup script, which will be called by a Scheduled Task
Added the APICID tool to get the APIC IDs
Added the IntelVoltageControl tool to be able to change the voltage offset for Intel CPUs
Added a new setting that allows you to treat WHEA warnings/errors as "real" errors, as long as the APIC ID matches the tested core
Version pushed to 0.10.00
  • Loading branch information
sp00n committed Aug 5, 2024
1 parent dc46eb1 commit ce44dc2
Show file tree
Hide file tree
Showing 14 changed files with 2,212 additions and 959 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.automode
.updatecheck
config.ini
deploy.ps1
Expand Down
11 changes: 10 additions & 1 deletion Run CoreCycler.bat
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@
@echo off

REM Build the parameter string
SET "PARAMS="

IF "%~1"=="" GOTO RUN
SET "PARAMS=%PARAMS% -CoreFromAutoMode %1"


:RUN
echo Starting the CoreCycler...
start "CoreCycler" cmd.exe /k powershell.exe -ExecutionPolicy Bypass -File "%~dp0script-corecycler.ps1"
start "CoreCycler" cmd.exe /k powershell.exe -ExecutionPolicy Bypass -File "%~dp0script-corecycler.ps1" %PARAMS%
exit
108 changes: 79 additions & 29 deletions configs/default.config.ini
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,16 @@ flashOnError = 1
lookForWheaErrors = 1


# Treat a WHEA Warning Event Log entry as an error
# If this is enabled, a WHEA warning (Event Id 19, "corrected hardware error") will be treated as a "real" error
# The testing on the core will be stopped and continued on the next one
# However only if the APIC ID from the WHEA message matches the core that was currently tested, otherwise
# only a warning will be displayed
#
# Default: 1
treatWheaWarningAsError = 1




# Prime95 specific settings
Expand Down Expand Up @@ -497,66 +507,106 @@ memory = 2GB



# Settings for the Automatic Curve Optimizer adjustment
[AutomaticCurveOptimizer]
# Settings for the Automatic Test Mode
[AutomaticTestMode]

# Enable the automatic Curve Optimizer adjustment
# It uses PJVol's PBO2 Tuner, which is included in the /tools/ directory
# If you enable this setting, the script will automatically adjust the Curve Optimizer values
# Enable the automatic test mode
# If you enable this setting, the script will automatically adjust the Curve Optimizer or voltage offset values
# when an error occurs
# Note that it will only INCREASE the Curve Optimizer values, i.e. it will try to make the settings more stable,
# it will never push the settings more into the negative
#
# For Ryzen CPUs up to Zen 4 (Ryzen 7000), it uses PJVol's "pbotest.exe", which is included in the /tools/pbocli/ directory
# For Intel, it uses "IntelVoltageControl", which allows you to set a voltage offset (also included in the /tools/ directory)
#
# Note that this will only INCREASE the Curve Optimizer / voltage offset values, i.e. it will try to make the settings
# more stable, it will never push the settings more into the negative
# Also note that enabling this setting will require the script to be run with administrator privileges
# And lastly, enabling it will set "skipCoreOnError" to 0 and "stopOnError" also top 0
# IMPORTANT: This only works up to Ryzen 7000 (Zen 4) so far
# And lastly, enabling it will set "skipCoreOnError" to 0 and "stopOnError" to 0 as long as the limit has not been reached
#
# IMPORTANT: This currently does not work for Ryzen 9000 (Zen 5) CPUs
#
# Default: 0
enableAutomaticAdjustment = 0


# The starting Curve Optimizer values
# You can provide the Curve Optimizer starting values here, or let them be automatically detected
# If you specify values here, they will overwrite your currently applied CO settings
# The starting Curve Optimizer / voltage offset values
# You can provide the Curve Optimizer / voltage offset starting values here, or let them be automatically detected
# If you specify values here, they will overwrite your currently applied CO / voltage offset settings
# If you leave the value blank or at "Default", it will try to automatically detect your current settings
#
# Important: use a negative sign if you have negative CO values, not providing a negative sign will
# instead apply a positive CO offset
# Use a comma separated list or define a single value that will be applied to all cores
# For Intel, this currently only really supports a single voltage offset that is applied to each core
# For Ryzen, you can define the Curve Optimizer value for each core
#
# Note: For Ryzen, the minimum possible Curve Optimizer value is defined by your CPU (and possibly motherboard)
# -30 is a common minimum value for Curve Optimizer, sometimes even -50
# Note: For Intel, the values are provided in millivolts, so e.g. -130 for an undervolt of -0.130v
#
# Note: The minimum possible value is defined by your CPU (and possibly motherboard). -30 is a common value
# IMPORTANT: Use a negative sign if you want negative CO values / a negative voltage offset, not providing a
# negative sign will instead apply a positive CO / voltage offset!
#
# Example for a Ryzen 5800X with 8 cores:
# Example for setting Curve Optimizer values for a Ryzen 5800X with 8 cores:
# startValues = -15, -10, -15, -8, 2, -20, 0, -30
# Example to assign a single value to all cores:
#
# Example to assign a single Curve Optimizer value to all cores:
# startValues = -20
#
# Example to assign a voltage offset of -0.120v (120mv) for Intel processors:
# startValues = -120
#
# Default: Default
startValues = Default


# The upper limit for the Curve Optimizer values
# If this limit is reached, the CO value will no longer be increased, instead the core will now simply
# throw an error and the regular "skipCoreOnError" setting will be obeyed
# The upper limit for the Curve Optimizer values / voltage offset
# If this limit has been reached, no further adjustments will be performed
# Instead the core will now simply throw an error and the regular "skipCoreOnError" setting will be obeyed
# This is either a Curve Optimizer value or a voltage offset value
#
# IMPORTANT: Be sensible about this value, setting it too high into the positive could apply a too high
# voltage to your CPU and may damage it!
#
# Default: 5
maxValue = 5
# Default: 0
maxValue = 0


# The amount by which to increase the Curve Optimizer value
# On an error, the Curve Optimizer value will be increased by this amount
# The amount by which to increase the Curve Optimizer / voltage offset value
# On an error, the Curve Optimizer / voltage offset value will be increased by this amount
# For Ryzen, a value between 1 and 5 seems reasonable
# For Intel, you should probably set this to 5 to increase the vCore by 5mv after an error
#
# Default: 1
incrementBy = 1
# Setting it to "Default" will set the value to 1 for Ryzen and 5 for Intel
#
# Default: Default
incrementBy = Default


# Repeat the test on a core if it has thrown an error and the Curve Optimizer value was increased
# Setting this to 1 will restart the test, until it has not thrown an error, or until the maximum CO value has been reached
# With 0 the loop will continue to the next core in line as normal
# Repeat the test on a core if it has thrown an error and the Curve Optimizer / voltage offset value was increased
# Setting this to 1 will restart the test, until it has not thrown an error, or until the maximum value has been reached
# Setting it to 0, the script will continue to the next core in line as normal
#
# Default: 1
repeatCoreOnError = 1


# Try to automatically resume after a crash / hard reboot
# If this setting is enabled, the script will try to automatically resume after a reboot has occurred
# It creates a Scheduled Task that will be run at logon, which then tries to resume where it left off,
# optionally repeating the last core with an adjusted value (see the repeatCoreOnError setting)
#
# IMPORTANT: If you just close the CoreCycler window without properly exiting the script with CTRL+C,
# the Scheduled Task will remain and will be executed on the next reboot!
# So make sure that you always exit CoreCycler by pressing CTRL+C
#
# IMPORTANT: The Scheduled Task will execute once you log back in to your user account
# So for a true automated testing, it would be beneficial if you activated auto-logon
# Be aware that this might pose a security risk though, so make sure to consider the risks!
# https://learn.microsoft.com/en-us/sysinternals/downloads/autologon
# https://learn.microsoft.com/en-us/troubleshoot/windows-server/user-profiles-and-logon/turn-on-automatic-logon
#
# Default: 0
enableResumeAfterUnexpectedExit = 0




# Log specific settings
Expand Down
10 changes: 8 additions & 2 deletions helpers/add-eventlog-source.ps1
Original file line number Diff line number Diff line change
@@ -1,13 +1,19 @@
<#
.AUTHOR
sp00n
.LINK
https://github.com/sp00n/corecycler
.LICENSE
Creative Commons "CC BY-NC-SA"
https://creativecommons.org/licenses/by-nc-sa/4.0/
https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode
.DESCRIPTION
This file is used to add a new Windows Event Log "Source", which is required to be able to use the Windows Event Log
The name of this new Source is "CoreCycler"
Adding this Source requires admin rights, which is why it's outsourced into this file, so that we don't need to call
the main scrip width admin rights
.PARAMETER shouldBeAdmin
[Mixed] If set (to anything), assume that we are already admin
.OUTPUTS
[Void]
#>
param(
$shouldBeAdmin
Expand Down
Loading

0 comments on commit ce44dc2

Please sign in to comment.