[7efbf3d1] | 1 | <?xml version="1.0" encoding="ISO-8859-1"?>
|
---|
| 2 | <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
---|
| 3 | "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
---|
| 4 | <!ENTITY % general-entities SYSTEM "../../general.ent">
|
---|
| 5 | %general-entities;
|
---|
| 6 |
|
---|
| 7 | <!ENTITY acpid-download-http "&sourceforge-repo;/acpid2/acpid-&acpid-version;.tar.xz">
|
---|
| 8 | <!ENTITY acpid-download-ftp " ">
|
---|
[200e254] | 9 | <!ENTITY acpid-md5sum "d7bcdcdefcd53b03730e50ba842554ea">
|
---|
[f23c35f4] | 10 | <!ENTITY acpid-size "156 KB">
|
---|
| 11 | <!ENTITY acpid-buildsize "2.6 MB">
|
---|
| 12 | <!ENTITY acpid-time "less than 0.1 SBU">
|
---|
[7efbf3d1] | 13 | ]>
|
---|
| 14 |
|
---|
| 15 | <sect1 id="acpid" xreflabel="acpid-&acpid-version;">
|
---|
| 16 | <?dbhtml filename="acpid.html"?>
|
---|
| 17 |
|
---|
| 18 | <sect1info>
|
---|
| 19 | <othername>$LastChangedBy$</othername>
|
---|
| 20 | <date>$Date$</date>
|
---|
| 21 | </sect1info>
|
---|
| 22 |
|
---|
| 23 | <title>acpid-&acpid-version;</title>
|
---|
| 24 |
|
---|
| 25 | <indexterm zone="acpid">
|
---|
| 26 | <primary sortas="a-acpid">acpid</primary>
|
---|
| 27 | </indexterm>
|
---|
| 28 |
|
---|
| 29 | <sect2 role="package">
|
---|
| 30 | <title>Introduction to acpid</title>
|
---|
| 31 |
|
---|
| 32 | <para>
|
---|
| 33 | The <application>acpid</application> (Advanced Configuration and Power
|
---|
| 34 | Interface event daemon) is a completely flexible, totally extensible
|
---|
| 35 | daemon for delivering ACPI events. It listens on netlink interface and
|
---|
| 36 | when an event occurs, executes programs to handle the event. The programs
|
---|
| 37 | it executes are configured through a set of configuration files, which can
|
---|
| 38 | be dropped into place by packages or by the user.
|
---|
| 39 | </para>
|
---|
| 40 |
|
---|
[da3947ef] | 41 | &lfs77_checked; &gcc5_checked;
|
---|
[7efbf3d1] | 42 |
|
---|
| 43 | <bridgehead renderas="sect3">Package Information</bridgehead>
|
---|
| 44 | <itemizedlist spacing="compact">
|
---|
| 45 | <listitem>
|
---|
| 46 | <para>
|
---|
| 47 | Download (HTTP): <ulink url="&acpid-download-http;"/>
|
---|
| 48 | </para>
|
---|
| 49 | </listitem>
|
---|
| 50 | <listitem>
|
---|
| 51 | <para>
|
---|
| 52 | Download (FTP): <ulink url="&acpid-download-ftp;"/>
|
---|
| 53 | </para>
|
---|
| 54 | </listitem>
|
---|
| 55 | <listitem>
|
---|
| 56 | <para>
|
---|
| 57 | Download MD5 sum: &acpid-md5sum;
|
---|
| 58 | </para>
|
---|
| 59 | </listitem>
|
---|
| 60 | <listitem>
|
---|
| 61 | <para>
|
---|
| 62 | Download size: &acpid-size;
|
---|
| 63 | </para>
|
---|
| 64 | </listitem>
|
---|
| 65 | <listitem>
|
---|
| 66 | <para>
|
---|
| 67 | Estimated disk space required: &acpid-buildsize;
|
---|
| 68 | </para>
|
---|
| 69 | </listitem>
|
---|
| 70 | <listitem>
|
---|
| 71 | <para>
|
---|
| 72 | Estimated build time: &acpid-time;
|
---|
| 73 | </para>
|
---|
| 74 | </listitem>
|
---|
| 75 | </itemizedlist>
|
---|
| 76 |
|
---|
| 77 | <para condition="html" role="usernotes">User Notes:
|
---|
| 78 | <ulink url="&blfs-wiki;/acpid"/>
|
---|
| 79 | </para>
|
---|
| 80 | </sect2>
|
---|
| 81 |
|
---|
| 82 | <sect2 role="installation">
|
---|
| 83 | <title>Installation of acpid</title>
|
---|
| 84 |
|
---|
| 85 | <para>
|
---|
| 86 | Install <application>acpid</application> by
|
---|
| 87 | running the following commands:
|
---|
| 88 | </para>
|
---|
| 89 |
|
---|
| 90 | <screen><userinput>./configure --prefix=/usr --docdir=/usr/share/doc/acpid-&acpid-version; &&
|
---|
| 91 | make</userinput></screen>
|
---|
| 92 |
|
---|
| 93 | <para>
|
---|
| 94 | This package does not come with a test suite.
|
---|
| 95 | </para>
|
---|
| 96 |
|
---|
| 97 | <para>
|
---|
| 98 | Now, as the <systemitem class="username">root</systemitem> user:
|
---|
| 99 | </para>
|
---|
| 100 |
|
---|
[d3789ec7] | 101 | <screen role="root"><userinput>make install &&
|
---|
[7efbf3d1] | 102 | install -v -m755 -d /etc/acpi/events &&
|
---|
| 103 | cp -r samples /usr/share/doc/acpid-&acpid-version;</userinput></screen>
|
---|
| 104 |
|
---|
| 105 | </sect2>
|
---|
| 106 |
|
---|
| 107 | <sect2 role="configuration">
|
---|
| 108 | <title>Configuring acpid</title>
|
---|
| 109 |
|
---|
| 110 | <para>
|
---|
| 111 | <application>acpid</application> is configured by user defined events.
|
---|
| 112 | Place event files under
|
---|
| 113 | <filename class="directory">/etc/acpi/events</filename> directory. If an
|
---|
| 114 | event occurs, <command>acpid</command> recurses through the event files in
|
---|
| 115 | order to see if the regex defined after "event" matches. If they do,
|
---|
| 116 | action is executed.
|
---|
| 117 | </para>
|
---|
| 118 |
|
---|
| 119 | <para>
|
---|
| 120 | The following brief example will suspend the system when the laptop lid
|
---|
| 121 | is closed (it requires <xref linkend="pm-utils"/>):
|
---|
| 122 | </para>
|
---|
| 123 |
|
---|
| 124 | <screen role="root"><userinput>cat > /etc/acpi/events/lid << "EOF"
|
---|
| 125 | <literal>event=button/lid
|
---|
| 126 | action=/etc/acpi/lid.sh</literal>
|
---|
| 127 | EOF
|
---|
| 128 |
|
---|
| 129 | cat > /etc/acpi/lid.sh << "EOF"
|
---|
| 130 | <literal>#!/bin/sh
|
---|
| 131 | /bin/grep -q open /proc/acpi/button/lid/LID/state && exit 0
|
---|
| 132 | /usr/sbin/pm-suspend</literal>
|
---|
| 133 | EOF
|
---|
| 134 | chmod +x /etc/acpi/lid.sh</userinput></screen>
|
---|
| 135 |
|
---|
| 136 | <para>
|
---|
| 137 | Unfortunately, not every computer labels ACPI events in the same way. To
|
---|
| 138 | determine how your buttons are recognized, use the
|
---|
| 139 | <command>acpi_listen</command> tool. Also, look in package documentation's
|
---|
| 140 | samples directory for more examples.
|
---|
| 141 | </para>
|
---|
| 142 |
|
---|
| 143 | <sect3 id="acpid-init">
|
---|
| 144 | <title>Boot Script</title>
|
---|
| 145 |
|
---|
| 146 | <para>
|
---|
| 147 | To automatically start <command>acpid</command> when the system is
|
---|
| 148 | rebooted, install the <filename>/etc/rc.d/init.d/acpid</filename>
|
---|
| 149 | boot script from the <xref linkend="bootscripts"/> package.
|
---|
| 150 | </para>
|
---|
| 151 |
|
---|
| 152 | <indexterm zone="acpid acpid-init">
|
---|
| 153 | <primary sortas="f-acpid">acpid</primary>
|
---|
| 154 | </indexterm>
|
---|
| 155 |
|
---|
| 156 | <screen role="root"><userinput>make install-acpid</userinput></screen>
|
---|
| 157 |
|
---|
| 158 | </sect3>
|
---|
| 159 |
|
---|
| 160 | </sect2>
|
---|
| 161 |
|
---|
| 162 | <sect2 role="content">
|
---|
| 163 | <title>Contents</title>
|
---|
| 164 |
|
---|
| 165 | <segmentedlist>
|
---|
| 166 | <segtitle>Installed Programs</segtitle>
|
---|
| 167 | <segtitle>Installed Libraries</segtitle>
|
---|
| 168 | <segtitle>Installed Directory</segtitle>
|
---|
| 169 |
|
---|
| 170 | <seglistitem>
|
---|
| 171 | <seg>
|
---|
[d3789ec7] | 172 | acpid, acpi_listen, and kacpimon
|
---|
[7efbf3d1] | 173 | </seg>
|
---|
| 174 | <seg>
|
---|
| 175 | None
|
---|
| 176 | </seg>
|
---|
| 177 | <seg>
|
---|
| 178 | /usr/share/doc/acpid-&acpid-version;
|
---|
| 179 | </seg>
|
---|
| 180 | </seglistitem>
|
---|
| 181 | </segmentedlist>
|
---|
| 182 |
|
---|
| 183 | <variablelist>
|
---|
| 184 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 185 | <?dbfo list-presentation="list"?>
|
---|
| 186 | <?dbhtml list-presentation="table"?>
|
---|
| 187 |
|
---|
| 188 | <varlistentry id="acpid-prog">
|
---|
| 189 | <term><command>acpid</command></term>
|
---|
| 190 | <listitem>
|
---|
| 191 | <para>
|
---|
| 192 | is a program that listens for ACPI events and executes the rules
|
---|
| 193 | that match the received event.
|
---|
| 194 | </para>
|
---|
| 195 | <indexterm zone="acpid acpid-prog">
|
---|
| 196 | <primary sortas="b-acpid">acpid</primary>
|
---|
| 197 | </indexterm>
|
---|
| 198 | </listitem>
|
---|
| 199 | </varlistentry>
|
---|
| 200 |
|
---|
| 201 | <varlistentry id="acpi_listen">
|
---|
| 202 | <term><command>acpi_listen</command></term>
|
---|
| 203 | <listitem>
|
---|
| 204 | <para>
|
---|
| 205 | is a simple tool which connects to <command>acpid</command> and
|
---|
| 206 | listens for events.
|
---|
| 207 | </para>
|
---|
| 208 | <indexterm zone="acpid acpi_listen">
|
---|
| 209 | <primary sortas="b-acpi_listen">acpi_listen</primary>
|
---|
| 210 | </indexterm>
|
---|
| 211 | </listitem>
|
---|
| 212 | </varlistentry>
|
---|
| 213 |
|
---|
| 214 | <varlistentry id="kacpimon">
|
---|
| 215 | <term><command>kacpimon</command></term>
|
---|
| 216 | <listitem>
|
---|
| 217 | <para>
|
---|
| 218 | is a monitor program that connects to three sources of ACPI events
|
---|
| 219 | (events file, netlink and input layer) and then reports on what it
|
---|
| 220 | sees while it is connected.
|
---|
| 221 | </para>
|
---|
| 222 | <indexterm zone="acpid kacpimon">
|
---|
| 223 | <primary sortas="b-kacpimon">kacpimon</primary>
|
---|
| 224 | </indexterm>
|
---|
| 225 | </listitem>
|
---|
| 226 | </varlistentry>
|
---|
| 227 |
|
---|
| 228 | </variablelist>
|
---|
| 229 |
|
---|
| 230 | </sect2>
|
---|
| 231 |
|
---|
| 232 | </sect1>
|
---|