old-www/HOWTO/ACPI-HOWTO/usingacpi.html

311 lines
5.3 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML
><HEAD
><TITLE
>Using ACPI</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.7"><LINK
REL="HOME"
TITLE="ACPI: Advanced Configuration and Power Interface"
HREF="index.html"><LINK
REL="PREVIOUS"
TITLE="Switching from APM to ACPI"
HREF="daemons.html"><LINK
REL="NEXT"
TITLE="References and Resources"
HREF="resources.html"></HEAD
><BODY
CLASS="sect1"
BGCOLOR="#FFFFFF"
TEXT="#000000"
LINK="#0000FF"
VLINK="#840084"
ALINK="#0000FF"
><DIV
CLASS="NAVHEADER"
><TABLE
SUMMARY="Header navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TH
COLSPAN="3"
ALIGN="center"
>ACPI: Advanced Configuration and Power Interface</TH
></TR
><TR
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="daemons.html"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
></TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="resources.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><DIV
CLASS="sect1"
><H1
CLASS="sect1"
><A
NAME="usingacpi"
></A
>16. Using ACPI</H1
><P
>There are a few different applications/daemons you will want to install
on your system: <SPAN
CLASS="application"
>acpid</SPAN
> (the daemon that will control your hardware states), and <SPAN
CLASS="application"
>acpi</SPAN
> (the interface to monitor events and states) are the base install. The
<SPAN
CLASS="application"
>acpi</SPAN
> Debian package is only available in testing and is unstable. If
you're running stable you won't be able to install it without playing
around with apt and your <TT
CLASS="filename"
>list.sources</TT
> file. You can probably
also compile from source. If you do get <SPAN
CLASS="application"
>acpi</SPAN
>
installed you can use it to monitor your system like this: <B
CLASS="command"
>acpi
<TT
CLASS="option"
>-V</TT
></B
>. The output will tell you about your
system. Mine looks like this:</P
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="screen"
>&#13; Thermal 1: ok, 47.1 degrees C
Thermal 2: ok, 45.1 degrees C
AC Adapter 1: off-line &#60;-- running off battery
AC Adapter 1: on-line &#60;-- running off AC power
</PRE
></FONT
></TD
></TR
></TABLE
><P
>Unfortunately, the <TT
CLASS="option"
>-V</TT
> <SPAN
CLASS="QUOTE"
>"full version"</SPAN
> doesn't work for me.
Fortunately I can still look in each of the acpi files individually for
information about my system. Check in the <TT
CLASS="filename"
>/proc/acpi</TT
> directory
for various things of importance. If I want to check my battery I read the
following file like this: <B
CLASS="command"
>cat
<TT
CLASS="filename"
>/proc/acpi/battery/BAT0/state</TT
></B
>. The output is as follows:</P
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="screen"
>&#13;present: yes
capacity state: ok
charging state: discharging &#60;-- running off battery
present rate: unknown
remaining capacity: 3920 mAh &#60;-- watch this number
present voltage: 14800 mV
</PRE
></FONT
></TD
></TR
></TABLE
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="screen"
>&#13;present: yes
capacity state: ok
charging state: discharging
present rate: unknown
remaining capacity: 3840 mAh &#60;-- capacity getting smaller
present voltage: 14800 mV
</PRE
></FONT
></TD
></TR
></TABLE
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="screen"
>&#13;present: yes
capacity state: ok
charging state: charging &#60;-- AC adapter plugged in
present rate: unknown
remaining capacity: 3840 mAh
present voltage: 14800 mV
</PRE
></FONT
></TD
></TR
></TABLE
><P
>If I want information about my battery in general I check it out like
this: <B
CLASS="command"
>cat <TT
CLASS="filename"
>/proc/acpi/battery/BAT0/info</TT
></B
></P
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="screen"
>&#13;present: yes
design capacity: 3920 mAh
last full capacity: 3920 mAh
battery technology: rechargeable
design voltage: 14800 mV
design capacity warning: 30 mAh
design capacity low: 20 mAh
capacity granularity 1: 10 mAh
capacity granularity 2: 3470 mAh
model number: Bat0
serial number:
battery type: Lion
OEM info: Acer
</PRE
></FONT
></TD
></TR
></TABLE
><P
>You're smart people. You can probably figure it out from here. :)</P
></DIV
><DIV
CLASS="NAVFOOTER"
><HR
ALIGN="LEFT"
WIDTH="100%"><TABLE
SUMMARY="Footer navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="daemons.html"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="index.html"
ACCESSKEY="H"
>Home</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="resources.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>Switching from APM to ACPI</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
>&nbsp;</TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>References and Resources</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>