Using cpufreq governors. Mode is powersave, dynamic or performance. We're assuming that the available governors are the same for all CPUs. This method changes the cpufreq governor on all CPUs to a certain policy. Definition at line 403 of file powermanage.py. 00403 : """ Using cpufreq governors. Mode is powersave, dynamic or performance. We're assuming that the available governors are the same for all CPUs. This method changes the cpufreq governor on all CPUs to a certain policy.""" if not self.USE_CPUFREQ or not self.hasCpuFreqGovernors: return False if policy == "dynamic": if self.onBattery(): policy = "dynamic/battery" else: policy = "dynamic/ac" for gov in self.cpu_policy[policy]: try: self.cpufreq.SetCPUFreqGovernor(gov) return True except dbus.DBusException: pass return False # no of governor worked def cpuIsOnline(self,cpu):
|