Added Power Levels reading support (pp_od_clk_voltage)

This commit is contained in:
Ilya Zlobintsev
2020-11-20 17:29:38 +02:00
parent e58663f7a9
commit d66c7dca69
3 changed files with 150 additions and 10 deletions

View File

@@ -362,11 +362,18 @@ fn set_info(builder: &Builder, d: DaemonConnection, gpu_id: u32) {
gpu_power_adjustment.set_upper(power_cap_max as f64);
gpu_power_adjustment.set_value(power_cap as f64);
power_profile_select_comboboxtext.set_active(match &gpu_info.power_profile {
PowerProfile::Auto => Some(0),
PowerProfile::High => Some(1),
PowerProfile::Low => Some(2),
});
match &gpu_info.power_profile {
Some(power_profile) => {
power_profile_select_comboboxtext.set_active(match power_profile {
PowerProfile::Auto => Some(0),
PowerProfile::High => Some(1),
PowerProfile::Low => Some(2),
});
},
None => {
power_profile_select_comboboxtext.set_sensitive(false);
}
}
let fan_control = d.get_fan_control(gpu_id);

View File

@@ -818,8 +818,8 @@
<object class="GtkLabel" id="power_profile_description_label">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="margin-start">5</property>
<property name="margin-end">5</property>
<property name="margin-start">10</property>
<property name="margin-end">10</property>
<property name="label" translatable="yes">Description of the selected power profile</property>
</object>
<packing>
@@ -847,6 +847,32 @@
<property name="position">4</property>
</packing>
</child>
<child>
<object class="GtkFrame">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label-xalign">0.10000000149011612</property>
<property name="shadow-type">none</property>
<child>
<placeholder/>
</child>
<child type="label">
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Power Levels</property>
<attributes>
<attribute name="weight" value="semibold"/>
</attributes>
</object>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">5</property>
</packing>
</child>
</object>
<packing>
<property name="position">1</property>