source: general/sysutils/upower.xml@ d9c3a6d5

11.2 11.3 12.0 12.1 kea ken/TL2024 ken/inkscape-core-mods ken/tuningfonts lazarus lxqt plabs/newcss plabs/python-mods python3.11 qt5new rahul/power-profiles-daemon renodr/vulkan-addition trunk xry111/llvm18 xry111/soup3 xry111/xf86-video-removal
Last change on this file since d9c3a6d5 was d9c3a6d5, checked in by Bruce Dubbs <bdubbs@…>, 2 years ago

Update to upower-v0.99.18.

  • Property mode set to 100644
File size: 10.4 KB
Line 
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
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 "beb231806883952c31c44f81ac745b25">
10 <!ENTITY upower-size "140 KB">
11 <!ENTITY upower-buildsize "4.9 MB (add 0.9 MB for tests)">
12 <!ENTITY upower-time "less than 0.1 SBU (using parallelism=4, add 0.4 SBU for tests)">
13]>
14
15<sect1 id="upower" xreflabel="UPower-&upower-version;">
16 <?dbhtml filename="upower.html"?>
17
18 <sect1info>
19 <date>$Date$</date>
20 </sect1info>
21
22 <title>UPower-&upower-version;</title>
23
24 <indexterm zone="upower">
25 <primary sortas="a-UPower">UPower</primary>
26 </indexterm>
27
28 <sect2 role="package">
29 <title>Introduction to UPower</title>
30
31 <para>
32 The <application>UPower</application> package provides an interface for
33 enumerating power devices, listening to device events and querying history
34 and statistics. Any application or service on the system can access the
35 org.freedesktop.UPower service via the system message bus.
36 </para>
37
38 &lfs111_checked;
39
40 <bridgehead renderas="sect3">Package Information</bridgehead>
41 <itemizedlist spacing="compact">
42 <listitem>
43 <para>
44 Download (HTTP): <ulink url="&upower-download-http;"/>
45 </para>
46 </listitem>
47 <listitem>
48 <para>
49 Download (FTP): <ulink url="&upower-download-ftp;"/>
50 </para>
51 </listitem>
52 <listitem>
53 <para>
54 Download MD5 sum: &upower-md5sum;
55 </para>
56 </listitem>
57 <listitem>
58 <para>
59 Download size: &upower-size;
60 </para>
61 </listitem>
62 <listitem>
63 <para>
64 Estimated disk space required: &upower-buildsize;
65 </para>
66 </listitem>
67 <listitem>
68 <para>
69 Estimated build time: &upower-time;
70 </para>
71 </listitem>
72 </itemizedlist>
73
74 <bridgehead renderas="sect3">UPower Dependencies</bridgehead>
75
76 <bridgehead renderas="sect4">Required</bridgehead>
77 <para role="required">
78 <xref linkend="libgudev"/>,
79 <xref linkend="libusb"/>, and
80 <xref linkend="polkit"/>
81 </para>
82
83 <bridgehead renderas="sect4">Optional (Required if building GNOME)</bridgehead>
84 <para role="optional">
85 <xref linkend="gobject-introspection"/>
86 </para>
87
88 <bridgehead renderas="sect4">Optional</bridgehead>
89 <para role="optional">
90 <xref linkend="gtk-doc"/>,
91 <xref linkend="pygobject3"/>,
92 <xref linkend="python-dbusmock"/>,
93 <xref linkend="umockdev"/> (for part of the test suite), and
94 <ulink url="https://libimobiledevice.org/">libimobiledevice</ulink>
95 </para>
96
97 <para condition="html" role="usernotes">User Notes:
98 <ulink url="&blfs-wiki;/upower"/>
99 </para>
100 </sect2>
101
102 <sect2 role="kernel" id="upower-kernel" revision="systemd">
103 <!-- With UPower-0.9.11's hardening of the systemd unit file,
104 User Namespace Support (CONFIG_USER_NS) is now required. Without this,
105 you will get "ERROR 213/USER" out of a 'systemctl start upower'. -->
106 <title>Kernel Configuration</title>
107
108 <para>
109 Enable the following options in the kernel configuration and recompile the
110 kernel if necessary:
111 </para>
112
113 <screen><literal>General Setup ---&gt;
114 [*] Namespaces support ---&gt; [CONFIG_NAMESPACES]
115 [*] User namespace [CONFIG_USER_NS]</literal></screen>
116
117 <indexterm zone="upower upower-kernel">
118 <primary sortas="d-upower">upower</primary>
119 </indexterm>
120 </sect2>
121
122 <sect2 role="installation">
123 <title>Installation of UPower</title>
124
125 <para>
126 First, remove an unneded dependency from a test:
127 </para>
128
129<screen><userinput>sed '/parse_version/d' -i src/linux/integration-test.py</userinput></screen>
130
131 <para>
132 Install <application>UPower</application> by running the following
133 commands:
134 </para>
135
136<screen revision="sysv"><userinput>mkdir build &amp;&amp;
137cd build &amp;&amp;
138meson --prefix=/usr \
139 --buildtype=release \
140 -Dgtk-doc=false \
141 -Dman=false \
142 -Dsystemdsystemunitdir=no \
143 -Dudevrulesdir=/usr/lib/udev/rules.d \
144 .. &amp;&amp;
145ninja</userinput></screen>
146
147<screen revision="systemd"><userinput>mkdir build &amp;&amp;
148cd build &amp;&amp;
149meson --prefix=/usr \
150 --buildtype=release \
151 -Dgtk-doc=false \
152 -Dman=false \
153 .. &amp;&amp;
154ninja</userinput></screen>
155
156 <para>
157 To test the results, issue: <command>ninja test</command>. Some
158 checks may not pass due to missing files. Test suite should be run from
159 a local GUI session started with dbus-launch.
160 </para>
161
162 <para>
163 Now, as the <systemitem class="username">root</systemitem> user:
164 </para>
165
166<screen role="root"><userinput>ninja install</userinput></screen>
167
168 </sect2>
169
170 <sect2 role="commands">
171 <title>Command Explanations</title>
172
173 <para>
174 <command>sed 'subdir.*doc/d' ...</command>: Even when passing
175 <parameter>-Dgtk-doc=false</parameter> and
176 <parameter>-Dman=false</parameter>, the build still requires
177 <application>GTK-Doc</application>. This command allows building
178 without it installed. Remove this switch if you have
179 <application>GTK-Doc</application> installed and you wish to build the
180 documentation (you will also need to remove the next two parameters).
181 </para>
182
183 <para>
184 <parameter>-Dgtk-doc=false</parameter>: Prevents building the
185 documentation. Remove this if you have <application>GTK-Doc</application>
186 installed and wish to build the documentation.
187 </para>
188
189 <para>
190 <parameter>-Dman=false</parameter>: Prevents building the
191 manual pages. Remove this if you have <application>GTK-Doc</application>
192 installed and wish to build the manual pages.
193 </para>
194
195 <para revision="sysv">
196 <parameter>-Dsystemdsystemunitdir=no</parameter>: Removes
197 the dependency on <application>systemd</application>.
198 </para>
199
200 <para revision="sysv">
201 <parameter>-Dudevrulesdir=/usr/lib/udev/rules.d</parameter>: Tells
202 the build system where to install <application>udev</application>
203 rules because the information is missing in
204 <filename>/usr/lib/pkgconfig/libudev.pc</filename>
205 </para>
206
207 </sect2>
208
209 <sect2 role="configuration" revision="systemd">
210
211 <title>Configuring UPower</title>
212<!-- timer statistics have been removed from kernel (since 4.11)
213 I do not know if there is a replacement. See
214 https://patchwork.kernel.org/patch/9561519
215 and https://bugs.freedesktop.org/show_bug.cgi?id=100626
216
217 <para>
218 To use the command <command>upower -w</command> for information about
219 processor wakeups (this command is used by <phrase revision="sysv">
220 <ulink url="&gnome-download-http;/gnome-power-manager/">gnome-power-manager</ulink></phrase><phrase revision="systemd"><xref linkend="gnome-power-manager"/></phrase>)
221 you need to enable CONFIG_TIMER_STATS. This is achieved in
222 <command>make menuconfig</command> by going to the &apos;kernel-hacking&apos;
223 menu and selecting &apos;Collect kernel timers statistics&apos;.
224 </para>
225-->
226 <sect3 id="upower-init">
227 <title>Systemd Unit</title>
228
229 <para>
230 To start the <command>UPower</command> service at boot,
231 enable the previously installed systemd unit by
232 running the following command as the
233 <systemitem class="username">root</systemitem> user:
234 </para>
235
236 <indexterm zone="upower upower-init">
237 <primary sortas="f-upower">upower</primary>
238 </indexterm>
239
240<screen role="root"><userinput>systemctl enable upower</userinput></screen>
241
242 </sect3>
243
244 </sect2>
245
246 <sect2 role="content">
247 <title>Contents</title>
248
249 <segmentedlist>
250 <segtitle>Installed Program<!--
251See below... <phrase revision="systemd">s</phrase>--></segtitle>
252 <segtitle>Installed Libraries</segtitle>
253 <segtitle>Installed Directories</segtitle>
254
255 <seglistitem>
256 <seg>
257 upower
258<!-- <phrase revision="systemd"> and upowerd</phrase>
259Upowerd should not be listed, as it is in /usr/libexec, and is not supposed
260to be run by a user. Furthermore, upowerd is also in sysv, and there is no
261reason so single out systemd here. -->
262 </seg>
263 <seg>
264 libupower-glib.so
265 </seg>
266 <seg>
267 /etc/UPower,
268 /usr/include/libupower-glib, and
269 /var/lib/upower
270 </seg>
271 </seglistitem>
272 </segmentedlist>
273
274 <variablelist>
275 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
276 <?dbfo list-presentation="list"?>
277 <?dbhtml list-presentation="table"?>
278
279 <varlistentry id="upower-prog">
280 <term><command>upower</command></term>
281 <listitem>
282 <para>
283 is the <application>UPower</application> command line tool
284 </para>
285 <indexterm zone="upower upower-prog">
286 <primary sortas="b-upower">upower</primary>
287 </indexterm>
288 </listitem>
289 </varlistentry>
290<!-- See above
291 <varlistentry id="upowerd" revision="systemd">
292 <term><command>upowerd</command></term>
293 <listitem>
294 <para>
295 is the <application>UPower</application> Daemon. It provides the
296 org.freedesktop.UPower service on the system message bus.
297 </para>
298 <indexterm zone="upower upowerd">
299 <primary sortas="b-upowerd">upowerd</primary>
300 </indexterm>
301 </listitem>
302 </varlistentry>-->
303
304 <varlistentry id="libupower-glib">
305 <term><filename class="libraryfile">libupower-glib.so</filename></term>
306 <listitem>
307 <para>
308 contains the <application>UPower</application> API functions
309 </para>
310 <indexterm zone="upower libupower-glib">
311 <primary sortas="c-libupower-glib">libupower-glib.so</primary>
312 </indexterm>
313 </listitem>
314 </varlistentry>
315
316 </variablelist>
317
318 </sect2>
319
320</sect1>
Note: See TracBrowser for help on using the repository browser.