mirror of
https://github.com/ayufan/steam-deck-tools.git
synced 2025-12-06 07:12:01 +01:00
PowerControl: TDP can only be configured via VangoghGPU
This commit is contained in:
parent
a86f2a49e1
commit
f6b9a77703
|
|
@ -43,6 +43,7 @@ namespace PowerControl.Options
|
|||
PersistOnCreate = false,
|
||||
OptionsValues = () => { return UserOptions().GetOptions(); },
|
||||
ApplyDelay = 1000,
|
||||
Visible = VangoghGPU.IsSupported,
|
||||
ResetValue = () => { return "15W"; },
|
||||
ActiveOption = "?",
|
||||
ApplyValue = (selected) =>
|
||||
|
|
@ -60,41 +61,19 @@ namespace PowerControl.Options
|
|||
var slowTDP = selectedOption.Get(SlowTDP, DefaultSlowTDP);
|
||||
var fastTDP = selectedOption.Get(FastTDP, DefaultFastTDP);
|
||||
|
||||
if (VangoghGPU.IsSupported)
|
||||
return CommonHelpers.Instance.WithGlobalMutex<string>(200, () =>
|
||||
{
|
||||
return CommonHelpers.Instance.WithGlobalMutex<string>(200, () =>
|
||||
using (var sd = VangoghGPU.Open())
|
||||
{
|
||||
using (var sd = VangoghGPU.Open())
|
||||
{
|
||||
if (sd is null)
|
||||
return null;
|
||||
if (sd is null)
|
||||
return null;
|
||||
|
||||
sd.SlowTDP = (uint)slowTDP;
|
||||
sd.FastTDP = (uint)fastTDP;
|
||||
}
|
||||
|
||||
return selected;
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
int stampLimit = slowTDP / 10;
|
||||
|
||||
Process.Start(new ProcessStartInfo()
|
||||
{
|
||||
FileName = "Resources/RyzenAdj/ryzenadj.exe",
|
||||
ArgumentList = {
|
||||
"--stapm-limit=" + stampLimit.ToString(),
|
||||
"--slow-limit=" + slowTDP.ToString(),
|
||||
"--fast-limit=" + fastTDP.ToString(),
|
||||
},
|
||||
WindowStyle = ProcessWindowStyle.Hidden,
|
||||
UseShellExecute = false,
|
||||
CreateNoWindow = true
|
||||
});
|
||||
sd.SlowTDP = (uint)slowTDP;
|
||||
sd.FastTDP = (uint)fastTDP;
|
||||
}
|
||||
|
||||
return selected;
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue