Overclock.net banner

[How-To] Power saving with the Radeon driver

26696 Views 3 Replies 2 Participants Last post by  Melcar
The open source driver for ATI cards has some power saving features. May not be that important for some desktop users, but for laptop users it's a must. The driver has two kinds of power saving schemes, one under UMS mode (older and more stable) and another under KMS mode. You can't use both methods at the same time. Most current distros have now defaulted to KMS, although none of them enable any power saving options in the drivers yet. For this guide I will just focus on KMS, which is what most every current distro uses.

KMS

There are two methods. One is the older profile based power switching. This method is available for all cards that support power saving. You will need the latest kernel available (minimum 2.6.35). To use it, simply execute the following command strings inside a terminal:

Code:

Code:
sudo -i
#to turn yourself into root

echo dynpm > /sys/class/drm/card0/device/power_method
## dynamic clock switching based on GPU load

echo profile > /sys/class/drm/card0/device/power_method
## profile based frequency switching; this is the default mode
If you select the profile method, you can then choose from several power profiles:

Code:

Code:
echo default > /sys/class/drm/card0/device/power_profile 
# uses default clocks/volts

echo low > /sys/class/drm/card0/device/power_profile 
## forces GPU to lowest available frequency; may cause some issues on certain laptops and displays, as this is the mode used when the display switches to dpms off mode

echo mid > /sys/class/drm/card0/device/power_profile 
## forces GPU  to be in the "mid" power state all the time; safer to use than "low" for regular desktop usage

echo high > /sys/class/drm/card0/device/power_profile
## forces GPU to highest available frequency

echo auto > /sys/class/drm/card-0/device/power_profile
## switches between high and mid power states depending on whether the system in on battery power or not
There is also DPM (Dynamic Power Management). This is a newer (and better) method, though is only available for HD2K and newer cards and with kernels 3.11 and newer. This method works more closely to how fglrx handles power management; clock switching should be automatic. DPM is not enabled by default in the 3.11 kernels, where you have to add radeon.dpm=1 to your kernel parameters. If you are using kernels 3.12 or newer, then DPM is enabled by default.

DPM can be further tweaked to your needs with the terminal. First you need to learn that your card will have different power states and performance levels. Each power state has three performance levels, which you can set manually. Read the blog entry linked to at the end of this guide to learn more about this.

Usage is similar to the method above:

Code:
sudo -i

#you need to be root to use all these commands

#there are three power states: battery, balanced, performance

#you can change between these states by echoing to the following parameter

/sys/class/drm/card0/device/power_dpm_state

#each power state has several performance levels: auto, low, high

#you can also change between them by echoing to the following:

/sys/class/drm/card0/device/power_dpm_force_performance_level
The default is the balanced power state and the auto performance level. You can change them to you hearts desire.

There is also a nifty GUI called radeon-profile if you don't want to mess with the terminal. Link is at the end of the guide.

Notes

1) DPM works for a lot of people, but for me it only kind of does. My HD7850 still spends about 90% of the time in "3d" clocks and voltage. I have to manually set it to low.

2) There was an issue with APUs and the open source drivers where they would default to the low power state without being able to change the clocks. DPM supposedly fixes this issue and APUs now correctly re-clock to proper performance levels.

Links of interest:

agd5f's blog post on DPM

radeon-profile
See less See more
  • Rep+
Reactions: 1
1 - 4 of 4 Posts
Added instructions for new 2.6.35 rc kernels.
Bit of a necro, but I've come up a trick with that changes your GPU into mid or high power depending on whether your laptop is plugged in or running on battery, if the auto profile doesn't work for you. It uses laptop-mode-tools to execute scripts that do as Melcar said in his post.

1. Make a file called gpu-save-on.sh and fill it with this:

Code:

Code:
#!/bin/sh
echo profile > /sys/class/drm/card0/device/power_method
echo mid > /sys/class/drm/card0/device/power_profile
2. Create another file, called gpu-save-off.sh and fill it with this:

Code:

Code:
#!/bin/sh
echo profile > /sys/class/drm/card0/device/power_method
echo high > /sys/class/drm/card0/device/power_profile
3. Run chmod +x on both of them
4. Copy gpu-save-on.sh to the following folders:

Code:

Code:
/etc/laptop-mode/batt-start
/etc/laptop-mode/lm-ac-stop
5. Copy gpu-save-off.sh to:

Code:

Code:
/etc/laptop-mode/nolm-ac-start/
/etc/laptop-mode/nolm-ac-stop/
/etc/laptop-mode/batt-stop/
/etc/laptop-mode/lm-ac-start/
Done - all you need to do now is reboot, or restart the laptop-mode service.
See less See more
Updating with current info.
1 - 4 of 4 Posts
This is an older thread, you may not receive a response, and could be reviving an old thread. Please consider creating a new thread.
Top