[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 |
|
---|
[8dfc5c3] | 7 | <!ENTITY acpid-download-http "&sourceforge-dl;/acpid2/acpid-&acpid-version;.tar.xz">
|
---|
[7efbf3d1] | 8 | <!ENTITY acpid-download-ftp " ">
|
---|
[c176fc7] | 9 | <!ENTITY acpid-md5sum "b2f2ca633b30ae893c47981fa4d3b258">
|
---|
[4c2c5ad] | 10 | <!ENTITY acpid-size "156 KB">
|
---|
[c176fc7] | 11 | <!ENTITY acpid-buildsize "1.9 MB">
|
---|
[f23c35f4] | 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 | <date>$Date$</date>
|
---|
| 20 | </sect1info>
|
---|
| 21 |
|
---|
| 22 | <title>acpid-&acpid-version;</title>
|
---|
| 23 |
|
---|
| 24 | <indexterm zone="acpid">
|
---|
| 25 | <primary sortas="a-acpid">acpid</primary>
|
---|
| 26 | </indexterm>
|
---|
| 27 |
|
---|
| 28 | <sect2 role="package">
|
---|
| 29 | <title>Introduction to acpid</title>
|
---|
| 30 |
|
---|
| 31 | <para>
|
---|
| 32 | The <application>acpid</application> (Advanced Configuration and Power
|
---|
| 33 | Interface event daemon) is a completely flexible, totally extensible
|
---|
| 34 | daemon for delivering ACPI events. It listens on netlink interface and
|
---|
| 35 | when an event occurs, executes programs to handle the event. The programs
|
---|
| 36 | it executes are configured through a set of configuration files, which can
|
---|
| 37 | be dropped into place by packages or by the user.
|
---|
| 38 | </para>
|
---|
| 39 |
|
---|
[dd6942d] | 40 | &lfs110a_checked;
|
---|
[7efbf3d1] | 41 |
|
---|
| 42 | <bridgehead renderas="sect3">Package Information</bridgehead>
|
---|
| 43 | <itemizedlist spacing="compact">
|
---|
| 44 | <listitem>
|
---|
| 45 | <para>
|
---|
| 46 | Download (HTTP): <ulink url="&acpid-download-http;"/>
|
---|
| 47 | </para>
|
---|
| 48 | </listitem>
|
---|
| 49 | <listitem>
|
---|
| 50 | <para>
|
---|
| 51 | Download (FTP): <ulink url="&acpid-download-ftp;"/>
|
---|
| 52 | </para>
|
---|
| 53 | </listitem>
|
---|
| 54 | <listitem>
|
---|
| 55 | <para>
|
---|
| 56 | Download MD5 sum: &acpid-md5sum;
|
---|
| 57 | </para>
|
---|
| 58 | </listitem>
|
---|
| 59 | <listitem>
|
---|
| 60 | <para>
|
---|
| 61 | Download size: &acpid-size;
|
---|
| 62 | </para>
|
---|
| 63 | </listitem>
|
---|
| 64 | <listitem>
|
---|
| 65 | <para>
|
---|
| 66 | Estimated disk space required: &acpid-buildsize;
|
---|
| 67 | </para>
|
---|
| 68 | </listitem>
|
---|
| 69 | <listitem>
|
---|
| 70 | <para>
|
---|
| 71 | Estimated build time: &acpid-time;
|
---|
| 72 | </para>
|
---|
| 73 | </listitem>
|
---|
| 74 | </itemizedlist>
|
---|
| 75 |
|
---|
| 76 | <para condition="html" role="usernotes">User Notes:
|
---|
| 77 | <ulink url="&blfs-wiki;/acpid"/>
|
---|
| 78 | </para>
|
---|
| 79 | </sect2>
|
---|
| 80 |
|
---|
| 81 | <sect2 role="installation">
|
---|
| 82 | <title>Installation of acpid</title>
|
---|
| 83 |
|
---|
| 84 | <para>
|
---|
| 85 | Install <application>acpid</application> by
|
---|
| 86 | running the following commands:
|
---|
| 87 | </para>
|
---|
| 88 |
|
---|
[68d5b0e] | 89 | <screen><userinput>./configure --prefix=/usr \
|
---|
| 90 | --docdir=/usr/share/doc/acpid-&acpid-version; &&
|
---|
[7efbf3d1] | 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 |
|
---|
[7fe07f59] | 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
|
---|
[af8a78d] | 139 | <command>acpi_listen</command> tool. Also, look in the <filename
|
---|
| 140 | class="directory">samples</filename> directory under <filename
|
---|
| 141 | class="directory">/usr/share/doc/acpid-&acpid-version;</filename>
|
---|
| 142 | for more examples.
|
---|
[7efbf3d1] | 143 | </para>
|
---|
| 144 |
|
---|
| 145 | <sect3 id="acpid-init">
|
---|
[d5497a2e] | 146 | <title><phrase revision="sysv">Boot Script</phrase>
|
---|
| 147 | <phrase revision="systemd">Systemd Socket</phrase></title>
|
---|
[7efbf3d1] | 148 |
|
---|
[d5497a2e] | 149 | <para revision="sysv">
|
---|
[7efbf3d1] | 150 | To automatically start <command>acpid</command> when the system is
|
---|
| 151 | rebooted, install the <filename>/etc/rc.d/init.d/acpid</filename>
|
---|
[d5497a2e] | 152 | boot script from the <xref linkend="bootscripts"/> package.
|
---|
| 153 | </para>
|
---|
| 154 |
|
---|
| 155 | <para revision="systemd">
|
---|
| 156 | To start the <command>acpid</command> daemon at boot,
|
---|
| 157 | install the systemd unit from the <xref linkend="systemd-units"/>
|
---|
| 158 | package by running the following command as the
|
---|
| 159 | <systemitem class="username">root</systemitem> user:
|
---|
[7efbf3d1] | 160 | </para>
|
---|
| 161 |
|
---|
| 162 | <indexterm zone="acpid acpid-init">
|
---|
| 163 | <primary sortas="f-acpid">acpid</primary>
|
---|
| 164 | </indexterm>
|
---|
| 165 |
|
---|
| 166 | <screen role="root"><userinput>make install-acpid</userinput></screen>
|
---|
| 167 |
|
---|
[d5497a2e] | 168 | <note revision="systemd">
|
---|
| 169 | <para>
|
---|
| 170 | This package uses socket based activation and will be started when
|
---|
| 171 | something needs it. No standalone unit file is provided for this
|
---|
| 172 | package.
|
---|
| 173 | </para>
|
---|
| 174 | </note>
|
---|
| 175 |
|
---|
[7efbf3d1] | 176 | </sect3>
|
---|
| 177 |
|
---|
| 178 | </sect2>
|
---|
| 179 |
|
---|
| 180 | <sect2 role="content">
|
---|
| 181 | <title>Contents</title>
|
---|
| 182 |
|
---|
| 183 | <segmentedlist>
|
---|
| 184 | <segtitle>Installed Programs</segtitle>
|
---|
| 185 | <segtitle>Installed Libraries</segtitle>
|
---|
[68d5b0e] | 186 | <segtitle>Installed Directories</segtitle>
|
---|
[7efbf3d1] | 187 |
|
---|
| 188 | <seglistitem>
|
---|
| 189 | <seg>
|
---|
[d3789ec7] | 190 | acpid, acpi_listen, and kacpimon
|
---|
[7efbf3d1] | 191 | </seg>
|
---|
| 192 | <seg>
|
---|
| 193 | None
|
---|
| 194 | </seg>
|
---|
| 195 | <seg>
|
---|
[68d5b0e] | 196 | /etc/acpi and /usr/share/doc/acpid-&acpid-version;
|
---|
[7efbf3d1] | 197 | </seg>
|
---|
| 198 | </seglistitem>
|
---|
| 199 | </segmentedlist>
|
---|
| 200 |
|
---|
| 201 | <variablelist>
|
---|
| 202 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 203 | <?dbfo list-presentation="list"?>
|
---|
| 204 | <?dbhtml list-presentation="table"?>
|
---|
| 205 |
|
---|
| 206 | <varlistentry id="acpid-prog">
|
---|
| 207 | <term><command>acpid</command></term>
|
---|
| 208 | <listitem>
|
---|
| 209 | <para>
|
---|
| 210 | is a program that listens for ACPI events and executes the rules
|
---|
[4c24eb0a] | 211 | that match the received event
|
---|
[7efbf3d1] | 212 | </para>
|
---|
| 213 | <indexterm zone="acpid acpid-prog">
|
---|
| 214 | <primary sortas="b-acpid">acpid</primary>
|
---|
| 215 | </indexterm>
|
---|
| 216 | </listitem>
|
---|
| 217 | </varlistentry>
|
---|
| 218 |
|
---|
| 219 | <varlistentry id="acpi_listen">
|
---|
| 220 | <term><command>acpi_listen</command></term>
|
---|
| 221 | <listitem>
|
---|
| 222 | <para>
|
---|
| 223 | is a simple tool which connects to <command>acpid</command> and
|
---|
[4c24eb0a] | 224 | listens for events
|
---|
[7efbf3d1] | 225 | </para>
|
---|
| 226 | <indexterm zone="acpid acpi_listen">
|
---|
| 227 | <primary sortas="b-acpi_listen">acpi_listen</primary>
|
---|
| 228 | </indexterm>
|
---|
| 229 | </listitem>
|
---|
| 230 | </varlistentry>
|
---|
| 231 |
|
---|
| 232 | <varlistentry id="kacpimon">
|
---|
| 233 | <term><command>kacpimon</command></term>
|
---|
| 234 | <listitem>
|
---|
| 235 | <para>
|
---|
| 236 | is a monitor program that connects to three sources of ACPI events
|
---|
| 237 | (events file, netlink and input layer) and then reports on what it
|
---|
[4c24eb0a] | 238 | sees while it is connected
|
---|
[7efbf3d1] | 239 | </para>
|
---|
| 240 | <indexterm zone="acpid kacpimon">
|
---|
| 241 | <primary sortas="b-kacpimon">kacpimon</primary>
|
---|
| 242 | </indexterm>
|
---|
| 243 | </listitem>
|
---|
| 244 | </varlistentry>
|
---|
| 245 |
|
---|
| 246 | </variablelist>
|
---|
| 247 |
|
---|
| 248 | </sect2>
|
---|
| 249 |
|
---|
| 250 | </sect1>
|
---|