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