16

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

5
  • 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? Jul 26, 2013 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, 2013 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, 2013 at 9:56
  • 1
    You're right, this should be re-opened. Apologies for the hasty (incorrect) vote to close. Jul 27, 2013 at 17:27
  • @Gladen - do you mean tlp ? This normally involves power-management for accus of notebooks, and it is handling usage of power too. Jul 28, 2013 at 16:04

5 Answers 5

15

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

5
  • 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, 2013 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, 2013 at 14:05
  • What is the name of apt package that needs to be installed?
    – Entea
    Feb 20, 2014 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, 2014 at 7:54
  • In 15.04 (Radeon HD 4850) /sys/class/drm/card0/device/power_method says profile and will not accept dynamic unless also enabled on the kernel command line. Sep 18, 2015 at 8:23
7

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 dpm=1 > /etc/modprobe.d/radeon-dpm.conf 
cat /etc/modprobe.d/radeon-dpm.conf 
# will output "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:

2
  • don't forget: 'sudo update-grub' after doing 'GRUB_CMDLINE_LINUX_DEFAULT="quiet radeon.dpm=1"'
    – Frank
    Sep 9, 2013 at 16:48
  • dude, you have no idea how helpful this was for me to fix an ATI HD 4890 graphics card on Manjaro. THANK YOU.
    – TheFrack
    Dec 10, 2015 at 0:46
1

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

1
1

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.

1
  • it is now /sys/kernel/debug/dri/0/amdgpu_pm_info
    – brauliobo
    Apr 14, 2018 at 20:08
0

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
# 

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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