Author Topic: Setup cpufreq and keep your laptop cool  (Read 6578 times)

Offline Texstar

  • Administrator
  • Super Villain
  • *****
  • Posts: 12525
Setup cpufreq and keep your laptop cool
« on: June 23, 2011, 07:31:44 PM »
This works for me. Maybe it will work for you too.

I have these packages installed.

[root@thenudiebar ~]# rpm -qa|grep cpufreq
cpufreq-1.0-28pclos2010
cpufrequtils-008-1pclos2010


In the root terminal I type:

cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies

I get the frequencies available to me. The one to the left is the highest and the one to the right is the lowest.
2800000 2100000 1600000 800000

Then I edit /etc/sysconfig/cpufreq file and add the minimum and maximum.

Looks like this:

# set cpufreq governor if defined
# possible choices are: ondemand powersave userspace performance
GOVERNOR=ondemand

# minimum frequency
MIN_FREQ=800000

# maximum frequency
MAX_FREQ=2800000

# Uncomment to use acpi-cpufreq as fallback
#USE_ACPI_CPUFREQ=yes


Then I go into the PCC and set cpufreq to start at boot. Once I reboot I open a terminal and check the status with


[texstar@thenudiebar ~]$ cpufreq-info
cpufrequtils 008: cpufreq-info (C) Dominik Brodowski 2004-2009
Report errors and bugs to cpufreq@vger.kernel.org, please.
analyzing CPU 0:
  driver: powernow-k8
  CPUs which run at the same hardware frequency: 0
  CPUs which need to have their frequency coordinated by software: 0
  maximum transition latency: 8.0 us.
  hardware limits: 800 MHz - 2.80 GHz
  available frequency steps: 2.80 GHz, 2.10 GHz, 1.60 GHz, 800 MHz
  available cpufreq governors: ondemand, conservative, powersave, userspace, performance
  current policy: frequency should be within 800 MHz and 2.80 GHz.
                  The governor "ondemand" may decide which speed to use
                  within this range.
  current CPU frequency is 800 MHz

Cha-ching!!!


Bonus Tip! Install CpuFreqDisplay plasmoid from get more widgets and add it to your KDE taskbar to see it in action.



« Last Edit: June 30, 2011, 11:13:36 PM by Texstar »

Thanks to everyone who donates. You keep the servers running.

Offline sling-shot

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 1730
  • Satyameva Jayate | Truth Alone Triumphs.
Re: Setup cpufreq and keep your laptop cool
« Reply #1 on: July 05, 2011, 11:25:23 AM »
Just wondering if /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies may not be available in an updated 2010 install versus brand new 2011 install.

I have an HP Mini with 2 installs. One of updated 2010 and another test install of 2011.

I get on my updated 2010 install the following:
Code: [Select]
[root@localhost xxx]# cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies
cat: /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies: No such file or directory

On going into the directory structure, I have a /sys/devices/system/cpu inside which there is "cpu0", "cpu1", "cpufreq", etc. Inside none of these I see the scaling_available_frequencies file.

I have both cpufreq-1.0-28pclos2010 and cpufrequtils-008-1pclos2010 accordiing to the rpm -qa|grep cpufreq


On the 2011 test install everything seems to work as suggested.

Even after using the frequencies reported by the 2011 install 2010 still shows no governor active by cpufreq-info.

Just reporting this for the possible difference.
-SS.
Packaging well will cure headaches of many :) But learning to package will cause headaches in many :(

AMD AthlonX2 3600+/ASUS M2NPV-VM/ATi HD4670/Onboard sound/3.5GB DDR2-533 RAM/SEAGATE 160+320GB HDD/DELL S2240L FullHD/Creative SBS370 2.1/PCLinuxOS2013/KDE4
Samsung NP305U1-A06IN | Nokia E6

Offline Gagarin Gambit

  • Full Member
  • ***
  • Posts: 190
  • Space technology
Re: Setup cpufreq and keep your laptop cool
« Reply #2 on: July 09, 2011, 04:35:12 AM »
Underclocking is very important for laptops or computers with overheating issues, I believe this should be sticky.

(although on the last laptop I installed PCLOS, cpufreq with ondemand governor worked out of the box :))
Linux. Space technology.

Offline canajun

  • Jr. Member
  • **
  • Posts: 49
  • I hate WinDohs!
Re: Setup cpufreq and keep your laptop cool
« Reply #3 on: August 01, 2011, 12:05:17 PM »
I get the same result as reported by Sling-Shot "cat: /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies: No such file or directory" on my Toshiba Satellite A305d running PCLOS 2010 with all the most recent updates (with exception of latest KDE for fear of borking system once again and having to re-install again ...but I digress)

          description: CPU
          product: AMD Turion(tm) 64 X2 Mobile Technology TL-60
          vendor: Hynix Semiconductor (Hyundai Electronics)
          physical id: 1a
          bus info: cpu@0
          version: 15.8.2
          slot: Socket M2/S1G1
          size: 2GHz
          capacity: 4GHz
          width: 64 bits
          clock: 200MHz

I would defintely like to solve this as overheating has been a constant problem with this puppy and keeps me from doing things like creating a custom "live CD" (always overheats and crashes).  The constant noise is also a real annoyance.

Thanks in advance!


edit:   kernel is  2.6.33.7-pclos6.bfs
« Last Edit: August 01, 2011, 01:26:47 PM by canajun »

Offline canajun

  • Jr. Member
  • **
  • Posts: 49
  • I hate WinDohs!
Re: Setup cpufreq and keep your laptop cool
« Reply #4 on: August 10, 2011, 04:47:17 AM »
Updated to PCLOS 2011 using Kernel 2.6.38.8-pclos1.pae.bfs (i686)  and got it working,
along with suspend and hibernate functions .... woohoo !   ;D

Offline OMSkates

  • Hero Member
  • *****
  • Posts: 2390
Re: Setup cpufreq and keep your laptop cool
« Reply #5 on: August 10, 2011, 05:21:49 AM »
Updated to PCLOS 2011 using Kernel 2.6.38.8-pclos1.pae.bfs (i686)  and got it working,
along with suspend and hibernate functions .... woohoo !   ;D
Awesome! :D

Offline sling-shot

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 1730
  • Satyameva Jayate | Truth Alone Triumphs.
Re: Setup cpufreq and keep your laptop cool
« Reply #6 on: August 10, 2011, 05:49:23 AM »
Updated to PCLOS 2011 using Kernel 2.6.38.8-pclos1.pae.bfs (i686)  and got it working,
along with suspend and hibernate functions .... woohoo !   ;D

How? Total wipe and reinstall?
-SS.
Packaging well will cure headaches of many :) But learning to package will cause headaches in many :(

AMD AthlonX2 3600+/ASUS M2NPV-VM/ATi HD4670/Onboard sound/3.5GB DDR2-533 RAM/SEAGATE 160+320GB HDD/DELL S2240L FullHD/Creative SBS370 2.1/PCLinuxOS2013/KDE4
Samsung NP305U1-A06IN | Nokia E6

Offline canajun

  • Jr. Member
  • **
  • Posts: 49
  • I hate WinDohs!
Re: Setup cpufreq and keep your laptop cool
« Reply #7 on: August 10, 2011, 01:00:53 PM »
Updated to PCLOS 2011 using Kernel 2.6.38.8-pclos1.pae.bfs (i686)  and got it working,
along with suspend and hibernate functions .... woohoo !   ;D

How? Total wipe and reinstall?
-SS.

Yes, I did a clean install and it seemed to be working, but it was still problematic with the standard .bfs kernel, so I installed the pae.bfs version and that cured it. Running very cool and quiet (better than on Windows Vista).

Core temps now (when idle) are usually around 47C.  to 50 C.  and THZN around 57 C  at boot up, and drops as low as 52 C. when idle. The fan kicks in when necessary and no longer racing and constantly whining loudly out of control. I am still experimenting with the limiting / governor functions to keep it from going to full speed with some apps (problematic when running WinDohs too), but so far, I am a happy PCLOS camper.

With PCLOS 2010, I could control cooling with the "powersave" module but then, the suspend and hibernate functions would not work. It was always a trade off-between the two features. Now I have both!

Downside: As I mentioned elsewhere though, following this upgrade, I no longer have any desktop effects with my Radeon 1200. Seems a number of others have experienced this as well with older ATI / Radeon graphics. Have tried a number of suggested "fixes" posted here on the forum, and everything else I could think of, but so far, no joy. Not a huge deal. But it would be nice to have that back too. Hopefully future updates will address this.


Offline grungebit

  • Jr. Member
  • **
  • Posts: 16
Re: Setup cpufreq and keep your laptop cool
« Reply #8 on: August 19, 2011, 10:51:28 AM »
@texstar:
is it possible to add custom frequencies for cpufreq to run? i got an AMD turion X2 RM-70 and the only possible frequency is 500MHz, 1GHz, and 2GHz. how do i add custom frequencies to cpufreq e.g 1,5 GHz or such?
one more thing, the option to set governor doesn't seem to work, whatever governor i choose via cpufreq config file or via cpufreq-set command it's just change for a while (like 1 minute or so) than it will set back to userspace governor? am i missing something??
fyi, i've got powernowd module installed, before i installed this module, the governor always set back to performance, HEYYY! ???

@sling-shot, @canajun:
maybe you guys does not load the proper kernel module for cpufreq to run, for mine i got cpufreq_stats,cpufreq_powersave,cpufreq_ondemand,cpufreq_conservative,freq_table,cpufreq_stats,cpufreq_ondemand kernel modules loaded, also for the my processor type i loaded powernow_k8 module too. these modules loaded from /etc/modprobe.preload if it's not there, add it manually.

regards and sorry for the bad english  ;)

Offline Gagarin Gambit

  • Full Member
  • ***
  • Posts: 190
  • Space technology
Re: Setup cpufreq and keep your laptop cool
« Reply #9 on: August 21, 2011, 05:47:40 AM »
is it possible to add custom frequencies for cpufreq to run? i got an AMD turion X2 RM-70 and the only possible frequency is 500MHz, 1GHz, and 2GHz. how do i add custom frequencies to cpufreq e.g 1,5 GHz or such?

If I'm not mistaken, the available frequencies depend on your processor - that is, they're part of your hardware. They're inbuilt, so every computer has a standard (maximum) frequency, and it might support a few other frequencies. So I don't think you can't change this using your software. There still might be a way, but this would probably mean meddling with your hardware or bios; google your model and any related terms and see if you discover something.
Linux. Space technology.

Offline gingermcchic

  • New Friend
  • *
  • Posts: 3
Re: Setup cpufreq and keep your laptop cool
« Reply #10 on: August 21, 2011, 12:49:56 PM »
Please excuse my noobieness, but how, exactly, do I add cpufreq to the boot rotation? PCLos xlde 2011

I can't find it in the menu
which pcufreq says it's not in the path
commandline /etc/sysconfig/cpufreq returns "permission denied"
and I'm just not real confident with what values I should provide for Image and Append

Offline grungebit

  • Jr. Member
  • **
  • Posts: 16
Re: Setup cpufreq and keep your laptop cool
« Reply #11 on: August 21, 2011, 01:15:59 PM »
@gagarin
oow so it's hardware thing, i thought we can do it like in android devices was...with a custom kernel on it, we can unlock the custom frequencies...:D

@ginger
open your pclos control center -> system -> manages system services... look for cpufreq and check the on boot checkbox to have it run at startup.
you need root access to run a system service...if you want to do it by command line it should be "service cpufreq start" or "/etc/init.d/cpufreq start"...hope that helps... ;)

Offline gingermcchic

  • New Friend
  • *
  • Posts: 3
Re: Setup cpufreq and keep your laptop cool
« Reply #12 on: August 23, 2011, 08:39:59 PM »
Thank you, bro. Gettin there, little by little.

Offline Linham

  • New Friend
  • *
  • Posts: 1
Re: Setup cpufreq and keep your laptop cool
« Reply #13 on: April 27, 2012, 01:36:17 PM »
I have just installed PCLinuxOS KDE 2010.07 and think  I  need to also slow the CPU as mentioned but can't find an option to check the temperature. From using another Linux OS I know the LapTop has a tendency to run hot.

PC by the way is a Compaq Presario 2500  and uses a Pentium 4 known to have a problem.

Thanks.

Offline rubentje1991

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 2110
  • Rubenus Parvus MCMXCI
Re: Setup cpufreq and keep your laptop cool
« Reply #14 on: April 27, 2012, 03:34:14 PM »
I have just installed PCLinuxOS KDE 2010.07 and think  I  need to also slow the CPU as mentioned but can't find an option to check the temperature. From using another Linux OS I know the LapTop has a tendency to run hot.

PC by the way is a Compaq Presario 2500  and uses a Pentium 4 known to have a problem.

Thanks.

I'd suggest installing the latest version - PCLinuxOS KDE 2012.02;
=> is there a reason you used such an old ISO (can give problems updating from such an old disk....  ;))S