A tiny, reversible PowerShell toolkit that fixes common random desktop freezes by:
- Disabling USB selective suspend (stops flaky hubs/peripherals sleeping)
- Turning PCIe ASPM off (prevents link state power weirdness)
- Disabling Hibernation (also disables Fast Startup)
- (Optional) Removing Intel XTU service & driver packages that linger after uninstall
- Saving an undo backup and logging evidence (critical events + devices “not OK”)
Works on Windows 10/11. No external downloads. Everything is auditable and reversible.
Run in an elevated (Administrator) PowerShell.
PowerShell 5.1 is fine; PowerShell 7+ works too (replacepowershellwithpwsh).
# Download
$u = 'https://raw.githubusercontent.com/wbaconsulting/windows-freeze-tune/main/scripts/WindowsFreezeTune.ps1'
$dst = "$env:TEMP\WindowsFreezeTune.ps1"
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
Invoke-WebRequest $u -UseBasicParsing -OutFile $dst
# Run
powershell -NoProfile -ExecutionPolicy Bypass -File $dst
# Undo later (restores your original values)
powershell -NoProfile -ExecutionPolicy Bypass -File $dst -UndoNote: this runs immediately and does not support passing
-Undo. Use Option A for-Undo.
powershell -NoProfile -ExecutionPolicy Bypass -Command "iwr -useb https://raw.githubusercontent.com/wbaconsulting/windows-freeze-tune/main/scripts/WindowsFreezeTune.ps1 | iex"$ver='v0.1.1' # change when a newer release is available
$zip="$env:TEMP\windows-freeze-tune.zip"
$uri="https://github.com/wbaconsulting/windows-freeze-tune/releases/download/$ver/windows-freeze-tune.zip"
Invoke-WebRequest $uri -UseBasicParsing -OutFile $zip
Expand-Archive $zip -DestinationPath "$env:TEMP\wft" -Force
powershell -NoProfile -ExecutionPolicy Bypass -File "$env:TEMP\wft\scripts\WindowsFreezeTune.ps1"
# Undo later
powershell -NoProfile -ExecutionPolicy Bypass -File "$env:TEMP\wft\scripts\WindowsFreezeTune.ps1" -Undo- Logs →
%Public%\WindowsFreezeTune-Logs\ - Backup →
%ProgramData%\WindowsFreezeTune\backup.json
-
USB selective suspend → Disabled (AC/DC)
USB hubs, KVMs, DACs, VR sensors and some keyboards/mice misbehave when Windows tries to suspend ports. -
PCIe ASPM → Off (AC/DC)
Prevents link power state transitions that can hang some GPUs, NVMe controllers, capture cards, etc. -
Hibernation → Off
Removes Fast Startup side-effects and frees thehiberfil.sysfile. Re-enable via-Undo. -
Intel XTU remnants → Attempted removal
Cleans theXTU3SERVICEWindows service andpnputildriver packages namedxtu*.inf.
Everything is written to a small JSON backup so you can revert.
- Windows 10/11, Administrator PowerShell
- PowerShell 5.1+ (Windows PowerShell is fine) or PowerShell 7+
- Built-ins:
powercfg,pnputil,sc,Get-PnpDevice,Get-WinEvent
- The script backs up your current power plan values (USB suspend, PCIe ASPM) and hibernation state.
- Use
-Undoto restore those exact values. - If something fails, the script continues safely and prints what it managed to change.
- Single-file script, no network calls, no obfuscation.
- You can read it in 2 minutes. It’s all in
scripts/WindowsFreezeTune.ps1. - We provide a testable repro path: check Event Viewer (Critical events) and Device Manager, before/after.
Sophia Script (SophiApp), privacy.sexy, O&O ShutUp10++, WinUtil, Harden-Windows-Security
We focused this repo on stability (freeze fixes) and reversibility, not broad “debloat”.
- Optional “Gaming preset” (latency-friendly power settings)
- Packaging for PowerShell Gallery / winget
- Telemetry-free usage stats (opt-in)
MIT — see LICENSE.
© Watertown Business Advisory, LLC — https://wbaconsulting.org