[Xfce4-commits] [panel-plugins/xfce4-cpufreq-plugin] 02/02: Prefer sysfs to Intel pstate in cpufreq_linux_init (Bug #13835)

noreply at xfce.org noreply at xfce.org
Fri May 4 05:12:47 CEST 2018


This is an automated email from the git hooks/post-receive script.

a   n   d   r   e       p   u   s   h   e   d       a       c   o   m   m   i   t       t   o       b   r   a   n   c   h       m   a   s   t   e   r   
   in repository panel-plugins/xfce4-cpufreq-plugin.

commit 2410acb0bb6261f88fb16a0406a32fd6018a947d
Author: Andre Miranda <andre42m at gmail.com>
Date:   Fri May 4 00:12:32 2018 -0300

    Prefer sysfs to Intel pstate in cpufreq_linux_init (Bug #13835)
---
 panel-plugin/xfce4-cpufreq-linux.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/panel-plugin/xfce4-cpufreq-linux.c b/panel-plugin/xfce4-cpufreq-linux.c
index ed61707..1dc0dc4 100644
--- a/panel-plugin/xfce4-cpufreq-linux.c
+++ b/panel-plugin/xfce4-cpufreq-linux.c
@@ -437,7 +437,10 @@ cpufreq_linux_init (void)
 	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
@@ -452,9 +455,7 @@ cpufreq_linux_init (void)
 			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

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list