Skip to content

Commit ce44dc2

Browse files
committed
Added the functionality for the automatic resuming of the script when 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
1 parent dc46eb1 commit ce44dc2

14 files changed

+2212
-959
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
.automode
12
.updatecheck
23
config.ini
34
deploy.ps1

Run CoreCycler.bat

+10-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,13 @@
11
@echo off
2+
3+
REM Build the parameter string
4+
SET "PARAMS="
5+
6+
IF "%~1"=="" GOTO RUN
7+
SET "PARAMS=%PARAMS% -CoreFromAutoMode %1"
8+
9+
10+
:RUN
211
echo Starting the CoreCycler...
3-
start "CoreCycler" cmd.exe /k powershell.exe -ExecutionPolicy Bypass -File "%~dp0script-corecycler.ps1"
12+
start "CoreCycler" cmd.exe /k powershell.exe -ExecutionPolicy Bypass -File "%~dp0script-corecycler.ps1" %PARAMS%
413
exit

configs/default.config.ini

+79-29
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,16 @@ flashOnError = 1
218218
lookForWheaErrors = 1
219219

220220

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

222232

223233
# Prime95 specific settings
@@ -497,66 +507,106 @@ memory = 2GB
497507

498508

499509

500-
# Settings for the Automatic Curve Optimizer adjustment
501-
[AutomaticCurveOptimizer]
510+
# Settings for the Automatic Test Mode
511+
[AutomaticTestMode]
502512

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

516530

517-
# The starting Curve Optimizer values
518-
# You can provide the Curve Optimizer starting values here, or let them be automatically detected
519-
# If you specify values here, they will overwrite your currently applied CO settings
531+
# The starting Curve Optimizer / voltage offset values
532+
# You can provide the Curve Optimizer / voltage offset starting values here, or let them be automatically detected
533+
# If you specify values here, they will overwrite your currently applied CO / voltage offset settings
520534
# If you leave the value blank or at "Default", it will try to automatically detect your current settings
521535
#
522-
# Important: use a negative sign if you have negative CO values, not providing a negative sign will
523-
# instead apply a positive CO offset
524536
# Use a comma separated list or define a single value that will be applied to all cores
537+
# For Intel, this currently only really supports a single voltage offset that is applied to each core
538+
# For Ryzen, you can define the Curve Optimizer value for each core
539+
#
540+
# Note: For Ryzen, the minimum possible Curve Optimizer value is defined by your CPU (and possibly motherboard)
541+
# -30 is a common minimum value for Curve Optimizer, sometimes even -50
542+
# Note: For Intel, the values are provided in millivolts, so e.g. -130 for an undervolt of -0.130v
525543
#
526-
# Note: The minimum possible value is defined by your CPU (and possibly motherboard). -30 is a common value
544+
# IMPORTANT: Use a negative sign if you want negative CO values / a negative voltage offset, not providing a
545+
# negative sign will instead apply a positive CO / voltage offset!
527546
#
528-
# Example for a Ryzen 5800X with 8 cores:
547+
# Example for setting Curve Optimizer values for a Ryzen 5800X with 8 cores:
529548
# startValues = -15, -10, -15, -8, 2, -20, 0, -30
530-
# Example to assign a single value to all cores:
549+
#
550+
# Example to assign a single Curve Optimizer value to all cores:
531551
# startValues = -20
532552
#
553+
# Example to assign a voltage offset of -0.120v (120mv) for Intel processors:
554+
# startValues = -120
555+
#
533556
# Default: Default
534557
startValues = Default
535558

536559

537-
# The upper limit for the Curve Optimizer values
538-
# If this limit is reached, the CO value will no longer be increased, instead the core will now simply
539-
# throw an error and the regular "skipCoreOnError" setting will be obeyed
560+
# The upper limit for the Curve Optimizer values / voltage offset
561+
# If this limit has been reached, no further adjustments will be performed
562+
# Instead the core will now simply throw an error and the regular "skipCoreOnError" setting will be obeyed
563+
# This is either a Curve Optimizer value or a voltage offset value
564+
#
565+
# IMPORTANT: Be sensible about this value, setting it too high into the positive could apply a too high
566+
# voltage to your CPU and may damage it!
540567
#
541-
# Default: 5
542-
maxValue = 5
568+
# Default: 0
569+
maxValue = 0
543570

544571

545-
# The amount by which to increase the Curve Optimizer value
546-
# On an error, the Curve Optimizer value will be increased by this amount
572+
# The amount by which to increase the Curve Optimizer / voltage offset value
573+
# On an error, the Curve Optimizer / voltage offset value will be increased by this amount
574+
# For Ryzen, a value between 1 and 5 seems reasonable
575+
# For Intel, you should probably set this to 5 to increase the vCore by 5mv after an error
547576
#
548-
# Default: 1
549-
incrementBy = 1
577+
# Setting it to "Default" will set the value to 1 for Ryzen and 5 for Intel
578+
#
579+
# Default: Default
580+
incrementBy = Default
550581

551582

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

559590

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

561611

562612
# Log specific settings

helpers/add-eventlog-source.ps1

+8-2
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,19 @@
11
<#
2+
.AUTHOR
3+
sp00n
4+
.LINK
5+
https://github.com/sp00n/corecycler
6+
.LICENSE
7+
Creative Commons "CC BY-NC-SA"
8+
https://creativecommons.org/licenses/by-nc-sa/4.0/
9+
https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode
210
.DESCRIPTION
311
This file is used to add a new Windows Event Log "Source", which is required to be able to use the Windows Event Log
412
The name of this new Source is "CoreCycler"
513
Adding this Source requires admin rights, which is why it's outsourced into this file, so that we don't need to call
614
the main scrip width admin rights
715
.PARAMETER shouldBeAdmin
816
[Mixed] If set (to anything), assume that we are already admin
9-
.OUTPUTS
10-
[Void]
1117
#>
1218
param(
1319
$shouldBeAdmin

0 commit comments

Comments
 (0)