Erleuchtung, Stromsparen, Undervolting PHC, TLP linrunnerscript. ____________ Lob für linrunner

xsid

Active member
Themenstarter
Registriert
29 Mai 2007
Beiträge
4.622
Erleuchtung, Stromsparen, Undervolting PHC, TLP linrunnerscript. ____________ Lob für linrunner

Hi Stromsparer,

ich bin doch sehr überrascht.

Bei einem T61 Intel-Grafik ermittelt "powertop" bei Debian Squeeze KDE amd65 eine Leistungsaufnahme von 210 Watt.
Es wurde ein Grundinstallation verwandt.
Powertop: Stromverbrauch (ACPI-Schätzung): 213,3W (0,1 Std.)

Gleicher T61 bei Kubuntu Maverick mit PHC- und Linrunnerscript-Optimierung werden nur noch ca. 18 Watt verbraucht.
Powertop: Stromverbrauch (ACPI-Schätzung): 19,5W (0,9 Std.)


Die Dokumentation von linrunner ist hervorragend, wirklich super. Sehr professionell.
Danke linrunner.

Linrunner, jetzt verstehe ich den Namen, wenn alle anderen keinen Strom mehr haben, Linrunner läuft.



Könnt Ihr diese Erfahrungswerte bestätigen?
Habe ich etwas falsch gemacht?

Ein richtiger WOW-Efekt.

MfG

xsid



Anleitung PHC:

http://openmindedbrain.info/26/10/2010/undervolting-in-ubuntu-10-10-maverick/


And what are the negative aspects of Undervolting? Well actually taking some voltage from the CPU could bring in computational problems, basically when taking too much of it the CPU could start mixing 1's and 0's which can crash the entire system (reset needed) or bring in data loss/corruption. Not so good eh? So how is that people manage to do it without causing those side effects?

It depends on every CPU. Because it is not possible to create two CPU's 100% alike in the factory, tests are made to ensure all CPU's sold can work with the voltages specified under all circumstances. The fact is that some of the CPU's can work with voltages many times inferior than others that came from same factory/same box. The trick is to discover the limits of your CPU and set the voltage just a little above this limit and you are good to go.

WARNING because of the negative aspects shown above, by following the steps given below, I am not under any circumstances responsible for any data loss or corruption, damage to the CPU/PC. Those next steps were proven to work for many people around the world, but no guarantee is given that it would work for you without possible side effects. Just make sure that at least you have an updated backup of the data before continuing.


Ok, so now that you accept full responsibilities for the steps below, let's get going. I actually did this several years ago under other version of Ubuntu (using a single core Pentium M CPU back then) and it worked alright, but many things changed since then, we've got multi core CPU's everywhere and the way the undervolting issue is handled in Linux is very different also.

So what do we need? A single or multi core Intel Mobile/Laptop CPU and Ubuntu 10.10 installed on it and some time because it will take a little before having everything configured. Here are the complete steps that worked for me:
As we are going to use a custom kernel, we need to add the linux-phc PPA repository, so just open a terminal and execute: 1 $ sudo add-apt-repository ppa:linux-phc/ppa
2 $ sudo apt-get update
1 $ sudo add-apt-repository ppa:linux-phc/ppa
2 $ sudo apt-get update

Basically they provide the same kernel as the Ubuntu one but with the patch that is capable for Undervolting.
Next we need to install the phc kernel, with headers: 1 $ sudo apt-get install linux-generic-phc linux-headers-generic-phc
1 $ sudo apt-get install linux-generic-phc linux-headers-generic-phc

Ok, now we need to restart and use the installed phc kernel when booting. After restarting, you can check if you are using the phc kernel by using 1 $ uname -r
2 2.6.35-22-generic-phc
1 $ uname -r
2 2.6.35-22-generic-phc

If no "phc" appears, then you have to configure grub2 to allow you to chose boot options and select the phc kernel at boot time. This can be done many ways one would be: 1 sudo update-grub
1 sudo update-grub

and count the number of lines that says "Found linux image" (first one is 0) and, when you found the phc one, do: 1 sudo gedit /etc/default/grub
1 sudo gedit /etc/default/grub

then just change the "GRUB_DEFAULT=0" to the number of the entry you found that has phc. Save the file and do a update-grub command again like in the first step. Now you can reboot into the phc kernel.
Great, we are using a phc kernel, now we need to add the actual undervolt module, as the kernel comes only with support for it, not the actual module. First we need to download phc-intel offtree module from here. Right now they do not have a compatible version for the 2.6.35 kernel, but give the link a try, maybe by the time you read this post there is already a module that can be used in 2.6.35 kernels. Meanwhile there was a kind user on linux-phc forum that managed to create a module for the 2.6.35 and 2.6.36 kernels. Topic about it here. Direct link to the tar.gz file he kindly shared to the rest of us here. So download and unpack the files anywhere and point the terminal to the directory where you extracted the files and do: 1 $ make prepare
2 $ make
3 $ sudo make install
1 $ make prepare
2 $ make
3 $ sudo make install

Right now you should have the module installed, check if everything worked by typing: 1 $ cat /sys/devices/system/cpu/cpu0/cpufreq/phc_default_vids
2 40 34 31 27 23 15
1 $ cat /sys/devices/system/cpu/cpu0/cpufreq/phc_default_vids
2 40 34 31 27 23 15

If everything worked, you should see some numbers (the ones above are the default ones for my CPU). If not, you may try to restart and check back to see if it works.
So right now we are set, the only thing we have to do is... undervolt the CPU.
Now we have to discover the limits of the CPU by lowering it's current voltage one step at a time and set the voltage 4 steps above the critical limit (where the cpu starts to give wrong calculations or the PC simply crashes).

Why four? Well the recommendation was 2 steps above, but with this limit the PC crashed in the same day hours later, so I made it 3 steps, then some days after it crashed again. So I think 4 steps should actually do it. If not, you may increase this value until it suits you.

Ok great now how to find the actual critical limit? There exists a script, created by the community, but it's old and it does not work for multi core CPU's and also in my particular case it sets the voltage directly below this critical limit so the PC crashes instantly.

I updated this script and made it work on multi core CPU's (hopefully it will work for you too), so you just have to download the script, then give it execution permissions and execute it and follow on-screen indications: 1 $ chmod +x intel-phc-undervolt.bash
2 $ ./intel-phc-undervolt.bash
1 $ chmod +x intel-phc-undervolt.bash
2 $ ./intel-phc-undervolt.bash

Oh and make sure you close as many applications as possible when executing the script as the system may actually turn instable (it is intended actually) just to prevent any data loss. The script treats all CPU's cores with the same voltages, so if one of them is weaker than the other (does not support such a aggressive undervolting) is this the critical value that the script uses for all of the others, even if they could possibly use a even lower value.
After you finished with the script, now you should have a "phc_tweaked_vids" file, containing the acceptable steps for your CPU. Now you only have to make changes permanent (load them at every boot of the pc) by editing /etc/rc.local file: 1 $ sudo gedit /etc/rc.local
1 $ sudo gedit /etc/rc.local

and adding one entry for every core you have, something like: 1 echo "23 20 4 4 4 4" > /sys/devices/system/cpu/cpu0/cpufreq/phc_vids
2 echo "23 20 4 4 4 4" > /sys/devices/system/cpu/cpu1/cpufreq/phc_vids
3 .
4 .
5 .
6 echo "23 20 4 4 4 4" > /sys/devices/system/cpu/cpu8/cpufreq/phc_vids
1 echo "23 20 4 4 4 4" > /sys/devices/system/cpu/cpu0/cpufreq/phc_vids
2 echo "23 20 4 4 4 4" > /sys/devices/system/cpu/cpu1/cpufreq/phc_vids
3 .
4 .
5 .
6 echo "23 20 4 4 4 4" > /sys/devices/system/cpu/cpu8/cpufreq/phc_vids

just before the "exit 0". Note that "23 20 4 4 4 4" are my values, you have to replace the above with your values, that came from the "phc_tweaked_vids" file. So that's about it. Not too easy, not too complicated.

So... is it worth it? I have done some tests to see if the above actually works as said, so first I tested to see if on battery using powertop application and the CPU temperature I could see any differences. None actually, if the CPU is in idle state, there is no actual gain using undervolting, be it battery or temperature.

But when I've done the test under full load (using 2 burnMMX instances, one for every core) and with the CPU set at it's maximum 2.4Ghz I could see a very very noticeable difference.

First let's see the power drain of the battery in Watts, as indicated by powertop application (with the PC disconnected from the charger, of course):
 
Nja die Messwerte von Powertop sind ab und an mal Quark, es gab auch schonmal leute die 0,1W mit angeschaltetem WLAN usw. gemessen haben, kann also nicht sein...
Hast du das Netzteil ausgesteckt?

Übrigens:

Auch mein Dank an linrunner, der die Linuxwelt doch immer wieder voran bringt;)
 
Netzteil

Hi,

powertop funktioniert nur im reinen Akkubetrieb.

Mit Netzteil. gibt es folgende Mitteilung:

Keine ACPI Stromverbrauch-Schätzung verfügbar

Kann ich den Stromverbrauch irgendwie zuverlässiger ermitteln?


MfG

xsid
 
xsid' schrieb:
ich bin doch sehr überrascht.

Bei einem T61 Intel-Grafik ermittelt "powertop" bei Debian Squeeze KDE amd65 eine Leistungsaufnahme von 210 Watt.
Es wurde ein Grundinstallation verwandt.
Powertop: Stromverbrauch (ACPI-Schätzung): 213,3W (0,1 Std.)
Und das glaubst du?
Was meinst du, könnte in deinem Notebook verbaut sein das 213W zieht :facepalm:
 
Ich habe vermutlich schon gefühlte 200mal geschrieben, dass die Powertop Schätzung Quark ist.

Auslesen per tp-smapi ist zuverlässig, ansonsten alles Käse.


cat /sys/devices/platform/smapi/BAT0/power_now

Edit: Ich hoffe dein T61 braucht bei maximaler Helligkeit und Wlan 18W. Das ist nämlich auch schon viel..

Edit#2: Wie ja schong eschrieben wurde, wie soll ein 90W Netzteil 210W + Verlustleistung bringen?... :facepalm:

Edit#3 (ich kanns nichts lassen xD) Bei der Hitzeentwicklung kannst du dann sämtliche Plastik und Metallteile problemfrei umformen, falls die nicht sowieso schmelzen :blink:
 
buddabrod' schrieb:
Edit: Ich hoffe dein T61 braucht bei maximaler Helligkeit und Wlan 18W. Das ist nämlich auch schon viel..

Selbst dann fänd ich es fast noch zu viel. Unter leichter Last ja, aber ruhend sollte <15 W sein hätte ich erwartet.
 
cat /sys/devices/platform/smapi/BAT0/power_now

Hallo buddabrod,

den Satz:

cat /sys/devices/platform/smapi/BAT0/power_now

habe ich mehrfach gelesen.

Bei Squeeze habe ich smapi in den Kernel integriert.

Wie funktionieirt das nun mit "cat /sys/devices/platform/smapi/BAT0/power_now" genau?

Hast Du da irgendwo eine Anleitung, eine guten Link?

Wie mache ich einen relaistischen Vergleich? Vorher / Nachher?

MfG

xsid
 
xsid' schrieb:
Wie funktionieirt das nun mit "cat /sys/devices/platform/smapi/BAT0/power_now" genau?

Konsole aufmachen (z.B. gnome-terminal) und den genau den "Satz" eintippen => die ausgeworfene Zahl entspricht der aktuellen Leistungsaufnahme in Milliwatt.
 
Falsch

HI,

bei mir scheint irgend etwas flasch zu sein:

cat /sys/devices/platform/smapi/BAT0/power_now
cat: /sys/devices/platform/smapi/BAT0/power_now: Datei oder Verzeichnis nicht gefunden

Fehlen mir irgend welche Pakete?
Muß noch etwas konfigurieren?
Wie gehe ich bei der Fehlersuche vor?

Ich verwende KDE.

MfG

xsid
 
Natürlich muss dafür tp-smapi installiert und geladen sein. Über apt kannst du es einfach nachinstallieren. modprobe tp-smapi lädt dann das Modul.

Danach funktioniert das Auslesen über smapi. Mehrfachen "tabben" (tabulieren? :D) in der Konsole hilft auch sehr gerne ;)
 
Jetzt ein Ergebnis

Hi,

t--smapi war doch nicht geladen, ich habe es wie folgt nachgeladen:

modprobe tp-smapi

Nun das Ergebnis bei Debian Squeeze KDE amd64:

cat /sys/devices/platform/smapi/BAT0/power_now
-24894

--Edit 12. März 2011

Bei Kubuntu 10.10 mit PHC-Kernel 2.6.35-27-generic-phc

cat /sys/devices/platform/smapi/BAT0/power_now
-15557

Ohne wlan:

cat /sys/devices/platform/smapi/BAT0/power_now
-14432

--Editende


Powertop verarbeitet vermutlich nur die Einheiten nicht richtig, ob das sein kann?

Wie lade ich tp-smapi automatisch bei jedem Booten? Macht das Sinn?
Zur Zeit lädt tp-smapi nicht selbständig.

Eintrag "tp-smapi" in /etc/modules ?

Ist das eine saubere Lösung?

MfG

xsid
 
Wenn die /etc/modules bei Debian geparsed wird, ist das einwandfrei.

Hier unter Fedora gibts das nicht, da muss man das in die /etc/rc.local reinfrickeln :(

Übrigens liest powertop davon nichts aus, sondern nimmt die Werte aus /proc/acpi/blafoo
 
weitere Optimierungemöglichkeiten

Hallo Stromsparer,

bei dem T61 mit Intel-Grafik, Intel(R) Core(TM)2 Duo CPU T9300 @ 2.50GHz
sieht es nun wie folgt aus:

Bei Kubuntu 10.10 mit PHC-Kernel 2.6.35-27-generic-phc mit wlan:

cat /sys/devices/platform/smapi/BAT0/power_now
-15557

Ohne wlan:

cat /sys/devices/platform/smapi/BAT0/power_now
-14411


Sind weitere Optimierungen bezüglich des Stromverbrauchs möglich?

Was ist bei Windwos möglich (XP, Vista, W7)?

MfG

xsid
 
Welche Displayhelligkeit? Auf minimal komme ich auf 9,5W mit Intel Grafik, wenn ich noch optisches Laufwerk etc. deaktiviere, komme ich so auf 9W.
 
Wie ihr alle auf solche Werte kommt, werde ich nie verstehen :(

Code:
holger@ub510:~$ cat /sys/devices/platform/smapi/BAT0/power_now-23467


23,5W mit meinem T510, auf 1.20GHz getaktet, WLAN an, Helligkeit halb. Liegt das nur an der nVidia Grafik?
 
Würde ich nicht sagen. Bei meinem T61 hatte ich vorher ein nvidia board drinne und damit einen Verbrauch, der ca. 0,3-0,5W höher war als mit der Intel jetzt. Wobei ich zu der Zeit noch einen alten Kernel benutzt hatte, der 2.6.37er bringt ja nochmals einige Ersparnisse (ca. 0,5W)
 
Watten

Hallo buddabrod,

die Displayhelligkeit ist jetzt auf niedrigster Stufe eingestellt.

cat /sys/devices/platform/smapi/BAT0/power_now
-12215

wlan und bluetooth sind deaktiviert gewesen.

Woher könnte die Differenz von ca. 3 Watt entstehen?

Wie deaktiviere ich mein Laufwerkt?

Was für einen Prozessor hast Du? 2x2,2Gz ?
Mein Prozessor ist ein Intel(R) Core(TM)2 Duo CPU T9300 @ 2.50GHz, könnte hier die Ursache liegen?

Ist der Fedora Kernel wirklich so viel sparsamer?
Meiner, Kubuntu 2.6.35-27-generic-phc.

Meine Bios Verison 2.27-1.08.

Die HDD ist eine Seagate Momentus 500 GB 7200 Umdr.


Ich möchte auch gerne 9 Watt.

MfG

xsid
 
Ich hab ein T7500, der sollte eigentlich im Idle mehr brauchen als dein T9100.

Deine Festplatte braucht mehr Strom, meine WD 500GB Platte hat nur 5400rpm.

Außerdem hat mein gesamtes System so nur ca. 6-9Wakeups/s, nach powertop.

Der 2.6.37er kernel bringt auch nochmal ca. 0,5W-1W Einsparung. Das hat nichts mit fedora spezifischen Sachen zu tun.
 
  • ok1.de
  • thinkstore24.de
  • ok2.de - Notebook Computer Server
  • Preiswerte-IT - Gebrauchte Lenovo Notebooks kaufen

Werbung

Zurück
Oben