7. Power Saving Techniques

  1. If you don't need infrared support, disable it in the BIOS or shutdown the IrDA® device driver. There are also some IrDA® features of the kernel which are useful for saving power.

  2. PCMCIA services consume much power, so shut them down if you don't need them.

  3. I'm not sure to which extend the backlight consumes power.

    Warning

    As far as I know this device can only bear a limited number of uptime circles. So avoid using screensavers, which turn off the backlight.

    If you want do it anyhow, you may use xset +dpms and xset dpms 0 0 300 This turns the screen off after 5 minutes of inactivity. Works only if the display is DPMS capable.

  4. For some examples to build batteries with increased uptime up to 8 hours look at Repair4Laptop: Battery .

  5. For information about APM look at the chapter APM above.

  6. The "noatime" option when mouting filesystems tells the kernel to not update the access time information of the file. This information, although sometimes useful, is not used by most people. Therefore, you can safely disable it, then preventing disk access each time you cat a file. Here is an example of a /etc/fstab with this power-saving option: /dev/hda7 /var ext2 defaults,noatime 0 2

  7. hdparm hdparm is a Linux disk utility that lets you set spin-down timeouts and other disk parameters.

  8. Mobile Update Daemon This is a drop-in replacement for the standard update daemon, mobile-update minimizes disk spin ups and reduces disk uptime. It flushes buffers only when other disk activity is present. To ensure a consistent file system call sync manually. Otherwise files may be lost on power failure. mobile-update does not use APM. So it works also on older systems.

  9. noflushd : noflushd monitors disk activity and spins down disks that have been idle for more than <timeout> seconds. It requires a kernel >=2.2.11 . Useful in combination with hdparm and mount with noatime option to bring down disk activity.

    Here are some comments and thoughts by Nat Makarevitch about a possible approach which may reduce the disk activity under Linux (sparing energy, especially with noflushd) the file Documentation/filesystems/proc.txt of the Linux sourcetree documents some useful features, esp. in the /proc/sys/vm section. Under Linux 2.2 I used:

    echo "100 5000 8 256 500 60000 60000 1884 2" > /proc/sys/vm/bdflush
    

    especially under Linux 2.4 which uses its spare time to 'pre-save' the less-used memory pages into the swap, increasing the disk activity I tried to figure the more adequate parameters (Linux 2.4.9, 192 MB RAM, Toshiba 3480 laptop) beware: some of those parameters may be dangerous or useless (I have not gathered serious data about the practical efficiency). moreover do not forget that delaying disk writes of data is intrinsically dangerous

    echo 99 512 32 512 0 300000 60 0 0 > /proc/sys/vm/bdflush
    # is '60' the max value for age_super?
    echo 1 1 96 > /proc/sys/vm/buffermem
    echo 512 128 32 > /proc/sys/vm/kswapd
    echo 1 10 96 > /proc/sys/vm/pagecache
    

  10. The Toshiba Linux Utilities are a set of Linux utilities for controlling the fan, supervisor passwords, and hot key functions of Toshiba Pentium notebooks. There is a KDE package Klibreta, too.

  11. At Kenneth E. Harker's page there is a recommendation for LCDproc LCDProc . "LCDproc is a small piece of software that will enable your Linux box to display live system information on a 20x4 line backlit LCD display. This program shows, among other things, battery status on notebooks." I tried this package and found that it connects only to the external Matrix-Orbital LCD 20x4 display , which is a LCD display connected to a serial port. I can't see any use for a laptop yet, but you might use it to build a wearable.

  12. The Diald Dial Daemon provides on demand Internet connectivity using the SLIP or PPP protocols. Diald can automatically dial in to a remote host when needed or bring down dial-up connections that are inactive.

  13. KDE provides KAPM, Kbatmon and Kcmlaptop. Written by Paul Campbell kcmlaptop is a set of KDE control panels that implements laptop computer support functions, it includes a dockable battery status monitor for laptops - in short a little icon in the KDE status bar that shows how much battery time you have left. It also will warn you when power is getting low and allows you to configure power saving options. Similar packages you may find at the GNOME project GNOME . See the software maps at both sites.

  14. Please see the Battery-Powered-HOWTO for further information.

Some more words about disks spin down with noflushd or hdparm utilities. The objective is to reduce hard disk usage to minimum, because on most laptops it is the primary source of noise and energy consumption. The "noflushd" daemon is a replacement of "update" which makes buffer updates on disk only when some other data is being read from the disk (the behavior of "update" is to flush buffers every 5 seconds, and it usually generates constant disk activity, so that the disk never becomes idle). "noflushd" also sets the disk spindown time and automatically calls "sync" before spindown. The syntax is something like "noflushd -n 5 /dev/hda". Using "noflushd" may cause loss of data if some files were edited while the disk was parked and not sync'ed, e.g. if the power was suddenly lost.

The hdparm utility can set the sleep time too, and also tune the IDE disk parameters for better performance. Make sure that the kernel IDE parameter "Use DMA by default when available" (section "Block devices") is enabled.

However, it is not enough to enable noflushd or IDE disk sleep time to make the disk effectively silent, because the system in most default installations is running many cron jobs, writes to log files, uses swap and so on. This activity is not always desirable, especially if the computer is standalone (not on network) and is used mostly by one user. Here are some recommendations.

First, the cron daemon and friends (anacron, atd, logrotate, sendmail / exim / ...) could be removed from the system if the services they run (such as, cleaning /tmp directories and logs, checking email etc.) are not needed.

Secondly, the syslogd configuration file /etc/syslog.conf should be modified to reduce the number of log files and messages logged, and also to have "-" signs before every file name (which means that the system will not have to sync the disk every time a message is logged).

Also, it is advisable to add "mark:none;" to the "syslog" strings, so that the "strich strich strich MARK strich strich strich" messages do not get written to the log files every half an hour. Typical Linux installations today have too many log files for the home user.

Finally, the disk may not go to sleep when a lot of swap space is in use. Type "free" and see how much swap is being used and how much free RAM is available. If you think there is enough free RAM to work without swap, or if there is a lot of swap used AND also a lot of free RAM, consider freeing the swap space ("su; swapoff -a; swapon -a") or switching the swap space off altogether ("su; swapoff -a"). Working without swap should be fine on systems with 64MB or more of RAM. (Working without swap will reduce the available memory, of course, and some software crashes without warning when it runs out of memory. But, adding swap will not prevent the crash resulting from some runaway memory consumuing software, it will only delay it, and it will make the system swap a lot before it happens.)

With these changes in the system, one could get the laptop to work for extended periods of time with its hard disk switched off.

The kernel can be configured with "Yes" to "APM Support" and "Enable console blanking using APM" (section "General setup"). Then the LCD screen lamp will shut off in console mode (so not just the screen goes black, but also the lamp). In X mode, the same effect can be obtained with "xset +dpms" (enable DPMS function) and "xset s blank" (enable screen blanking). One can add these commands to the X window session or window manager initialization scripts.

The computer's BIOS energy savings options (hard disk sleep time, video blanking time and so on) are probably not useful and in some cases may even cause crashes. Therefore they could be disabled in the laptop's BIOS.