[How-To] Power saving with the Radeon driver - Overclock.net - An Overclocking Community

Forum Jump: 

[How-To] Power saving with the Radeon driver

 
Thread Tools
post #1 of 4 (permalink) Old 05-12-2010, 10:05 AM - Thread Starter
New to Overclock.net
 
Melcar's Avatar
 
Join Date: Sep 2005
Location: Merida
Posts: 8,350
Rep: 641 (Unique: 441)

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:

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:
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


Magicbox
(18 items)
CPU
Ryzen 7 1700
Motherboard
GA-AX370-Gaming K7
GPU
RX 480 Nitro+
RAM
Corsair Vengeance
Hard Drive
Samsung EVO 850
Hard Drive
HyperX 3K
Hard Drive
Seagate Barracuda
Power Supply
EVGA G2
Cooling
Noctua NH-D15
Cooling
Morpheus II
Case
Phanteks Enthoo Pro
Operating System
Kubuntu 18.04
Operating System
Windows 10 Pro
Monitor
Dell U2515H
Keyboard
CM Storm QuickFire TK
Mouse
G502
Mousepad
G440
Audio
Xonar DX
▲ hide details ▲
Melcar is offline  
Sponsored Links
Advertisement
 
post #2 of 4 (permalink) Old 06-11-2010, 09:15 AM - Thread Starter
New to Overclock.net
 
Melcar's Avatar
 
Join Date: Sep 2005
Location: Merida
Posts: 8,350
Rep: 641 (Unique: 441)
Added instructions for new 2.6.35 rc kernels.

Magicbox
(18 items)
CPU
Ryzen 7 1700
Motherboard
GA-AX370-Gaming K7
GPU
RX 480 Nitro+
RAM
Corsair Vengeance
Hard Drive
Samsung EVO 850
Hard Drive
HyperX 3K
Hard Drive
Seagate Barracuda
Power Supply
EVGA G2
Cooling
Noctua NH-D15
Cooling
Morpheus II
Case
Phanteks Enthoo Pro
Operating System
Kubuntu 18.04
Operating System
Windows 10 Pro
Monitor
Dell U2515H
Keyboard
CM Storm QuickFire TK
Mouse
G502
Mousepad
G440
Audio
Xonar DX
▲ hide details ▲
Melcar is offline  
post #3 of 4 (permalink) Old 09-11-2011, 09:33 AM
New to Overclock.net
 
Join Date: Oct 2009
Location: Joburg, South Africa
Posts: 1,739
Rep: 62 (Unique: 56)
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:
#!/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:
#!/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:
/etc/laptop-mode/batt-start
/etc/laptop-mode/lm-ac-stop
5. Copy gpu-save-off.sh to:
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.

__________________________________________________

RIP Syrillian - "Semper fidelis"
biltong is offline  
Sponsored Links
Advertisement
 
post #4 of 4 (permalink) Old 12-27-2013, 04:04 PM - Thread Starter
New to Overclock.net
 
Melcar's Avatar
 
Join Date: Sep 2005
Location: Merida
Posts: 8,350
Rep: 641 (Unique: 441)
Updating with current info.

Magicbox
(18 items)
CPU
Ryzen 7 1700
Motherboard
GA-AX370-Gaming K7
GPU
RX 480 Nitro+
RAM
Corsair Vengeance
Hard Drive
Samsung EVO 850
Hard Drive
HyperX 3K
Hard Drive
Seagate Barracuda
Power Supply
EVGA G2
Cooling
Noctua NH-D15
Cooling
Morpheus II
Case
Phanteks Enthoo Pro
Operating System
Kubuntu 18.04
Operating System
Windows 10 Pro
Monitor
Dell U2515H
Keyboard
CM Storm QuickFire TK
Mouse
G502
Mousepad
G440
Audio
Xonar DX
▲ hide details ▲
Melcar is offline  
Reply

Quick Reply
Message:
Options

Register Now

In order to be able to post messages on the Overclock.net - An Overclocking Community forums, you must first register.
Please enter your desired user name, your email address and other required details in the form below.
User Name:
If you do not want to register, fill this field only and the name will be used as user name for your post.
Password
Please enter a password for your user account. Note that passwords are case-sensitive.
Password:
Confirm Password:
Email Address
Please enter a valid email address for yourself.
Email Address:

Log-in



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Show Printable Version Show Printable Version
Email this Page Email this Page


Forum Jump: 

Posting Rules  
You may post new threads
You may post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off