[Xfce4-commits] <xfce4-cpufreq-plugin:master> Fix crash when the machine uses the intel pstate driver.

Harald Judt noreply at xfce.org
Sun Aug 18 11:32:08 CEST 2013


Updating branch refs/heads/master
         to f41f66ba8a9b7e9496d07a862f1ddad72ab10e8c (commit)
       from f624eb1d06fb0375c4fbc29298965d7667519a1f (commit)

commit f41f66ba8a9b7e9496d07a862f1ddad72ab10e8c
Author: Harald Judt <h.judt at gmx.at>
Date:   Sat Aug 10 12:27:28 2013 +0200

    Fix crash when the machine uses the intel pstate driver.
    
    At the moment, the plugin does not support the intel pstate driver and will
    crash trying to access the non-existant current frequency file in sysfs.
    Disable cpufreq features until proper pstate support has been implemented.

 panel-plugin/xfce4-cpufreq-linux.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/panel-plugin/xfce4-cpufreq-linux.c b/panel-plugin/xfce4-cpufreq-linux.c
index 00c6dd4..21bc040 100644
--- a/panel-plugin/xfce4-cpufreq-linux.c
+++ b/panel-plugin/xfce4-cpufreq-linux.c
@@ -402,7 +402,8 @@ cpufreq_linux_init (void)
 	if (cpuFreq->cpus == NULL)
 		return FALSE;
 
-	if (g_file_test ("/sys/devices/system/cpu/cpu0/cpufreq", G_FILE_TEST_EXISTS))
+	if (g_file_test ("/sys/devices/system/cpu/cpu0/cpufreq", G_FILE_TEST_EXISTS) &&
+		!g_file_test ("/sys/devices/system/cpu/intel_pstate", 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 ();


More information about the Xfce4-commits mailing list