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 upower-download-http "https://gitlab.freedesktop.org/upower/upower/-/archive/v&upower-version;/upower-v&upower-version;.tar.bz2">
|
---|
8 | <!ENTITY upower-download-ftp " ">
|
---|
9 | <!ENTITY upower-md5sum "2399845217a9c6e4510f66033fcd7cf6">
|
---|
10 | <!ENTITY upower-size "140 KB">
|
---|
11 | <!ENTITY upower-buildsize "5.5 MB (add 2.6 MB for tests)">
|
---|
12 | <!ENTITY upower-time "less than 0.1 SBU (add 0.6 SBU for tests)">
|
---|
13 | ]>
|
---|
14 |
|
---|
15 | <sect1 id="upower" xreflabel="UPower-&upower-version;">
|
---|
16 | <?dbhtml filename="upower.html"?>
|
---|
17 |
|
---|
18 |
|
---|
19 | <title>UPower-&upower-version;</title>
|
---|
20 |
|
---|
21 | <indexterm zone="upower">
|
---|
22 | <primary sortas="a-UPower">UPower</primary>
|
---|
23 | </indexterm>
|
---|
24 |
|
---|
25 | <sect2 role="package">
|
---|
26 | <title>Introduction to UPower</title>
|
---|
27 |
|
---|
28 | <para>
|
---|
29 | The <application>UPower</application> package provides an interface for
|
---|
30 | enumerating power devices, listening to device events and querying history
|
---|
31 | and statistics. Any application or service on the system can access the
|
---|
32 | org.freedesktop.UPower service via the system message bus.
|
---|
33 | </para>
|
---|
34 |
|
---|
35 | &lfs121_checked;
|
---|
36 |
|
---|
37 | <bridgehead renderas="sect3">Package Information</bridgehead>
|
---|
38 | <itemizedlist spacing="compact">
|
---|
39 | <listitem>
|
---|
40 | <para>
|
---|
41 | Download (HTTP): <ulink url="&upower-download-http;"/>
|
---|
42 | </para>
|
---|
43 | </listitem>
|
---|
44 | <listitem>
|
---|
45 | <para>
|
---|
46 | Download (FTP): <ulink url="&upower-download-ftp;"/>
|
---|
47 | </para>
|
---|
48 | </listitem>
|
---|
49 | <listitem>
|
---|
50 | <para>
|
---|
51 | Download MD5 sum: &upower-md5sum;
|
---|
52 | </para>
|
---|
53 | </listitem>
|
---|
54 | <listitem>
|
---|
55 | <para>
|
---|
56 | Download size: &upower-size;
|
---|
57 | </para>
|
---|
58 | </listitem>
|
---|
59 | <listitem>
|
---|
60 | <para>
|
---|
61 | Estimated disk space required: &upower-buildsize;
|
---|
62 | </para>
|
---|
63 | </listitem>
|
---|
64 | <listitem>
|
---|
65 | <para>
|
---|
66 | Estimated build time: &upower-time;
|
---|
67 | </para>
|
---|
68 | </listitem>
|
---|
69 | </itemizedlist>
|
---|
70 |
|
---|
71 | <bridgehead renderas="sect3">UPower Dependencies</bridgehead>
|
---|
72 |
|
---|
73 | <bridgehead renderas="sect4">Required</bridgehead>
|
---|
74 | <para role="required">
|
---|
75 | <xref linkend="libgudev"/> and
|
---|
76 | <xref linkend="libusb"/>
|
---|
77 | </para>
|
---|
78 |
|
---|
79 | <bridgehead renderas="sect4">Optional (Required if building GNOME)</bridgehead>
|
---|
80 | <para role="optional">
|
---|
81 | &gobject-introspection;
|
---|
82 | </para>
|
---|
83 |
|
---|
84 | <bridgehead renderas="sect4">Optional</bridgehead>
|
---|
85 | <para role="optional">
|
---|
86 | <xref linkend="gtk-doc"/>,
|
---|
87 | <xref linkend="libxslt"/>,
|
---|
88 | <xref linkend="docbook-xsl"/>,
|
---|
89 | <xref linkend="pygobject3"/>,
|
---|
90 | <xref linkend="python-dbusmock"/>,
|
---|
91 | <xref linkend="umockdev"/> (for part of the test suite), and
|
---|
92 | <ulink url="https://libimobiledevice.org/">libimobiledevice</ulink>
|
---|
93 | </para>
|
---|
94 |
|
---|
95 | </sect2>
|
---|
96 |
|
---|
97 | <sect2 role="kernel" id="upower-kernel" revision="systemd">
|
---|
98 | <!-- With UPower-0.9.11's hardening of the systemd unit file,
|
---|
99 | User Namespace Support (CONFIG_USER_NS) is now required. Without this,
|
---|
100 | you will get "ERROR 213/USER" out of a 'systemctl start upower'. -->
|
---|
101 | <title>Kernel Configuration</title>
|
---|
102 |
|
---|
103 | <para>
|
---|
104 | Enable the following options in the kernel configuration and recompile the
|
---|
105 | kernel if necessary:
|
---|
106 | </para>
|
---|
107 |
|
---|
108 | <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
|
---|
109 | href="upower-systemd-kernel.xml"/>
|
---|
110 |
|
---|
111 | <indexterm zone="upower upower-kernel">
|
---|
112 | <primary sortas="d-upower">upower</primary>
|
---|
113 | </indexterm>
|
---|
114 | </sect2>
|
---|
115 |
|
---|
116 | <sect2 role="installation">
|
---|
117 | <title>Installation of UPower</title>
|
---|
118 |
|
---|
119 | <para>
|
---|
120 | Install <application>UPower</application> by running the following
|
---|
121 | commands:
|
---|
122 | </para>
|
---|
123 |
|
---|
124 | <screen revision="sysv"><userinput>mkdir build &&
|
---|
125 | cd build &&
|
---|
126 |
|
---|
127 | meson setup .. \
|
---|
128 | --prefix=/usr \
|
---|
129 | --buildtype=release \
|
---|
130 | -D gtk-doc=false \
|
---|
131 | -D man=false \
|
---|
132 | -D systemdsystemunitdir=no \
|
---|
133 | -D udevrulesdir=/usr/lib/udev/rules.d &&
|
---|
134 | ninja</userinput></screen>
|
---|
135 |
|
---|
136 | <screen revision="systemd"><userinput>mkdir build &&
|
---|
137 | cd build &&
|
---|
138 | meson setup .. \
|
---|
139 | --prefix=/usr \
|
---|
140 | --buildtype=release \
|
---|
141 | -D gtk-doc=false \
|
---|
142 | -D man=false &&
|
---|
143 | ninja</userinput></screen>
|
---|
144 |
|
---|
145 | <!-- On my system with LANG=zh_CN.UTF-8, one test attempted to compare
|
---|
146 | Chinese error message with English references and failed.
|
---|
147 | LC_ALL=C fixes the problem. -->
|
---|
148 | <!-- Headphone hotplug (bluetooth and AUX) was tested and seems to work
|
---|
149 | okay even with the test faliures. Maybe it's wants headphones plugged
|
---|
150 | in during the test? Regardless, it can be safely ignored. -->
|
---|
151 | <!-- On a 32-bit machine, the following test failure can be observed:
|
---|
152 | ======================================================================
|
---|
153 | FAIL: test_battery_energy_charge_mixed (__main__.Tests.test_battery_energy_charge_mixed)
|
---|
154 | battery which reports both current charge and energy
|
---|
155 |
|
---|
156 | self.assertEqual(self.get_dbus_dev_property(bat0_up, 'Percentage'), 40.0)
|
---|
157 | AssertionError: 40.00000000000001 != 40.0
|
---|
158 |
|
---|
159 | This is known upstream as https://gitlab.freedesktop.org/upower/upower/-/issues/251
|
---|
160 | Not sure if this is an actual problem, but it seems to start and work
|
---|
161 | properly -renodr
|
---|
162 |
|
---|
163 | test_bluetooth_le_device: upstream MR !207 -xry111 -->
|
---|
164 |
|
---|
165 | <!-- On my system all 68 tests passed for v1.90.4.
|
---|
166 | Did not check on a 32-bit system. - bdubbs -->
|
---|
167 |
|
---|
168 | <para>
|
---|
169 | To test the results, issue: <command>LC_ALL=C ninja test</command>. The
|
---|
170 | test suite should be run from a local GUI session started with
|
---|
171 | dbus-launch. On 32-bit machines, one test will fail due to rounding
|
---|
172 | errors: <filename>Tests.test_battery_energy_charge_mixed</filename>. On
|
---|
173 | some systems, two tests relating to the headphone hotplug feature are
|
---|
174 | known to fail. Those can be safely ignored since the functionality still
|
---|
175 | works.
|
---|
176 | </para>
|
---|
177 |
|
---|
178 | <para>
|
---|
179 | Now, as the <systemitem class="username">root</systemitem> user:
|
---|
180 | </para>
|
---|
181 |
|
---|
182 | <screen role="root"><userinput>ninja install</userinput></screen>
|
---|
183 |
|
---|
184 | </sect2>
|
---|
185 |
|
---|
186 | <sect2 role="commands">
|
---|
187 | <title>Command Explanations</title>
|
---|
188 |
|
---|
189 | <para>
|
---|
190 | <parameter>-D gtk-doc=false</parameter>: Prevents building the
|
---|
191 | documentation. Remove this if you have <application>GTK-Doc</application>
|
---|
192 | installed and wish to build the documentation.
|
---|
193 | </para>
|
---|
194 |
|
---|
195 | <para>
|
---|
196 | <parameter>-D man=false</parameter>: Prevents building the
|
---|
197 | manual pages. Remove this if you have <xref linkend='libxslt'/> and
|
---|
198 | <xref linkend='docbook-xsl'/> installed and wish to build the manual
|
---|
199 | pages.
|
---|
200 | </para>
|
---|
201 |
|
---|
202 | <para revision="sysv">
|
---|
203 | <parameter>-D systemdsystemunitdir=no</parameter>: Removes
|
---|
204 | the dependency on <application>systemd</application>.
|
---|
205 | </para>
|
---|
206 |
|
---|
207 | <para revision="sysv">
|
---|
208 | <parameter>-D udevrulesdir=/usr/lib/udev/rules.d</parameter>: Tells
|
---|
209 | the build system where to install <application>udev</application>
|
---|
210 | rules because the information is missing in
|
---|
211 | <filename>/usr/lib/pkgconfig/libudev.pc</filename>
|
---|
212 | </para>
|
---|
213 |
|
---|
214 | </sect2>
|
---|
215 |
|
---|
216 | <sect2 role="content">
|
---|
217 | <title>Contents</title>
|
---|
218 |
|
---|
219 | <segmentedlist>
|
---|
220 | <segtitle>Installed Program<!--
|
---|
221 | See below... <phrase revision="systemd">s</phrase>--></segtitle>
|
---|
222 | <segtitle>Installed Libraries</segtitle>
|
---|
223 | <segtitle>Installed Directories</segtitle>
|
---|
224 |
|
---|
225 | <seglistitem>
|
---|
226 | <seg>
|
---|
227 | upower
|
---|
228 | <!-- <phrase revision="systemd"> and upowerd</phrase>
|
---|
229 | Upowerd should not be listed, as it is in /usr/libexec, and is not supposed
|
---|
230 | to be run by a user. Furthermore, upowerd is also in sysv, and there is no
|
---|
231 | reason so single out systemd here. -->
|
---|
232 | </seg>
|
---|
233 | <seg>
|
---|
234 | libupower-glib.so
|
---|
235 | </seg>
|
---|
236 | <seg>
|
---|
237 | /etc/UPower,
|
---|
238 | /usr/include/libupower-glib, and
|
---|
239 | /var/lib/upower
|
---|
240 | </seg>
|
---|
241 | </seglistitem>
|
---|
242 | </segmentedlist>
|
---|
243 |
|
---|
244 | <variablelist>
|
---|
245 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
246 | <?dbfo list-presentation="list"?>
|
---|
247 | <?dbhtml list-presentation="table"?>
|
---|
248 |
|
---|
249 | <varlistentry id="upower-prog">
|
---|
250 | <term><command>upower</command></term>
|
---|
251 | <listitem>
|
---|
252 | <para>
|
---|
253 | is the <application>UPower</application> command line tool
|
---|
254 | </para>
|
---|
255 | <indexterm zone="upower upower-prog">
|
---|
256 | <primary sortas="b-upower">upower</primary>
|
---|
257 | </indexterm>
|
---|
258 | </listitem>
|
---|
259 | </varlistentry>
|
---|
260 | <!-- See above
|
---|
261 | <varlistentry id="upowerd" revision="systemd">
|
---|
262 | <term><command>upowerd</command></term>
|
---|
263 | <listitem>
|
---|
264 | <para>
|
---|
265 | is the <application>UPower</application> Daemon. It provides the
|
---|
266 | org.freedesktop.UPower service on the system message bus.
|
---|
267 | </para>
|
---|
268 | <indexterm zone="upower upowerd">
|
---|
269 | <primary sortas="b-upowerd">upowerd</primary>
|
---|
270 | </indexterm>
|
---|
271 | </listitem>
|
---|
272 | </varlistentry>-->
|
---|
273 |
|
---|
274 | <varlistentry id="libupower-glib">
|
---|
275 | <term><filename class="libraryfile">libupower-glib.so</filename></term>
|
---|
276 | <listitem>
|
---|
277 | <para>
|
---|
278 | contains the <application>UPower</application> API functions
|
---|
279 | </para>
|
---|
280 | <indexterm zone="upower libupower-glib">
|
---|
281 | <primary sortas="c-libupower-glib">libupower-glib.so</primary>
|
---|
282 | </indexterm>
|
---|
283 | </listitem>
|
---|
284 | </varlistentry>
|
---|
285 |
|
---|
286 | </variablelist>
|
---|
287 |
|
---|
288 | </sect2>
|
---|
289 |
|
---|
290 | </sect1>
|
---|