[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 |
|
---|
[9b8ff698] | 37 | &lfs112_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 | <para condition="html" role="usernotes">User Notes:
|
---|
| 74 | <ulink url="&blfs-wiki;/acpid"/>
|
---|
| 75 | </para>
|
---|
| 76 | </sect2>
|
---|
| 77 |
|
---|
| 78 | <sect2 role="installation">
|
---|
| 79 | <title>Installation of acpid</title>
|
---|
| 80 |
|
---|
| 81 | <para>
|
---|
| 82 | Install <application>acpid</application> by
|
---|
| 83 | running the following commands:
|
---|
| 84 | </para>
|
---|
| 85 |
|
---|
[68d5b0e] | 86 | <screen><userinput>./configure --prefix=/usr \
|
---|
| 87 | --docdir=/usr/share/doc/acpid-&acpid-version; &&
|
---|
[7efbf3d1] | 88 | make</userinput></screen>
|
---|
| 89 |
|
---|
| 90 | <para>
|
---|
| 91 | This package does not come with a test suite.
|
---|
| 92 | </para>
|
---|
| 93 |
|
---|
| 94 | <para>
|
---|
| 95 | Now, as the <systemitem class="username">root</systemitem> user:
|
---|
| 96 | </para>
|
---|
| 97 |
|
---|
[7fe07f59] | 98 | <screen role="root"><userinput>make install &&
|
---|
[7efbf3d1] | 99 | install -v -m755 -d /etc/acpi/events &&
|
---|
| 100 | cp -r samples /usr/share/doc/acpid-&acpid-version;</userinput></screen>
|
---|
| 101 |
|
---|
| 102 | </sect2>
|
---|
| 103 |
|
---|
| 104 | <sect2 role="configuration">
|
---|
| 105 | <title>Configuring acpid</title>
|
---|
| 106 |
|
---|
| 107 | <para>
|
---|
| 108 | <application>acpid</application> is configured by user defined events.
|
---|
| 109 | Place event files under
|
---|
| 110 | <filename class="directory">/etc/acpi/events</filename> directory. If an
|
---|
| 111 | event occurs, <command>acpid</command> recurses through the event files in
|
---|
| 112 | order to see if the regex defined after "event" matches. If they do,
|
---|
| 113 | action is executed.
|
---|
| 114 | </para>
|
---|
| 115 |
|
---|
| 116 | <para>
|
---|
| 117 | The following brief example will suspend the system when the laptop lid
|
---|
| 118 | is closed (it requires <xref linkend="pm-utils"/>):
|
---|
| 119 | </para>
|
---|
| 120 |
|
---|
| 121 | <screen role="root"><userinput>cat > /etc/acpi/events/lid << "EOF"
|
---|
| 122 | <literal>event=button/lid
|
---|
| 123 | action=/etc/acpi/lid.sh</literal>
|
---|
| 124 | EOF
|
---|
| 125 |
|
---|
| 126 | cat > /etc/acpi/lid.sh << "EOF"
|
---|
| 127 | <literal>#!/bin/sh
|
---|
| 128 | /bin/grep -q open /proc/acpi/button/lid/LID/state && exit 0
|
---|
| 129 | /usr/sbin/pm-suspend</literal>
|
---|
| 130 | EOF
|
---|
| 131 | chmod +x /etc/acpi/lid.sh</userinput></screen>
|
---|
| 132 |
|
---|
| 133 | <para>
|
---|
| 134 | Unfortunately, not every computer labels ACPI events in the same way. To
|
---|
| 135 | determine how your buttons are recognized, use the
|
---|
[af8a78d] | 136 | <command>acpi_listen</command> tool. Also, look in the <filename
|
---|
| 137 | class="directory">samples</filename> directory under <filename
|
---|
| 138 | class="directory">/usr/share/doc/acpid-&acpid-version;</filename>
|
---|
| 139 | for more examples.
|
---|
[7efbf3d1] | 140 | </para>
|
---|
| 141 |
|
---|
| 142 | <sect3 id="acpid-init">
|
---|
[d5497a2e] | 143 | <title><phrase revision="sysv">Boot Script</phrase>
|
---|
| 144 | <phrase revision="systemd">Systemd Socket</phrase></title>
|
---|
[7efbf3d1] | 145 |
|
---|
[d5497a2e] | 146 | <para revision="sysv">
|
---|
[7efbf3d1] | 147 | To automatically start <command>acpid</command> when the system is
|
---|
| 148 | rebooted, install the <filename>/etc/rc.d/init.d/acpid</filename>
|
---|
[d5497a2e] | 149 | boot script from the <xref linkend="bootscripts"/> package.
|
---|
| 150 | </para>
|
---|
| 151 |
|
---|
| 152 | <para revision="systemd">
|
---|
| 153 | To start the <command>acpid</command> daemon at boot,
|
---|
| 154 | install the systemd unit from the <xref linkend="systemd-units"/>
|
---|
| 155 | package by running the following command as the
|
---|
| 156 | <systemitem class="username">root</systemitem> user:
|
---|
[7efbf3d1] | 157 | </para>
|
---|
| 158 |
|
---|
| 159 | <indexterm zone="acpid acpid-init">
|
---|
| 160 | <primary sortas="f-acpid">acpid</primary>
|
---|
| 161 | </indexterm>
|
---|
| 162 |
|
---|
| 163 | <screen role="root"><userinput>make install-acpid</userinput></screen>
|
---|
| 164 |
|
---|
[d5497a2e] | 165 | <note revision="systemd">
|
---|
| 166 | <para>
|
---|
| 167 | This package uses socket based activation and will be started when
|
---|
| 168 | something needs it. No standalone unit file is provided for this
|
---|
| 169 | package.
|
---|
| 170 | </para>
|
---|
| 171 | </note>
|
---|
| 172 |
|
---|
[7efbf3d1] | 173 | </sect3>
|
---|
| 174 |
|
---|
| 175 | </sect2>
|
---|
| 176 |
|
---|
| 177 | <sect2 role="content">
|
---|
| 178 | <title>Contents</title>
|
---|
| 179 |
|
---|
| 180 | <segmentedlist>
|
---|
| 181 | <segtitle>Installed Programs</segtitle>
|
---|
| 182 | <segtitle>Installed Libraries</segtitle>
|
---|
[68d5b0e] | 183 | <segtitle>Installed Directories</segtitle>
|
---|
[7efbf3d1] | 184 |
|
---|
| 185 | <seglistitem>
|
---|
| 186 | <seg>
|
---|
[d3789ec7] | 187 | acpid, acpi_listen, and kacpimon
|
---|
[7efbf3d1] | 188 | </seg>
|
---|
| 189 | <seg>
|
---|
| 190 | None
|
---|
| 191 | </seg>
|
---|
| 192 | <seg>
|
---|
[68d5b0e] | 193 | /etc/acpi and /usr/share/doc/acpid-&acpid-version;
|
---|
[7efbf3d1] | 194 | </seg>
|
---|
| 195 | </seglistitem>
|
---|
| 196 | </segmentedlist>
|
---|
| 197 |
|
---|
| 198 | <variablelist>
|
---|
| 199 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 200 | <?dbfo list-presentation="list"?>
|
---|
| 201 | <?dbhtml list-presentation="table"?>
|
---|
| 202 |
|
---|
| 203 | <varlistentry id="acpid-prog">
|
---|
| 204 | <term><command>acpid</command></term>
|
---|
| 205 | <listitem>
|
---|
| 206 | <para>
|
---|
| 207 | is a program that listens for ACPI events and executes the rules
|
---|
[4c24eb0a] | 208 | that match the received event
|
---|
[7efbf3d1] | 209 | </para>
|
---|
| 210 | <indexterm zone="acpid acpid-prog">
|
---|
| 211 | <primary sortas="b-acpid">acpid</primary>
|
---|
| 212 | </indexterm>
|
---|
| 213 | </listitem>
|
---|
| 214 | </varlistentry>
|
---|
| 215 |
|
---|
| 216 | <varlistentry id="acpi_listen">
|
---|
| 217 | <term><command>acpi_listen</command></term>
|
---|
| 218 | <listitem>
|
---|
| 219 | <para>
|
---|
| 220 | is a simple tool which connects to <command>acpid</command> and
|
---|
[4c24eb0a] | 221 | listens for events
|
---|
[7efbf3d1] | 222 | </para>
|
---|
| 223 | <indexterm zone="acpid acpi_listen">
|
---|
| 224 | <primary sortas="b-acpi_listen">acpi_listen</primary>
|
---|
| 225 | </indexterm>
|
---|
| 226 | </listitem>
|
---|
| 227 | </varlistentry>
|
---|
| 228 |
|
---|
| 229 | <varlistentry id="kacpimon">
|
---|
| 230 | <term><command>kacpimon</command></term>
|
---|
| 231 | <listitem>
|
---|
| 232 | <para>
|
---|
| 233 | is a monitor program that connects to three sources of ACPI events
|
---|
| 234 | (events file, netlink and input layer) and then reports on what it
|
---|
[4c24eb0a] | 235 | sees while it is connected
|
---|
[7efbf3d1] | 236 | </para>
|
---|
| 237 | <indexterm zone="acpid kacpimon">
|
---|
| 238 | <primary sortas="b-kacpimon">kacpimon</primary>
|
---|
| 239 | </indexterm>
|
---|
| 240 | </listitem>
|
---|
| 241 | </varlistentry>
|
---|
| 242 |
|
---|
| 243 | </variablelist>
|
---|
| 244 |
|
---|
| 245 | </sect2>
|
---|
| 246 |
|
---|
| 247 | </sect1>
|
---|