Damn Small Linux - Not!
The forum for DSL-N
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

How to use laptop-mode-tools to extend Laptop Bettery Life

 
Post new topic   Reply to topic    Damn Small Linux - Not! Forum Index -> DSL-N Tips and Tricks
View previous topic :: View next topic  
Author Message
Juanito



Joined: 11 Sep 2006
Posts: 88
Location: Dubai, U.A.E.

PostPosted: Fri Oct 06, 2006 3:32 pm    Post subject: How to use laptop-mode-tools to extend Laptop Bettery Life Reply with quote

There is a Debian package called laptop-mode-tools that will monitor your battery status and HD use and spin down the HD if it is not needed. This being said, since I am booting DSL-N from USB "hdparm -y /dev/hda" or "hdparm -Y /dev/hda" would also get the job done...

The Debian Stable package of laptop-mode-tools does not have a great deal of functionality but later versions will interact with acpid and cpufreqd to maximise power savings. The extension cpufreq_combo.dsl in the "testing" area will load and start acpid and cpufreqd for you.

The required packages are:

1. lsb-base_3.1-15_all.deb at
2. laptop-mode-tools_1.32-1_all.deb at

Once you have the packages, issue the following commands:

root@dslbox:~# dpkg -i /path/lsb-base_3.1-15_all.deb
root@dslbox:~# dpkg -i /path/laptop-mode-tools_1.32-1_all.deb

The behaviour of laptop-mode-tools is controlled by settings in the file /etc/laptop-mode/laptop-mode.conf - there is a reasonable explanation for the settings contained in the file.

You can check if laptop-mode-tools is running by "cat /proc/sys/vm/laptop_mode" - a non zero value means that laptop-mode-tools is enabled. As far as I can tell, laptop-mode-tools should start-up on its own, but for some reason I have to force it:

root@dslbox:~# cat /proc/sys/vm/laptop_mode
0
root@dslbox:~# /etc/init.d/laptop-mode start
Enabling laptop mode...done (enabled, active.).
root@dslbox:~# cat /proc/sys/vm/laptop_mode
2
root@dslbox:~# /etc/init.d/laptop-mode status
Laptop mode status:

Mounts:
/dev/root on / type ext2 (rw)
/ramdisk on /ramdisk type tmpfs (rw,size=806592k)
/UNIONFS on /UNIONFS type unionfs (rw,dirs=/ramdisk=rw:/KNOPPIX=ro,delete=whiteout)
/dev/sda1 on /cdrom type vfat (ro,nodiratime,fmask=0022,dmask=0022,codepage=cp437,iocharset=iso8859-1)
/dev/cloop on /KNOPPIX type iso9660 (ro)
/UNIONFS/dev/pts on /UNIONFS/dev/pts type devpts (rw)
/proc/bus/usb on /proc/bus/usb type usbfs (rw,devmode=0666)
/UNIONFS/dev/sda2 on /mnt/sda2 type vfat (rw,nosuid,nodev,umask=000,uid=1000,gid=1000)
/dev/sdb1 on /mnt/sdb1 type vfat (rw,nosuid,nodev,umask=000,uid=1000,gid=1000)
/dev/hda5 on /mnt/hda5 type ntfs (ro,nosuid,nodev,umask=000,uid=1000,gid=1000)

Drive power status:

/dev/hda:
drive state is: standby

(NOTE: drive settings affected by Laptop Mode cannot be retrieved.)

Readahead states:
/dev/sda1: 3072 kB
/dev/cloop: 128 kB
/UNIONFS/dev/sda2: 3072 kB
/dev/sdb1: 128 kB
/dev/hda5: 128 kB

Laptop Mode is allowed to run: /var/run/laptop-mode-enabled exists.

/proc/sys/vm/laptop_mode:
2

/proc/sys/vm/dirty_ratio:
60

/proc/sys/vm/dirty_background_ratio:
1

/proc/sys/vm/dirty_expire_centisecs:
60000

/proc/sys/vm/dirty_writeback_centisecs:
60000

/sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_cur_freq:
1400000

/sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq:
1600000

/sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_min_freq:
600000

/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor:
performance

/proc/acpi/button/lid/LID/state:
state: open

/proc/acpi/ac_adapter/AC/state:
state: off-line

/proc/acpi/battery/BAT0/state:
present: yes
capacity state: ok
charging state: discharging
present rate: 15848 mW
remaining capacity: 42000 mWh
present voltage: 12043 mV

root@dslbox:~#
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Damn Small Linux - Not! Forum Index -> DSL-N Tips and Tricks All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group