Reduce CPU usage when accessing i2c smbus devices on windows (AMD)
This commit is contained in:
parent
3e45e4201d
commit
d90ea6b843
5 changed files with 170 additions and 82 deletions
|
|
@ -82,6 +82,21 @@ OpenRGBSettingsPage::OpenRGBSettingsPage(QWidget *parent) :
|
|||
ui->CheckboxLogConsole->setChecked(log_manager_settings["log_console"]);
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------*\
|
||||
| Load drivers settings (Windows only) |
|
||||
\*---------------------------------------------------------*/
|
||||
#ifdef _WIN32
|
||||
json drivers_settings = ResourceManager::get()->GetSettingsManager()->GetSettings("Drivers");
|
||||
|
||||
if(drivers_settings.contains("amd_smbus_reduce_cpu"))
|
||||
{
|
||||
ui->CheckboxAMDSMBusReduceCPU->setChecked(drivers_settings["amd_smbus_reduce_cpu"]);
|
||||
}
|
||||
#else
|
||||
ui->DriversSettingsLabel->hide();
|
||||
ui->CheckboxAMDSMBusReduceCPU->hide();
|
||||
#endif
|
||||
|
||||
/*---------------------------------------------------------*\
|
||||
| Load AutoStart settings |
|
||||
\*---------------------------------------------------------*/
|
||||
|
|
@ -530,3 +545,11 @@ void Ui::OpenRGBSettingsPage::on_CheckboxLogConsole_clicked()
|
|||
SaveSettings();
|
||||
}
|
||||
|
||||
void Ui::OpenRGBSettingsPage::on_CheckboxAMDSMBusReduceCPU_clicked()
|
||||
{
|
||||
json drivers_settings = ResourceManager::get()->GetSettingsManager()->GetSettings("Drivers");
|
||||
drivers_settings["amd_smbus_reduce_cpu"] = ui->CheckboxAMDSMBusReduceCPU->isChecked();
|
||||
ResourceManager::get()->GetSettingsManager()->SetSettings("Drivers", drivers_settings);
|
||||
SaveSettings();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -50,6 +50,7 @@ private slots:
|
|||
void on_CheckboxRunZoneChecks_clicked();
|
||||
void on_OpenSettingsFolderButton_clicked();
|
||||
void on_CheckboxLogConsole_clicked();
|
||||
void on_CheckboxAMDSMBusReduceCPU_clicked();
|
||||
};
|
||||
|
||||
#endif // OPENRGBSETTINGSPAGE_H
|
||||
|
|
|
|||
|
|
@ -24,41 +24,12 @@
|
|||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>398</width>
|
||||
<height>554</height>
|
||||
<width>418</width>
|
||||
<height>464</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_3">
|
||||
<item row="22" column="0">
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::MinimumExpanding</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="20" column="1">
|
||||
<widget class="QComboBox" name="ComboBoxAutoStartProfile"/>
|
||||
</item>
|
||||
<item row="5" column="0">
|
||||
<widget class="QCheckBox" name="CheckboxLoadGeometry">
|
||||
<property name="text">
|
||||
<string>Load Window Geometry</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="QComboBox" name="ComboBoxTheme"/>
|
||||
</item>
|
||||
<item row="17" column="1">
|
||||
<item row="19" column="1">
|
||||
<widget class="QLineEdit" name="TextServerPort">
|
||||
<property name="inputMask">
|
||||
<string>90000</string>
|
||||
|
|
@ -71,33 +42,40 @@
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="0">
|
||||
<widget class="QCheckBox" name="CheckboxRunZoneChecks">
|
||||
<item row="20" column="0">
|
||||
<widget class="QCheckBox" name="CheckboxAutoStartClient">
|
||||
<property name="text">
|
||||
<string>Run zone checks on rescan</string>
|
||||
<string>Start Client</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="16" column="0">
|
||||
<widget class="QCheckBox" name="CheckboxAutoStartServer">
|
||||
<item row="10" column="0">
|
||||
<widget class="QLabel" name="DriversSettingsLabel">
|
||||
<property name="text">
|
||||
<string>Start Server</string>
|
||||
<string>Drivers Settings</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="18" column="1">
|
||||
<item row="23" column="0">
|
||||
<widget class="QLabel" name="AutoStartStatusLabel">
|
||||
<property name="text">
|
||||
<string>Start at Login Status</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="20" column="1">
|
||||
<widget class="QLineEdit" name="TextClientHost"/>
|
||||
</item>
|
||||
<item row="19" column="1">
|
||||
<widget class="QLineEdit" name="TextCustomArgs"/>
|
||||
</item>
|
||||
<item row="15" column="0">
|
||||
<widget class="QCheckBox" name="CheckboxAutoStartMinimized">
|
||||
<item row="19" column="0">
|
||||
<widget class="QCheckBox" name="CheckboxAutoStartSetServerPort">
|
||||
<property name="text">
|
||||
<string>Start Minimized</string>
|
||||
<string>Set Server Port</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="21" column="1">
|
||||
<widget class="QLineEdit" name="TextCustomArgs"/>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="UserInterfaceSettingsLabel">
|
||||
<property name="text">
|
||||
|
|
@ -105,13 +83,6 @@
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="11" column="0">
|
||||
<widget class="QCheckBox" name="CheckboxAutoStart">
|
||||
<property name="text">
|
||||
<string>Start At Login</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0">
|
||||
<widget class="QCheckBox" name="CheckboxMinimizeOnClose">
|
||||
<property name="text">
|
||||
|
|
@ -126,42 +97,35 @@
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="18" column="0">
|
||||
<widget class="QCheckBox" name="CheckboxAutoStartClient">
|
||||
<item row="13" column="0">
|
||||
<widget class="QCheckBox" name="CheckboxAutoStart">
|
||||
<property name="text">
|
||||
<string>Start Client</string>
|
||||
<string>Start At Login</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="20" column="0">
|
||||
<item row="22" column="0">
|
||||
<widget class="QCheckBox" name="CheckboxAutoStartProfile">
|
||||
<property name="text">
|
||||
<string>Load Profile</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="17" column="0">
|
||||
<widget class="QCheckBox" name="CheckboxAutoStartSetServerPort">
|
||||
<item row="18" column="0">
|
||||
<widget class="QCheckBox" name="CheckboxAutoStartServer">
|
||||
<property name="text">
|
||||
<string>Set Server Port</string>
|
||||
<string>Start Server</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="ThemeLabel">
|
||||
<item row="12" column="0">
|
||||
<widget class="QLabel" name="AutoStartLabel">
|
||||
<property name="text">
|
||||
<string>Theme (restart required)</string>
|
||||
<string>Start At Login Settings:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="9" column="0">
|
||||
<widget class="QCheckBox" name="CheckboxLogConsole">
|
||||
<property name="text">
|
||||
<string>Enable Log Console (restart required)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="19" column="0">
|
||||
<item row="21" column="0">
|
||||
<widget class="QCheckBox" name="CheckboxAutoStartCustom">
|
||||
<property name="text">
|
||||
<string>Custom Arguments</string>
|
||||
|
|
@ -175,17 +139,67 @@
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="21" column="0">
|
||||
<widget class="QLabel" name="AutoStartStatusLabel">
|
||||
<item row="17" column="0">
|
||||
<widget class="QCheckBox" name="CheckboxAutoStartMinimized">
|
||||
<property name="text">
|
||||
<string>Start at Login Status</string>
|
||||
<string>Start Minimized</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="10" column="0">
|
||||
<widget class="QLabel" name="AutoStartLabel">
|
||||
<item row="24" column="0">
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::MinimumExpanding</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="QComboBox" name="ComboBoxTheme"/>
|
||||
</item>
|
||||
<item row="7" column="0">
|
||||
<widget class="QCheckBox" name="CheckboxRunZoneChecks">
|
||||
<property name="text">
|
||||
<string>Start At Login Settings:</string>
|
||||
<string>Run zone checks on rescan</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="9" column="0">
|
||||
<widget class="QCheckBox" name="CheckboxLogConsole">
|
||||
<property name="text">
|
||||
<string>Enable Log Console (restart required)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="ThemeLabel">
|
||||
<property name="text">
|
||||
<string>Theme (restart required)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="0">
|
||||
<widget class="QCheckBox" name="CheckboxLoadGeometry">
|
||||
<property name="text">
|
||||
<string>Load Window Geometry</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="22" column="1">
|
||||
<widget class="QComboBox" name="ComboBoxAutoStartProfile"/>
|
||||
</item>
|
||||
<item row="11" column="0">
|
||||
<widget class="QCheckBox" name="CheckboxAMDSMBusReduceCPU">
|
||||
<property name="text">
|
||||
<string>AMD SMBus: Reduce CPU Usage (restart required)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue