Laptop Battery Life Again
Paulo Cavalcanti
promac at gmail.com
Sun Jul 6 11:44:22 UTC 2008
On Sun, Jul 6, 2008 at 1:23 AM, jdow <jdow at earthlink.net> wrote:
> From: "Paulo Cavalcanti" <promac at gmail.com>
> Sent: Saturday, 2008, July 05 12:40
>
>
>
> Hi,
>>
>> I noticed that when I boot on kernel 2.6.25,
>> my laptop battery, according to gnome, has 3h:40 min of
>> charge. However, when booting on a 2.6.24 kernel,
>> this number goes up to 4h:20 min.
>>
>> Then, I collected some interesting links, discussing this issue.
>>
>> 1) http://fedoraproject.org/wiki/FWN/Issue100
>>
>> 2) http://www.thinkwiki.org/wiki/How_to_reduce_power_consumption
>>
>> 3) http://kdekorte.blogspot.com/
>>
>> 4) http://samwel.tk/laptop_mode/faq
>>
>> 5) http://lwn.net/Articles/257426/
>>
>> My questions are:
>>
>> 1) should I follow powertop advices blindly?
>>
>> 2) On the first link, in the topic
>> Reducing Power Usage Of Fedora
>>
>> https://www.redhat.com/archives/fedora-devel-list/2007-August/msg00558.html
>>
>> Raul Sundaram recommends using
>>
>> echo 5 > /proc/sys/vm/laptop_mode
>>
>> Why this is not done automatically?
>>
>> 3) In the third link, there is an acpi script that really works,
>> and can be used to change the parameters, when switching from
>> battery to power chord (although some options are wrong,
>> specially the hdparm use - be careful).
>>
>> 4) What about laptop-mode-tools available from Dries' repo?
>>
>> 5) Why different kernels have different expectations, regarding battery
>> discharge?
>>
>> I would like to hear some advice, because I have not owned
>> a laptop for some time, and I do not want to burst my HD
>> or shorten my battery life.
>>
>
> Google for it on the LKML. There was a discussion there in the last week.
> <https://www.redhat.com/mailman/listinfo/fedora-list>
Thanks, I found it.
http://lkml.org/lkml/2008/7/5/99
Well, what I am doing for now is using /etc/rc.local,
/etc/acpi/actions/battery.sh, and /etc/acpi/events/battery.conf.
I commented some options because I do not have bluetooth,
my laptop does not support wake on LAN, I want my laptop_mode always ON,
and I am avoiding aggressive power savings for my disk.
Now, I just need some time to evaluate the results.....
--------------------------------------------------------------------------
#!/bin/sh
#
# This script will be executed *after* all the other init scripts.
# You can put your own initialization stuff in here if you don't
# want to do the full Sys V style init stuff.
touch /var/lock/subsys/local
# roma
echo 5 > /proc/sys/vm/laptop_mode
/sbin/hdparm -B 254 /dev/sda
-------------------------------------------------------------------------------------------
#!/bin/bash
# /etc/acpi/actions/battery.sh
state=`grep on-line /proc/acpi/ac_adapter/AC/state | wc -l`
if [ $state -gt 0 ]; then
hal-disable-polling --device /dev/scd0 --enable-polling
# echo 0 > /proc/sys/vm/laptop_mode
echo 0 > /sys/devices/system/cpu/sched_mc_power_savings
# /sbin/hdparm -B 254 -S 0 /dev/sda
echo 499 > /proc/sys/vm/dirty_writeback_centisecs
# for i in /sys/bus/usb/devices/*/power/autosuspend; do echo 0 > $i; done
# /sbin/ethtool -s eth0 wol g
echo 0 > /sys/module/snd_hda_intel/parameters/power_save
echo max_performance >
/sys/class/scsi_host/host0/link_power_management_policy
# echo enable > /proc/acpi/ibm/bluetooth
policy
else
hal-disable-polling --device /dev/scd0
# echo 5 > /proc/sys/vm/laptop_mode
echo 1 > /sys/devices/system/cpu/sched_mc_power_savings
# /sbin/hdparm -B 254 -S 252 /dev/sda
echo 1500 > /proc/sys/vm/dirty_writeback_centisecs
# for i in /sys/bus/usb/devices/*/power/autosuspend; do echo 1 > $i; done
# /sbin/ethtool -s eth0 wol d
echo 1 > /sys/module/snd_hda_intel/parameters/power_save
echo min_power > /sys/class/scsi_host/host0/link_power_management_policy
# killall beagled
# echo disable > /proc/acpi/ibm/bluetooth
fi
------------------------------------------------------------------------------------------------
# ACPID config when switching to and from
# battery mode.
# /etc/acpi/events/battery.conf
event=battery.*
action=/etc/acpi/actions/battery.sh
--
Paulo Roma Cavalcanti
LCG - UFRJ
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.fedoraproject.org/pipermail/users/attachments/20080706/db16d687/attachment-0001.html
More information about the users
mailing list