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