[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 " ">
|
---|
[2faedff] | 9 | <!ENTITY acpid-md5sum "988c2e3fd5ba0ea4492d3ba7273af295">
|
---|
| 10 | <!ENTITY acpid-size "160 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 |
|
---|
| 19 | <title>acpid-&acpid-version;</title>
|
---|
| 20 |
|
---|
| 21 | <indexterm zone="acpid">
|
---|
| 22 | <primary sortas="a-acpid">acpid</primary>
|
---|
| 23 | </indexterm>
|
---|
| 24 |
|
---|
| 25 | <sect2 role="package">
|
---|
| 26 | <title>Introduction to acpid</title>
|
---|
| 27 |
|
---|
| 28 | <para>
|
---|
| 29 | The <application>acpid</application> (Advanced Configuration and Power
|
---|
| 30 | Interface event daemon) is a completely flexible, totally extensible
|
---|
| 31 | daemon for delivering ACPI events. It listens on netlink interface and
|
---|
| 32 | when an event occurs, executes programs to handle the event. The programs
|
---|
| 33 | it executes are configured through a set of configuration files, which can
|
---|
| 34 | be dropped into place by packages or by the user.
|
---|
| 35 | </para>
|
---|
| 36 |
|
---|
[15445ab] | 37 | &lfs113_checked;
|
---|
[7efbf3d1] | 38 |
|
---|
| 39 | <bridgehead renderas="sect3">Package Information</bridgehead>
|
---|
| 40 | <itemizedlist spacing="compact">
|
---|
| 41 | <listitem>
|
---|
| 42 | <para>
|
---|
| 43 | Download (HTTP): <ulink url="&acpid-download-http;"/>
|
---|
| 44 | </para>
|
---|
| 45 | </listitem>
|
---|
| 46 | <listitem>
|
---|
| 47 | <para>
|
---|
| 48 | Download (FTP): <ulink url="&acpid-download-ftp;"/>
|
---|
| 49 | </para>
|
---|
| 50 | </listitem>
|
---|
| 51 | <listitem>
|
---|
| 52 | <para>
|
---|
| 53 | Download MD5 sum: &acpid-md5sum;
|
---|
| 54 | </para>
|
---|
| 55 | </listitem>
|
---|
| 56 | <listitem>
|
---|
| 57 | <para>
|
---|
| 58 | Download size: &acpid-size;
|
---|
| 59 | </para>
|
---|
| 60 | </listitem>
|
---|
| 61 | <listitem>
|
---|
| 62 | <para>
|
---|
| 63 | Estimated disk space required: &acpid-buildsize;
|
---|
| 64 | </para>
|
---|
| 65 | </listitem>
|
---|
| 66 | <listitem>
|
---|
| 67 | <para>
|
---|
| 68 | Estimated build time: &acpid-time;
|
---|
| 69 | </para>
|
---|
| 70 | </listitem>
|
---|
| 71 | </itemizedlist>
|
---|
| 72 |
|
---|
| 73 | </sect2>
|
---|
| 74 |
|
---|
| 75 | <sect2 role="installation">
|
---|
| 76 | <title>Installation of acpid</title>
|
---|
| 77 |
|
---|
| 78 | <para>
|
---|
| 79 | Install <application>acpid</application> by
|
---|
| 80 | running the following commands:
|
---|
| 81 | </para>
|
---|
| 82 |
|
---|
[68d5b0e] | 83 | <screen><userinput>./configure --prefix=/usr \
|
---|
| 84 | --docdir=/usr/share/doc/acpid-&acpid-version; &&
|
---|
[7efbf3d1] | 85 | make</userinput></screen>
|
---|
| 86 |
|
---|
| 87 | <para>
|
---|
| 88 | This package does not come with a test suite.
|
---|
| 89 | </para>
|
---|
| 90 |
|
---|
| 91 | <para>
|
---|
| 92 | Now, as the <systemitem class="username">root</systemitem> user:
|
---|
| 93 | </para>
|
---|
| 94 |
|
---|
[7fe07f59] | 95 | <screen role="root"><userinput>make install &&
|
---|
[7efbf3d1] | 96 | install -v -m755 -d /etc/acpi/events &&
|
---|
| 97 | cp -r samples /usr/share/doc/acpid-&acpid-version;</userinput></screen>
|
---|
| 98 |
|
---|
| 99 | </sect2>
|
---|
| 100 |
|
---|
| 101 | <sect2 role="configuration">
|
---|
| 102 | <title>Configuring acpid</title>
|
---|
| 103 |
|
---|
| 104 | <para>
|
---|
| 105 | <application>acpid</application> is configured by user defined events.
|
---|
| 106 | Place event files under
|
---|
| 107 | <filename class="directory">/etc/acpi/events</filename> directory. If an
|
---|
| 108 | event occurs, <command>acpid</command> recurses through the event files in
|
---|
| 109 | order to see if the regex defined after "event" matches. If they do,
|
---|
| 110 | action is executed.
|
---|
| 111 | </para>
|
---|
| 112 |
|
---|
| 113 | <para>
|
---|
| 114 | The following brief example will suspend the system when the laptop lid
|
---|
| 115 | is closed (it requires <xref linkend="pm-utils"/>):
|
---|
| 116 | </para>
|
---|
| 117 |
|
---|
[08c3c25] | 118 | <!-- TODO: Move from pm-suspend to systemctl suspend for systemd -->
|
---|
[7efbf3d1] | 119 | <screen role="root"><userinput>cat > /etc/acpi/events/lid << "EOF"
|
---|
| 120 | <literal>event=button/lid
|
---|
| 121 | action=/etc/acpi/lid.sh</literal>
|
---|
| 122 | EOF
|
---|
| 123 |
|
---|
| 124 | cat > /etc/acpi/lid.sh << "EOF"
|
---|
| 125 | <literal>#!/bin/sh
|
---|
| 126 | /bin/grep -q open /proc/acpi/button/lid/LID/state && exit 0
|
---|
| 127 | /usr/sbin/pm-suspend</literal>
|
---|
| 128 | EOF
|
---|
| 129 | chmod +x /etc/acpi/lid.sh</userinput></screen>
|
---|
| 130 |
|
---|
| 131 | <para>
|
---|
| 132 | Unfortunately, not every computer labels ACPI events in the same way. To
|
---|
| 133 | determine how your buttons are recognized, use the
|
---|
[af8a78d] | 134 | <command>acpi_listen</command> tool. Also, look in the <filename
|
---|
| 135 | class="directory">samples</filename> directory under <filename
|
---|
| 136 | class="directory">/usr/share/doc/acpid-&acpid-version;</filename>
|
---|
| 137 | for more examples.
|
---|
[7efbf3d1] | 138 | </para>
|
---|
| 139 |
|
---|
| 140 | <sect3 id="acpid-init">
|
---|
[d5497a2e] | 141 | <title><phrase revision="sysv">Boot Script</phrase>
|
---|
| 142 | <phrase revision="systemd">Systemd Socket</phrase></title>
|
---|
[7efbf3d1] | 143 |
|
---|
[d5497a2e] | 144 | <para revision="sysv">
|
---|
[7efbf3d1] | 145 | To automatically start <command>acpid</command> when the system is
|
---|
| 146 | rebooted, install the <filename>/etc/rc.d/init.d/acpid</filename>
|
---|
[d5497a2e] | 147 | boot script from the <xref linkend="bootscripts"/> package.
|
---|
| 148 | </para>
|
---|
| 149 |
|
---|
| 150 | <para revision="systemd">
|
---|
| 151 | To start the <command>acpid</command> daemon at boot,
|
---|
| 152 | install the systemd unit from the <xref linkend="systemd-units"/>
|
---|
| 153 | package by running the following command as the
|
---|
| 154 | <systemitem class="username">root</systemitem> user:
|
---|
[7efbf3d1] | 155 | </para>
|
---|
| 156 |
|
---|
| 157 | <indexterm zone="acpid acpid-init">
|
---|
| 158 | <primary sortas="f-acpid">acpid</primary>
|
---|
| 159 | </indexterm>
|
---|
| 160 |
|
---|
| 161 | <screen role="root"><userinput>make install-acpid</userinput></screen>
|
---|
| 162 |
|
---|
[d5497a2e] | 163 | <note revision="systemd">
|
---|
| 164 | <para>
|
---|
| 165 | This package uses socket based activation and will be started when
|
---|
| 166 | something needs it. No standalone unit file is provided for this
|
---|
| 167 | package.
|
---|
| 168 | </para>
|
---|
| 169 | </note>
|
---|
| 170 |
|
---|
[7efbf3d1] | 171 | </sect3>
|
---|
| 172 |
|
---|
| 173 | </sect2>
|
---|
| 174 |
|
---|
| 175 | <sect2 role="content">
|
---|
| 176 | <title>Contents</title>
|
---|
| 177 |
|
---|
| 178 | <segmentedlist>
|
---|
| 179 | <segtitle>Installed Programs</segtitle>
|
---|
| 180 | <segtitle>Installed Libraries</segtitle>
|
---|
[68d5b0e] | 181 | <segtitle>Installed Directories</segtitle>
|
---|
[7efbf3d1] | 182 |
|
---|
| 183 | <seglistitem>
|
---|
| 184 | <seg>
|
---|
[d3789ec7] | 185 | acpid, acpi_listen, and kacpimon
|
---|
[7efbf3d1] | 186 | </seg>
|
---|
| 187 | <seg>
|
---|
| 188 | None
|
---|
| 189 | </seg>
|
---|
| 190 | <seg>
|
---|
[68d5b0e] | 191 | /etc/acpi and /usr/share/doc/acpid-&acpid-version;
|
---|
[7efbf3d1] | 192 | </seg>
|
---|
| 193 | </seglistitem>
|
---|
| 194 | </segmentedlist>
|
---|
| 195 |
|
---|
| 196 | <variablelist>
|
---|
| 197 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 198 | <?dbfo list-presentation="list"?>
|
---|
| 199 | <?dbhtml list-presentation="table"?>
|
---|
| 200 |
|
---|
| 201 | <varlistentry id="acpid-prog">
|
---|
| 202 | <term><command>acpid</command></term>
|
---|
| 203 | <listitem>
|
---|
| 204 | <para>
|
---|
| 205 | is a program that listens for ACPI events and executes the rules
|
---|
[4c24eb0a] | 206 | that match the received event
|
---|
[7efbf3d1] | 207 | </para>
|
---|
| 208 | <indexterm zone="acpid acpid-prog">
|
---|
| 209 | <primary sortas="b-acpid">acpid</primary>
|
---|
| 210 | </indexterm>
|
---|
| 211 | </listitem>
|
---|
| 212 | </varlistentry>
|
---|
| 213 |
|
---|
| 214 | <varlistentry id="acpi_listen">
|
---|
| 215 | <term><command>acpi_listen</command></term>
|
---|
| 216 | <listitem>
|
---|
| 217 | <para>
|
---|
| 218 | is a simple tool which connects to <command>acpid</command> and
|
---|
[4c24eb0a] | 219 | listens for events
|
---|
[7efbf3d1] | 220 | </para>
|
---|
| 221 | <indexterm zone="acpid acpi_listen">
|
---|
| 222 | <primary sortas="b-acpi_listen">acpi_listen</primary>
|
---|
| 223 | </indexterm>
|
---|
| 224 | </listitem>
|
---|
| 225 | </varlistentry>
|
---|
| 226 |
|
---|
| 227 | <varlistentry id="kacpimon">
|
---|
| 228 | <term><command>kacpimon</command></term>
|
---|
| 229 | <listitem>
|
---|
| 230 | <para>
|
---|
| 231 | is a monitor program that connects to three sources of ACPI events
|
---|
| 232 | (events file, netlink and input layer) and then reports on what it
|
---|
[4c24eb0a] | 233 | sees while it is connected
|
---|
[7efbf3d1] | 234 | </para>
|
---|
| 235 | <indexterm zone="acpid kacpimon">
|
---|
| 236 | <primary sortas="b-kacpimon">kacpimon</primary>
|
---|
| 237 | </indexterm>
|
---|
| 238 | </listitem>
|
---|
| 239 | </varlistentry>
|
---|
| 240 |
|
---|
| 241 | </variablelist>
|
---|
| 242 |
|
---|
| 243 | </sect2>
|
---|
| 244 |
|
---|
| 245 | </sect1>
|
---|