8/7/07

Laptop Undervolting - Ubuntu and WinXp

With the arrival of summer and high temperatures it's always a good idea to cool down (if possible).

I own a Compaq nx8220 (Intel M750 @ 1.86Ghz) which dynamically underclocks itself in both Ubuntu and Windows - like mostly all the other relatively new models i've seen. But sometimes, even at the lowest frequency and while almost idle operation cycles it reach relatively high temperatures (i'd say the air circuit is not one of the best in the market).

Whether you are the kind of hardware health freak which enables and monitors all kind of sensors in your system (like me) or just interested in extending the life of your batteries reducing the working voltages of your processor might be what you are looking for.

If you are using Windows, the procedure is quite straight:

  1. Get Notebook Hardware Control
  2. Use it!
If you are using Ubuntu Feisty, you have to do the following:

  1. Get Linux Processor Hardware Control
  2. Take a look at its list of supported processors and kernels
  3. # sudo apt-get install linux-source-(your kernel version)
  4. Change to the folder where you unpacked the kernel source
  5. #cp /boot/config-$(uname -r) .config
  6. # patch -p1 <>
  7. # make oldconfig
  8. # make prepare
  9. # make scripts
  10. # make M=./arch/i386/kernel/cpu/cpufreq
  11. # mkdir cpufreq_bak
  12. # sudo cp -r /lib/modules/$(uname -r)/kernel/arch/i386/kernel/cpu/cpufreq ./cpufreq_bak
  13. # cd arch/i386/kernel/cpu/cpufreq/
  14. # sudo cp speedstep-centrino.ko /lib/modules/$(uname -r)/kernel/arch/i386/kernel/cpu/cpufreq
  15. # cat /sys/devices/system/cpu/cpu0/cpufreq/op_points_table
This is your current operation points table. I think you should make a back-up copy just to prevent ...

Now, to modify this table you must overwrite it, i.e with an order like this:

# echo "798000:700,1064000:780,1330000:876,1596000:972,1862000:1068" | sudo tee /sys/devices/system/cpu/cpu0/cpufreq/op_points_table

***You can add this line to your /etc/rc.local so it runs every time the system boots.

The string between the "" is a comma separated list of Frequency(Khz):Voltage(mV) pairs in which you assign a running voltage to the selected frequency multiplier of your processor.
There are lists around the net with the different values you can use in different processor models, and you can try different combinations to see which one suits you the best.
If you are running a dual boot setup like me you can test different operation tables with the Notebook Hardware Control as it runs a stability test for new tables.

As an example using the operation table shown above my laptop decreased its running temperature in around 5ºC at normal operation and a good 15ºC at full CPU use.

Ack's: Thanks to Philipp for firstly telling me about Linux PHC

8 comentarios:

EigenPersona dijo...

I have a question/comment from the what-if universe:
what if I set up crazy voltages?

I assume there will be some kind of hardware protection, or maybe you are just allowed to try valid (frequency, voltage) pairs. Is this right?

Ein dijo...

In both frequency and voltage, there are only fixed valid values. If you assign too low voltage values to high frequencies, the system may get unstable.
Other than this, if you set high voltage values probably your system is going to overheat, but i don't think it allows you to define voltages bigger than 1.5V (maximum nominal working voltage?).

El Portu dijo...

Has he really posted?

I can't believe in it.

My laptop is a potato and it would be better if i don't try any of this.

Ahora, lo que no acabo de pillar es este giro a la globalidad lingüística.

El Portu dijo...

(Y sí, me ha sobrado ese "in")

javis dijo...

I use a big ventilator, one of those that u use in summer to get cool, and it works! But i'm hot :S really hot ;)

javis dijo...

Is there any software for güindous that controls the temp in a big cpu?
I'm sure you know, kotaun taun taun.

EigenPersona dijo...

I'm pretty sure that kind of software must exist, in fact, the link provided by Ein is a good starting point to look for.

On the other hand, for a desktop computer temperature is not such an important/critical issue, for all his components are not distributed as compact as in laptops.

Ein dijo...

Mira el MotherBoardMonitor
MBM
pero asegurate de buscar bien bien el tipo de placa base que usas. Chuch