--- xfce4-cpufreq-plugin-1.1.3/panel-plugin/xfce4-cpufreq-linux.c 2014-12-22 18:50:31.000000000 +0100 +++ xfce4-cpufreq-plugin-1.1.3.new/panel-plugin/xfce4-cpufreq-linux.c 2017-09-06 21:35:33.051592344 +0200 @@ -417,18 +417,18 @@ { gint i; - if (g_file_test ("/sys/devices/system/cpu/intel_pstate", G_FILE_TEST_EXISTS)) + if (g_file_test ("/sys/devices/system/cpu/cpu0/cpufreq", + G_FILE_TEST_EXISTS)) { - /* read current cpu frequencies from /proc/cpuinfo */ - cpufreq_cpu_read_procfs_cpuinfo (); - - /* read current scaling governor from sysfs */ for (i = 0; i < cpuFreq->cpus->len; i++) cpufreq_cpu_read_sysfs_current (i); } - else if (g_file_test ("/sys/devices/system/cpu/cpu0/cpufreq", - G_FILE_TEST_EXISTS)) + else if (g_file_test ("/sys/devices/system/cpu/intel_pstate", G_FILE_TEST_EXISTS)) { + /* read current cpu frequencies from /proc/cpuinfo */ + cpufreq_cpu_read_procfs_cpuinfo (); + + /* read current scaling governor from sysfs */ for (i = 0; i < cpuFreq->cpus->len; i++) cpufreq_cpu_read_sysfs_current (i); } @@ -458,7 +458,10 @@ if (cpuFreq->cpus == NULL) return FALSE; - if (g_file_test ("/sys/devices/system/cpu/intel_pstate", G_FILE_TEST_EXISTS)) { + if (g_file_test ("/sys/devices/system/cpu/cpu0/cpufreq", + G_FILE_TEST_EXISTS)) + return cpufreq_cpu_read_sysfs (); + else if (g_file_test ("/sys/devices/system/cpu/intel_pstate", G_FILE_TEST_EXISTS)) { gboolean ret = cpufreq_cpu_intel_pstate_read (); /* Tools like i7z show the current real frequency using the @@ -473,9 +476,7 @@ cpuFreq->options->show_warning = FALSE; } return ret; - } else if (g_file_test ("/sys/devices/system/cpu/cpu0/cpufreq", - G_FILE_TEST_EXISTS)) - return cpufreq_cpu_read_sysfs (); + } else if (g_file_test ("/proc/cpufreq", G_FILE_TEST_EXISTS)) return cpufreq_cpu_read_procfs (); else