[Pm-utils] fix cpufreq governor setting on dualcore machines
Stefan Seyfried
seife at suse.de
Tue Mar 13 10:23:35 PDT 2007
Hi,
https://bugzilla.novell.com/show_bug.cgi?id=227854#c13 sums it up nicely.
On dualcore cpus, where the governor setting affects more than one core,
the cpufreq policy will be set to performance after resume.
fix:
Index: pm/hooks/94cpufreq
===================================================================
RCS file: /cvs/pm-utils/pm-utils/pm/hooks/94cpufreq,v
retrieving revision 1.3
diff -u -p -r1.3 94cpufreq
--- pm/hooks/94cpufreq 6 Mar 2007 19:55:31 -0000 1.3
+++ pm/hooks/94cpufreq 13 Mar 2007 17:20:39 -0000
@@ -11,7 +11,12 @@ hibernate_cpufreq()
[ -f $x/cpufreq/scaling_governor ] || continue
savestate ${x}_governor $(cat $x/cpufreq/scaling_governor)
- sh -c "echo userspace > $x/cpufreq/scaling_governor" >/dev/null 2>&1
+ done
+ for x in $(ls -1) ; do
+ [ -d $x/cpufreq ] || continue
+ [ -f $x/cpufreq/scaling_governor ] || continue
+
+ echo performance > $x/cpufreq/scaling_governor 2>/dev/null
done
popd >/dev/null 2>&1
}
--
Stefan Seyfried
"Any ideas, John?"
"Well, surrounding them's out."
More information about the Pm-utils
mailing list