orlev

Becerikli
Katılım
30 Nisan 2026
Mesajlar
219
Çözümler
1
Beğeniler
185
Merhaba arkadaşlar,
Counter-Strike 2 oynarken sistemdeki girdi gecikmesini (input lag) en aza indirmek, ağ kartındaki anlık ping dalgalanmalarını (jitter) önlemek ve fare tepkilerini keskinleştirmek için güvenli bir PowerShell betiği ve CS2 yapılandırma dosyası hazırladım.
Piyasadaki hazır ve kapalı kaynaklı programların aksine tüm kodlar açıktır. Dışarıdan bir dosya indirmenize gerek yoktur; kodları Not Defteri ile kendiniz oluşturup içini satır satır inceleyebilirsiniz. Ayrıca FACEIT Anti-Cheat kullananların sorun yaşamaması için menüye VBS/Bellek Bütünlüğü seçeneği eklenmiştir.
  • Platform Seçimi (Valve / FACEIT): Sadece Premier/Rekabetçi oynuyorsanız maksimum FPS için VBS kapatılır. FACEIT oynuyorsanız Anti-Cheat uyumluluğu için VBS ve Bellek Bütünlüğü aktif tutulur.
  • GPU ve Oyun Modu: Donanım Hızlandırmalı GPU Zamanlaması (HAGS) ve Windows Oyun Modu açılır, arka plan oyun kaydı (GameDVR) kapatılır.
  • Fare Optimizasyonu: Windows fare ivmesi tamamen sıfırlanır (1:1 Raw Input).
  • Ağ Kartı ve Ping: Windows ağ hız kısıtlaması (Network Throttling) kaldırılır, Nagle algoritması (TCPNoDelay) kapatılır ve ağ kartının güç tasarrufu / kesinti denetimi devre dışı bırakılır.
  • USB ve Sistem: Oyun sırasında fare/klavye uyku gecikmesini önlemek için USB Seçmeli Askıya Alma kapatılır ve eski DirectX gölgelendirici önbelleği temizlenir.


1. Adım: Windows 11 Optimizasyon Betiği
  1. Masaüstünde sağ tıklayıp Yeni > Metin Belgesi oluşturun.
  2. Aşağıdaki kodun tamamını kopyalayıp içine yapıştırın.
  3. Dosyayı CS2_Optimize.ps1 adıyla kaydedin (Kayıt türü: Tüm Dosyalar).
  4. Dosyaya sağ tıklayıp PowerShell ile Çalıştır deyin ve yönetici iznini onaylayın.
  5. Açılan ekranda oynadığınız platforma göre 1 veya 2 yazıp Enter'a basın. İşlem bitince bilgisayarı yeniden başlatın.
Not: "Bu sistemde komut dosyalarının çalıştırılması devre dışı bırakıldı" (ExecutionPolicy) hatası alırsanız:
Masaüstünde boş bir alana Shift + Sağ Tık yapıp Terminalde aç (veya PowerShell penceresini buradan açın) seçeneğine tıklayın ve aşağıdaki komutu yapıştırıp Enter'a basın. Bu komut güvenlik ayarlarını kalıcı olarak değiştirmez, sadece tek seferlik bu dosyanın çalışmasına izin verir:

Kod:
powershell -ExecutionPolicy Bypass -File .\CS2_Optimize.ps1

CS2_Optimize.ps1 Kodu:

Kod:
if (!([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] "Administrator")) {
    Start-Process powershell.exe "-NoProfile -ExecutionPolicy Bypass -File `"$PSCommandPath`"" -Verb RunAs
    exit
}

function Set-RegSafe {
    param([string]$Path, [string]$Name, $Value, [string]$Type = "DWord")
    if (!(Test-Path $Path)) { New-Item -Path $Path -Force | Out-Null }
    Set-ItemProperty -Path $Path -Name $Name -Value $Value -Type $Type -Force -ErrorAction SilentlyContinue
}

Clear-Host
Write-Host "========================================================="
Write-Host "   CS2 & WINDOWS 11 E-SPOR OPTIMIZASYON ARACI"
Write-Host "=========================================================`n"

Write-Host "Hangi platformda oynuyorsunuz?"
Write-Host "1 - Sadece Valve / Premier (Maksimum FPS icin VBS Kapatilir)"
Write-Host "2 - FACEIT Oynuyorum (Anti-Cheat uyumlulugu icin VBS/HVCI Acik Kalir)`n"

$Secim = Read-Host "Seciminizi yapin (1 veya 2)"

Write-Host "`nOptimizasyonlar uygulaniyor, lutfen bekleyin...`n"

if ($Secim -eq "1") {
    Set-RegSafe "HKLM:\SYSTEM\CurrentControlSet\Control\DeviceGuard" "EnableVirtualizationBasedSecurity" 0
    Set-RegSafe "HKLM:\SYSTEM\CurrentControlSet\Control\DeviceGuard\Scenarios\HypervisorEnforcedCodeIntegrity" "Enabled" 0
    Write-Host "[+] Valve Modu: VBS ve Bellek Butunlugu kapatildi."
} else {
    Set-RegSafe "HKLM:\SYSTEM\CurrentControlSet\Control\DeviceGuard" "EnableVirtualizationBasedSecurity" 1
    Set-RegSafe "HKLM:\SYSTEM\CurrentControlSet\Control\DeviceGuard\Scenarios\HypervisorEnforcedCodeIntegrity" "Enabled" 1
    Write-Host "[+] FACEIT Modu: VBS ve Bellek Butunlugu FACEIT AC uyumlulugu icin aktif edildi."
}

Set-RegSafe "HKLM:\SYSTEM\CurrentControlSet\Control\GraphicsDrivers" "HwSchMode" 2
Set-RegSafe "HKCU:\Software\Microsoft\GameBar" "AutoGameModeEnabled" 1
Set-RegSafe "HKCU:\Software\Microsoft\GameBar" "AllowAutoGameMode" 1
Set-RegSafe "HKCU:\System\GameConfigStore" "GameDVR_Enabled" 0
Write-Host "[+] GPU Zamanlamasi (HAGS) ve Oyun Modu acildi, GameDVR kapatildi."

Set-RegSafe "HKCU:\Control Panel\Mouse" "MouseSpeed" "0" "String"
Set-RegSafe "HKCU:\Control Panel\Mouse" "MouseThreshold1" "0" "String"
Set-RegSafe "HKCU:\Control Panel\Mouse" "MouseThreshold2" "0" "String"
Write-Host "[+] Fare ivmesi sifirlandi (1:1 Raw Input)."

Set-RegSafe "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Multimedia\SystemProfile" "NetworkThrottlingIndex" 0xffffffff
Set-RegSafe "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Multimedia\SystemProfile" "SystemResponsiveness" 0

$Adapters = Get-NetAdapter -ErrorAction SilentlyContinue | Where-Object {$_.Status -eq "Up"}
foreach ($Adapter in $Adapters) {
    Set-NetAdapterAdvancedProperty -Name $Adapter.Name -DisplayName "*Energy Efficient Ethernet*" -DisplayValue "Disabled" -ErrorAction SilentlyContinue
    Set-NetAdapterAdvancedProperty -Name $Adapter.Name -DisplayName "*Enerji Tasarruflu*" -DisplayValue "Devre*" -ErrorAction SilentlyContinue
    Set-NetAdapterAdvancedProperty -Name $Adapter.Name -DisplayName "*Power Saving Mode*" -DisplayValue "Disabled" -ErrorAction SilentlyContinue
    Set-NetAdapterAdvancedProperty -Name $Adapter.Name -DisplayName "*Interrupt Moderation*" -DisplayValue "Disabled" -ErrorAction SilentlyContinue
    Set-NetAdapterAdvancedProperty -Name $Adapter.Name -DisplayName "*Kesinti Denetimi*" -DisplayValue "Devre*" -ErrorAction SilentlyContinue
}

$Interfaces = Get-ChildItem "HKLM:\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Interfaces" -ErrorAction SilentlyContinue
foreach ($Interface in $Interfaces) {
    Set-ItemProperty -Path $Interface.PSPath -Name "TcpAckFrequency" -Value 1 -Type DWord -Force -ErrorAction SilentlyContinue
    Set-ItemProperty -Path $Interface.PSPath -Name "TCPNoDelay" -Value 1 -Type DWord -Force -ErrorAction SilentlyContinue
}
Write-Host "[+] Ag karti guc tasarrufu kapatildi, TCPNoDelay ve paket gecikmesi optimize edildi."

powercfg /setacvalueindex SCHEME_CURRENT 2a737441-1930-4402-8d77-b2bebba308a3 48e6b7a6-50f5-4782-a5d4-53bb8f07e226 0 2>$null
powercfg /setactive SCHEME_CURRENT 2>$null
Set-RegSafe "HKCU:\Software\Microsoft\Windows\CurrentVersion\Themes\Personalize" "EnableTransparency" 0
Set-RegSafe "HKCU:\Control Panel\Desktop\WindowMetrics" "MinAnimate" "0" "String"
Write-Host "[+] USB uyku modu, saydamlik ve gereksiz pencere animasyonlari kapatildi."

$ShaderCachePath = "$env:LOCALAPPDATA\D3DSCache"
if (Test-Path $ShaderCachePath) {
    Remove-Item -Path "$ShaderCachePath\*" -Recurse -Force -ErrorAction SilentlyContinue
    Write-Host "[+] Eski DirectX Golgelendirici Onbellegi temizlendi."
}

Write-Host "`n========================================================="
Write-Host "   TUM AYARLAR TAMAMLANDI! BILGISAYARI YENIDEN BASLATIN."
Write-Host "========================================================="
Pause





2. Adım: CS2 autoexec.cfg
  1. Steam'de Counter-Strike 2'ye sağ tıklayıp Yönet > Yerel dosyalara göz at deyin.
  2. game > csgo > cfg klasörüne girin.
  3. İçine autoexec.cfg adında bir metin belgesi oluşturup aşağıdaki kodları yapıştırın.

Kod:
fps_max "0"
fps_max_ui "200"
engine_low_latency_sleep_after_client_tick "1"
rate "786432"
cl_net_buffer_ticks "0"
r_fullscreen_gamma "2.2"
snd_mixahead "0.001"
host_writeconfig
echo "CS2 Ayarlari Yuklendi."



Ayarları Varsayılana Döndürme (Geri Alma )
Yapılan tüm değişiklikleri tek tıkla Windows'un ilk fabrika ayarlarına döndürmek isterseniz aynı yöntemle masaüstünde CS2_Sifirla.ps1 dosyası oluşturup çalıştırabilirsiniz. (Çalıştırma izni hatası alırsanız Terminal üzerinden powershell -ExecutionPolicy Bypass -File .\CS2_Sifirla.ps1 komutunu kullanabilirsiniz.)

Kod:
if (!([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] "Administrator")) {
    Start-Process powershell.exe "-NoProfile -ExecutionPolicy Bypass -File `"$PSCommandPath`"" -Verb RunAs
    exit
}

function Set-RegSafe {
    param([string]$Path, [string]$Name, $Value, [string]$Type = "DWord")
    if (!(Test-Path $Path)) { New-Item -Path $Path -Force | Out-Null }
    Set-ItemProperty -Path $Path -Name $Name -Value $Value -Type $Type -Force -ErrorAction SilentlyContinue
}

Write-Host "Ayarlar Windows varsayilanlarina donduruluyor...`n"

Set-RegSafe "HKLM:\SYSTEM\CurrentControlSet\Control\DeviceGuard" "EnableVirtualizationBasedSecurity" 1
Set-RegSafe "HKLM:\SYSTEM\CurrentControlSet\Control\DeviceGuard\Scenarios\HypervisorEnforcedCodeIntegrity" "Enabled" 1
Set-RegSafe "HKCU:\System\GameConfigStore" "GameDVR_Enabled" 1

Set-RegSafe "HKCU:\Control Panel\Mouse" "MouseSpeed" "1" "String"
Set-RegSafe "HKCU:\Control Panel\Mouse" "MouseThreshold1" "6" "String"
Set-RegSafe "HKCU:\Control Panel\Mouse" "MouseThreshold2" "10" "String"

Set-RegSafe "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Multimedia\SystemProfile" "NetworkThrottlingIndex" 10
Set-RegSafe "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Multimedia\SystemProfile" "SystemResponsiveness" 20

$Adapters = Get-NetAdapter -ErrorAction SilentlyContinue | Where-Object {$_.Status -eq "Up"}
foreach ($Adapter in $Adapters) {
    Set-NetAdapterAdvancedProperty -Name $Adapter.Name -DisplayName "*Energy Efficient Ethernet*" -DisplayValue "Enabled" -ErrorAction SilentlyContinue
    Set-NetAdapterAdvancedProperty -Name $Adapter.Name -DisplayName "*Enerji Tasarruflu*" -DisplayValue "Etkin" -ErrorAction SilentlyContinue
    Set-NetAdapterAdvancedProperty -Name $Adapter.Name -DisplayName "*Power Saving Mode*" -DisplayValue "Enabled" -ErrorAction SilentlyContinue
    Set-NetAdapterAdvancedProperty -Name $Adapter.Name -DisplayName "*Interrupt Moderation*" -DisplayValue "Enabled" -ErrorAction SilentlyContinue
    Set-NetAdapterAdvancedProperty -Name $Adapter.Name -DisplayName "*Kesinti Denetimi*" -DisplayValue "Etkin" -ErrorAction SilentlyContinue
}

$Interfaces = Get-ChildItem "HKLM:\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Interfaces" -ErrorAction SilentlyContinue
foreach ($Interface in $Interfaces) {
    Remove-ItemProperty -Path $Interface.PSPath -Name "TcpAckFrequency" -ErrorAction SilentlyContinue
    Remove-ItemProperty -Path $Interface.PSPath -Name "TCPNoDelay" -ErrorAction SilentlyContinue
}

powercfg /setacvalueindex SCHEME_CURRENT 2a737441-1930-4402-8d77-b2bebba308a3 48e6b7a6-50f5-4782-a5d4-53bb8f07e226 1 2>$null
powercfg /setactive SCHEME_CURRENT 2>$null
Set-RegSafe "HKCU:\Software\Microsoft\Windows\CurrentVersion\Themes\Personalize" "EnableTransparency" 1
Set-RegSafe "HKCU:\Control Panel\Desktop\WindowMetrics" "MinAnimate" "1" "String"

Write-Host "`nTum ayarlar Windows varsayilanlarina donduruldu. Bilgisayari yeniden baslatin."
Pause