Radeon Power Management
KDE Plasma 4 Extensions
Score 83%
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:

5 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

NatsuPower

4 years ago

It works nice on Chakra Linux with my HD 4870 but on openSUSE the two commands reset it self after restart and the widget lose control
chmod a+w /sys/class/drm/card0/device/power_method
chmod a+w /sys/class/drm/card0/device/power_profile

I tried with su as super user in Konsole and sudo it works after the two commands but they are reseted after every reboot.

Ok maybe this is a problem of openSUSE but what do you think?

Report

C

jemino

4 years ago

Hi,

Did you put those two commands in /etc/rc.local (so that they're executed each time the machine boots) ?

Report

NatsuPower

4 years ago

No I can not find an /etc/rc.local on openSUSE 12.3 and also Chakra Linux an /etc/rc.local do not exist or maybe it is in another place?

OK in Chakra Linux /etc/rc.local do not exits but the widget works fine after every reboot.

Report

C

jemino

4 years ago

After a bit googling, I found out that Opensuse has another file that's executed on each boot, though it's executed much earlier in the boot sequence than rc.local. Still, you could try putting the commands in there :

/etc/init.d/boot.local

Report

NatsuPower

4 years ago

Yeah thanks it seems this helped me :D

I made it like this at /etc/init.d/boot.local

#! /bin/sh
#
# Copyright (c) 2002 SuSE Linux AG Nuernberg, Germany. All rights reserved.
#
# Author: Werner Fink, 1996
# Burchard Steinbild, 1996
#
# /etc/init.d/boot.local
#
# script with local commands to be executed from init on system startup
#
# Here you should add things, that should happen directly after booting
# before we're going to the first run level.
#

#Radeon pm
chmod a+w /sys/class/drm/card0/device/power_method
chmod a+w /sys/class/drm/card0/device/power_profile
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

now it works and pleas made an comment for openSUSE users in your main post.

Report

C

jemino

4 years ago

Glad it works. I just updated the plasmoid description.

Report

obedlink

4 years ago

voltage, frequency etc. are not shown, only sample temperature.
when using the mount command I get the following result.

obed @ kubuntu: ~ $ sudo mount-t debugfs none / sys / kernel / debug
[sudo] password for obed:
mount: none already mounted or / sys / kernel / debug busy
mount: according to mtab, none is already mounted on / sys / kernel / debug
obed @ kubuntu: ~ $

Report

C

jemino

4 years ago

If debugfs is already mounted (which seemes to be the case), you need to make sure that normal users have read permission :

sudo chmod -R o+r /sys/kernel/debug

Report

dinolib

4 years ago

Same problem here. Kernel 3.7 made /sys/kernel/debug/dri root only accessible. Can't change it with chown.

Report

C

jemino

4 years ago

chown isn't an option here. What about chmod (a+x for every directory in the path, a+r for the file itself) ? For example (as root) :

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

Report

dinolib

4 years ago

seems to work! thanks

Report

ArLex

4 years ago

Thank you for this neat tool. It's very helpful.
I've been using version 1.4 of this plasmoid for my Mobility Radeon HD 4200 on Fedora 15-17. I was able to change power mode, although there was no device info (as I understood, because of other output and less info available for Mobility cards) and it had visual bug with button size (for all KDE versions that I used - 4.7-4.9).
In v1.7 the buttons are now placed correctly and it shows the current engine clock. But when trying to change the power mode I get the following error:
Quote:Error in contents/code/main.js on line 41.

Error:
Function.prototype.disconnect:
failed to disconnect from
QTimer::timeout()
By clicking "OK" it shows, that the mode has changed, but sysfs shows that it has not.
I installed it manually as described, KDE 4.9.3, Fedora 17. Thanks in advance.

Report

C

jemino

4 years ago

I can't reproduce this (but I don't have a Radeon card anymore, so my tests are limited to installing F17 in VirtualBox).

Could you try the following :

- in kwrite, open ~/.kde/share/apps/plasma/plasmoids/radeon-pm/contents/code/main.js

- comment the following lines out (by putting // at the beginning of each of them) : 40, 41, 46, 47

- save, close editor, log out and back in

Report

ArLex

4 years ago

Yes, it works! It's pity you don't have Radeon now:( Will this plasmoid be maintained?

Another question regarding state info:
It seems, that my card doesn't have voltage and temperature sensors - "cat /sys/kernel/debug/dri/0/radeon_pm_info" gives the following output:
Quote:default engine clock: 500000 kHz
current engine clock: 193320 kHz
default memory clock: 533000 kHz
but widget shows only current engine clock. Or was it supposed to show current memory clock?

Thanks for your help.

Report

C

jemino

4 years ago

I'll try to fix bugs when possible (as long as they don't depend on actually having a radeon card) but I won't add or change features.

Regarding the memory clock, the script does look for the "current memory clock" line and does nothing if the line isn't there. If you want to display the memory frequency, you can edit the main.js file again, go to line 197 and replace "current m" by "default m".


Report

jaxxed

5 years ago

This plasmoid is the gift of gold to all Linux users who stand by the OSS radion driver.

J, is there anything that needs to be done to keep it up to date?
Would it make sense to try to write some systemd/cpufreq interface instead of directly writing to the files (which I think that it does)

Report

C

jemino

5 years ago

Hi,

I'm not sure about cpufreq (isn't it dedicated to cpu power management ?).

Systemd being an init replacement, I don't think it would be of use here (unless you want a daemon that scales the frequencies based on various conditions, but this is way beyond the scope of this simple applet).

About the "pseudo-files" this applet writes to, they are (but my knowledge might not be so up-to-date) the only userspace interface to access radeon power management. Even a power management daemon would need to use this interface (and thus write to the files).

Take care
JM

Report

snakebite

4 years ago

Hello just to inform you, according to archwiki you can also use udev to change power method/profile ;https://wiki.archlinux.org/index.php/ATI#Powersaving

Report

Deathmachine

5 years ago

Well done, a very useful plasmoid

Report

msledziona

5 years ago

Thank you for this plasmoid, now I can simply make my PC much cooler :)

Report

mpxlbs

5 years ago

Hello!

I'm using Kubuntu 12.04, and I love the work you did on Radeon PM! Now, it might be because of a never version of kubuntu has arrived, but Radeon PM doesn't seem to be able to remember the last power profile I used, after each reboot, so I have to manually select it again, even though in the settings, the box that asks me if it should remember it, is marked. Why would this happen? Also, any plans for a new version? Thanks!

Report

Archon9

6 years ago

When I run this plasmoid, it pops up the following error:

Error in contents/code/main.js on line 202.

TypeError: Results of expression 'ioJob' [undefined] is not an object.

I'm on Linux Mint 10 with KDE 4.6.0

Report

C

jemino

6 years ago

I just posted a new version. Could you please try this one ?

Report

Archon9

6 years ago

It's working now, thanks!

Report

itslennie

6 years ago

I registered just to say thank you for this. Just what I have been looking for to manage my ATI card without the proprietary drivers.

Report

5 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

product-maker ArLex Dec 16 2012

product-maker BILLYKANE Jun 22 2012

product-maker Deathmachine Jun 21 2012

product-maker snakebite Jun 16 2012

product-maker FraMari Mar 14 2012

product-maker redhatsky Feb 19 2012

product-maker grayhawk Dec 04 2011

product-maker erpera Nov 01 2011

product-maker mi-schutka Oct 03 2011

product-maker Hanau2010 Sep 18 2011

product-maker Sonnenwolf Sep 15 2011

product-maker tritemius Sep 02 2011

product-maker tamra Aug 22 2011

product-maker jackhunter2 Aug 22 2011

product-maker fprumbau Aug 17 2011

product-maker philopdx Aug 09 2011

product-maker swear007 Aug 05 2011

product-maker Krog Aug 04 2011

product-maker jaxxed Jul 29 2011

product-maker mischi Jul 22 2011

product-maker tcat Jul 14 2011

product-maker fredix Jun 24 2011

product-maker oOSplashOo Jun 21 2011

product-maker darountree Jun 19 2011

product-maker Naproxeno Jun 14 2011

product-maker AndreasRoehr Jun 11 2011

product-maker varanus Jun 05 2011

product-maker supermadman Jun 03 2011

product-maker SeaJey May 24 2011

product-maker xophermc May 20 2011

product-maker seamanj May 19 2011

product-maker chazz557 Apr 15 2011

product-maker Gilde Apr 02 2011

product-maker UnimatrixZero Mar 30 2011

product-maker pascalaldo Mar 26 2011

product-maker hemathor Mar 24 2011

product-maker zakaqere Mar 19 2011

product-maker bischa Mar 18 2011

product-maker XenoPL Mar 12 2011

product-maker Fisiu Mar 11 2011

product-maker deabru Mar 10 2011

product-maker alvinjames Mar 10 2011

product-maker schnelle Mar 10 2011

product-maker vitoubien Mar 10 2011

product-maker 6 6

File (click to download) Version Description Filetype Packagetype License Downloads Date Filesize OCS-Install DL
Details
version
1.7
updated Jun 20 2012
added Mar 10 2011
downloads today
0
page views today 0