You are not logged in.

#1 2015-07-21 06:36:07

siv
Member
Registered: 2014-04-18
Posts: 25

[Solved] - TLP and disabling default governor

Hi guys,
I installed TLP and configurated it.

Here the lines about governors:

CPU_SCALING_GOVERNOR_ON_AC=ondemand
CPU_SCALING_GOVERNOR_ON_BAT=powersafe

I rebooted but if I'm not wrong tlp-stat says that the governors are both ondemand (both for AC and battery):

+++ Processor
CPU Model      = Intel(R) Core(TM)2 Duo CPU     P7450  @ 2.13GHz

/sys/devices/system/cpu/cpu0/cpufreq/scaling_driver    = acpi-cpufreq
/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor  = ondemand
/sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq  =   800000 [kHz]
/sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq  =  2133000 [kHz]
/sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies = 2133000 1600000 800000 [kHz]

/sys/devices/system/cpu/cpu1/cpufreq/scaling_driver    = acpi-cpufreq
/sys/devices/system/cpu/cpu1/cpufreq/scaling_governor  = ondemand
/sys/devices/system/cpu/cpu1/cpufreq/scaling_min_freq  =   800000 [kHz]
/sys/devices/system/cpu/cpu1/cpufreq/scaling_max_freq  =  2133000 [kHz]
/sys/devices/system/cpu/cpu1/cpufreq/scaling_available_frequencies = 2133000 1600000 800000 [kHz]

Maybe it is a conflict with default system's governor? The documentation about TLP says to stop every governor to avoid conflit but I don't know how.

How can I sto system's governor? The only thing that I know is that the loaded module is acpi_cpufreq:

[siv@siv-arch ~]$ sudo lsmod | grep acpi
acpi_cpufreq           20480  1
processor              28672  3 acpi_cpufreq

Last edited by siv (2015-07-27 09:55:16)

Offline

#2 2015-07-21 08:05:04

Awebb
Member
Registered: 2010-05-06
Posts: 6,311

Re: [Solved] - TLP and disabling default governor

1. powersave not powersafe. https://www.kernel.org/doc/Documentatio … ernors.txt
2. Why would you want powersave? Modern processors usually wake up, do their job and fall asleep again. If you limit the speed, they will take longer to do their job and sleep less and therefore use more energy. I have not done any real scientific research about this, but in my experience, the powersave governor does not give you that much more battery time but slows down the system.

Offline

#3 2015-07-21 09:19:59

siv
Member
Registered: 2014-04-18
Posts: 25

Re: [Solved] - TLP and disabling default governor

1)Ooops thank you! What a foolish error!
I'll try to correct it in the config file and see if the system keeps the right value.

2)So do you suggest to keep everything on "ondemand"? Also the part that manages the sleep of the harddrive? In other words, in your opinion, there are benefits using TLP or similiar software today?

Offline

#4 2015-07-21 10:29:25

Awebb
Member
Registered: 2010-05-06
Posts: 6,311

Re: [Solved] - TLP and disabling default governor

1. I'm only talking about the CPU governor. Let me be more specific: It depends on your CPU (or rather it's age), what governor you should prefer. If you have an Intel (PIII mobile or newer), you have access to the so called SpeedStep CPU feature (read about it). The respective AMD technologies are called Cool'n'Quiet and PowerNow!. As for the maturity of the technology, the number of board and mailing list posts with either keywords and "ondemand" peaks in 2008. Depending on your CPU, tampering with the governor might cause "problems" on modern Intel CPUs, because they now use the intel_pstate driver by default (since Linux 3.9, it's all in the wiki.

As a rule of thumb, powersave will not give you benefits regarding energy consumption on a CPU manufactured during the past ten years. You should only change the governor from "ondemand" to whatever you need, if you experience problems (like the stepping is too slow and causes latencies).

I see you have a Core 2 Duo P7450 It supports EIST but not pstate. According to the Arch wiki entry about CPU freq scaling, the module "acpi-cpufreq" is supposed to be loaded by default. Check modprobe.

There is another governor, "conservative". It behaves similar to "ondemand", but it works the other way round: It increases the clock slowly but decreases is very quickly. I'd experiment with those two governors.


2. I personally don't use TLP (but I will try it again tonight, so thanks for reminding me). TLP does not really do much, it's an event based settings manager for all those nice energy management features in the Kernel and all that stuff in /sys. It doesn't do the real work for you, you still to figure out, what settings are sane and beneficial for your setup.

By the way...

Maybe it is a conflict with default system's governor? The documentation about TLP says to stop every governor to avoid conflit but I don't know how.

I don't know of any special governor setting in Arch. The TLP FAQ explicitly mentions Ubuntu and Debian, as they have special circumstances there. I think it all boils down to "powersafe".

Offline

#5 2015-07-21 12:24:48

siv
Member
Registered: 2014-04-18
Posts: 25

Re: [Solved] - TLP and disabling default governor

First of all thanks a lot for detailed informations.

1) I didn't know about all these informations. So if I understood correctly "powersave" will not gives benefits. The only two governors "accettable" are: ondemand and conservative (neither the performance?)
I have just tried "powersave" and the performances decreased drastically. Maybe, as you said, I have to switch to "ondemand" or "conservative".
Hoverever I'm realizing that the most heavy factor regaring energy consuption is the brightness of the screen. Am I right?

2) Yeah, you're right, I corrected the error and now tlp-stat shows the right governor.

Offline

#6 2015-07-21 13:55:12

Awebb
Member
Registered: 2010-05-06
Posts: 6,311

Re: [Solved] - TLP and disabling default governor

It really depends on your hardware. My laptop (desktop replacement) has the following orders of impact on the consumption:

Heavy work:
1. CPU
2. Display
3. WLAN
4. Bluetooth
5. rest

If all I do is browse the web:
1. Display
2. CPU
3. WLAN
4. Bluetooth
5. rest

My netbook is different. WLAN, CPU and DISPLAY are about equal, it has no bluetooth, the wild card is the HDD.


About governors: My Intel i7 for example uses this intel_pstate module. It was developed, because the cpufreq driver's ondemand didn't work so well with those new processors. It only comes with two governors, powersave and performance. In intel_pstate terms, powersave is what you know as ondemand and performance is about the same as performance.

Offline

#7 2015-07-27 09:54:50

siv
Member
Registered: 2014-04-18
Posts: 25

Re: [Solved] - TLP and disabling default governor

Thank you for the help with TLP and for the very interesting discussion about energy consuption.

Offline

#8 2015-07-27 10:00:14

Awebb
Member
Registered: 2010-05-06
Posts: 6,311

Re: [Solved] - TLP and disabling default governor

I'm curious now: How did you end up doing it?

Offline

#9 2015-07-27 14:44:38

siv
Member
Registered: 2014-04-18
Posts: 25

Re: [Solved] - TLP and disabling default governor

Yeah you're right I didn't post any conclusion.

The "problem" with TLP was the misspelling of the word "powersave" (I wrote "powersafe").

About the configuration of TLP I end up setting:
with battery -> ondemand (powersave damages harshly the performances of the laptop)
with power supply -> performance

The others setting of TLP follow more or less the same philosophy. With AC power I set a value that increase performances (despite the energy consuption) and with battery I set a value that tries to extend the life of the battery.
However, as I said above and you confirmed it, when I use the laptop for browsing the most consuming factor is the display brightness, so unless I decrease it, the life of the battery is (very) short regardless TLP or not.

Last edited by siv (2015-07-27 14:46:19)

Offline

Board footer

Powered by FluxBB