Power management patches for Radeon devices were added to the mainline Linux kernel earlier this year (since 2.6.35???). These features can provide dynamic voltage and frequency scaling when running under KMS. This, of course only applies to the open source radeon driver and does not work on the fglrx driver from AMD/ATI. Currently by default the power management profile is set to ‘default’ which does not automatically switch power states or do any frequency scaling.

The following are two settings which can be used to set the power management state on radeon cards.


The power_method option allows you to switch between the profile or dynpm method. The power_profile offers four options: default, auto, low, high.

The default settings are profile and default which uses the default clocks and does not change the power state.  dynpm is the most aggressive power management state however it only works on a single head configuration and may result in display flickering. I recommend setting the power_method to profile and the power_profile to auto. This will dynamically scale the GPU clocks down when the system is running on battery power.

On Ubuntu 10.10 the power management profile can be set by running the following commands.

sudo -i
echo auto > /sys/class/drm/card0/device/power_profile

To set this configuration when the system boots add the second command to the /etc/rc.local file.

The current GPU clocks can be checked by running:

cat /sys/kernel/debug/dri/0/radeon_pm_info

Here are the results from my laptop using the auto profile.

When running on AC power:
default engine clock: 480000 kHz
current engine clock: 479250 kHz
default memory clock: 450000 kHz
current memory clock: 450000 kHz
PCIE lanes: 0

When running on battery:
default engine clock: 480000 kHz
current engine clock: 128250 kHz
default memory clock: 450000 kHz
current memory clock: 135000 kHz
PCIE lanes: 0



Somewhere with in the past few weeks my swap partition disappeared. At first I didn’t even notice it stopped working. The first result of this was that the hibernate option also disappeared. I thought it was just some setting that went wrong somewhere with all the kernels I had been fooling around with. I finally realized the swap partition was gone when htop showed a 0/0MB swap size.

Under gnome disk utility the swap partition was showing up as an unknown partition. The solution was to simply select the partition in disk utility and format the partition as Swap Space. Since the swap partition was reformatted the UUID has changed so /etc/fstab must be updated. The UUID of the swap parition can be found by doing:

ls -al /dev/disk/by-uuid/

This will list the disks and partitions on your system according to their UUIDs and the device name their equivalent device name (sda1, sdc3, etc). Here’s what it looks like on my system.

lrwxrwxrwx 1 root root  10 2010-11-22 17:18 91eef435-49c4-4035-8785-24811fd4816e -> ../../sda5
lrwxrwxrwx 1 root root  10 2010-11-22 17:18 A6FCDDA5FCDD6FD3 -> ../../sda2
lrwxrwxrwx 1 root root  10 2010-11-22 17:18 d69ce970-9aed-4bb1-a493-75ce35d76307 -> ../../sda6
lrwxrwxrwx 1 root root  10 2010-11-22 17:18 F680D2F180D2B6F9 -> ../../sda1

The swap partition on my system according to gnome disk utility is /dev/sda6. So I copy the UUID associated with sda6 (d69ce970-9aed-4bb1-a493-75ce35d76307) and update /etc/fstab with the new UUID.

In the end the swap entry in my fstab looks like this:

UUID=d69ce970-9aed-4bb1-a493-75ce35d76307 none            swap    sw              0       0

I have written the gstreamer-delta plugin which applies sharpening to an audio stream. Foobar users will know this as the Noise Sharpening plugin (a.k.a. foo_dsp_delta). One of my favourite dsp plugins from the Windows world which was sadly missing from the land of Linux. I set out looking for a way to insert a dsp plugin into Linux audio players such as Rhythmbox. Luckily the task was much easier than I had expected for players which use the Gstreamer backend (e.g. Rhythmbox, Banshee).

Thanks to this post on the Ubuntu Forums I found that there is a gconf key which Gstreamer based players use to determine which audio sink to connect to. It turns out that you can modify the key with a partial pipeline. Elements can be inserted before the audio sink in effect creating a custom dsp chain. The gconf key on Ubuntu 10.10 is /system/gstreamer/0.10/default/musicaudiosink. Now the default audio sink is autoaudiosink. To add plugins to the pipeline simply add the plugin id and it’s options prior to the audio sink. Each plugin is separated by a “!“.

For example:

delta gain=120 !  autoaudiosink

The above setting will insert the audio sharpening plugin before the audio output plugin in the Gstreamer music playback with a gain setting of 120%.

The plugin is hosted on my PPA:

If the plugin is working then something similar to the following should be shown in the terminal when a Gstreamer based audio player begins playing music. The values may be different depending on your audio file/output format.

Caps negotiation succeeded with 1 is_int @ 2 channels, endianness 1, width 32, depth 32, sign 1

This plugin supports mono and stereo (un)signed int and floating point inputs to maximize compatibility with audio streams (Although I have not tested this to an great extent). The gain parameter works much like the setting on the Foobar plugin. The accepted values are from 0-200%, with the default at 100%. There is a debug parameter (silent) which defaults to true. Set it to false to print some useless debug info (mostly used to check whether the plugin/dsp chain is actually working).

There is another plugin which I use is called the crossfeed plugin. This is a Bauer stereophonic-to-binaural DSP by lazka which can be obtained here. A stereo mix is usually designed for listening from speakers. The sound from each channel is meant to reach both ears which does not happen when listening on headphones. This is plugin mixes the right and left channels for headphone listeners to simulate that.

Finally, here is what my gconf key looks like:

delta gain=120 ! crossfeed preset=1 ! autoaudiosink


There are a number of other plugins for Gstreamer included by default a lot of which have nothing to do with audio processing. Many that do don’t seem to be very useful for listening to music. At least none that I have found yet from looking briefly through the list.  There are a few limiter plugins which some might find useful however they don’t seem to be immediately usable since some only support 1 channel pads or float data (it seems like most audio players prefer to output in int format).