Counter-Strike 2

Counter-Strike 2

View Stats:
ISOLATE YOUR CPU'S PHYSICAL CORES for maximum performance in CS2
This simple script that you just run in PowerShell (as administrator) isolates your CPU's physical cores (the most powerful ones) and leaves the remaining "virtual" threads (the less powerful ones) for background processes running on your PC in real time. This makes your CS2 run smooth and stable with zero stuttering, keeping 1% lows high and imperceptible so those sudden drops don't make enemies jitter on screen.

Keep in mind this script is specifically for the i5-12400F, but if you copy it into Gemini, GPT, or a similar AI and ask it to adapt it for your specific CPU model, it will tailor it to your computer's specs. Also, I highly recommend asking Gemini: "Do a complete audit of everything that could cause latency or stuttering in CS2, and give me a PowerShell script along with instructions on how to run it." It will provide the full audit and spot any underlying issues. After that, you can ask it to write another script to fix them.

You won't believe the difference you'll notice—all without needing software like Process Lasso or similar tools. For instance, the audit can tweak hidden settings most people don't know about, such as preventing Windows from ever putting PCIe or USB ports to sleep, ensuring your game runs cleanly without those bottleneck hiccups we often aren't even aware of.

Cheers, see you in the comments!

Write-Host "=== MONITOR DE AISLAMIENTO DE NÚCLEOS DEDICADO A CS2 ===" -ForegroundColor Cyan
Write-Host "Esperando a que se inicie cs2.exe..." -ForegroundColor Yellow

# Afinidad para hilos virtuales/impares (1,3,5,7,9,11 -> Máscara de bits: 2730 / 0xAAA)
$afinidadVirtuales = 2730

# Procesos secundarios a aislar en los hilos impares
$procesosFondo = @("explorer", "chrome", "steam", "steamwebhelper", "audiodg", "svchost", "dwmapi", "ctfmon")

while ($true) {
$cs2 = Get-Process -Name "cs2" -ErrorAction SilentlyContinue

if ($cs2) {
Write-Host "`n[!] CS2 DETECTADO - Moviendo procesos secundarios a Hilos Virtuales..." -ForegroundColor Green

foreach ($nombreProc in $procesosFondo) {
$procs = Get-Process -Name $nombreProc -ErrorAction SilentlyContinue
foreach ($p in $procs) {
try {
$p.ProcessorAffinity = [IntPtr]$afinidadVirtuales
} catch {}
}
}

# Esperar a que el juego se cierre antes de volver a verificar
while (Get-Process -Name "cs2" -ErrorAction SilentlyContinue) {
Start-Sleep -Seconds 5
}
Write-Host "`n[-] CS2 cerrado. Monitor de nuevo en espera..." -ForegroundColor Yellow
}
Start-Sleep -Seconds 2
}
< >
Showing 1-2 of 2 comments
Originally posted by ⎝⎝✧𝑀cL๏viภ✧⎠⎠:
This simple script that you just run in PowerShell (as administrator) isolates your CPU's physical cores (the most powerful ones) and leaves the remaining "virtual" threads (the less powerful ones) for background processes running on your PC in real time. This makes your CS2 run smooth and stable with zero stuttering, keeping 1% lows high and imperceptible so those sudden drops don't make enemies jitter on screen.

Keep in mind this script is specifically for the i5-12400F, but if you copy it into Gemini, GPT, or a similar AI and ask it to adapt it for your specific CPU model, it will tailor it to your computer's specs. Also, I highly recommend asking Gemini: "Do a complete audit of everything that could cause latency or stuttering in CS2, and give me a PowerShell script along with instructions on how to run it." It will provide the full audit and spot any underlying issues. After that, you can ask it to write another script to fix them.

You won't believe the difference you'll notice—all without needing software like Process Lasso or similar tools. For instance, the audit can tweak hidden settings most people don't know about, such as preventing Windows from ever putting PCIe or USB ports to sleep, ensuring your game runs cleanly without those bottleneck hiccups we often aren't even aware of.

Cheers, see you in the comments!

Write-Host "=== MONITOR DE AISLAMIENTO DE NÚCLEOS DEDICADO A CS2 ===" -ForegroundColor Cyan
Write-Host "Esperando a que se inicie cs2.exe..." -ForegroundColor Yellow

# Afinidad para hilos virtuales/impares (1,3,5,7,9,11 -> Máscara de bits: 2730 / 0xAAA)
$afinidadVirtuales = 2730

# Procesos secundarios a aislar en los hilos impares
$procesosFondo = @("explorer", "chrome", "steam", "steamwebhelper", "audiodg", "svchost", "dwmapi", "ctfmon")

while ($true) {
$cs2 = Get-Process -Name "cs2" -ErrorAction SilentlyContinue

if ($cs2) {
Write-Host "`n[!] CS2 DETECTADO - Moviendo procesos secundarios a Hilos Virtuales..." -ForegroundColor Green

foreach ($nombreProc in $procesosFondo) {
$procs = Get-Process -Name $nombreProc -ErrorAction SilentlyContinue
foreach ($p in $procs) {
try {
$p.ProcessorAffinity = [IntPtr]$afinidadVirtuales
} catch {}
}
}

# Esperar a que el juego se cierre antes de volver a verificar
while (Get-Process -Name "cs2" -ErrorAction SilentlyContinue) {
Start-Sleep -Seconds 5
}
Write-Host "`n[-] CS2 cerrado. Monitor de nuevo en espera..." -ForegroundColor Yellow
}
Start-Sleep -Seconds 2
}
Same for 14400F?
It's much simpler to start Steam as below in a script.

:: This start command sets Steam (and thus CS2) to use only CPUs you want active
:: Use https://bitsum.com/tools/cpu-affinity-calculator/ affinity calculator for your CPU

start /B /affinity <YOURAFFINTIY> "Steam" "%pathtosteam%\Steam\steam.exe"
< >
Showing 1-2 of 2 comments
Per page: 1530 50