Skip to content

Instantly share code, notes, and snippets.

@luciusbono
Created October 29, 2018 02:14
Show Gist options
  • Save luciusbono/6e002fded7efa6ece68de973db84876a to your computer and use it in GitHub Desktop.
Save luciusbono/6e002fded7efa6ece68de973db84876a to your computer and use it in GitHub Desktop.
$xtu_service = Get-Service -name "XTU3SERVICE"
$xtu_path = "C:\Program Files (x86)\Intel\Intel(R) Extreme Tuning Utility\Client\XTUCli.exe"
$undervolt = -50
if ($xtu_service.Status -ne "Running")
{
Write-Output "Starting XTU service"
start-service -name "XTU3SERVICE"
}
else
{
Write-Output "Restarting XTU service"
Restart-Service -Name "XTU3SERVICE"
}
$count = 0
$get_core = (& $xtu_path -i tuning | Select-String "Core Voltage Offset" | %{ -split $_ | select -index 4} | Out-String) -replace "mV",''
$current_core = [int]$get_core
if ($current_core -ne $undervolt)
{
Write-Output "Core voltage currently set to $($current_core)mV setting core undervolt to $($undervolt)mV."
& $xtu_path -t -id 34 -v $undervolt
}
$get_cache = (& $xtu_path -i tuning | Select-String "Cache Voltage Offset" | %{ -split $_ | select -index 4 } | Out-String) -replace "mV",''
$current_cache = [int]$get_cache
if ($current_cache -ne $undervolt)
{
Write-Output "Cache voltage currently set to $($current_cache)mV setting cache undervolt to $($undervolt)mV."
Start-Sleep -Seconds 5
& $xtu_path -t -id 79 -v $undervolt
}
while($true)
{
$xtu_process = Get-Process xtucli -ErrorAction SilentlyContinue
while ($xtu_process) {
Start-Sleep 1
$xtu_process = Get-Process xtucli -ErrorAction SilentlyContinue
}
$watt_value = (Get-Random -Minimum 120 -Maximum 160) * .125
& $xtu_path -t -id 48 -v $watt_value
$count++
Start-Sleep -Seconds 15
}
Start-Sleep -Seconds 4
exit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment