Page 1 of 1

How to optimized battery life ?

Posted: Wed Nov 10, 2004 4:15 pm
by dodik
Is there any way to optimize the battery when the latop is not plugged on AC ? I mean like under Windows ( :oops: ), to stop the hard drive when the latop is not using it and to automatically minimize brightness down when we unplug the power.

I already managed to get the speedstep centrino working :D and my T42 is running at 600 mhz on battery, but I still don't have as much time on battery as when my latop is under windows.

Do you guys have any leads about how to modify brightness and to stop hard drive rotating ?

Posted: Thu Nov 11, 2004 12:05 pm
by kristian
There is some useful information in the Battery Powered Linux HOWTO.
Also, much can be found at google with the right keywords...

I'm not sure about how to programmatically modify the brightness on a Thinkpad since I haven't received mine yet (...The wait is unbearable!)... :roll:
But about the hard drive:
The good news is that an optimized GNU/Linux-based laptop can keep the disk spun down for *far* longer than a windows based one, simply because you as the user have ultimate control over how your computer behaves.
The bad news is that it requires quite a bit of config file hacking to achieve power nirvana... :?

Here's some points to consider:
  • If you can, use an old-school, non-journalling file system, like ext2. That makes controlling the drive's write accesses far easier.
    The downside is that a crash or power failure are more likely to cause a data corruption as opposed to with a journalling fs.
  • If you won't, or are using a journalling fs (ext3, reiserfs, etc.) already, check out the laptop_mode kernel module which does go some way to remedy the situation for journalling filesystems on laptops, unfortunately also at the expense of data safety (Because the synchronization to disk is delayed).
    I might add that, at least in theory, the ext2 and ext3 file systems are compatible, so if your file system is ext3 you should be able to remount it as ext2 at the expense of a reboot.
  • The syslog is a major offender, especially wrt. the dummy --MARK-- messages it writes every 10 minute or so. Check out the above howto for information on how to optimize it.
  • Another one is cron which run jobs at scheduled intervals. On my current laptop I've disabled it altogether and instead installed anacron which runs needed jobs at boottime instead. Might be an option as long as you remember to reboot the machine now and then.
  • Disable read-access logging on the filesystem in /etc/fstab by appending "noatime" to the options.
  • Place the /tmp directory in RAM by mounting it using the tmpfs file system, also covered in the HOWTO.
  • If you have plenty of RAM, consider disabling the swap file. (Though I haven't really noticed any huge difference on this myself, so I've kept it on.)
  • If you surf the web a lot, either disable the web browser's hard-drive cache entirely, or place the cache in the above mentioned tmpfs file system. Afaik, both Firefox and Opera allow you to do this.
  • Once you've mastered your hard drive writes, install noflushd to actually spin down the drive when it is idle for a specified amount of time (I have a 60 second timeout).
My current laptop can have its drive spun down for days using such a setup, though I should mention that it gets some additional assistance from running some applications remotely via X, and keeping my documents on a network-mounted file server, which might not be an option for everyone.

Regards,
Kristian

Posted: Thu Nov 11, 2004 4:54 pm
by graziano
You can get some extra battery time if you enable "powerplay" for the radeon chipset. If you have the latest xorg, you can enable it with DynamicClocks. I gain about 20-30 minutes with it.

For whatever reason if I enable the spin-down power saving on the disk (either with laptop-mode or with hdparm -S) eventually my machine (T41) will lock up: the HD led stays on but the machine will lock.

The brigthness of the LCD can be somewhat controlled by the BIOS (when I unplug, the LCD dims a little) but I controll it by hand. ibm_acpi is progressing well, so eventually it will get it working.

graziano

Posted: Mon Nov 15, 2004 3:20 pm
by darkhelmet03
Three things:

1. cpufreqd daemon (1.2.2 works fine for me). The thinkpad is at 600MHz and only goes up when really required.

2. laptop_mode (laptop_mode_tools), I only use it when in battery mode, since the load/unload cycles are predetermined (300,000) and after that you have to search for a new HDD ;) (requires 2.6.6+ kernel)

3. keep the LCD brightness as low as possible

4. the radeon has a power saving mode that may be enabled in one of the latest X.orgs....thoug hI still run FC1 w/ XFree86 and 2.6.9 so I don't know if there is a difference....

Posted: Mon Jan 03, 2005 6:14 am
by Guest
Dont't use cpufreqd. It is very slow.
Clocking up is working really good but down to 600 Mhz will take much time.
Only use cpufreq built-in 2.6.x-Kernel und create your own acpi-events to sends commands like

Code: Select all

echo -n ondemand > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
That way, clocking the CPU is much faster.

Posted: Mon Jan 03, 2005 1:22 pm
by Volker
A while ago, I made some comparison tests for power usage in different configurations, see

http://www.sas.upenn.edu/~vbraun/comput ... power.html

Note that the current xorg already has the Powerplay patches. The option name has been changed to "DynamicClocks".

Posted: Mon Jul 11, 2005 5:17 am
by tassou
DynamicClocks works well for me too, but stop working after a suspend/resume - unless I restart my xserver of course -. Do you have this bug too ?

Tassou

Posted: Mon Jul 11, 2005 7:44 am
by karnesky
kristian wrote:I'm not sure about how to programmatically modify the brightness on a Thinkpad since I haven't received mine yet
The fn-buttons worked for me out-of-the-box.
[*]If you can, use an old-school, non-journalling file system, like ext2. That makes controlling the drive's write accesses far easier.
The downside is that a crash or power failure are more likely to cause a data corruption as opposed to with a journalling fs.
JFS is a journalling filesystem that is CPU-efficient & allows spin-downs. Certainly reiser4, which doesn't allow spin-downs, should probably be avoided.
I might add that, at least in theory, the ext2 and ext3 file systems are compatible, so if your file system is ext3 you should be able to remount it as ext2 at the expense of a reboot.
Often you wouldn't even need a reboot. But I still question the true advantages of avoiding ALL journalling filesystems.