Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 01 May 2004 14:05:36 -0700
From:      "Kevin Oberman" <oberman@es.net>
To:        "Markie" <mark.cullen@dsl.pipex.com>
Cc:        freebsd-mobile@freebsd.org
Subject:   Re: Laptop ACPI question 
Message-ID:  <20040501210536.5FF525D0E@ptavv.es.net>
In-Reply-To: Your message of "Sat, 01 May 2004 21:29:56 BST." <003001c42fbb$11ce5060$f700000a@ape> 

next in thread | previous in thread | raw e-mail | index | archive | help
> From: "Markie" <mark.cullen@dsl.pipex.com>
> Date: Sat, 1 May 2004 21:29:56 +0100
> Sender: owner-freebsd-mobile@freebsd.org
> 
> Hello,
> 
> Just a quick question... would having ACPI working on a laptop increase
> battery life at all? I just left it sat idle without ACPI and it got to an
> hour and 30 minutes... I went to start xchat and it just switched off
> straight away after it started loading :o) if I leave it doing `cat
> /dev/random > /dev/null` it only lasts 45 minutes :o(
> 
> I am just wondering if it's a naffed battery... or... there's something a
> bit wrong with the laptop or... I just need ACPI? I don't really know what
> ACPI does, so.... :o)

Actually, ACPI will greatly improve battery life soon, but not yet. The
bits and pieces are being fed into CURRENT and I suspect that SpeedStep
support will be coming soon.
In the meantime, you can use sysctls to manually adjust CPU performance
to enhance battery life.

Look at:
hw.acpi.cpu.throttle_max: 8
hw.acpi.cpu.throttle_state: 8
hw.acpi.cpu.cx_supported: C1/0 C2/1 C3/85
hw.acpi.cpu.cx_lowest: 0
hw.acpi.cpu.cx_history: 1453705/0 0/0 0/0

Reducing the hw.acpi.cpu.throttle_state will increase battery life by
effectively reducing CPU speed. The reduction is linear and a setting of
1 makes my system crawl.

Setting hw.acpi.cpu.cx_lowest will reduce the responsiveness of P4-M or
Centrino system by putting the system in a "deeper sleep" than just
halting the CPU. The cost is that it takes longer for the system to
start processing again. Its effect can appear as jerkiness in some
operations. It may be set to as many values (higher is slower) as are
listed in cx_history. (In the example, there are three, 0, 1, and 2
available.)  Depending on hardware connected, some levels may not be
available. On my laptop, 2 is not available if the USB driver is loaded.

The history also shows how often each sleep mode has been invoked.

When the acpi_cpufreq code is ready, it will provide the best power control,
but this can help.

I'll append a little snippet I use to adjust the power, but feel free to
try other combinations.
-- 
R. Kevin Oberman, Network Engineer
Energy Sciences Network (ESnet)
Ernest O. Lawrence Berkeley National Laboratory (Berkeley Lab)
E-mail: oberman@es.net			Phone: +1 510 486-8634

#!/bin/sh
case "$1" in
ac)
    sudo sysctl hw.acpi.cpu.throttle_state=8
    sudo sysctl hw.acpi.cpu.cx_lowest=0
    echo "Set to AC power (high) performance"
    ;;
hi)
    sudo sysctl hw.acpi.cpu.throttle_state=8
    sudo sysctl hw.acpi.cpu.cx_lowest=2
    echo "Set to high battery performance"
    ;;
normal)
    sudo sysctl hw.acpi.cpu.throttle_state=4
    sudo sysctl hw.acpi.cpu.cx_lowest=2
    echo "Set to normal battery performance"
    ;;
lo)
    sudo sysctl hw.acpi.cpu.throttle_state=1
    sudo sysctl hw.acpi.cpu.cx_lowest=2
    echo "Set to low battery performance"
    ;;
*)
    echo "Usage: `basename $0` (ac|hi|normal|lo)" >&2
    exit 64
    ;;
esac
 
exit 0



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040501210536.5FF525D0E>