chore: add laptop-turbo.ps1 to prepare the laptop for measurement runs
Linux / keyless-cuda-gate (push) Skipped
Rust port / port-typecheck (push) Failing after 8s
Rust port / port-fast (push) Failing after 8s
Rust port / port-oracles (push) Failing after 11s
Rust port / port-linux-tests (push) Failing after 13s
Linux / verify (push) Failing after 16s
Linux / keyless-cuda (push) Skipped
Linux / static-cuda-package (push) Skipped
Linux / hosted-cuda-package (push) Skipped
Linux / linux-static-cli (push) Skipped
Linux / linux-cli-container (push) Skipped
Linux / release-cli (push) Skipped

Activates the ASUS Turbo scheme, turns off sleep/hibernate/display-off/lock-display-off on mains power and prints the GPU power limit.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
Pavlo Ratushnyi
2026-10-28 02:32:17 +01:00
co-authored by Claude Sonnet 5.5
parent b8474d6f71
commit 5dacd41fca
+33
View File
@@ -0,0 +1,33 @@
# Prepares the Windows laptop (ASUS ROG, RTX 3080) for a measurement run. Run it yourself, once, before the run:
# powershell -ExecutionPolicy Bypass -File scripts\dev\laptop-turbo.ps1
# It changes only the Windows power settings of the ASUS "Turbo" scheme (on mains power): activates the scheme and turns off
# the sleep, hibernate, display-off and lock-screen-display-off timeouts. It does not touch the registry, the lock policy, Armoury Crate
# or the GPU. Armoury Crate keeps its own performance mode (the GPU power limit); the script prints that limit so a low value is visible.
# Previous values are printed so they can be restored by hand.
$ErrorActionPreference = 'Stop'
$list = powercfg /list | Out-String
$m = [regex]::Match($list, '(?m)^Power Scheme GUID:\s+([0-9a-f-]{36})\s+\((Turbo)\)')
if (-not $m.Success) { throw "No power scheme named Turbo found; run 'powercfg /list' and pick the ASUS performance scheme by hand." }
$turbo = $m.Groups[1].Value
$battery = Get-CimInstance Win32_Battery -ErrorAction SilentlyContinue
if ($battery -and $battery.BatteryStatus -ne 2) { Write-Warning "The laptop is on battery; plug in the charger first (the AC settings below do not apply on battery)." }
Write-Host "Active scheme before:"; powercfg /getactivescheme
powercfg /setactive $turbo
foreach ($name in 'standby-timeout-ac', 'hibernate-timeout-ac', 'monitor-timeout-ac') {
powercfg /change $name 0
}
# console lock display off timeout (the screen blanking while the session is locked): 0 = never
powercfg /setacvalueindex $turbo SUB_VIDEO VIDEOCONLOCK 0
powercfg /setactive $turbo
Write-Host "`nActive scheme now:"; powercfg /getactivescheme
Write-Host "`nGPU state (the power limit must be above 100 W for a valid measurement):"
$gpu = nvidia-smi --query-gpu=name,power.limit,power.draw,clocks.sm,pstate --format=csv,noheader,nounits
Write-Host $gpu
$limit = [double](($gpu -split ',')[1])
if ($limit -lt 100) { Write-Warning "GPU power limit is $limit W: Armoury Crate is not in its Turbo/Manual performance mode. Set it there; this script cannot." }
Write-Host "`nLeave the lock-screen requirement to Settings > Accounts > Sign-in options (Require sign-in: Never); this script does not change it."