GNOME CPU Frequency Scaling Applet

Today I finally took the time to get the gnome frequency scaling applet working for my machine.  I have a Shuttle sd11g5 that I run for my desktop machine.  It is a silent PC that has a 2Ghz Pentium M CPU.  The Pentium M has some great power saving features and the gnome CPU Frequency Applet should let you control it.

The first thing I had to do was enable the userspace governor in the kernel.  The kernel allows for multiple methods for controlling the CPU frequency.  I had previously been using the “performance” governor which simply sets the CPU to the maximum speed.  That generally makes sense for a desktop machine that is always plugged in but I wanted to be able to under clock the machine for when I was away.   Of course I had to enable the speedstep modules in the kernel as well.

Once the kernel setup was out of the way I could change the CPU frequency via cpufreq-set which is part of the debian package ‘cpufrequtils.’  I could only do that as root which didn’t help me much since my goal was to change the clock speed from the gnome panel.  I set the binary as suid root but still the CPU frequency applet wouldn’t let me change the clock speed.  Finally I started reading the source code for the applet and noticed that it came with its own CPU frequency setting tool.  I changed THAT binary to suid root and I could finally modify the frequency from the gnome panel.

I just took a peak through the source code for the utility that sets the CPU frequency.  It’s just doing some simple reading and writing of file in either /proc or /sys.  It might be possible to change the group on some of those files to allow members of a particular group to change the CPU frequency.  That’s typically how Debian does this sort of thing but it’s not currently set that way.  It might not be possible anyhow.

Advertisements
This entry was posted in Geek, Tips. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s