juxuanu / cpupower-governors

Enables the ability to swap between kernel governors for the CPU useful for laptops.
GNU General Public License v2.0
7 stars 2 forks source link

Keep ondemand and performance #3

Open bjonnh opened 4 years ago

bjonnh commented 4 years ago

Hey, I would keep all the available governors.

There are some usecases where performance and ondemand are still better.

See the selenium benchmarks here: https://www.phoronix.com/scan.php?page=article&item=linux59-ryzen3900xt-cpufreq&num=5

juxuanu commented 4 years ago

Hey, I'm thinking that maybe I should add a preferences window where you can choose which ones you want available. What do you think? I've never made this, I'll start reading about it.

khartahk commented 3 years ago

Another thing would be great. If intel_pstate driver is in use only powersave and performance governors are available. Could you add something to check for that? For now I've just added an if to not show Balanced menu like so:

const GLib = imports.gi.GLib;
let governor_driver = GLib.spawn_command_line_sync("cpupower frequency-info | grep intel_pstate")[1].toString();
if (!governor_driver.search("driver: intel_pstate")){
     let itemSchedutil = new PopupMenu.PopupMenuItem(_("Balanced"));
     Main.panel.statusArea.aggregateMenu._power._item.menu.addMenuItem(itemSchedutil);
     itemSchedutil.connect('activate', () => {
          Util.spawn(['/bin/bash', '-c', "pkexec cpupower frequency-set -g schedutil"])
     });
};