additional settings for powersaving

Joined
Jul 29, 2008
Messages
23
Reaction score
0
So I was browsing lesswatts.org and it appears that acer did not set some stuff.

I did these:

echo 1 > /sys/devices/system/cpu/sched_mc_power_savings
echo 3000 > /proc/sys/vm/dirty_writeback_centisecs
echo 10 > /sys/module/snd_hda_intel/parameters/power_save
echo 5 > /proc/sys/vm/laptop_mode

From the batter tray icon, it looks that a got about ~20 mins extra of battery life.

I then started looking at the network stuff.

"iwpriv ath0 powersave" can take 1 2 or 3. I currently have it set to 3, but I have no idea which number does what. It could have disabled power save. I didn't bother looking for the source to see if the developers put any useful comments in there.

if you're using the ether jack, you can try setting this:
ethtool -s eth0 autoneg off speed 10
Seeing as you're on battery, streaming audio would kill it, versus playing from the system.

I'll be setting up a vmware image with FC8 for compiling the 26 kernel, as there are a crap load more features for portable devices, as well as for powersaving features.

In the end, almost three hours from this little "stick" of a battery is not bad.
However, I plan on breaking all this kde/gnome stuff down. I know that acer kept it in/used it for the integration that it provides, but I want a minimal environment. So I'm going to change the init to not load a lot of this stuff. WindowMaker for a windowmanager (yes, there is fluxbox, but it's not as productive for me, and wm has always been fast and efficient), some webkit based browser, and some small app to provide a clickable interface to turn on and off any thing I need. We'll see...

So far tuning the current environment is keeping me satisfied.
 
echo 1 > /sys/devices/system/cpu/sched_mc_power_savings
echo 3000 > /proc/sys/vm/dirty_writeback_centisecs
echo 10 > /sys/module/snd_hda_intel/parameters/power_save
echo 5 > /proc/sys/vm/laptop_mode

From the batter tray icon, it looks that a got about ~20 mins extra of battery life.


Wow, I think I just may have to try these settings if they give 20 mins more battery time :shock:

Is there an easy way to revert these settings if they should f* something up?
 
Sid said:
Thanks for these.
How did you test the results of these changes?

I had already tested the battery to obtain a base spec. Using three terms and firefox with two tabs. I never saw more than 2:34 on the battery tray's tooltip for remaining battery time. If I was idle for a bit, and the screen blanked, when I came back, it would say 3+, but as soon as I started working again, it dropped below 2 1/2 hours.

So that's the base line...

After changing these kernel/driver settings, I unplugged the power cable, and adjusted the backlight to the lowest setting (something I will always do when on battery). Every time I hovered the mouse over the battery tray icon, it was more than 2 1/2 hours for at least 20 mins, and the first value I saw was 2:54. I was working, so I did not keep precise track of time.

I might do that tomorrow after work.

Is there an easy way to revert these settings if they should f* something up?
Provided that you didn't put this stuff in rc.local or any other init script, you only need reboot the One. Settings do not keep after reboots. :)
 
Provided that you didn't put this stuff in rc.local or any other init script, you only need reboot the One. Settings do not keep after reboots.

Sweet, I'll have to test these! :geek:
 
enildeR said:
Sid said:
Thanks for these.
How did you test the results of these changes?

I had already tested the battery to obtain a base spec. Using three terms and firefox with two tabs. I never saw more than 2:34 on the battery tray's tooltip for remaining battery time. If I was idle for a bit, and the screen blanked, when I came back, it would say 3+, but as soon as I started working again, it dropped below 2 1/2 hours.
I'm not sure I'd trust the battery applet to be accurate... at least not the time, which is just an estimate. Might be better to time it yourself from full charge down to, say, 10% capacity.
 
glibdud said:
I'm not sure I'd trust the battery applet to be accurate... at least not the time, which is just an estimate. Might be better to time it yourself from full charge down to, say, 10% capacity.
True. In Windows XP it gives me an estimate of over three hours when at about 90% capacity. Ubuntu on the other hand gives me under two hours.

My battery is 2200mAh.
 
I have the 2400 battery, just FYI.

Considering that in all of the time I've used the One, I have never seen the battery time more than 2:34. Mind you, I typically check this after uplugging the the power cord, and I have been working for a couple of minutes.

After setting these options, I saw 2:54 (after the same method of unplugging, working, and then checking the time remaining). This in of itself is unusual. It certainly didn't "spike" and provide the time remaining, inaccurately. Of course, this is not definitive.

I will set the power center settings to sleep at 25%, and I'll see how long it takes to reach that point with and without these settings. That way we have some kind of "scientific" test results. :)

I'll post later this evening with the results.
 
so I have found more info, and I'm going to dump it into this thread to keep track of everything.

http://www.cyrius.com/debian/nslu2/linux-on-flash.html

The kernel-params script is a good base to set power-saving options, and they are an improvement over the original settings I listed at the beginning of this thread.

I have two more links to read through and see if there is anything useful.

You can save that script to, say, /usr/local/sbin/ and then run it from /etc/rc.local
Modify it and place the other settings within the "start" section.

-Redline
 
PowerTOP (http://www.lesswatts.org/projects/powertop/) can be useful for measuring laptop power usage with different options. I haven't t tried it on Linpus, but it works fine on Ubuntu (for improved data display, run it as root). I suspect that the watt measurements it shows are not always equal, but slightly vary depending on the amount of charge the battery has, so it's likely that minor differences between different options are valuable to know only for roughly the same amount of battery charge...
 
I tried running powertop (installed with yum) and got the following results after runnung a couple of minutes:

Cn Avg residency P-states (frequencies)
C0 (cpu running) (13,2%) 1,60 Ghz 0,6%
C1 0,0ms ( 0,0%) 1333 Mhz 0,0%
C2 0,9ms (41,5%) 1066 Mhz 0,0%
C3 1,0ms (45,3%) 800 Mhz 99,4%


Wakeups-from-idle per second : 717,8 interval: 10,0s
Power usage (ACPI estimate): 9,2W (2,9 hours) (long term: 18,4W,/1,4h)

No detailed statistics available; please enable the CONFIG_TIMER_STATS kernel op. This option is located in the Kernel Debugging section of menuconfig (which is CONFIG_DEBUG_KERNEL=y in the config file). Note: this is only available in 2.6.21 and later kernels.

Suggestion: Enable USB autosuspend by pressing the U key or adding usbcore.autosuspend=1 to the kernel command line in the grub config.

Suggestion: Enable the CONFIG_USB_SUSPEND kernel configuration option. This option will automatically disable UHCI USB when not in use, and may save approximately 1 Watt of power.

Suggestion: Enable the CONFIG_CPU_FREQ_STAT kernel configuration option. This option allows PowerTOP to show P-state percentages. P-states correspond to CPU frequencies.

Suggestion: Enable the CONFIG_HPET_TIMER kernel configuration option. Without HPET support the kernel needs to wake up every 20 milliseconds for some housekeeping tasks.

Suggestion: Enable the CONFIG_NO_HZ kernel configuration option. This option is required to get any kind of longer sleep times in the CPU.

Suggestion: Enable the CONFIG_ACPI_BATTERY kernel configuration option. This option is required to get power estimages from PowerTOP.

Suggestion: Enable the CONFIG_INOTIFY kernel configuration option. This option allows programs to wait for changes in files and directories instead of having to poll for these changes.

So we would definitely benefit from a recompiled kernel.
 
That's strange. Most of those options are enabled already. Only CONFIG_DEBUG_KERNEL is not enabled. So it depends then how much powertop can tell us with this option enabled. I don't like the idea with running with debug on. But I think I'll try.
 
okay... It looks like you can only squeeze so much out of this setup.

By chance I took out the "nolapic_timer" from grub, and now powertop shows only ~8 wakeups per second. This is without X running, bare minimum, in console, and my previous settings applied.

So when, I unplugged, I was looking at 3.0 hrs w/ 8.3W. I even tried the 2.6.25 kernel that is in the development repo, and not much diff.

Before this, I was seeing ~750mA in /proc/acpi/bat*/*/state for "present rate." Right now, I just cat'd it, and it's getting 733mA. So, if the atom really does only use 4W, then something else is using the same load. SSD, backlight, and the system board. So maybe there really isn't much more you can push out of the battery.

I'm sure there are a ton more stuffs to set in /proc/* and /sys/* for the .25 kernel, but that's going to take time.

I downloaded the rpm for 26, but I haven't installed it yet.

http://kojipkgs.fedoraproject.org/packa ... 9.i686.rpm

I'll test that as well, but considering that most stats out on the net state the atom uses ~8W, and then Intel's docs state that the Atom uses ~4W, there might be some room for improvement. I believe the goal would be to see how efficient the One can be while in use... *shrug*
 
Back
Top