Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Author Message
noxOffline
Post subject: How to control gpu/cpu temperatures under the new KDE  PostPosted: 29.05.2011, 22:35



Joined: 2010-09-14
Posts: 45

Status: Offline
Hi,

after a recent DU I've noticed that the new KDE doesn't offer cpu scaling and some power-saving options it had before under the Power Management settings.
How can i get these options back or what tool is the best/safest to regulate my gpu/cpu temperatures ?
 
 View user's profile Send private message  
Reply with quote Back to top
Ilinsekt
Post subject: RE: How to control gpu/cpu temperatures under the new KDE  PostPosted: 30.05.2011, 11:59



Joined: 2010-10-29
Posts: 43

These are probably gone for good. They were first removed in KDE 4.5, because some people thought they were "too confusing" and were heavily lobbying to remove them (I absolutely don't agree with this politics, but hey, they're the devs). Now, with the removal of HAL dependencies and introduction of upower, these settings are definitely gone, as upower doesn't allow changing the cpu governors anymore. However, there is a command-line tool named cpufreq-set (it's part of cpufreq-utils), that will do the trick. It must be run as root however, but there is a workaround: type visudo as root. This will let you edit the /etc/sudoers config file, which allows configuration of sudo behavior. There, you put at the end of the file:
      Code:
#includedir /etc/sudoers.d
if the line isn't already there. This will include all configuration snippets in /etc/sudoers.d in the main configuration. Then you create a new file named /etc/sudoers.d/cpufreq , with the following content:
      Code:
%users  localhost=(ALL) NOPASSWD: /usr/bin/cpufreq-set
This will allow everybody from group users to run "sudo cpufreq-set" without the root password. You can replace %users with your username, so that only you can do that. Powerdevil offers the option to execute any program when a particular profile is loaded, so you need to make a shell script which sets the cpu governor for every core of your computer:
      Code:

#!/bin/sh

check_governor_avail() {
    info="/sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors"
    if [ -f $info ] && grep -q "\<1>" $info ; then
        return 0;
    fi
    return 1;
}

if [ -n $1 ] &&  check_governor_avail $1 ; then
    CPUS=$(cat /proc/stat|sed -ne 's/^cpu\([[:digit:]]\+\).*/\1/p')
    for cpu in $CPUS ; do
        sudo /usr/bin/cpufreq-set --cpu $cpu --governor $1 2>&1 > /dev/null || RETVAL=$?
    done
fi

Save this somewhere, for example ~/.powerprofile.sh, and make it executable. Now you just need to enter "~/.powerprofile.sh conservative" in the "execute a program" field in powerdevil, to set the cpu governor to conservative when the power profile is loaded.
 
 View user's profile Send private message  
Reply with quote Back to top
noxOffline
Post subject:   PostPosted: 30.05.2011, 22:57



Joined: 2010-09-14
Posts: 45

Status: Offline
Thank you very much llinsekt, thats exactly what i needed!

In my opinion, removing convenient and useful linux options to please some "confused" windows users is really not the way to go for kde... a little "advanced options" tab would do the job.
 
 View user's profile Send private message  
Reply with quote Back to top
devilOffline
Post subject: RE: How to control gpu/cpu temperatures under the new KDE  PostPosted: 30.05.2011, 22:58



Joined: 2010-08-26
Posts: 491
Location: Berlin
Status: Offline
apt-get install upower

greetz
devil
 
 View user's profile Send private message  
Reply with quote Back to top
bfreeOffline
Post subject:   PostPosted: 31.05.2011, 00:14
Team Member


Joined: 2010-08-26
Posts: 249

Status: Offline
      nox wrote:
In my opinion, removing convenient and useful linux options to please some "confused" windows users is really not the way to go for kde... a little "advanced options" tab would do the job.

I think in all probability if you can really understand all the implications of messing with normal (ondemand) cpu clocking then you don't need a gui to do it with. So before you go messing with CPU governors please read the first section of http://www.codon.org.uk/~mjg59/power/good_practices.html.

Basically a gui to pick powersave is just giving people who want to save power a chance to shoot themselves in the foot and waste power.
 
 View user's profile Send private message  
Reply with quote Back to top
noxOffline
Post subject:   PostPosted: 02.06.2011, 08:36



Joined: 2010-09-14
Posts: 45

Status: Offline
@bfree


To be honest I don't really care about saving power, only about controlling / regulating the temperatures of my notebook. The problem for me were too high temps (100 °C) doing some trivial tasks, like playing youtube videos... which was prevented with the old KDE 4.4x power-saving settings (resulted in max 70 °C, regardless of the task and with minimal performance impact).

What i would actually need, i think, is described in your article as an "application that monitors the temperature and limits the CPU speed appropriately". Since i'm not a programmer and could't find an application that does exactly this, llinsekts approach seems best to get the old functionality back, but observing the situation after the latest DU the temps look pretty ok (except again while playing some youtube videos), so i'm still thinking about implementing it.


Cheers
 
 View user's profile Send private message  
Reply with quote Back to top
Display posts from previous:     
Jump to:  
All times are GMT - 12 Hours
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Powered by Zafenio