PolicyKit and CPUFreq Applet

The frequency selector menu has been implemented for a long time now however, there are still people who don’t know such a feature exists. The problem is that it uses a helper program that has to be installed with the suid bit enabled and it seems that some distros don’t do that by default.

Now that PolicyKit has been proposed as an external GNOME dependency, I’ve decided to give it a try. Yesterday I committed a patch to gnome-applets to use PolicyKit (when it’s available) in the cpufreq applet, so that we don’t need to enable the suid bit in cpufreq-selector anymore. The selector menu will be always available by default now. An authentication dialog, provided by PolicyKit-gnome, will pop up when a non-admin user tries to use the selector menu.

PolicyKit-gnome authentication dialog
PolicyKit-gnome authentication dialog

Don’t worry too much about the annoying popup dialog, since the authentication can be remembered forever, so that if you want, you will only see this popup dialog the first time.

Good bye Java!

After a course having to program in Java for several uni subjects, now I can happily remove java from my system :-))

$ sudo rm -r /opt/java

CPUFreq Applet

In my last post I talked about my cpufreq-applet plans for the current release cycle. Finally I’ve rewritten most of the applet and here are the results so far:

  • Rewrite cpufreq selector popup: done (Fixed bugs #336449, #338557)
  • Use libcpufreq from cpufrequtils: almost done. At the moment libcpufreq is used only in the monitor, but I’ll use it also in the selector soon.


GTK+ is using evince as a previewer in the new printing stuff. Great!. I’m working on a preview mode for evince available through the command line. I’ve added other command line options like –fullscreen and –presentation (fixes bug #317031) too.

There are still some problems. Right now, the printing dialog is closed when you click on preview and evince is launched. Matthias Clasen has proposed to add a print button in evince toolbar so that the user just click on it and the document is sent to the printer. IMO this approach has several problems: first of all, you can’t go back and change the print settings because the print dialog has disappeared. In addition, we have to provide a way to send the print settings from the dialog to evince which is not so easy to do. I think all of these problems could be solved if we don’t close the print dialog when clicking on preview and not allowing to print from evince when it’s in preview mode. What do you think?

GNOME System Tools

The new dbus stuff is in cvs head now!!! I haven’t tried it out yet, but I’ll do it as soon as I finish the exams. Garnacho has open a wiki page where he explains how to get it working.

Work (GSyC/Libresoft)

After some time without hacking because of the exams I’ve been working again on my project (DeTraS). I’m happy with the progress 🙂

Governor Selecting

I’ve just committed the changes which add support to change the governor with the frequency selector. I didn’t know how to exactly add it, so finally I’ve chosen what I think it’s the less bad option.

CPUFreq Applet Preferences dialog
CPUFreq Applet Preferences dialog

Frequencies menu Governors menu Frequencies and governors menu
Frequencies menu Governors menu Frequencies and governors menu

Maybe the names of the governors are technical and difficult to understand for the users

GNOME 2.12 Timeframe

GNOME 2.10 has been successfully released yet, so it’s time now to work on GNOME 2.12. I have some interesting bugs in CPUFreq Applet, lots of work in GNOME System Tools, and other features I’m really interested in.

CPUFreq Applet

  • #168356: A patch for adding FreeBSD support. I have to review it carefully because it’s a long patch.
  • #168550: I can’t reproduce this bug because I haven’t got a HT processor. I’ll try to fix it by using text files simulating two processors.
  • #160031: It’s a zioma bug in fact. He is going to convert the icons to SVG format. I know he is working on a new application icon too :-))
  • #170492: I disagree with this bug, anyway I would like to know other opinions
  • #164581: I think it’s very important to be able to select governors. However I still don’t know how I’m going to do it. The cpufreq-selector drop down menu could become too big with the frequencies and governors.

GNOME System Tools

There are good news here, the GST backends have been accepted in FreeDesktop!.

There is lots of work to do, because they are going to be important changes in the GST architecture.

Garnacho has started coding, but he hasn’t published anything yet, because he is waiting for the migration of the GST backends from the GNOME CVS to the FreeDesktop CVS. Then, he’ll do a special branch for these changes and I’ll be able to start coding too.

Other interesting features

Change the CPU frequency with GNOME CPUFreq Applet

A new GNOME CPUFreq Applet release is available for download

The most important new feature is the frequency selector. Although it’s a feature requested by many people, I’ve not included it before now because of security reasons. By default the frequency selector is installed suid root. But you can avoid it by using –enable-suid=no as a configure script argument or even if you don’t want to install the frequency selector you can use –disable-frequency-selector

The frequency selector is not cpufreq-applet specific, but it’s a generic tool that it can be used by other applications.

GNOME CPUFreq Applet News

Hadess has proposed gnome-cpufreq-applet to be included in Fedora Core. I’m very happy. Ubuntu has already included it. There are many people who asked to me to add to the applet the possibility of allowing the user to change the cpu frequency. The main problem is that it’s needed to be root to do it. So, I’ve finally written a command line tool that will be called by the applet. If the user or his sysadmin wants can set the SUID bit and the applet will be able to change the cpu frequency. I’ve not still finished it, but I hope to have it soon. Here is a screenshot of what I’ve already done.

GNOME CPUFreq Applet Selector
GNOME CPUFreq Applet. Frequency selector

Dominik Brodowski, a kernel cpufreq hacker, emailed me to talk me about the cpufreq governors. Currently the applet only works with userspace, powersave and performance governors. He also sent me a patch. As soon as I finish with the frequency selector feature, I will work on the governors stuff.

I’ve also received a bug from Debian. I have a lot of work in the applet for the next days.