wok view acpid/stuff/acpi/battery.sh @ rev 1582

ekiga: depends on libiconv, libunixODBC
author Pascal Bellard <pascal.bellard@slitaz.org>
date Thu Oct 16 07:39:09 2008 +0000 (2008-10-16)
parents
children
line source
1 #!/bin/sh
2 ##
3 ## battery.sh
4 ##
5 ## Made by Dominique Corbex
6 ## Login <domcox@users.sourceforge.net
7 ##
8 ## Started on Mon Oct 6 12:09:59 2008 Dominique Corbex
9 ## Last update
10 ##
11 ## Tips & Tricks taken from http://www.lesswatts.org
13 # Enable laptop mode
14 # When laptop mode is enabled, the kernel will try to be smart
15 # about when to do IO, to give the disk and the SATA links as
16 # much time as possible in a low power state.
18 if [ ! -e /proc/sys/vm/laptop_mode ] ; then
19 echo "Kernel does not have support for laptop mode. Please apply the laptop mode" >&2
20 echo "patch or install a newer kernel." >&2
21 else
22 echo "Enabling laptop mode"
23 echo 5 > /proc/sys/vm/laptop_mode
24 fi
26 # AC97 audio power saving mode
27 # The AC97 onboard audio chips support power saving, where the
28 # analog parts (codec) are powered down when no program is using
29 # the audio device.
31 if [ -e /sys/module/snd_ac97_codec/parameters/power_save ] ; then
32 echo "Enabling AC97 audio power saving mode"
33 echo 1 > /sys/module/snd_ac97_codec/parameters/power_save
34 echo 1 > /dev/dsp
35 fi
37 # The VM writeback time
38 # The VM subsystem caching allows the kernel to group consecutive
39 # writes into one big write, and to generally optimize the disk IO
40 # to be the most efficient.
42 if [ -e /proc/sys/vm/dirty_writeback_centisecs ] ; then
43 echo "Writeback time set to 1500ms"
44 echo 1500 > /proc/sys/vm/dirty_writeback_centisecs
45 fi