Open bjonnh opened 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.
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"])
});
};
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