Ubuntu – How to enable the Radeon dynamic power management feature

kernel

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

Best Answer

  • 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