Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions Resources/Devices.es.resx
Original file line number Diff line number Diff line change
Expand Up @@ -516,6 +516,12 @@
<data name="CheckGlobalTimerExplain" xml:space="preserve">
<value>Hace que todos los procesos compartan el temporizador más fino que pida una aplicación, como en Windows 10. Aumenta el consumo; mantenlo solo si un juego antiguo concreto lo necesita.</value>
</data>
<data name="CheckProcessorStateRange" xml:space="preserve">
<value>Estado mínimo del procesador bloqueado</value>
</data>
<data name="CheckProcessorStateRangeExplain" xml:space="preserve">
<value>Una herramienta de ajustes redujo el valor más alto que Windows permite para el estado mínimo del procesador (normalmente 100 %). La configuración queda fija en ese valor, el editor del plan no puede subirla y el ajuste de limitación de la CPU puede fallar. La reparación restablece el límite de Windows del 100 %.</value>
</data>
<data name="ScriptsTitle" xml:space="preserve">
<value>Scripts de Marius Heier</value>
</data>
Expand Down
6 changes: 6 additions & 0 deletions Resources/Devices.it.resx
Original file line number Diff line number Diff line change
Expand Up @@ -516,6 +516,12 @@
<data name="CheckGlobalTimerExplain" xml:space="preserve">
<value>Fa condividere a tutti i processi il timer più fine richiesto da un'app, come in Windows 10. Aumenta i consumi; tienilo solo se serve a un vecchio gioco specifico.</value>
</data>
<data name="CheckProcessorStateRange" xml:space="preserve">
<value>Stato minimo del processore bloccato</value>
</data>
<data name="CheckProcessorStateRangeExplain" xml:space="preserve">
<value>Un tool di tweak ha abbassato il valore massimo che Windows consente per lo stato minimo del processore (normalmente 100%). L'impostazione resta bloccata su quel valore, l'editor del piano non può alzarla e il tweak sul throttling della CPU può fallire. La correzione ripristina il limite di Windows al 100%.</value>
</data>
<data name="ScriptsTitle" xml:space="preserve">
<value>Script di Marius Heier</value>
</data>
Expand Down
6 changes: 6 additions & 0 deletions Resources/Devices.ja.resx
Original file line number Diff line number Diff line change
Expand Up @@ -516,6 +516,12 @@
<data name="CheckGlobalTimerExplain" xml:space="preserve">
<value>Windows 10 と同様に、いずれかのアプリが要求した最も細かいタイマーをすべてのプロセスで共有させます。消費電力が増えるため、特定の古いゲームで必要な場合のみ維持してください。</value>
</data>
<data name="CheckProcessorStateRange" xml:space="preserve">
<value>最小のプロセッサの状態がロックされています</value>
</data>
<data name="CheckProcessorStateRangeExplain" xml:space="preserve">
<value>チューニングツールが、最小のプロセッサの状態に Windows が許可する上限値(通常は 100%)を下げています。設定はその値に固定され、電源プランエディターでは上げられず、CPU スロットリングの調整が失敗する場合があります。修復すると Windows の上限 100% に戻ります。</value>
</data>
<data name="ScriptsTitle" xml:space="preserve">
<value>Marius Heier のスクリプト</value>
</data>
Expand Down
6 changes: 6 additions & 0 deletions Resources/Devices.resx
Original file line number Diff line number Diff line change
Expand Up @@ -516,6 +516,12 @@
<data name="CheckGlobalTimerExplain" xml:space="preserve">
<value>Makes every process share the finest timer any app requests, as on Windows 10. It raises power use; keep it only if a specific old game needs it.</value>
</data>
<data name="CheckProcessorStateRange" xml:space="preserve">
<value>Minimum processor state locked</value>
</data>
<data name="CheckProcessorStateRangeExplain" xml:space="preserve">
<value>A tweaking tool lowered the highest value Windows allows for minimum processor state (normally 100%). The setting stays stuck at that value, the power plan editor cannot raise it and the CPU throttling tweak may fail. The repair puts the Windows limit of 100% back.</value>
</data>
<data name="ScriptsTitle" xml:space="preserve">
<value>Marius Heier scripts</value>
</data>
Expand Down
6 changes: 6 additions & 0 deletions Resources/Devices.ru.resx
Original file line number Diff line number Diff line change
Expand Up @@ -516,6 +516,12 @@
<data name="CheckGlobalTimerExplain" xml:space="preserve">
<value>Заставляет все процессы использовать самый точный таймер, запрошенный любым приложением, как в Windows 10. Повышает энергопотребление; оставляйте только если это нужно конкретной старой игре.</value>
</data>
<data name="CheckProcessorStateRange" xml:space="preserve">
<value>Минимальное состояние процессора заблокировано</value>
</data>
<data name="CheckProcessorStateRangeExplain" xml:space="preserve">
<value>Утилита твиков снизила максимальное значение, которое Windows допускает для минимального состояния процессора (обычно 100%). Параметр застревает на этом значении, редактор схемы не может его повысить, а твик троттлинга ЦП может не сработать. Исправление возвращает предел Windows в 100%.</value>
</data>
<data name="ScriptsTitle" xml:space="preserve">
<value>Скрипты Marius Heier</value>
</data>
Expand Down
6 changes: 6 additions & 0 deletions Resources/Devices.zh-CN.resx
Original file line number Diff line number Diff line change
Expand Up @@ -516,6 +516,12 @@
<data name="CheckGlobalTimerExplain" xml:space="preserve">
<value>使所有进程共享任一应用请求的最高计时器精度(与 Windows 10 相同)。会增加功耗;仅在特定旧游戏需要时保留。</value>
</data>
<data name="CheckProcessorStateRange" xml:space="preserve">
<value>最小处理器状态被锁定</value>
</data>
<data name="CheckProcessorStateRangeExplain" xml:space="preserve">
<value>某个优化工具降低了 Windows 允许的最小处理器状态上限(通常为 100%)。该设置会卡在这个值,电源计划编辑器无法调高它,CPU 节流优化也可能失败。修复会恢复 Windows 的 100% 上限。</value>
</data>
<data name="ScriptsTitle" xml:space="preserve">
<value>Marius Heier 脚本</value>
</data>
Expand Down
10 changes: 9 additions & 1 deletion Services/TweakCheckService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ private TweakCheckService() { }
private const string Csrss = @"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\csrss.exe\PerfOptions";
private const string Dwm = @"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Dwm";
private const string Mouse = @"HKEY_CURRENT_USER\Control Panel\Mouse";
// Definition of "Minimum processor state": ValueMax is the highest value any plan may use (Windows default 100).
private const string MinProcessorState = Control + @"\Power\PowerSettingsť33251-82be-4824-96c1-47b60b740d00\893dee8e-2bef-41e0-89c6-b55d0929964c";
internal const int DefaultProcessorStateMax = 100;
internal const int DefaultSvcHostSplitThreshold = 0x380000;
internal static readonly string[] BcdTimerValues = ["useplatformclock", "disabledynamictick", "useplatformtick", "tscsyncpolicy"];
private static readonly string[] RawMouseThrottleValues = ["RawMouseThrottleEnabled", "RawMouseThrottleForced", "RawMouseThrottleDuration", "RawMouseThrottleLeeway"];
Expand Down Expand Up @@ -100,7 +103,11 @@ .. DeleteExisting(MemoryManagement, "IoPageLockLimit", "CacheUnmapBehindLengthIn
],
Show(MemoryManagement, "DisablePagingExecutive", "LargeSystemCache", "IoPageLockLimit", "CacheUnmapBehindLengthInMB"), restart: true),
Check("RawMouseThrottle", DeleteExisting(Mouse, RawMouseThrottleValues), Show(Mouse, RawMouseThrottleValues)),
Check("GlobalTimer", DeleteExisting(Kernel, "GlobalTimerResolutionRequests"), Show(Kernel, "GlobalTimerResolutionRequests"), restart: true)
Check("GlobalTimer", DeleteExisting(Kernel, "GlobalTimerResolutionRequests"), Show(Kernel, "GlobalTimerResolutionRequests"), restart: true),
Check("ProcessorStateRange",
Value(MinProcessorState, "ValueMax") is int max && max < DefaultProcessorStateMax
? [new(MinProcessorState, "ValueMax", DefaultProcessorStateMax)] : [],
Show(MinProcessorState, "ValueMax"), restart: true)
};
return checks.Select(check => check with { Managed = ManagedValues(check.Id) }).ToList();
}
Expand All @@ -120,6 +127,7 @@ private static RegistryValueChange[] ManagedValues(string id)
"MemoryManagement" => Values(MemoryManagement, "DisablePagingExecutive", "LargeSystemCache", "IoPageLockLimit", "CacheUnmapBehindLengthInMB"),
"RawMouseThrottle" => Values(Mouse, RawMouseThrottleValues),
"GlobalTimer" => Values(Kernel, "GlobalTimerResolutionRequests"),
"ProcessorStateRange" => Values(MinProcessorState, "ValueMax"),
_ => []
};
}
Expand Down
6 changes: 5 additions & 1 deletion TweakHub.Tests/DevicesLatencyTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,8 @@ public void TweakChecksFlagBadValuesAndBuildRepairs()
[(@"HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management", "FeatureSettingsOverride")] = 3,
[(@"HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management", "LargeSystemCache")] = 1,
[(@"HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control", "SvcHostSplitThresholdInKB")] = 0x380000,
[(@"HKEY_CURRENT_USER\Control Panel\Mouse", "RawMouseThrottleEnabled")] = 1
[(@"HKEY_CURRENT_USER\Control Panel\Mouse", "RawMouseThrottleEnabled")] = 1,
[(@"HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Power\PowerSettingsť33251-82be-4824-96c1-47b60b740d00\893dee8e-2bef-41e0-89c6-b55d0929964c", "ValueMax")] = 0
};
var checks = TweakCheckService.Evaluate(name => values.GetValueOrDefault((name.Key, name.Value)), ["useplatformclock"], "Restricted")
.ToDictionary(check => check.Id);
Expand All @@ -168,10 +169,13 @@ public void TweakChecksFlagBadValuesAndBuildRepairs()
Assert.That(checks["AutoTuning"].RepairScript, Does.Contain("autotuninglevel=normal"));
Assert.That(checks["ThreadDpc"].Status, Is.EqualTo(TweakCheckStatus.Ok));
Assert.That(checks["InputQueues"].Managed, Has.Count.EqualTo(2), "Undo can find backups even after the repair");
Assert.That(checks["ProcessorStateRange"].Repair.Single().Value, Is.EqualTo(100), "A lowered limit goes back to the Windows default");
});

var withoutAdmin = TweakCheckService.Evaluate(_ => null, null, "Normal").Single(check => check.Id == "BcdTimers");
Assert.That(withoutAdmin.Status, Is.EqualTo(TweakCheckStatus.NeedsAdministrator));
Assert.That(TweakCheckService.Evaluate(_ => 100, [], "Normal").Single(check => check.Id == "ProcessorStateRange").Status,
Is.EqualTo(TweakCheckStatus.Ok), "The Windows default is not flagged");
}

[Test]
Expand Down
Loading