source: general/sysutils/acpid.xml

trunk
Last change on this file was b9874725, checked in by Bruce Dubbs <bdubbs@…>, 2 months ago

Many tags.

Mostly Programming and Xorg sections and dependencies.

  • Property mode set to 100644
File size: 9.3 KB
Line 
1<?xml version="1.0" encoding="UTF-8"?>
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-dl;/acpid2/acpid-&acpid-version;.tar.xz">
8 <!ENTITY acpid-download-ftp " ">
9 <!ENTITY acpid-md5sum "988c2e3fd5ba0ea4492d3ba7273af295">
10 <!ENTITY acpid-size "160 KB">
11 <!ENTITY acpid-buildsize "1.9 MB">
12 <!ENTITY acpid-time "less than 0.1 SBU">
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
37 <note>
38 <para>
39 Some other packages may handle some ACPI events as well and they
40 may conflict with this package. For example, &logind;
41 (read the documentation for <option>Handle*=</option> in
42 <ulink role='man' url='&man;logind.conf.5'>logind.conf(5)</ulink>
43 for details) and
44 <xref linkend='upower'/> (used by many desktop environments such as
45 GNOME, KDE, and XFCE for handling ACPI events). If you've installed
46 such a package and it's enough for your use case, this package is
47 probably not needed. If you really need this package, you must be
48 careful configuring it and the other packages handling ACPI events
49 to avoid conflicts. Notably, &logind; handles some ACPI events
50 by default, so the handling of these events by &logind; should be
51 disabled first if handling these events with acpid
52 (again, read <ulink role='man'
53 url='&man;logind.conf.5'>logind.conf(5)</ulink> for details).
54 </para>
55 </note>
56
57 &lfs121_checked;
58
59 <bridgehead renderas="sect3">Package Information</bridgehead>
60 <itemizedlist spacing="compact">
61 <listitem>
62 <para>
63 Download (HTTP): <ulink url="&acpid-download-http;"/>
64 </para>
65 </listitem>
66 <listitem>
67 <para>
68 Download (FTP): <ulink url="&acpid-download-ftp;"/>
69 </para>
70 </listitem>
71 <listitem>
72 <para>
73 Download MD5 sum: &acpid-md5sum;
74 </para>
75 </listitem>
76 <listitem>
77 <para>
78 Download size: &acpid-size;
79 </para>
80 </listitem>
81 <listitem>
82 <para>
83 Estimated disk space required: &acpid-buildsize;
84 </para>
85 </listitem>
86 <listitem>
87 <para>
88 Estimated build time: &acpid-time;
89 </para>
90 </listitem>
91 </itemizedlist>
92
93 </sect2>
94
95 <sect2 role="installation">
96 <title>Installation of acpid</title>
97
98 <para>
99 Install <application>acpid</application> by
100 running the following commands:
101 </para>
102
103<screen><userinput>./configure --prefix=/usr \
104 --docdir=/usr/share/doc/acpid-&acpid-version; &amp;&amp;
105make</userinput></screen>
106
107 <para>
108 This package does not come with a test suite.
109 </para>
110
111 <para>
112 Now, as the <systemitem class="username">root</systemitem> user:
113 </para>
114
115<screen role="root"><userinput>make install &amp;&amp;
116install -v -m755 -d /etc/acpi/events &amp;&amp;
117cp -r samples /usr/share/doc/acpid-&acpid-version;</userinput></screen>
118
119 </sect2>
120
121 <sect2 role="configuration">
122 <title>Configuring acpid</title>
123
124 <para>
125 <application>acpid</application> is configured by user defined events.
126 Place event files under
127 <filename class="directory">/etc/acpi/events</filename> directory. If an
128 event occurs, <command>acpid</command> recurses through the event files in
129 order to see if the regex defined after "event" matches. If they do,
130 action is executed.
131 </para>
132
133 <para>
134 The following brief example will suspend the system when the laptop
135 lid is closed<phrase revision='sysv'> (it requires
136 <xref linkend="pm-utils"/>)</phrase>. The example also disables
137 the default handling of the lid close event by &logind; when the
138 system is on battery and not connected to any external monitor,
139 in order to avoid a conflict:
140 </para>
141
142<screen revision='sysv' role="nodump"><userinput>cat &gt; /etc/acpi/events/lid &lt;&lt; "EOF"
143<literal>event=button/lid
144action=/etc/acpi/lid.sh</literal>
145EOF
146
147cat &gt; /etc/acpi/lid.sh &lt;&lt; "EOF"
148<literal>#!/bin/sh
149/bin/grep -q open /proc/acpi/button/lid/LID/state &amp;&amp; exit 0
150/usr/sbin/pm-suspend</literal>
151EOF
152chmod +x /etc/acpi/lid.sh
153
154mkdir -pv /etc/elogind/logind.conf.d
155echo <literal>HandleLidSwitch=ignore</literal> &gt; /etc/elogind/logind.conf.d/acpi.conf</userinput></screen>
156
157<screen revision='systemd' role="nodump"><userinput>cat &gt; /etc/acpi/events/lid &lt;&lt; "EOF"
158<literal>event=button/lid
159action=/etc/acpi/lid.sh</literal>
160EOF
161
162cat &gt; /etc/acpi/lid.sh &lt;&lt; "EOF"
163<literal>#!/bin/sh
164/bin/grep -q open /proc/acpi/button/lid/LID/state &amp;&amp; exit 0
165/usr/bin/systemctl suspend</literal>
166EOF
167chmod +x /etc/acpi/lid.sh
168
169mkdir -pv /etc/systemd/logind.conf.d
170echo <literal>HandleLidSwitch=ignore</literal> &gt; /etc/systemd/logind.conf.d/acpi.conf</userinput></screen>
171
172 <para>
173 Unfortunately, not every computer labels ACPI events in the same way
174 (for example, the lid may be recognized as <filename>LID0</filename>
175 instead of <filename>LID</filename>).
176 To determine how your buttons are recognized, use the
177 <command>acpi_listen</command> tool. Also, look in the <filename
178 class="directory">samples</filename> directory under <filename
179 class="directory">/usr/share/doc/acpid-&acpid-version;</filename>
180 for more examples.
181 </para>
182
183 <sect3 id="acpid-init">
184 <title><phrase revision="sysv">Boot Script</phrase>
185 <phrase revision="systemd">Systemd Socket</phrase></title>
186
187 <para revision="sysv">
188 To automatically start <command>acpid</command> when the system is
189 rebooted, install the <filename>/etc/rc.d/init.d/acpid</filename>
190 boot script from the <xref linkend="bootscripts"/> package.
191 </para>
192
193 <para revision="systemd">
194 To start the <command>acpid</command> daemon at boot,
195 install the systemd unit from the <xref linkend="systemd-units"/>
196 package by running the following command as the
197 <systemitem class="username">root</systemitem> user:
198 </para>
199
200 <indexterm zone="acpid acpid-init">
201 <primary sortas="f-acpid">acpid</primary>
202 </indexterm>
203
204<screen role="root"><userinput>make install-acpid</userinput></screen>
205
206 <note revision="systemd">
207 <para>
208 This package uses socket based activation and will be started when
209 something needs it. No standalone unit file is provided for this
210 package.
211 </para>
212 </note>
213
214 </sect3>
215
216 </sect2>
217
218 <sect2 role="content">
219 <title>Contents</title>
220
221 <segmentedlist>
222 <segtitle>Installed Programs</segtitle>
223 <segtitle>Installed Libraries</segtitle>
224 <segtitle>Installed Directories</segtitle>
225
226 <seglistitem>
227 <seg>
228 acpid, acpi_listen, and kacpimon
229 </seg>
230 <seg>
231 None
232 </seg>
233 <seg>
234 /etc/acpi and /usr/share/doc/acpid-&acpid-version;
235 </seg>
236 </seglistitem>
237 </segmentedlist>
238
239 <variablelist>
240 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
241 <?dbfo list-presentation="list"?>
242 <?dbhtml list-presentation="table"?>
243
244 <varlistentry id="acpid-prog">
245 <term><command>acpid</command></term>
246 <listitem>
247 <para>
248 is a program that listens for ACPI events and executes the rules
249 that match the received event
250 </para>
251 <indexterm zone="acpid acpid-prog">
252 <primary sortas="b-acpid">acpid</primary>
253 </indexterm>
254 </listitem>
255 </varlistentry>
256
257 <varlistentry id="acpi_listen">
258 <term><command>acpi_listen</command></term>
259 <listitem>
260 <para>
261 is a simple tool which connects to <command>acpid</command> and
262 listens for events
263 </para>
264 <indexterm zone="acpid acpi_listen">
265 <primary sortas="b-acpi_listen">acpi_listen</primary>
266 </indexterm>
267 </listitem>
268 </varlistentry>
269
270 <varlistentry id="kacpimon">
271 <term><command>kacpimon</command></term>
272 <listitem>
273 <para>
274 is a monitor program that connects to three sources of ACPI events
275 (events file, netlink and input layer) and then reports on what it
276 sees while it is connected
277 </para>
278 <indexterm zone="acpid kacpimon">
279 <primary sortas="b-kacpimon">kacpimon</primary>
280 </indexterm>
281 </listitem>
282 </varlistentry>
283
284 </variablelist>
285
286 </sect2>
287
288</sect1>
Note: See TracBrowser for help on using the repository browser.