Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 15 Aug 2012 11:07:08 +0200
From:      Andreas Nilsson <andrnils@gmail.com>
To:        Dominic Fandrey <kamikaze@bsdforen.de>
Cc:        freebsd-stable@freebsd.org
Subject:   Re: battery state
Message-ID:  <CAPS9%2BSsgPHCr2_xaCF637vtj%2B%2BQx7i%2BtjE%2BwYTuotHLL3CWz0Q@mail.gmail.com>
In-Reply-To: <502B61B8.4040304@bsdforen.de>
References:  <502B5F7D.6000909@bsdforen.de> <CAPS9%2BSv7FgSN=CkNwhzTa_caHA5gVvGZD8HZZ548Qubp_SAF_g@mail.gmail.com> <502B61B8.4040304@bsdforen.de>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Aug 15, 2012 at 10:45 AM, Dominic Fandrey <kamikaze@bsdforen.de>wrote:

> On 15/08/2012 10:40, Andreas Nilsson wrote:
>
>> On Wed, Aug 15, 2012 at 10:36 AM, Dominic Fandrey <kamikaze@bsdforen.de
>> >wrote:
>>
>>> For a while now "acpiconf -i0" always shows the battery state that
>>> was correct when booting the system. It's never updated.
>>>
>>> snip
>>>
>>
>> It wont solve the problem, but does the sysctl hw.acpi.battery.time update
>> correctly?
>>
>
> Thanks for the fast reply, right now it shows -1 (the system was plugged
> in during boot).
>
> I just unplugged it and it still shows -1:
>
>> sysctl hw.acpi.battery
>>
> hw.acpi.battery.life: 99
> hw.acpi.battery.time: -1
> hw.acpi.battery.state: 0
> hw.acpi.battery.units: 2
> hw.acpi.battery.info_expire: 5
>
>
> --
> A: Because it fouls the order in which people normally read text.
> Q: Why is top-posting such a bad thing?
> A: Top-posting.
> Q: What is the most annoying thing on usenet and in e-mail?
>

Sounds like there is some acpi-problem then. On my thinkpad it takes maybe
five seconds for it to go from -1 to an estimate. Also
hw.acpi.battery.state=0 for me equals "AC plugged in and battery full". I
have this in my .xinitrc to monitor my battery ( in a loop which then uses
xsetroot to show the info ):
case `sysctl -n hw.acpi.battery.state` in
0) batstate="AC full" ;;
1) batstate="`sysctl -n hw.acpi.battery.time` m" ;;
2) batstate="AC charing" ;;

Best regards
Andreas



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAPS9%2BSsgPHCr2_xaCF637vtj%2B%2BQx7i%2BtjE%2BwYTuotHLL3CWz0Q>