Skip to content

Commit

Permalink
Add Windows power mode control
Browse files Browse the repository at this point in the history
  • Loading branch information
JamesCJ60 committed Aug 13, 2024
1 parent 4cfb8e2 commit 02761b2
Show file tree
Hide file tree
Showing 12 changed files with 109 additions and 40 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -208,15 +208,15 @@
{
"Name" = "8:Microsoft Visual Studio"
"ProductName" = "8:Universal x86 Tuning Utility"
"ProductCode" = "8:{46B5637C-C030-4589-B644-42558B303E53}"
"PackageCode" = "8:{7CA71618-5CC8-487B-98CA-0D99F21D685A}"
"ProductCode" = "8:{7F2C82FE-3378-4A3D-930A-2D54383F208C}"
"PackageCode" = "8:{C5FDB19F-F4CB-41C4-89ED-16502DC306E8}"
"UpgradeCode" = "8:{300E743A-4C69-440D-9425-14C446AB2658}"
"AspNetVersion" = "8:"
"RestartWWWService" = "11:FALSE"
"RemovePreviousVersions" = "11:TRUE"
"DetectNewerInstalledVersion" = "11:TRUE"
"InstallAllUsers" = "11:FALSE"
"ProductVersion" = "8:2.2.13"
"ProductVersion" = "8:2.2.15"
"Manufacturer" = "8:JamesCJ60"
"ARPHELPTELEPHONE" = "8:"
"ARPHELPLINK" = "8:"
Expand Down
2 changes: 1 addition & 1 deletion Universal x86 Tuning Utility/App.config
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@
<value>True</value>
</setting>
<setting name="AdapterIdx" serializeAs="String">
<value>1</value>
<value>0</value>
</setting>
<setting name="CropTitleBarOfUWP" serializeAs="String">
<value>True</value>
Expand Down
2 changes: 1 addition & 1 deletion Universal x86 Tuning Utility/App.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public static T GetService<T>()
return _host.Services.GetService(typeof(T)) as T;
}

public static string version = "2.2.13";
public static string version = "2.2.15";
private Mutex mutex;
private const string MutexName = "UniversalX86TuningUtility";

Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Universal x86 Tuning Utility/Properties/Settings.settings
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@
<Value Profile="(Default)">True</Value>
</Setting>
<Setting Name="AdapterIdx" Type="System.Int32" Scope="User">
<Value Profile="(Default)">1</Value>
<Value Profile="(Default)">0</Value>
</Setting>
<Setting Name="CropTitleBarOfUWP" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">True</Value>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ namespace Universal_x86_Tuning_Utility.Scripts.GPUs.NVIDIA
{
internal class NvTuning
{
public const int MinCoreOffset = -900, MinMemoryOffset = -900, MaxCoreOffset = 2000, MaxMemoryOffset = 2000, MinClockLimit = 400, MaxClockLimit = 4000;
public const int MinCoreOffset = -900, MinMemoryOffset = -900, MaxCoreOffset = 4000, MaxMemoryOffset = 4000, MinClockLimit = 400, MaxClockLimit = 4000;

public static int SetClocks(int core, int memory, int voltage = 0)
{
Expand Down
1 change: 1 addition & 0 deletions Universal x86 Tuning Utility/Scripts/RyzenAdj_To_UXTU.cs
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ await Task.Run(() =>
else if (ryzenAdjCommandString == "intel-volt-sa") Intel_Management.changeVoltageOffset(3, ryzenAdjCommandValue);
else if (ryzenAdjCommandString == "intel-bal-cpu") Intel_Management.changePowerBalance(0, ryzenAdjCommandValue);
else if (ryzenAdjCommandString == "intel-bal-gpu") Intel_Management.changePowerBalance(1, ryzenAdjCommandValue);
else if (ryzenAdjCommandString == "intel-gpu") Intel_Management.changeGpuClock(ryzenAdjCommandValue);
//else if (ryzenAdjCommandString == "power-limit-1") TDP_Management.changePL1(ryzenAdjCommandValue);
//else if (ryzenAdjCommandString == "power-limit-2") TDP_Management.changePL2(ryzenAdjCommandValue);
}
Expand Down
6 changes: 4 additions & 2 deletions Universal x86 Tuning Utility/Services/PresetManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ public class Preset
public int IntelVoltSA { get; set; }

public bool IsIntelBal { get; set; }
public int IntelBalCPU { get; set; }
public int IntelBalGPU { get; set; }
public int IntelBalCPU { get; set; } = 9;
public int IntelBalGPU { get; set; } = 13;

public int rsr { get; set; }
public int boost { get; set; }
Expand Down Expand Up @@ -164,6 +164,8 @@ public class Preset

public int displayHz { get; set; }

public int powerMode { get; set; }

public bool isMag { get; set; }
public bool isVsync { get; set; }
public bool isRecap { get; set; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@
<UseWindowsForms>True</UseWindowsForms>
<SignAssembly>False</SignAssembly>
<Copyright>© UXTU Team 2020 - 2024</Copyright>
<AssemblyVersion>2.2.13</AssemblyVersion>
<FileVersion>2.2.13</FileVersion>
<AssemblyVersion>2.2.15</AssemblyVersion>
<FileVersion>2.2.15</FileVersion>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<SupportedOSPlatformVersion>10.0.22621.0</SupportedOSPlatformVersion>
<Version>2.2.12</Version>
<Version>2.2.15</Version>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
Expand Down
47 changes: 43 additions & 4 deletions Universal x86 Tuning Utility/Views/Pages/CustomPresets.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -539,11 +539,11 @@
<TextBlock
FontSize="14"
FontWeight="Medium"
Text="APU iGPU Tuning" />
Text="iGPU Tuning" />
<TextBlock
FontSize="12"
Foreground="{DynamicResource TextFillColorTertiaryBrush}"
Text="Provides the ability to set a static iGPU clock on select APUs."/>
Text="Provides the ability to set a static iGPU clock on select APUs/CPUs."/>
</StackPanel>
</Grid>
</ui:CardExpander.Header>
Expand All @@ -552,7 +552,7 @@
<StackPanel Margin="0,-8,0,0">
<StackPanel Orientation="Horizontal">
<TextBlock FontWeight="DemiBold" FontSize="13" Foreground="{DynamicResource TextFillColorPrimaryBrush}">iGPU Clock (MHz)</TextBlock>
<ui:SymbolIcon Symbol="Info20" Margin="6,0,0,-2" Foreground="{DynamicResource TextFillColorPrimaryBrush}" ToolTip="Controls the static clock speed of the iGPU, requires either a system reboot or system sleep to revert back to normal." VerticalAlignment="Bottom" />
<ui:SymbolIcon Symbol="Info20" Margin="6,0,0,-2" Foreground="{DynamicResource TextFillColorPrimaryBrush}" ToolTip="Controls the static clock speed of the iGPU, requires either a system reboot or system sleep to revert back to normal on AMD systems." VerticalAlignment="Bottom" />
</StackPanel>

<Grid Margin="0,8,0,0">
Expand Down Expand Up @@ -1083,7 +1083,7 @@ VerticalAlignment="Center" SelectedIndex="0" MinWidth="138" Name="cbxResScale" H
<ui:CardExpander Name="sdIntelBal"
IsEnabled="True"
IsExpanded="False"
Icon="Pulse20" Margin="0,8,15,0">
Icon="Scales20" Margin="0,8,15,0">
<ui:CardExpander.Header>
<Grid>
<Grid.ColumnDefinitions>
Expand Down Expand Up @@ -1783,6 +1783,45 @@ Icon="Desktop20" Margin="0,8,15,0">
</Grid>
</ui:CardControl.Header>
</ui:CardControl>
<ui:CardControl Name="sdPowerMode"
IsEnabled="True"
Icon="Power20" Margin="0,8,15,0">
<ui:CardControl.Header>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<StackPanel Grid.Column="0" VerticalAlignment="Center">
<TextBlock
FontSize="14"
FontWeight="Medium"
Text="Windows Power Mode" />
<TextBlock
FontSize="12"
Foreground="{DynamicResource TextFillColorTertiaryBrush}"
Text="Provides the ability to change the Windows power mode from a preset."/>
</StackPanel>
<ComboBox
Grid.Column="1"
VerticalAlignment="Center" SelectedIndex="0" MinWidth="164" Name="cbxPowerMode" Height="37">
<ComboBoxItem>
System Controlled
</ComboBoxItem>
<ComboBoxItem>
Best Power Effciency
</ComboBoxItem>
<ComboBoxItem>
Balanced
</ComboBoxItem>
<ComboBoxItem>
Best Performance
</ComboBoxItem>
</ComboBox>

</Grid>
</ui:CardControl.Header>
</ui:CardControl>
<ui:CardControl Name="sdAsusPower"
IsEnabled="True"
Icon="Power20" Margin="0,8,15,0">
Expand Down
Loading

0 comments on commit 02761b2

Please sign in to comment.