Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

So recently, the RC's of Linux Kernel 3.11 were released. As you may know, this new kernel comes with dynamic power management for users of the open source Radeon driver. Since I have power management issues with the default kernel of Ubuntu 13.04, I wanted to try this out.

Doe someone know how to enable this new feature after I downloaded and installed the latest kernel RC from the Kernel Testing PPA?

EDIT: More specifically, I am talking about this: http://www.phoronix.com/scan.php?page=news_item&px=MTM5NjE

share|improve this question
    
3.11 has not been released yet, and Ubuntu already has an official mirror? That's new. Do you, perhaps, mean the kernel testing PPA? –  mikewhatever Jul 26 '13 at 7:09
    
Yes, that's the one I mean! I downloaded the latest RC (rc2 at the time of writing) from there. –  Gladen Jul 26 '13 at 7:24
1  
@mikewhatever: edited the question to make it more clear. In my opinion this question is not off-topic at all, I am talking about installing a new kernel in the CURRENT Ubuntu version (13.04). Can someone please clarify why this question is closed? –  Gladen Jul 27 '13 at 9:56
1  
You're right, this should be re-opened. Apologies for the hasty (incorrect) vote to close. –  Tom Brossman Jul 27 '13 at 17:27
    
No worries! Thanks for reopening! :) –  Gladen Jul 27 '13 at 23:57

5 Answers 5

up vote 11 down vote accepted

Update (8-05-2014): As expected, in Ubuntu 14.04 DPM is enabled by default for all modern AMD GPU's (HD 4000 through HD 7000 series). If you are running this release together with a supported graphics card, you don't need to do anything to use this feature.

Update (28-11-2013): Ubuntu 13.10 ships with the 3.11 kernel by default. So if you are using this release, all you need to do is add the parameter to the Linux Kernel. I updated the guide accordingly. Also, it looks like by Ubuntu 14.04, DPM will be enabled by default so hopefully this guide will be obsolete by then! ;)

Ok, In the last few days I experimented a bit and got it enabled! It's actually really easy once you found out how to do it.. For people who also want to try it, I'll explain every step. Starting with the installation of the new kernel.

First of all a few points to consider. The Radeon DPM support is only for Radeon HD 2000 (R600) series graphics cards and newer. If you're using a really old ATI Radeon graphics card, the power management support is already tapped out on the open-source driver.

Steps for Ubuntu 13.04 or below only:

To use Radeon DPM you need the Linux 3.11 kernel or newer. You can use the Ubuntu mainline kernel PPA and download the latest stable 3.11 Linux kernel image from this kernel.ubuntu.com directory. Any future kernel updates are fine too and can then also be found in this directory.

Using the dynamic power management feature requires updated firmware for the graphics card. The latest Radeon microcode/firmware can be downloaded from this directory. You need the *_smc.bin files from June. If you're unsure of your specific graphics card codename, you can generally find it from looking at output of lspci -v | less ... The file(s) need to be placed within /lib/firmware/radeon. If you try to use Radeon DPM without the firmware, acceleration will end up being disabled for the GPU. You also need to make sure you have the updated firmware in /lib/firmware/radeon before installing the >3.11 kernel - it will be pulled automagically into the installed image.

Ubuntu 13.10 or lower, or users of Radeon HD 3000 or below:

The Radeon DPM support is not enabled by default below Linux kernel 3.13, or for older GPUs. You must add the radeon.dpm=1 parameter to the Linux kernel to enable it in these cases. For the steps to do so on Ubuntu, see the Ubuntu Wiki about the different ways.

With the new kernel installed, firmware updated and Kernel parameter enabled you should be good to go. You must now reboot your system and you can check if everything is working after that by doing

cat /sys/kernel/debug/dri/64/radeon_pm_info

Note: @luca992 pointed out that the file radeon_pm_info could be in a different directory (for example in /sys/kernel/debug/dri/1/ instead of dri/64/). If you're absolutely sure you followed all steps correctly, you can check if this could be the case in your situation.

You should see something like this:

uvd    vclk: 0 dclk: 0
power level 0    sclk: 22000 mclk: 25000 vddc: 900

You can further configure DPM by opening /etc/rc.local and adding the following line:

echo parameter > /sys/class/drm/card0/device/power_dpm_state

Where "parameter" can be:

  • battery (a set of performance levels targeted for optimal operation on battery)
  • balanced (a set of performance levels targeted for optimal every day use)
  • performance (a set of performance levels targeted for the highest GPU performance)

Sources: http://www.botchco.com/agd5f/?p=57

share|improve this answer
1  
Got to say.. battery life on my laptop is now just as good as with the proprietary drivers. Also performance should be a bit better as a side effect of being able to reclock to higher speeds on heavier loads. I'm impressed with the results! –  Gladen Jul 31 '13 at 8:09
    
If you get command not found: glxinfo. Then it isn't installed. To install, do sudo apt-get install mesa-utils. –  meshy Aug 15 '13 at 14:05
    
What is the name of apt package that needs to be installed? –  Entea Feb 20 at 19:07
    
"If you are running this release together with a supported graphics card, you don't need to do anything to use this feature." – Except the default setting is 'balanced', so you may want to switch to 'battery' if you want to minimize power consumption. –  otus May 22 at 7:54

Ok, I'm going to part from the presumption you already have the kernel 3.11-GIT and have a r6xx-SI or newer ATI card. From there on, you just have to add radeom.dpm=1 as a kernel module parameter and DPM should be activated.

It could be either in the GRUB parameter, in the /etc/default/grub file write

GRUB_CMDLINE_LINUX_DEFAULT="quiet radeon.dpm=1"
sudo update-grub

Or in a .conf file under your /etc/modprobe directory:

sudo su -
touch /etc/modprobe.d/radeon-dpm.conf
echo options radeon dms=1 > /etc/modprobe.d/radeon-dpm.conf 
cat /etc/modprobe.d/radeon-dpm.conf 
options radeon dpm=1

Quote from the sources:

The AMD Radeon driver finally has dynamic power management support! For Radeon GPUs the core clock and memory clocks will dynamically adjust (along with the voltages) based upon load, this works for multi-monitor configurations, and it's at near feature parity to what's provided by PowerPlay and the features in the AMD Catalyst driver. This is a big win for saving on power/battery when using the open-source Radeon Linux driver along with offering better performance for newer GPUs that have a boot clock speed that's lower than their rated frequencies. This support goes back to Radeon HD 2000 (R600) GPUs but is currently not enabled by default but requires setting radeon.dpm=1.

Sources:

share|improve this answer
    
don't forget: 'sudo update-grub' after doing 'GRUB_CMDLINE_LINUX_DEFAULT="quiet radeon.dpm=1"' –  Frank Sep 9 '13 at 16:48
    
no problem mate :) –  Frank Sep 9 '13 at 17:01

In addition to Gladen's answer I thought I would make an additional commit on verifying dpm is working to save others some frustration.

In my case

cat /sys/kernel/debug/dri/64/radeon_pm_info

does not exist so I thought dpm was not working.

However apparently that file is just in different folders for me.

cat /sys/kernel/debug/dri/65/radeon_pm_info

or

cat /sys/kernel/debug/dri/1/radeon_pm_info

both exist and list the same info.

share|improve this answer
    
Thanks for the info, I'll add that to the guide. :) –  Gladen Feb 3 at 18:45

In case tlp meets your intentions :

sudo add-apt-repository ppa:linrunner/tlp

sudo apt-get update

sudo apt-get install tlp tlp-rdw

For thinkpads it is :

sudo apt-get install tp-smapi-dkms acpi-call-tools

When am not wrong - tlp is not inmediately dependent on the kernel-version - it depends more on the hardware. Between Kernel 3.11 and Kernel 3.10 are no wildly differences.

In article of phoronix is listed about the new changes in Kernel 3.11 :

http://www.phoronix.com/scan.php?page=news_item&px=MTQwODk

But in 3.11 there are no changes about the power-management in general.

I think the dynamic power-management changes for Radeon affect only the support with power-supply of the graphics card.

After installation tlp is to start with :

sudo tlp start

share|improve this answer
1  
Thanks for the response! But that is not exactly what I mean. There actually is power management as you can read in this article on Phoronix: phoronix.com/scan.php?page=news_item&px=MTM5NjE –  Gladen Jul 28 '13 at 18:17

Following up on the answer from @Gladen, I found that

echo parameter > /sys/class/drm/card0/device/power_dpm_state

didn't work. A quick ls -l /sys/class/drm/ showed me that card0 refers to the integrated card & card1 to the discrete card. So the following works for me on card1:

$ sudo -i

# cat /sys/class/drm/card1/device/power_dpm_state
balanced
# cat /sys/class/drm/card1/device/power_dpm_force_performance_level  
auto
# cat /sys/kernel/debug/dri/1/radeon_pm_info
uvd    vclk: 0 dclk: 0
power level 0    sclk: 15700 mclk: 20000 vddc: 900 vddci: 0
#
# echo "battery" > /sys/class/drm/card1/device/power_dpm_state
# cat /sys/kernel/debug/dri/1/radeon_pm_info
uvd    vclk: 0 dclk: 0
power level 0    sclk: 15700 mclk: 20000 vddc: 900 vddci: 0
#
# echo "low" > /sys/class/drm/card1/device/power_dpm_force_performance_level  
# cat /sys/kernel/debug/dri/1/radeon_pm_info
uvd    vclk: 0 dclk: 0
power level 0    sclk: 15700 mclk: 20000 vddc: 900 vddci: 0
# echo "performance" > /sys/class/drm/card1/device/power_dpm_state
# cat /sys/kernel/debug/dri/1/radeon_pm_info
uvd    vclk: 0 dclk: 0
power level 0    sclk: 15700 mclk: 20000 vddc: 900 vddci: 0
# echo "high" > /sys/class/drm/card1/device/power_dpm_force_performance_level  
-bash: echo: write error: Invalid argument
# # Not sure why the above happened!?
#
# cat /sys/kernel/debug/dri/1/radeon_pm_info
uvd    vclk: 0 dclk: 0
power level 2    sclk: 75000 mclk: 80000 vddc: 1120 vddci: 0
# echo "high" > /sys/class/drm/card1/device/power_dpm_force_performance_level  
#
# echo "battery" > /sys/class/drm/card1/device/power_dpm_state
# cat /sys/kernel/debug/dri/1/radeon_pm_info
uvd    vclk: 0 dclk: 0
power level 0    sclk: 15700 mclk: 20000 vddc: 900 vddci: 0
# 
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.