-
-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix auto reapply for Ryzen APUs
- Loading branch information
Showing
12 changed files
with
221 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,137 @@ | ||
<UserControl x:Class="AATUV3.Pages.Intel.IntelCustomPresets" | ||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | ||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | ||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" | ||
xmlns:local="clr-namespace:AATUV3.Pages" | ||
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit" | ||
mc:Ignorable="d" | ||
d:DesignHeight="500" d:DesignWidth="850"> | ||
<UserControl.Resources> | ||
<Style x:Key="FocusVisual"> | ||
<Setter Property="Control.Template"> | ||
<Setter.Value> | ||
<ControlTemplate> | ||
<Rectangle Margin="2" StrokeDashArray="1 2" Stroke="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" SnapsToDevicePixels="true" StrokeThickness="1"/> | ||
</ControlTemplate> | ||
</Setter.Value> | ||
</Setter> | ||
</Style> | ||
<SolidColorBrush x:Key="Button.Static.Background" Color="#FFDDDDDD"/> | ||
<SolidColorBrush x:Key="Button.Static.Border" Color="#FF707070"/> | ||
<SolidColorBrush x:Key="Button.MouseOver.Background" Color="#FFBEE6FD"/> | ||
<SolidColorBrush x:Key="Button.MouseOver.Border" Color="#FF3C7FB1"/> | ||
<SolidColorBrush x:Key="Button.Pressed.Background" Color="#FFC4E5F6"/> | ||
<SolidColorBrush x:Key="Button.Pressed.Border" Color="#FF2C628B"/> | ||
<SolidColorBrush x:Key="Button.Disabled.Background" Color="#FFF4F4F4"/> | ||
<SolidColorBrush x:Key="Button.Disabled.Border" Color="#FFADB2B5"/> | ||
<SolidColorBrush x:Key="Button.Disabled.Foreground" Color="#FF838383"/> | ||
<Style x:Key="RoundedButtonStyle" TargetType="{x:Type Button}"> | ||
<Setter Property="FocusVisualStyle" Value="{StaticResource FocusVisual}"/> | ||
<Setter Property="Background" Value="{StaticResource Button.Static.Background}"/> | ||
<Setter Property="BorderBrush" Value="{StaticResource Button.Static.Border}"/> | ||
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/> | ||
<Setter Property="BorderThickness" Value="1"/> | ||
<Setter Property="HorizontalContentAlignment" Value="Center"/> | ||
<Setter Property="VerticalContentAlignment" Value="Center"/> | ||
<Setter Property="Padding" Value="1"/> | ||
<Setter Property="Template"> | ||
<Setter.Value> | ||
<ControlTemplate TargetType="{x:Type Button}"> | ||
<Border x:Name="border" Background="{TemplateBinding Background}" CornerRadius="4" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="0" SnapsToDevicePixels="true"> | ||
<ContentPresenter x:Name="contentPresenter" Focusable="False" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/> | ||
</Border> | ||
<ControlTemplate.Triggers> | ||
<Trigger Property="IsDefaulted" Value="true"> | ||
<Setter Property="BorderBrush" TargetName="border" Value="{DynamicResource {x:Static SystemColors.HighlightBrushKey}}"/> | ||
</Trigger> | ||
<Trigger Property="IsMouseOver" Value="true"> | ||
<Setter Property="Background" TargetName="border" Value="{DynamicResource PrimaryBlueColorHover}"/> | ||
<Setter Property="BorderBrush" TargetName="border" Value="{StaticResource Button.MouseOver.Border}"/> | ||
</Trigger> | ||
<Trigger Property="IsPressed" Value="true"> | ||
<Setter Property="Background" TargetName="border" Value="{DynamicResource PrimaryBlueColorDown}"/> | ||
<Setter Property="BorderBrush" TargetName="border" Value="{StaticResource Button.Pressed.Border}"/> | ||
</Trigger> | ||
<Trigger Property="IsEnabled" Value="false"> | ||
<Setter Property="Background" TargetName="border" Value="{StaticResource Button.Disabled.Background}"/> | ||
<Setter Property="BorderBrush" TargetName="border" Value="{StaticResource Button.Disabled.Border}"/> | ||
<Setter Property="TextElement.Foreground" TargetName="contentPresenter" Value="{StaticResource Button.Disabled.Foreground}"/> | ||
</Trigger> | ||
</ControlTemplate.Triggers> | ||
</ControlTemplate> | ||
</Setter.Value> | ||
</Setter> | ||
</Style> | ||
</UserControl.Resources> | ||
<Grid> | ||
<Border CornerRadius="5" Background="{DynamicResource PrimaryBackgroundColor}"> | ||
<DockPanel LastChildFill="True"> | ||
<StackPanel DockPanel.Dock="Bottom" Orientation="Horizontal" HorizontalAlignment="Right" Margin="0,6,4,0"> | ||
<Button Style="{DynamicResource RoundedButtonStyle}" Margin="0,0,3,3" Background="{DynamicResource PrimaryBlueColor}" FontSize="16" Foreground="White" Content="Apply Settings" Height="45" VerticalAlignment="Bottom" HorizontalAlignment="Right" Width="170" Click="Apply_Click"/> | ||
</StackPanel> | ||
<DockPanel LastChildFill="True" Margin="6,0,0,0"> | ||
<ScrollViewer VerticalScrollBarVisibility="Visible" HorizontalScrollBarVisibility="Auto" Margin="0,0,0,0" CanContentScroll="False" Name="rightView" > | ||
<DockPanel LastChildFill="False"> | ||
<StackPanel CanVerticallyScroll="True" DockPanel.Dock="Left"> | ||
<StackPanel Margin="0,6,0,0"> | ||
<CheckBox Name="cbPower" Content="CPU Power Control:" FontSize="17.2" Foreground="White" BorderThickness="0,1,1,1" Padding="4,-4,0,0" Margin="6,0,0,0" /> | ||
<StackPanel Orientation="Horizontal" Margin="20,2,0,0"> | ||
<Label Content="Power Limit 1:" Foreground="White" BorderBrush="White" FontSize="16" Height="auto" Width="180" /> | ||
<xctk:IntegerUpDown Name="nudPL1" Watermark="Enter Integer" Width="95" Height="20" Minimum="0" Value="0" Increment="5"/> | ||
</StackPanel> | ||
<StackPanel Orientation="Horizontal" Margin="20,-5,0,0"> | ||
<Label Content="Power Limit 2:" Foreground="White" BorderBrush="White" FontSize="16" Height="auto" Width="180" /> | ||
<xctk:IntegerUpDown Name="nudPL2" Watermark="Enter Integer" Width="95" Height="20" Minimum="0" Value="0" Increment="5"/> | ||
</StackPanel> | ||
</StackPanel> | ||
|
||
<StackPanel Margin="0,10,0,0"> | ||
<CheckBox Name="cbVoltage" Content="FIVR Voltage Offset Control:" FontSize="17.2" Foreground="White" BorderThickness="0,1,1,1" Padding="4,-4,0,0" Margin="6,0,0,0" /> | ||
<StackPanel Orientation="Horizontal" Margin="20,2,0,0"> | ||
<Label Content="Core Voltage:" Foreground="White" BorderBrush="White" FontSize="16" Height="auto" Width="180" /> | ||
<xctk:IntegerUpDown Name="nudCore" Watermark="Enter Integer" Width="95" Height="20" Minimum="-500" Value="0" Increment="5"/> | ||
</StackPanel> | ||
<StackPanel Orientation="Horizontal" Margin="20,-5,0,0"> | ||
<Label Content="Cache Voltage:" Foreground="White" BorderBrush="White" FontSize="16" Height="auto" Width="180" /> | ||
<xctk:IntegerUpDown Name="nudCache" Watermark="Enter Integer" Width="95" Height="20" Minimum="-500" Value="0" Increment="5"/> | ||
</StackPanel> | ||
<StackPanel Orientation="Horizontal" Margin="20,-5,0,0"> | ||
<Label Content="iGPU Compute Voltage:" Foreground="White" BorderBrush="White" FontSize="16" Height="auto" Width="180"/> | ||
<xctk:IntegerUpDown Name="nudGPU" Watermark="Enter Integer" Width="95" Height="20" Minimum="-500" Value="0" Increment="5"/> | ||
</StackPanel> | ||
<StackPanel Orientation="Horizontal" Margin="20,-5,0,0"> | ||
<Label Content="iGPU Unslice Voltage:" Foreground="White" BorderBrush="White" FontSize="16" Height="auto" Width="180"/> | ||
<xctk:IntegerUpDown Name="nudGPUSlice" Watermark="Enter Integer" Width="95" Height="20" Minimum="-500" Value="0" Increment="5"/> | ||
</StackPanel> | ||
<StackPanel Orientation="Horizontal" Margin="20,-5,0,0"> | ||
<Label Content="Agent Voltage:" Foreground="White" BorderBrush="White" FontSize="16" Height="auto" Width="180" /> | ||
<xctk:IntegerUpDown Name="nudAgent" Watermark="Enter Integer" Width="95" Height="20" Minimum="-500" Value="0" Increment="5"/> | ||
</StackPanel> | ||
|
||
|
||
<TextBlock Foreground="White" FontSize="16" MaxWidth="295" TextWrapping="WrapWithOverflow">Only works on Intel CPUs with unlocked FIVR voltage control.</TextBlock> | ||
<TextBlock Foreground="White" FontSize="16" MaxWidth="295" TextWrapping="WrapWithOverflow" Margin="0,10,0,0">Core and Cache must be synced with older Intel CPUs for voltage offsets to work.</TextBlock> | ||
<TextBlock Foreground="White" FontSize="16" MaxWidth="295" TextWrapping="WrapWithOverflow" Margin="0,55,0,0">More options will be added over time.</TextBlock> | ||
|
||
</StackPanel> | ||
|
||
</StackPanel> | ||
<StackPanel DockPanel.Dock="Right" Margin="0,6,0,0" Visibility="Collapsed"> | ||
<StackPanel Margin="0,6,0,0"> | ||
<Label Content="Radeon iGPU Settings:" FontSize="18" Foreground="White"/> | ||
<StackPanel Orientation="Horizontal" Margin="20,6,0,0"> | ||
<CheckBox Name="cbiGPU" Content="iGPU Clock:" Foreground="White" BorderBrush="White" FontSize="16" Height="18" Width="150" BorderThickness="0,1,1,1" Padding="8,-4,0,0"/> | ||
<xctk:IntegerUpDown Name="nudiGPU" Watermark="Enter Integer" Width="95" Height="20" Minimum="200" Value="1500" Increment="25"/> | ||
</StackPanel> | ||
</StackPanel> | ||
|
||
|
||
</StackPanel> | ||
</DockPanel> | ||
</ScrollViewer> | ||
</DockPanel> | ||
</DockPanel> | ||
</Border> | ||
</Grid> | ||
</UserControl> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
using System.Windows; | ||
using System.Windows.Controls; | ||
using System.Windows.Data; | ||
using System.Windows.Documents; | ||
using System.Windows.Input; | ||
using System.Windows.Media; | ||
using System.Windows.Media.Imaging; | ||
using System.Windows.Navigation; | ||
using System.Windows.Shapes; | ||
using RyzenSMUBackend; | ||
using AATUV3.Scripts.SMU_Backend_Scripts; | ||
using AATUV3.Scripts; | ||
using UXTU.Scripts.Intel; | ||
|
||
namespace AATUV3.Pages.Intel | ||
{ | ||
/// <summary> | ||
/// Interaction logic for HomeMenu.xaml | ||
/// </summary> | ||
public partial class IntelCustomPresets : UserControl | ||
{ | ||
public IntelCustomPresets() | ||
{ | ||
InitializeComponent(); | ||
} | ||
|
||
private async void Apply_Click(object sender, RoutedEventArgs e) | ||
{ | ||
string voltageOffset = $"set --allow-overvolt --commit 0 {(int)nudCore.Value} 1 {(int)nudGPU.Value} 2 {(int)nudCache.Value} 3 {(int)nudAgent.Value} 4 {(int)nudGPUSlice.Value}"; | ||
|
||
if(cbPower.IsChecked == true) await Task.Run(() => ChangeTDP.changeTDP((int)nudPL1.Value, (int)nudPL2.Value)); | ||
|
||
if (cbVoltage.IsChecked == true) BasicExeBackend.ApplySettings("bin//intel//IntelVoltageControl.exe", voltageOffset, true); | ||
} | ||
} | ||
} |
Oops, something went wrong.