nodefourtytwo / gnome-shell-extension-cpu-freq

Change CPU frequency from gnome shell
12 stars 11 forks source link

Changed to use cpupower #2

Closed LeCoyote closed 11 years ago

LeCoyote commented 11 years ago

There you go, tested here with gnome-shell 3.4 and works like a charm.

Perhaps you might consider adding a quick info in the readme that this extension reads the current governor from CPU0 and sets it for ALL cpus.

Cheers!

victornoel commented 11 years ago

Hi, since we use cpupower, can't we use it also instead of cpufreq-selector ?

LeCoyote commented 11 years ago

True. That's quite trivial, gimme a few minutes :)

LeCoyote commented 11 years ago

I've checked, the problem is the polkit. I have never looked into it before, so I have to figure out how to grant cpupower privileges from the gnome shell in order to set the governor.

nodefourtytwo commented 11 years ago

That's why I kept cpufreq-selector, it already deals with polkit.

Changing governors isn't supposed to be done by users. I'm all for getting rid of cpufreq-selector, but I did not find a simple way.

nodefourtytwo commented 11 years ago

By the way, I looked at your changes, they seem perfect.

Has every (big) distribution moved to cpupower yet? Maybe I'll try to keep some kind of compatibility with cpufreq for some time.

LeCoyote commented 11 years ago

No idea, I use Arch too. Of course, it would be quite easy to keep cpufreq-info and cpupower compatibility in parallel.

As for cpufreq-selector vs cpupower for governor settings, I have yet to understand how to do something with root/admin privileges in an extension.

LeCoyote commented 11 years ago

Just to clarify, do you want me to work on the cpufreq-info compatibility or do you prefer to do it yourself?

nodefourtytwo commented 11 years ago

If you feel like doing it, go on.

Else I'll do it tonight (in about 10h).

LeCoyote commented 11 years ago

I'll give it a shot then.

victornoel commented 11 years ago

Well, since this is an extension for gnome and that cpufreq-selector is delivered with gnome, maybe the best is to keep using it? I didn't thought about policy questions, I asked if it was possible to support cpupower with polkit there in case it was possible: https://aur.archlinux.org/packages.php?ID=42669

nodefourtytwo commented 11 years ago

I integrated your changes and added the possibility to use wether cpufreq-info or cpupower, thanks!