Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nvidia plugin: get cooler RPM instead of percentage #86

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions plugins/nvidia/nvidia-plugin.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
const gchar *plugin_name = "nvidia";

#define THERMAL_SENSOR_TEMP "SensorTemp"
#define THERMAL_COOLER_LEVEL "CoolerLevel"
#define THERMAL_COOLER_SPEED "CoolerSpeed"
#define GPU_CORE_TEMP "CoreTemp"
#define AMBIENT_TEMP "AmbientTemp"

Expand All @@ -58,12 +58,12 @@ static gdouble nvidia_plugin_get_sensor_value(const gchar *path,
NV_CTRL_THERMAL_SENSOR_READING,
&temp);

} else if (g_ascii_strcasecmp(path, THERMAL_COOLER_LEVEL) == 0) {
} else if (g_ascii_strcasecmp(path, THERMAL_COOLER_SPEED) == 0) {
res = XNVCTRLQueryTargetAttribute(nvidia_sensors_dpy,
NV_CTRL_TARGET_TYPE_COOLER,
i,
0,
NV_CTRL_THERMAL_COOLER_LEVEL,
NV_CTRL_THERMAL_COOLER_SPEED,
&temp);

} else if (g_ascii_strcasecmp(path, GPU_CORE_TEMP) == 0) {
Expand Down Expand Up @@ -140,10 +140,10 @@ static GList *nvidia_plugin_init(void) {
&cnt)) {

for (i = 0; i < cnt; i++) {
gchar *id = g_strdup_printf("GPU%d%s", i, THERMAL_COOLER_LEVEL);
gchar *id = g_strdup_printf("GPU%d%s", i, THERMAL_COOLER_SPEED);

sensors_applet_plugin_add_sensor(&sensors,
THERMAL_COOLER_LEVEL,
THERMAL_COOLER_SPEED,
id,
_("GPU"),
FAN_SENSOR,
Expand Down