How to keep your cpu cool and your fan quiet

How to do things, solutions, recipes, tutorials
Message
Author
User avatar
erikson
Posts: 735
Joined: Wed 27 Feb 2008, 09:22
Location: Ghent, Belgium
Contact:

How to keep your cpu cool and your fan quiet

#1 Post by erikson »

Rev.0, 2008-Apr-25, Original
Rev.1, 2008-Apr-27, Cosmetic changes; correction of typos; comment on 3.01
Rev.2, 2008-May-17, Addition of min/max frequency fine tuning
Rev.3, 2010-Nov-15 (after a long absence): I downloaded and set up Lucid (luci-235) on my brand-new hp pavilion dv7-4050eb (with dual-core intel i5 processor). I noticed that Lucid includes a cpu frequency-scaling gui, that automates/replaces the manual work described below, and that works fine. After some research I find the gui has been developed and documented by trio: http://murga-linux.com/puppy/viewtopic.php?t=45143 - thanks trio, great job!

1. Introduction

This HOW-TO explains how to keep your cpu cool and your fan quiet, practically without affecting performance, by cpu frequency-scaling. This method employs the dynamic in-kernel ondemand governor, that changes cpu clock frequency (and supply voltage) at run time according to cpu load. Don't worry, it's much simpler than it sounds.

Note that bits and pieces on cpu frequency-scaling can be found in various forum threads. This HOW-TO intends to bring the pieces together into a well-documented, consistent and correct text.

2. What to expect

Summary of the findings on my laptop (hp/compaq nx9030) running pcPuppyOS rc6 (a 3.01 derivative) at ambient room temperature (around 20°C):
before frequency-scaling
- cpu temperature (monitored with conky) was constantly around 60...62° C,
- the fan was blowing roughly half-time, switching on/off every minute or so,
- the battery was drained from full to empty in some 55 to 60 minutes.
with frequency-scaling
- cpu stays below 50°C,
- the fan is completely silent (it never blows),
- the battery lasts for some 70 minutes,
- user responsiveness is not noticeably affected.

Note that the method described here only saves power on the cpu; there may be room for further power saving on other parts of the system. In comparison, WinXP/SP2 appears to be slightly more power-conservative overall (the battery lasts for some 75 minutes) even though the fan occasionally blows.

Comment 2008-Apr-27

I have applied this method on four Puppy versions (vanilla 2.16.1, vanilla 3.01, and 3.01 derivatives pcPuppyOS rc6 and final). For an as yet unknown reason (under investigation), the method described here appears to be much less effective for vanilla 3.01. In this case, it helps to reduce the maximum frequency.

Percentage of time spent at the highest cpu frequency (see section 4.3) for fairly light usage of the laptop:
- for Puppy 2.16.1: 0...4%
- for pcPuppyOS: 0...4%
- for Puppy 3.01: 60...65%

3. Outline of steps

(1) For background, read detailed explanation (section 4)
(2) Copy/paste below code section into /etc/rc.d/rc.local
(3) Uncomment/comment appropriate lines
(4) Reboot

The code has just three active lines. That's all!

Code: Select all

# cpu frequency-scaling (to save energy and to keep the system cool)
# step 1: load cpu driver, setup cpufreq system
#modprobe speedstep-lib		# library, not needed
#modprobe acpi-cpufreq		# generic
#modprobe p4-clockmod		# Intel
modprobe speedstep-centrino	# Intel Centrino
#modprobe speedstep-ich		# Intel
#modprobe speedstep-smi		# Intel
#modprobe powernow-k6		# AMD
#modprobe powernow-k7		# AMD
#modprobe powernow-k8		# AMD
#modprobe longrun		# Transmeta
#modprobe longhaul		# VIA Technologies
#modprobe e_powersaver		# VIA Technologies
#modprobe cpufreq-nforce2	# nVidia
#modprobe gx-suspmod		# Cyrix Media
# step 2: load driver(s) for frequency-scaling mode(s)
modprobe cpufreq_ondemand	# ondemand mode
#modprobe cpufreq_powersave	# powersave mode (not used)
#modprobe cpufreq_conservative	# conservative mode (not used)
#modprobe cpufreq_userspace	# userspace mode (not used)
# step 3: min/max fine-tuning; launch ondemand frequency-scaling mode
# replace [min] resp. [max] with numeric values from available frequencies
#echo [min] > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
#echo [max] > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
echo ondemand > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
4. Detailed explanation

4.1. Background reading

Many cpus have mechanisms to save power by changing the core supply voltage and clock frequency at run time. These are described in detail in the 16-page document Ref.1 "The ondemand governor". You should read this document as background. A quick reading should suffice, it's not necessary to bother about the fine details.

4.2. Manual set-up method

Before modifying rc.local, it is useful to boot from fresh (e.g. from live-CD with pfix=ram boot option) and to find out manually (using rxvt) which modules are required.

4.2.1. Step 1: load appropriate cpu frequency-scaling driver

These modules are in directory
/lib/modules/2.6.21.7/kernel/arch/i386/kernel/cpu/cpufreq/

The modules (shown using ls of this directory) are speedstep-lib, acpi-cpufreq, p4-clockmod, speedstep-centrino, speedstep-ich, speedstep-smi, powernow-k6, powernow-k7, powernow-k8, longrun, longhaul, e_powersaver, cpufreq-nforce2, gx-suspmod.

Module speedstep-lib is a library for common functions for Intel SpeedStep v.1 and v.2 support. On my laptop it can be modprobed without errors, but it's apparently not needed and so I don't load it. Some other modules may depend on it and load it automatically.

The other modules are the actual drivers. Insofar I found on the web, p4-clockmod and speedstep-x are Intel, powernow-x are AMD, longrun is Transmeta, longhaul and e_powersave are VIA Technologies, cpufreq_nforce2 is nVidia, gx-suspmod is Cyrix Media.

Evidently only one driver is needed. The drivers will not load on the "wrong" hardware, so it is safe to try each driver in turn when in doubt as to which is the correct one.

On my laptop (with Intel Centrino):
- modprobing acpi-cpufreq or p4-clockmod gives the error message

Code: Select all

FATAL: Error inserting <module> (...): Device or resource busy
- modprobing speedstep-ich, speedstep-smi, powernow-k6, powernow-k7, powernow-k8, longrun, longhaul, e_powersaver, cpufreq-nforce2 or gx-suspmod gives the error message

Code: Select all

FATAL: Error inserting <module> (...): No such device
- modprobing speedstep-centrino works fine.

Successful modprobing of the correct cpu frequency-scaling driver also sets up the filesystem for frequency scaling, under /sys/devices/system/cpu/cpu0/cpufreq/

4.2.2.Step 2: load driver(s) for frequency-scaling governor(s)

The driver modules (cpufreq_xxx with xxx = powersave, ondemand, conservative and userspace) are in directory /lib/modules/2.6.21.7/kernel/drivers/cpufreq/

There are five frequency-scaling governors:
- performance is a static mode, that runs the cpu constantly at its highest frequency (this mode has/needs no driver module and is default in Puppy),
- powersave is a static mode, that runs the cpu constantly at its lowest frequency (this mode uses least power; on my laptop user responsiveness is clearly degraded as seen e.g. when dragging a window)
- ondemand is a dynamic mode, that rapidly switches cpu frequency according to cpu load, in order to minimize power use with virtually no performance loss,
- conservative is a variant of ondemand, see Ref.1.
- userspace requires additional tools, see Ref.1.

You should modprobe the cpufreq-xxx driver(s) for all governors that you intend to use. In my case, I only use ondemand. Also performance and powersave governors may be useful, resp. for maximum speed and for minimum power consumption. In Puppy, I see little or no use for the conservative and userspace governors.

4.2.3. Step 3: activate frequency-scaling governor

This is done by writing the selected governor into the scaling_governor file, e.g.

Code: Select all

echo ondemand > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
4.3. Inspection of frequency-scaling state files and fine-tuning

These files are in directory /sys/devices/system/cpu/cpu0/cpufreq/
(this directory is set up by the cpu frequency-scaling driver)

In this directory, you can inspect at any time (from rxvt):
- available governors, by catting scaling_available_governors
- the active governor, by catting scaling_governor
- available cpu frequencies, by catting scaling_available_frequencies
- the current cpu frequency, by catting cpuinfo_cur_freq,
- frequency statistics, by catting stats/time_in_state

The active scaling governor takes into account the maximum and minimum frequencies as specified in the files scaling_max_freq and scaling_min_freq. Maybe, in ondemand mode, you find that the fan is still blowing too much to your taste. Maybe, in powersave mode, you find that your laptop is too slow to your taste. Then you may select another maximum resp. minimum cpu frequency, from the list of available frequencies in scaling_available_frequencies, and write it to file scaling_max_freq resp. scaling_min_freq.

4.4. Boot-time configuration

Copy/paste the rc.local code section as shown higher, and comment/uncomment the appropriate lines according to the required modules, as identified manually. The selected governor is then active after every reboot.

5. Further comments

(1) Above discussion applies to systems with one cpu (cpu0).

(2) I have tested above method on Puppy 2.16.1, Puppy 3.01, pcPuppyOS rc6 and pcPuppyOS final, and I expect it to work for all Puppy versions 2.13 and higher. For lower versions, cfr. Ref.4

(3) The ondemand mode can be further tuned if so desired. The parameter files are in directory /sys/devices/system/cpu/cpu0/cpufreq/ondemand
I personally did not experiment with these, since I'm perfectly satisfied with the default settings.

(4) Kazm has written a GUI script that autodetects the cpu type, cfr his post further down this thread and cfr Ref.4 (I have not tested it).

6. References

Ref.1 "The Ondemand Governor"
http://kernel.org/pub/linux/kernel/peop ... -paper.pdf
Ref.2 "Power management" (wikipedia)
http://en.wikipedia.org/wiki/List_of_CP ... chnologies
Ref.3 "Linux Kernel Documentation / cpu-freq"
http://www.mjmwired.net/kernel/Documentation/cpu-freq
Ref.4 "Howto get CPU frequency scaling to work in 2.xx"
http://www.murga-linux.com/puppy/viewtopic.php?t=12019
Ref.5 "Prozessorauslastung minimieren / optimieren?"
http://www.murga-linux.com/puppy/viewtopic.php?t=25669
Last edited by erikson on Tue 16 Nov 2010, 20:46, edited 14 times in total.

User avatar
playdayz
Posts: 3799
Joined: Fri 25 Apr 2008, 18:57

How to keep your cpu cool and your fan quiet

#2 Post by playdayz »

What great timing. I have just come back to Puppy after a year or two and I am happy to be here. The first thing I did was to install Puppy 3.01 in Virtualbox and it just screamed. It was by far the fastest thing I've seen in my VB. With low memory requirement (160-192K) I can open a Puppy session and leave it on the desktop at all times.

Then I put it on my Thinkpad T22 with a Sandisk Extreme 4 CF/IDE drive. The performance there is also crisp. So crisp that I used the BIOS to decrease cpu frequency by half to "fixed 450." Amazingly, the performance is about the same--totally useful, with no fan noise, noticeably less heat, and presumably greater battery life (if I ever get a good battery for it ;-)

My plan was to next start learning about how to control the cpu and I find you have done a lot of work for me. I appreciate it. Thanks.

Kazm
Posts: 29
Joined: Mon 14 Jan 2008, 21:53
Location: Russia, Ufa
Contact:

#3 Post by Kazm »

I made GUI script for this :roll:
And its also contain GUI script cpu_power_save_eee directly for ASUS eeePC, that use module p4-clockmod...

This script use some script from Xubuntu that auto find needed cpu module, but it not find anymore for ASUS eeePC CPU :cry:
Maybe I use old version?
Attachments
cpu_power_save_loc.pet
(4.81 KiB) Downloaded 1870 times

User avatar
recycler
Posts: 120
Joined: Thu 26 Jul 2007, 02:19
Location: New Zealand

how to get this working on compaq laptop

#4 Post by recycler »

erikson wrote:recycler,

On which specific combination of PC and Puppy version have you tried?

I assume you have typed in rxvt

Code: Select all

modprobe p4-clockmod
without getting an error message. This should indeed indicate success.
You can check with

Code: Select all

lsmod | grep p4
which should return p4-clockmod (and maybe some other modules with p4 in the name).

Now (e.g. with rox) check if you have the following directories

Code: Select all

/sys
/sys/devices
/sys/devices/system
/sys/devices/system/cpu
/sys/devices/system/cpu/cpu0
/sys/devices/system/cpu/cpu0/cpufreq
If not, from where in the tree is it missing?

Possibly you also have to do

Code: Select all

modprobe acpi-cpufreq
What does that return? Do you now have all /sys/... directories?

NB - description of console commands such as modprobe, lsmod, cat etcetera can be found at http://linux.die.net/
Hi, thanks for this support. I would love to have a quiet puppy laptop so here goes...
machine is Compaq Presario 2500 with 512mb Ram and 2.8Gig processor. I started with a fresh install of puppy 4.00 but have added in Tuuxx's icewm and an sfs of open office.

Following your advice I type lsmod | grep p4
and yes, I have p4_clockmod and speedstep_lib and nls_cp437

I have the laptop beside me (puppy can't use it's dial up modem) and I can see the directories down to cpufreq in which there are 11 files and two directories - 'ondemand' and 'stats'

modprobe acpi-cpufreq returns
FATAL: Error inserting acpi_cpufreq (/lib/modules/2.6.21.7/kernel/arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.ko): Device or resource busy

and that is where I get confused!

I've also just checked the rc.local file where I inserted the code. One question - I copied and pasted the code into there and uncommented the line modprobe p4-clockmod but is there a typing error there? It looks like a dash but maybe that should be an underscore?

The line about ondemand mode is also uncommented and then the last line for stage 3.

Hope this gives you the information you need. Many thanks
Leon

ps just went to directory cpufreq as recommended in orginal instructions to check Cpu freq and the cat cpuinfo_cur_freq returned 350000

Also before doing this tried changing the dash in the code to an underscore. Fan still going so don't think it's working yet. I would also be happy fixing the cpu freq at 1gig since this would be perfectly fast enough and maybe is easier?
[i][quote] [/quote]
[/i]Puppy 412 and 430

User avatar
erikson
Posts: 735
Joined: Wed 27 Feb 2008, 09:22
Location: Ghent, Belgium
Contact:

Re: how to get this working on compaq laptop

#5 Post by erikson »

recycler wrote:I can see the directories down to cpufreq in which there are 11 files and two directories - 'ondemand' and 'stats'
Okay, then the required cpu driver module (in your case p4-clockmod) is loaded.
modprobe acpi-cpufreq returns
FATAL: Error inserting acpi_cpufreq (/lib/modules/2.6.21.7/kernel/arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.ko): Device or resource busy
No problem, apparently it is not needed.
I've also just checked the rc.local file where I inserted the code. One question - I copied and pasted the code into there and uncommented the line modprobe p4-clockmod but is there a typing error there? It looks like a dash but maybe that should be an underscore?
I used dashes and underscores as I found the modules in pcPuppyOS (derivative of 3.01). AFAIK Puppy is forgiving and treats dashes/underscores in module names as equivalent, so it doesn't really matter.
Hope this gives you the information you need.
So far everything looks as it should be.

Please post contents of the files:
(1) /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies
(2) /sys/devices/system/cpu/cpu0/cpufreq/stats/time_in_state
[size=84][i]If it ain't broke, don't fix it.[/i] --- erikson
hp/compaq nx9030 (1.6GHz/480MB/37.2GB), ADSL, Linksys wireless router
[url]http://www.desonville.net/[/url]
Puppy page: [url]http://www.desonville.net/en/joere.puppy.htm[/url][/size]

User avatar
recycler
Posts: 120
Joined: Thu 26 Jul 2007, 02:19
Location: New Zealand

file contents

#6 Post by recycler »

Scaling Freq available
350000 700000 1050000 1400000 1750000 2100000 2450000 2800000

Time in State
350000 9907
700000 700
1050000 200
1400000 100
1750000 300
2100000 0
2450000 100
2800000 8924

...this could be embarrassing - looks like it is working :?: :)

...edit - now had the laptop running on battery for about 30 minutes and the fan comes on and off. With 30 minutes from the mains adapter (how I usually use it) fan seems to stay on all the time. Are the ondemand settings different depending on power source and if so can I change them?
[i][quote] [/quote]
[/i]Puppy 412 and 430

User avatar
erikson
Posts: 735
Joined: Wed 27 Feb 2008, 09:22
Location: Ghent, Belgium
Contact:

Re: file contents

#7 Post by erikson »

recycler wrote:looks like it is working
Yesss !!!

But I notice a similar effect as for me on 3.01 standard, namely the cpu is running at its highest frequency almost half-time (while it's just a few percent for several other Puppy flavors). Thus frequency scaling on my 3.01 standard and on your 4.00 does work, but is quite less effective than it might be. I still have not found why :?

It may be worthwhile to try the conservative governor (a variant of ondemand). Next option, that must be effective, is to install the powersave governor (echo powersave > .../scaling_governor). Then the cpu will always run at its lowest frequency.
Are the ondemand settings different depending on power source and if so can I change them?
AFAIK there's no difference in frequency-switching behavior between on-battery or on-ac. But while the battery is charging, the charging circuitry in the laptop dissipates some additional power (that must be evacuated by the fan).

Edit (addition, also adapted in first post)

You can also choose the highest cpu frequency that you accept (from the list of available frequencies), and write that one to file scaling_max_freq, e.g.

Code: Select all

echo 1750000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
Very effective in combination with the ondemand governor. Of course the line can also be added to rc.local, under "step 3".

In the same manner, it is possible to raise the minimal frequency.
Last edited by erikson on Sat 17 May 2008, 11:56, edited 1 time in total.
[size=84][i]If it ain't broke, don't fix it.[/i] --- erikson
hp/compaq nx9030 (1.6GHz/480MB/37.2GB), ADSL, Linksys wireless router
[url]http://www.desonville.net/[/url]
Puppy page: [url]http://www.desonville.net/en/joere.puppy.htm[/url][/size]

User avatar
recycler
Posts: 120
Joined: Thu 26 Jul 2007, 02:19
Location: New Zealand

cpu freq

#8 Post by recycler »

I will try your suggestions - thank you very much for the assistance :)

User avatar
recycler
Posts: 120
Joined: Thu 26 Jul 2007, 02:19
Location: New Zealand

reduced cpu speed on dingo

#9 Post by recycler »

Powersave mode - runs at the lowest frequency all the time - noticable loss of performance. Conservation - chooses middle way all he time. Some loss of performance. On demand but with max freq limited to 1gig. Produces this stat
350000 75104
700000 3200
1050000 85020
1400000 0
1750000 0
2100000 0
2450000 0
2800000 4
performance slight decrease - ok.

But - the cpu fan stays on all the time. Even with powersave mode. Leads me to wonder if the laptop is running hotter than it should!? Good to have the technique worked out. Can this be used to slow down a desktop and therefore also reduce the amount of heat produced and power consumed?
[i][quote] [/quote]
[/i]Puppy 412 and 430

User avatar
erikson
Posts: 735
Joined: Wed 27 Feb 2008, 09:22
Location: Ghent, Belgium
Contact:

Re: reduced cpu speed on dingo

#10 Post by erikson »

recycler wrote:But - the cpu fan stays on all the time. Even with powersave mode.
Strange... frequency scaling obviously works... did you use any boot parameter (like acpi=off or so)?
recycler wrote:Leads me to wonder if the laptop is running hotter than it should!?
Cpu temperature can be checked as follows, from rxvt:

Code: Select all

modprobe thermal
cat /proc/acpi/thermal_zone/THRM/temperature
The thermal module sets up the thermal_zone filesystem (if acpi is enabled). Thereafter, file temperature is continually updated.
recycler wrote:Can this be used to slow down a desktop and therefore also reduce the amount of heat produced and power consumed?
Yes.
[size=84][i]If it ain't broke, don't fix it.[/i] --- erikson
hp/compaq nx9030 (1.6GHz/480MB/37.2GB), ADSL, Linksys wireless router
[url]http://www.desonville.net/[/url]
Puppy page: [url]http://www.desonville.net/en/joere.puppy.htm[/url][/size]

User avatar
playdayz
Posts: 3799
Joined: Fri 25 Apr 2008, 18:57

Thinkpad T22

#11 Post by playdayz »

Thinkpad T22, BIOS says Intel Speedstep Technology. Dingo 4.0 (but same thing happens with 3.01). 900MHz. 256M RAM. 2.6.21.7.

All of the possible drivers say
FATAL: Error inserting acpi_cpufreq (/lib/modules/2.6.21.7/kernel/arch/i386/kernel/cpu/cpufreq/acpi-cpufreq1.ko): No such device
The drivers I tried were acpi-cpufreq, speedstep-centrino, speedstep-ich, speedstep-smi. Same message for all. Speedstep-lib does load.

Kazm's CPU Power Mode script did run and it echoed back whatever mode I chose (ondemand, conservative, etc.) lsmod showed that the script had loaded cpufreq_ondemand, along with speedstep-lib, but there was no speedstep-smi (or any variation of that) loaded. The script had recommended speedstep-smi.

The filesystem showed /sys/devices/system/cpu/cpu0/ the directory cpu0 was empty (which makes sense since the driver is supposed to create cpufreq, etc.).

There are settings in the BIOS that relate to power saving and Speedstep. The power saving gives choices Max Performance, Max Battery Save, and Custom for both AC and battery operation. Custom allows to adjust cpu frequency and does work, but it selects a static frequency. The Speedstep option does basically the same thing. No setting that I have tried of these two options makes any difference to loading the drivers--all four drivers give that same message.

The modules fan, thermal, processor, ac, and battery are also loaded.

I am about out of ideas--I would be grateful for any. thanks.

Soupbean

#12 Post by Soupbean »

I followed the instructions above for my T23 and it seems to be working ok (i'm not sure if it's the same for your T22). I'm using the acpi-cpufreq module as mentioned here
IBMWiki wrote:The CPU (Pentium III-M) has power management and throttling; use the acpi-cpufreq module instead of the speedstep-ich module to change speed automatically. The CPU has only two speeds, and with the cpufreq_ondemand & cpufreq_conservative modules, dynamic scaling will be achieved
do you have the modules required? (are the modules shown when you ls the directory as stated in the instructions)
erikson wrote: These modules are in directory
/lib/modules/2.6.21.7/kernel/arch/i386/kernel/cpu/cpufreq/

The modules (shown using ls of this directory) are speedstep-lib, acpi-cpufreq...

User avatar
playdayz
Posts: 3799
Joined: Fri 25 Apr 2008, 18:57

I do have the modules

#13 Post by playdayz »

Thanks for letting me know that it works on my computer's younger sibling Soupean.

The modules are in that directory. I am reasonably sure they are being tried because if I intentionally mispell one then I get a Module Not Found message instead of a No Such Device message.

If you have a chance and are comfortale doing so, perhaps you could look at your machine's BIOS and tell me how any options concerning power saving and Speedstep are set. thanks.

User avatar
erikson
Posts: 735
Joined: Wed 27 Feb 2008, 09:22
Location: Ghent, Belgium
Contact:

Re: Thinkpad T22

#14 Post by erikson »

playdayz wrote:Thinkpad T22 (...)
I am about out of ideas--I would be grateful for any. thanks.
On the T22 (and some other machines) it may be necessary to disable speedstep-lib checks in order to make speedstep-smi loadable.

Try this (at your own risk, see link):

Code: Select all

modprobe speedstep-lib relaxed-check=1
modprobe speedstep-smi
Cfr. Speedstep on Coppermine Thinkpads
[size=84][i]If it ain't broke, don't fix it.[/i] --- erikson
hp/compaq nx9030 (1.6GHz/480MB/37.2GB), ADSL, Linksys wireless router
[url]http://www.desonville.net/[/url]
Puppy page: [url]http://www.desonville.net/en/joere.puppy.htm[/url][/size]

User avatar
Aitch
Posts: 6518
Joined: Wed 04 Apr 2007, 15:57
Location: Chatham, Kent, UK

#15 Post by Aitch »

@erikson

thought you might be interested in this:

http://www.bio.ifi.lmu.de/~steiner/linux/
Fn-F7 Man, this is cool :-) It activates the power saving mode. You can flip through the power saving schemes with the cursor keys. These are the modes that define how the laptop will behave when running on batteries. See the APM chapter right above this one. With the right key you select the modes in the order "No saving -> middle saving -> high saving -> user-defined", with the left key in the reverse order. Thus, if you have defined the user-defined mode to run the CPU with 250MHz, you can switch between 500MHz and 250MHz while running Linux (note that all modes except user-defined mode run the CPU with 500MHz). And even if you have defined a certain screen brightness for the user-defined energy-saving scheme, you can still adjust the brightness with the m300bl-tool (see the X section). Thus, you can chose the CPU speed independent from the brightness with Linux :-)
Leave the mode with the same combination.
Aitch

Soupbean

#16 Post by Soupbean »

@playdayz

This is how my the power settings in my BIOS look:


Power Mode fro AC: Maximum Performance
Power Mode for Battery: Maximum Battery Life

Processor Speed: Fixed Max
Suspend timer: 5 minutes
LCD off timer: 5 minutes
HDD off timer: 3 minutes

Hibernate by time: Disabled
Low Bettery Action: Suspend
Suspend when LCD is closed: Suspend
Suspend/Hibernate while docked: Disabled
RediSafe: Disabled
Resume on time: Disabled
Resume on Modem Ring: Disabled

Intel SpeedStep technology: Enabled
Mode of AC: Automatic
Mode for Battery: Battery Optimized
Screen Blanking: Enabled
Suspend to hibernation: Disabled
CPU Power Management: Automatic
PCI Bus Power Management: Automatic


By the way, i'm using this in puppy 3.01, i haven't tried it in puppy 4

User avatar
erikson
Posts: 735
Joined: Wed 27 Feb 2008, 09:22
Location: Ghent, Belgium
Contact:

#17 Post by erikson »

Aitch wrote:thought you might be interested in this: (...)
Interesting indeed, thanks. Though the described Fn-F7 technique does not work on my laptop, it does something completely different :-)

On quite a few brands and models of PCs (and laptops in particular), power modes can be managed with propriety techniques. These may be accessible via function keys (as in your example for the Compaq Armada E500) and/or via BIOS settings (as in Soupbean's example for the IBM Thinkpad). Since these techniques are propriety and machine-specific, users are left on their own to search the web if anything might apply.

The method I described is more general, insofar the processor and BIOS support industry-standard ACPI (Advanced Configuration and Power Interface), and insofar ACPI is not overruled one way or another by conflicting boot parameters or BIOS settings.
[size=84][i]If it ain't broke, don't fix it.[/i] --- erikson
hp/compaq nx9030 (1.6GHz/480MB/37.2GB), ADSL, Linksys wireless router
[url]http://www.desonville.net/[/url]
Puppy page: [url]http://www.desonville.net/en/joere.puppy.htm[/url][/size]

PaulBx1
Posts: 2312
Joined: Sat 17 Jun 2006, 03:11
Location: Wyoming, USA

#18 Post by PaulBx1 »

I tried this for my Thinkpad A21m:

Code: Select all

modprobe speedstep-lib relaxed_check=1
modprobe speedstep-smi
modprobe cpufreq_ondemand
echo ondemand > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
It accepts this without error in rxvt however dmesg yields:

Code: Select all

ondemand governor failed to load due to too long transition latency
... and the scaling governor is still "performance".

I wonder if the kernel had this turned on during compile:

Code: Select all

CONFIG_X86_SPEEDSTEP_RELAXED_CHECK = y
I keep looking for reasons to retire this old Thinkpad and dig something a little better out of a dumpster. This may be a good one...

jakfish
Posts: 762
Joined: Fri 18 Jul 2008, 19:09

#19 Post by jakfish »

This is a fantastically helpful thread, and I thank everybody who contributed to it.

For the record, CPU scaling works in an ASUS EEE 900/DingoPlus. Because the scaling oftens goes to max freq (900 in the eee's case), I set the max freq to 675 and the min freq to 337.

There's a little lag time to opening OO, and other hungry apps, but it's a small price to pay.

With this scaling, it's possible to keep the machine cool enough to prevent the eee fan from coming on. Since I still haven't found a way for manual fan control in a Puppy/eee setup, the scaling adds substantially to battery life--well over four hours.

One thing my amateur eye noticed: the lower the max freq, the higher CPU usage (shown on a conky). Without scaling, running at a steady 630mhz set in BIOS, DingoPlus runs OO in the background at about 16-18% in conky's CPU monitor. With the scaling specs set to PowerMode and 675-337 max/min respectively, the CPU monitor shows about 25-27%

I don't know if this means anything, except that scaling drops the machine's temperature about 3 degrees, key to fan control on the eee 900.

Jake

SteveLeader
Posts: 4
Joined: Fri 12 Sep 2008, 07:42

Acer Aspire 1690

#20 Post by SteveLeader »

Hi!
First of all - thank you for this incredible thread! It's great (even for beginners like me :) ).

I've got a Acer Aspire 1692 with a Centrino platform with a Pentium M 740 CPU (1,73 GHz).

My intention is to keep the fan silent. So I did the following:

Code: Select all

# modprobe speedstep-centrino
# modprobe cpufreq_powersave
and because i want to stop the fan, i fixed the maximum frequency to the minimum of the cpu

Code: Select all

# cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies 
1733000 1333000 1067000 800000 
# echo 800000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq 
then i wanted to know, if he's running at the lowest level, which was confirmed by time_in_state

Code: Select all

# cat /sys/devices/system/cpu/cpu0/cpufreq/stats/time_in_state 
1733000 24817
1333000 0
1067000 0
800000 21950

# cat /sys/devices/system/cpu/cpu0/cpufreq/stats/time_in_state 
1733000 24817
1333000 0
1067000 0
800000 57498
so he's working at 800MHz only.
After doing that, the temperature fell to 40°C

Code: Select all

# cat /proc/acpi/thermal_zone/THRM/temperature 
temperature:             40 C
and stays at this level the whole time.
top says 100% idle...

Code: Select all

CPU:   0% usr   0% sys   0% nice 100% idle   0% io   0% irq   0% softirq
but my fan is spinning the whole time. it never stops (neither on ac nor on battery).

So I was wondering, if someone has an idea how to get my fan silent, because it's very annoying. This is the only problem with puppy...without it, it would be the perfect os ;)

Thanks in advance!
steve

Post Reply