Radeon Power Management

Plasma 4 Widgets

Source (link to git-repo or to original if based on someone elses unmodified work): Add the source-code for this project on opencode.net

7
Score 86.9%
Description:

INTRODUCTION

This Javascript applet allows for controlling and monitoring the power management mode and temperature of AMD/ATI graphics cards.

It only works with the free Xorg radeon driver and requires at least a 2.6.35 kernel.

It does NOT work with the proprietary fglrx driver.

INSTALLATION

Before installing/using the applet, some system configuration steps must be accomplished. As root (or with sudo), the following files must be made writable for all users. This will allow any user to change the power management settings of the card :

chmod a+w /sys/class/drm/card0/device/power_method
chmod a+w /sys/class/drm/card0/device/power_profile


Also as root, you must mount the debug file system. This will allow the applet to display frequencies and voltage information (if it doesn't work, you may need to make sure that normal users can navigate and read the debug file system) :

mount -t debugfs none /sys/kernel/debug

On some systems, the following permissions can be necessary :

chmod a+x /sys/kernel/debug
chmod a+x /sys/kernel/debug/dri
chmod a+x /sys/kernel/debug/dri/0
chmod a+r /sys/kernel/debug/dri/0/radeon_pm_info


To make the above configurations persistent, you can put those command lines in /etc/rc.local or, for OpenSUSE users, in /etc/init.d/boot.local

The following commands must be passed as a normal user (ie. not root).

If you installed a previous version, you must first close all instances of the applet, and uninstall it :

plasmapkg -r radeon-pm

You can now install the applet :

plasmapkg -t plasmoid -i radeon-pm.plasmoid

CONFIGURATION

The buttons allow you to select the power management mode for your card. Here are their meaning (from the Xorg wiki, http://wiki.x.org/wiki/RadeonFeature) :

- Dynamic : dynamically changes the clocks based on the number of pending fences, so performance is ramped up when running GPU intensive apps, and ramped down when the GPU is idle. The reclocking is attemped during vertical blanking periods, but due to the timing of the reclocking functions, doesn't not always complete in the blanking period, which can lead to flicker in the display. Due to this, dynpm only works when a single head is active.

- Low : forces the gpu to be in the low power state all the time. Note that low can cause display problems on some laptops; this is why auto does not use low when displays are active.

- Mid : forces the gpu to be in the mid power state all the time. The low power state is selected when the monitors are in the dpms off state.

- High : forces the gpu to be in the high power state all the time. The low power state is selected when the monitors are in the dpms off state.

- Automatic : selects between mid and high power states based on the whether the system is on battery power or not. The low power state are selected when the monitors are in the dpms off state.

- Default : uses the default clocks and does not change the power state. This is the default behavior.

In the applet settings dialog, you can set the following values :

- Radeon PM info path : path to the kernel debug file (named radeon_pm_info) which contains the power state informations (frequencies, voltage).

- Device directory : path to the device directory. This directory must contain the power_method and power_profile files. This directory should also contain a hwmon subdirectory for temperature monitoring.

- Temperature monitor path : path to the temperature monitor file. This file should be in a sub-subdirectory of the device directory (something like hwmon/hwmon0), and is usually called temp1_input (or something like that...).

- Show low power mode button : since this mode can cause display problems, use it at your own risk.

- Delay between updates : this sets the elapsed time (in seconds) between updates.

- Remember power mode : if checked, the last selected power management mode will be applied the next time the applet is loaded. This can be tricky for some setups (like mine) where the lowest power mode does not work well when the laptop is docked and hooked up to an external screen.

Last changelog:

7 years ago

1.7
Corrected a bug with some non persistent configuration options

1.6
Made the script a bit more robust when dealing with incomplete radeon_pm_info data

1.5
Tried to consolidate some workarounds. If you don't have problems, there's no need to update.

1.4
worked around a problem with some settings being forgotten under KDE 4.6.x (if you don't have this problem, you may want to stick to the 1.3 version, which is also included in the download) and added X-Plasma-NotificationArea=true (the plasmoid can now be added to the notification area).

1.3
added actual low power mode (optional) and updated readme with power mode descriptions from Xorg

1.2
frequencies are now displayed in MHz (suggested by Fisiu. It does look much better indeed).

1.15
corrected a bug which prevented the applet to work for KDE 4.6+

1.1
added setting for temperature monitor path.

1.0
initial release

9

hemathor

8 years ago

ok, i updated the kernel to 2.6.38, and everything seems to work fine... :)

Report

C

jemino

8 years ago

good. I'll update the description with the kernel version information.

Report

9

hemathor

8 years ago

that's what i suspected...

ok, then i should update my kernel... i planned to do that a week ago anyway...

long lives procrastination...

but thanks anyway!

Report

C

jemino

8 years ago

although everything seems to be in order (kms, power management initialized), maybe your kernel misses some bits to make this work (2.6.35+ seems to be required if you look here http://www.x.org/wiki/RadeonFeature, under "KMS Power Management Options").

Also, just in case (but you likely have already checked this), maybe you have a /sys/class/drm/card1 (or 2) directory ?

Report

9

schnelle

8 years ago

After "plasmapkg -i radeon-pm.plasmoid" I got this message:
Could not find a suitable installer for package of type Plasma/Applet,Plasma/PopupApplet

Kubuntu Maverick KDE 4.6.1

Any ideas what is going wrong?

BTW great plasmoid! :)

Report

C

jemino

8 years ago

Try again by adding the package type. This seems necessary with KDE 4.6+ :

plasmapkg -t plasmoid -i radeon-pm.plasmoid

If you confirm it works for you, I will edit the installation procedure.

Report

9

schnelle

8 years ago

It works, THANK YOU !!!

p.s. I know about warning at radeonfeature wiki about low profile, but on my laptop low profile works just fine.

Thank you again for this great plasmoid.

Cheers.

Report

C

jemino

8 years ago

I'm glad it worked. I've added the additional option to the installation description.

Regarding the low power mode, on my laptop it seems to have the same effect as the mid profile (which is another reason why I didn't bother with the low profile in the first place).

Report

9

Fisiu

8 years ago

afaik, we missed one power profile, named 'mid'. All available profiles are:
Quote:"default" uses the default clocks and does not change the power state. This is the default behavior.
"auto" selects between "mid" and "high" power states based on the whether the system is on battery power or not. The "low" power state are selected when the monitors are in the dpms off state.
"low" forces the gpu to be in the low power state all the time. Note that "low" can cause display problems on some laptops; this is why auto only uses "low" when displays are off.
"mid" forces the gpu to be in the "mid" power state all the time. The "low" power state is selected when the monitors are in the dpms off state.
"high" forces the gpu to be in the "high" power state all the time. The "low" power state is selected when the monitors are in the dpms off state.

Report

C

jemino

8 years ago

well, actually, the Low button activates the mid profile, precisely because of the warning about potential problems with the actual low profile. I wasn't comfortable with the idea of people yelling at me because I broke their laptop ;-)

Report

9

Fisiu

8 years ago

So there is no 'low' profile option currently while 'Low' is 'mid'?

Report

C

jemino

8 years ago

That's right. I guess I could add a real low button (and rename the current one to mid), with an option to enable it (defaulting to disabled).

Report

9

Fisiu

8 years ago

When adding this plasmoid, I get error:

Error in contents/code/main.js on line 31.
TypeError: No default value


btw, I have temp info under:
'/sys/class/drm/card0/device/hwmon/hwmon1/temp1_input'

Report

C

jemino

8 years ago

I added a setting (temperature monitor path) to the configuration dialog. Could you try this new version ?

Report

9

Fisiu

8 years ago

This time I get:

Error in contents/code/main.js on line 32.
TypeError: Result of expression 'deviceUrl.replace'[undefined] is not a function.

If it matters, I use KDE 4.6.0 on openSUSE 11.4, gfx = hd4770.

Report

C

jemino

8 years ago

I'm on KDE 4.5 myself but I have no idea if it makes a difference. If you're up for a little debugging, could you try the following ?

- copy the radeon-pm.plasmoid file to an empty dir

- unzip radeon-pm.plasmoid

- edit file contents/code/main.js, go to line 31 and add the following instructions :

print(plasmoid.activeConfig); print(deviceUrl);

- save, quit editor and launch the modified plasmoid with this command line :

plasmoidviewer PATH-TO-DIR-WHERE-YOU-UNZIPPED-THE-PLASMOID

- what's the terminal output ?

Report

9

Fisiu

8 years ago

Quote:fisiu@pendrak:~/Stuff/139738-radeon-pm/radeon-pm> plasmoidviewer .
plasmoidviewer(1416)/libplasma Plasma::FrameSvg::resizeFrame: Invalid size QSizeF(0, 0)
plasmoidviewer(1416)/libplasma Plasma::FrameSvg::resizeFrame: Invalid size QSizeF(0, 0)
Object::connect: No such signal Plasma::PopupApplet::popupEvent(bool)
main
TypeError: No default value
QPainter::begin: Paint device returned engine == 0, type: 2
QPainter::setCompositionMode: Painter not active
QPainter::end: Painter not active, aborted

Report

C

jemino

8 years ago

ok, I had to download Opensuse 11.4 and launch it inside VirtualBox to find what this was about. KDE 4.5 and 4.6 do tread URL objects differently, so what worked for me didn't work for you.
I've uploaded a new version. Let's hope there aren't other differences.

Report

C

jemino

8 years ago

I'm glad it finally worked for you. Thanks for reporting the problem, and for your suggestion (it's so much better I can't believe I didn't think of it myself).

Report

9

Fisiu

8 years ago

Now it works well :) Thanks a lot for it!

btw, I modified kHz → MHz. imho it looks better ;)
Quote:
var newEngineFrequency = parseInt(lines[1].replace(/[^0-9]/g, ""));
newEngineFrequency = newEngineFrequency/1000;
if (newEngineFrequency != currentEngineFrequency) {
currentEngineFrequency = newEngineFrequency;
engineLabel.text = currentEngineFrequency + " MHz";
engineMeter.value = currentEngineFrequency;
}

var newMemoryFrequency = parseInt(lines[3].replace(/[^0-9]/g, ""));
newMemoryFrequency = newMemoryFrequency/1000;
if (newMemoryFrequency != currentMemoryFrequency) {
currentMemoryFrequency = newMemoryFrequency;
memoryLabel.text = currentMemoryFrequency + " MHz";
memoryMeter.value = currentMemoryFrequency;
}

Report

9

Fisiu

8 years ago

Quote:fisiu@pendrak:~/Stuff/139738-radeon-pm/radeon-pm> plasmoidviewer .
plasmoidviewer(1416)/libplasma Plasma::FrameSvg::resizeFrame: Invalid size QSizeF(0, 0)
plasmoidviewer(1416)/libplasma Plasma::FrameSvg::resizeFrame: Invalid size QSizeF(0, 0)
Object::connect: No such signal Plasma::PopupApplet::popupEvent(bool)
main
TypeError: No default value
QPainter::begin: Paint device returned engine == 0, type: 2
QPainter::setCompositionMode: Painter not active
QPainter::end: Painter not active, aborted

Report

7 years ago

1.7
Corrected a bug with some non persistent configuration options

1.6
Made the script a bit more robust when dealing with incomplete radeon_pm_info data

1.5
Tried to consolidate some workarounds. If you don't have problems, there's no need to update.

1.4
worked around a problem with some settings being forgotten under KDE 4.6.x (if you don't have this problem, you may want to stick to the 1.3 version, which is also included in the download) and added X-Plasma-NotificationArea=true (the plasmoid can now be added to the notification area).

1.3
added actual low power mode (optional) and updated readme with power mode descriptions from Xorg

1.2
frequencies are now displayed in MHz (suggested by Fisiu. It does look much better indeed).

1.15
corrected a bug which prevented the applet to work for KDE 4.6+

1.1
added setting for temperature monitor path.

1.0
initial release

12345678910
47
product-maker ArLex Dec 16 2012 9 excellent
product-maker BILLYKANE Jun 22 2012 9 excellent
product-maker Deathmachine Jun 21 2012 9 excellent
product-maker snakebite Jun 16 2012 9 excellent
product-maker FraMari Mar 14 2012 9 excellent
product-maker redhatsky Feb 19 2012 9 excellent
product-maker grayhawk Dec 04 2011 9 excellent
product-maker erpera Nov 01 2011 9 excellent
product-maker mi-schutka Oct 03 2011 9 excellent
product-maker Hanau2010 Sep 18 2011 9 excellent
product-maker Sonnenwolf Sep 15 2011 9 excellent
product-maker tritemius Sep 02 2011 9 excellent
product-maker tamra Aug 22 2011 9 excellent
product-maker jackhunter2 Aug 22 2011 9 excellent
product-maker fprumbau Aug 17 2011 9 excellent
product-maker philopdx Aug 09 2011 9 excellent
product-maker swear007 Aug 05 2011 9 excellent
product-maker Krog Aug 04 2011 9 excellent
product-maker jaxxed Jul 29 2011 9 excellent
product-maker mischi Jul 22 2011 9 excellent
product-maker tcat Jul 14 2011 9 excellent
product-maker fredix Jun 24 2011 9 excellent
product-maker oOSplashOo Jun 21 2011 9 excellent
product-maker darountree Jun 19 2011 9 excellent
product-maker Naproxeno Jun 14 2011 9 excellent
product-maker AndreasRoehr Jun 11 2011 9 excellent
product-maker varanus Jun 05 2011 9 excellent
product-maker supermadman Jun 03 2011 9 excellent
product-maker SeaJey May 24 2011 9 excellent
product-maker xophermc May 20 2011 9 excellent
product-maker seamanj May 19 2011 9 excellent
product-maker hithirdwavedust Apr 20 2011 9 excellent
product-maker chazz557 Apr 15 2011 9 excellent
product-maker Gilde Apr 02 2011 9 excellent
product-maker UnimatrixZero Mar 30 2011 9 excellent
product-maker pascalaldo Mar 26 2011 9 excellent
product-maker hemathor Mar 24 2011 9 excellent
product-maker zakaqere Mar 19 2011 9 excellent
product-maker bischa Mar 18 2011 9 excellent
product-maker XenoPL Mar 12 2011 9 excellent
product-maker Fisiu Mar 11 2011 9 excellent
product-maker deabru Mar 10 2011 9 excellent
product-maker alvinjames Mar 10 2011 9 excellent
product-maker schnelle Mar 10 2011 9 excellent
product-maker BastianBalthazarreBux Mar 10 2011 9 excellent
product-maker BenderBendingRodriguez Mar 10 2011 9 excellent
product-maker vitoubien Mar 10 2011 9 excellent
product-maker Base: 4 x 5.0 Ratings
Be the first to comment
alvanx
Jan 10 2013
erpera
Nov 01 2011
poomerang
Aug 31 2011
tcat
Jul 14 2011
varanus
Jun 05 2011
Gilde
Apr 09 2011
Fisiu
Mar 11 2011
File (click to download) Version Description Downloads Date Filesize DL OCS-Install MD5SUM
*Needs pling-store or ocs-url to install things
Pling
0 Affiliates
Details
license
version
1.7
updated Jun 20 2012
added Mar 10 2011
downloads 24h
0
mediaviews 24h 0
pageviews 24h 11