From: "Phil Endecott" <phil_hmpau_endecott@chezphil.org>
To: linux acpi <linux-acpi@vger.kernel.org>
Subject: Battery level alarm on Eee 901
Date: Wed, 17 Sep 2008 22:43:27 +0100 [thread overview]
Message-ID: <1221687807792@dmwebmail.dmwebmail.chezphil.org> (raw)
Hello, it's me again...
I'm trying to get a low battery alarm to work on my Eee. In
/sys/class/power_supply/BAT0 I have a good selection of readable
attributes like charge_now, current_now etc. There is also a writeable
"alarm" file. But as far as I can see, the alarm is not implemented.
I have a couple of questions about this:
- Looking at the ACPI battery driver code, it knows that there is no
support for an alarm when it tests the result of evaluating the _BTP
method, which my BIOS doesn't seem to offer. However, it doesn't
subsequently return an error to the write, so my attempt to set an
alarm succeeds. Is this the desired behaviour? Wouldn't it be better
to either not create the alarm file, or to cause writes to fail, when
it's known that there is no support?
- Presumably I could write a trivial daemon to poll the battery level.
A quick search find bazillions of gui applets that do this. I would
prefer to generate a synthetic ACPI battery alarm event when I detect a
low charge level, so that the action taken in response can be
implemented independent of the method of detection. Has this already
been done? Is there an easy way to inject a synthetic ACPI event from
user-space? What does a valid battery alarm event look like?
Many thanks for any suggestions.
Phil.
next reply other threads:[~2008-09-17 21:43 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-17 21:43 Phil Endecott [this message]
2008-09-18 2:33 ` Battery level alarm on Eee 901 Zhao Yakui
2008-09-18 10:01 ` Phil Endecott
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1221687807792@dmwebmail.dmwebmail.chezphil.org \
--to=phil_hmpau_endecott@chezphil.org \
--cc=linux-acpi@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox