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

C

jemino

7 years ago

You're welcome. I'm glad you found it useful enough to register.

Report

jaxxed

7 years ago

This plugin has been a major help for me. I suffer from a problem that many have, with dell laptops that use i7s and Radon HD Mobiles, where they overheat easily.

Your plasmooid works well for me, if I install it manually, not from the kde automatic downloader, and as long as I followed your instructions above.

Please note that additionally, I had to overwrite the setting for the temperature monitor (different card integer)

I am writing to ask for help with the other information values. How can I get the memory and power information to work.

Report

C

jemino

7 years ago

The various paths can vary from a system to another. In order to display the frequencies and voltage, you need to mount the debug file system (as root. Put this in /etc/rc.local if you want it to be persistent) :

mount -t debugfs none /sys/kernel/debug

Then you must find the radeon_pm_info file and paste the resulting path in the corresponding setting :

find /sys/kernel/debug -name radeon_pm_info

About the KDE downloader, I admit I haven't tested this. I'll have a look at it when I'm back from my vacations.

Report

jaxxed

7 years ago

Thanks for the help.

Following your instructions i realized that my current user didn't have permissions to access the debug fs.
I changed the owner group for the fs to adm (chown -R adm), added read and navigate permissions to the group (chmode -R g+rX),and made sure that my user was in adm, then restarted the widget : now everything works.

Report

C

jemino

7 years ago

glad you could solve this. I added a note to the description about this potential issue.

Report

msledziona

8 years ago

Is there any hope to get this applet also for the fglrx proprietary drivers? I think that could be difficult, but maybe someone will try? Maybe more people who use fglrx (and do not want to switch to free radeon drivers) would like to have such thing on desktop :)

Report

C

jemino

8 years ago

sorry, but I'm definitely fglrx-free, and don't want to go there again.

On the other hand, back when I used it, the one thing that seemed to work right was power management, so I'm not sure that a fglrx-aware plasmoid would be that useful.

If you want to fiddle with frequencies, there's always this utility (although it's not a plasmoid) :

http://amdovdrvctrl.sourceforge.net

Report

BatriceSells

8 years ago

Hi

I installed your script (no errors) but I can see nothing showing in plasmoïds?

Report

C

jemino

8 years ago

Your message also reminded me that I had a new version sitting on my computer for ages. You may want to try the updated version.

Report

BatriceSells

8 years ago

I got a Squeeze-based Mepis and a 2.6.36 kernel and I'm using KDE 4.5.1.


Nothing shows in the plasmoïds.

I'm going to try your new version.

But installation gave no error message and went flawlessly???

Thx for th e work !

Report

BatriceSells

8 years ago

Oh I must say : I got a Radeon HD4770 and the radeon driver provides temp through lmsensors in another plasmoid already, maybe I should not use it?

Report

C

jemino

8 years ago

just tried 1.3 and 1.4 with the live Mepis 11 dvd. In both cases, the plasmoid actually does show up in the list, so I have no idea why it doesn't for you.
When adding it to the desktop though, only 1.3 seems to work. 1.4 doesn't (I'm going to investigate that).

Report

BatriceSells

8 years ago

Re bonjour

Problème curieux, je peux choisir "Dynamic" sur l'applet, mais lorsque j'entre dans les réglages il plante.

De plus, une fois choisi le mode "Dynamic" (je n'utilise pas de laptop mais un pc de bureau), les variations de la vitesse d'horloge et la consommation de la carte ne changent pas (749Mhz et 798Mhz, 1000Mv).

Paradoxalement, la T° du GPU a baissé d'1°C (de 56°C à 55°C)... et l'affichage de KDE est plus fluide (jusqu'ici avec le pilote Radeon il était parfois un peu...lent).


Il me semble que sur le site du pilote libre ma carte n'ets pas supportée entièrement (et pas par le pilote radeonHD).

Report

C

jemino

8 years ago

Le mode dynamique ne semble pas non plus avoir d'effet sur la carte graphique de mon portable (fréquences et voltage restent à la valeur max en permanence). Le mode est donc présent dans l'applet mais je n'ai pas pu le tester sur une carte qui le supporte.

Quand au problème de plantage lors de l'ouverture des réglages, je n'arrive pas à le reproduire (quel que soit le mode sélectionné).

Sinon, le pilote radeonHD est obsolète. Toutes les cartes ATI/AMD utilisent maintenant le pilote radeon, récentes comme anciennes.

Report

BatriceSells

8 years ago

Bonjour!

Hem hem... je l'avais installé en root...

En user le 1.4 marche parfaitement chez moi!

Désolée pour le dérangement !

Report

C

jemino

8 years ago

il n'y a pas de mal, et j'admets que la procédure d'installation pourrait être plus claire sur ce point. Je vais préciser ça.

Report

C

jemino

8 years ago

In my understanding, the plasmoid should show up, even if it doesn't work when added to the desktop/panel.

You can use this command to check if the plasmoid is installed :

plasmapkg --list | grep radeon-pm

You can also check that everything is in place by running this command :

find $HOME/.kde -name radeon-pm -exec ls -lR '{}' \;

I'm now downloading Mepis. I'll keep you posted if I find out why it doesn't show up for you.

Report

BatriceSells

8 years ago

Ohoh

Fisrt, thanks for your time !

When I run your command I get that :

Jess@mepis1:~$ plasmapkg --list | grep radeon-pm
plasmapkg(4572)/libplasma Plasma::PackageStructurePrivate::createPackageMetadata: No metadata file in the package, expected it at: ""

Uho!

And :

Report

C

jemino

8 years ago

that's strange. If the plasmoid had been installed, it should appear in the plasmapkg --list output, and find should, well, find it.

Just in case, did you install the plasmoid as root ? If you did, you shouldn't have, since the default behaviour of plasmapkg is to use the user's profile for installation (meaning that the plasmoid would have been installed in root's profile).

Aside from this, since I can't reproduce it, I have to admit I'm out of ideas.

Report

BatriceSells

8 years ago

...and find command finds nothing

Report

C

jemino

8 years ago

what's your KDE version ? It should work with 4.5 and 4.6 (maybe also with older versions but I didn't test with 4.4 and older).

BTW, the plasmoid should appear in the "System Information" category.

Report

hemathor

8 years ago

with my 3600 card there is none ofe these files:
/sys/class/drm/card0/device/power_method
/sys/class/drm/card0/device/power_profile

any ideas?

Report

C

jemino

8 years ago

what's the output of the following commands ?

uname -a

dmesg | grep drm

Report

hemathor

8 years ago

# uname -a
Linux sunshine 2.6.34.7-0.7-desktop #1 SMP PREEMPT 2010-12-13 11:13:53 +0100 x86_64 x86_64 x86_64 GNU/Linux

since my uptime apparently seems too long to keep anything for dmesg, i give you a 'grep drm /var/log/boot.msg' at http://pastebin.com/E3vCUXJn instead. if that's not sufficient, i will have to reboot...

Report

C

jemino

8 years ago

after some googling, the kernel version seems to be the culprit. It looks like the /sys interface was added in 2.6.35. Before that, you add to use the radeon.dynpm and other boot parameters for power management.

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 Count: 4 Rating: 5.0
File (click to download) Version Description Downloads Date Filesize DL OCS-Install
Pling
*Needs ocs-url or ocs-store to install things
Details
license
version
1.7
updated Jun 20 2012
added Mar 10 2011
downloads today
1
page views today 10