Archive for Linux

Frequency scaling

Processors are often underused: the most common tasks like web surfing, chatting, etc don’t demand much CPU power. Even multimedia applications like photo editing don’t push processors to the limit. Using Gentoo allows you however to use 100% of your processor when updating world for example…

But apart of that, why would you let your processor running at its maximal frequency clock? Configuring your kernel the right way, and performing a simple command make frequency scaling a reality on your computer. The following applies to a “PowerNow!” capable CPU, like an AMD64 for example.

First check for the following options in your kernel config:

Power management options  --->
 CPU Frequency scaling  --->
  [*] CPU Frequency scaling
   <*> 'conservative' cpufreq governor
   <*> AMD Opteron/Athlon64 PowerNow!
   [*] ACPI Processor P-States driver

That should add the support for scaling your processor frequency. If you want your processor to scale its frequency depending on the demand, simply do (as root):

echo ondemand > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor

To put it back at its maximal frequency, no matter the demand, do:

echo performance > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor

To make this permanent (i.e. upon each reboot), simply add this line to the /etc/conf.d/local.start file.

That’s it! Of course, it’s just a part of the whole story, but that’s just enough for me to remember how I shall do it if things screw up…

Music Player

Since the Gentoo team declared xmms being out of support, I tried some music players for replacing it, which I used for many years now.

I first took a look at audacious, which is a xmms look-alike player written in Gtk, but I had some problems with sticky title bars and I soon abandoned it.

Then I gave Amarok a try, and after some tweaking, it rapidly became my new music player of choice. It of course plays mp3, ogg, wav, pls and m3u (stream radios), and CD’s, and features a great playlist editor, which xmms lacks. Aside of that, it has some nice features like On Screen Display (OSD), covers management, lyrics search tool, etc.

Amarok

I was reluctant to use any other player than xmms because I heavily used the xmms-shell program to command the player: a small applet on top of my screen allowed me to rapidly pause, switch songs and change the volume. This has now been replaced by the amarok global shortcut capability: you can configure any key combination to trigger the most common actions: play, pause, fast forward, next track, volume, … and that not only within amarok (hence the word global 😉 ).

Now I just have to arrange all my mp3 tags in order to use the playlist functionality the most efficiently :|…Tagtool will be my best friend!

P2P Software

My P2P program of choice has always been the LimeWire Gnutella client since napster and friends were disabled. But LimeWire apparently intends to implement DRM filtering technology, that’s why some folks have created a fork named FrostWire which will always remain free as in both free beer and free speech.

Until I modified my ~/.frostwire/gnutella.net file like this, I wasn’t able to connect to the gnutella network. Now it’s just working great! I’m using it on Ubuntu, and I will do so on Gentoo as soon as it is put in portage.