source: general/sysutils/upower.xml@ 7170b0a7

12.0 12.1 ken/TL2024 ken/tuningfonts lazarus plabs/newcss python3.11 rahul/power-profiles-daemon renodr/vulkan-addition trunk xry111/llvm18
Last change on this file since 7170b0a7 was e7cd19a, checked in by Xi Ruoyao <xry111@…>, 10 months ago

general: Use new rendering method for kernel configuration

It's almost a plain "conversion". Exceptions:

  • In elogind, [CGROUPS] is dropped because it's in LFS now.
  • In libusb, move the kernel configuration to match the layout of other packages.
  • Property mode set to 100644
File size: 10.3 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 "bfd6e3275e61d7e097b53eb2b216fffa">
10 <!ENTITY upower-size "136 KB">
11 <!ENTITY upower-buildsize "6.5 MB (add 1.1 MB for tests)">
12 <!ENTITY upower-time "less than 0.1 SBU (using parallelism=4, 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 &lfs113_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"/>,
76 <xref linkend="libusb"/>, and
77 <xref linkend="polkit"/>
78 </para>
79
80 <bridgehead renderas="sect4">Optional (Required if building GNOME)</bridgehead>
81 <para role="optional">
82 <xref linkend="gobject-introspection"/>
83 </para>
84
85 <bridgehead renderas="sect4">Optional</bridgehead>
86 <para role="optional">
87 <xref linkend="gtk-doc"/>,
88 <xref linkend="libxslt"/>,
89 <xref linkend="docbook-xsl"/>,
90 <xref linkend="pygobject3"/>,
91 <xref linkend="python-dbusmock"/>,
92 <xref linkend="umockdev"/> (for part of the test suite), and
93 <ulink url="https://libimobiledevice.org/">libimobiledevice</ulink>
94 </para>
95
96 </sect2>
97
98 <sect2 role="kernel" id="upower-kernel" revision="systemd">
99 <!-- With UPower-0.9.11's hardening of the systemd unit file,
100 User Namespace Support (CONFIG_USER_NS) is now required. Without this,
101 you will get "ERROR 213/USER" out of a 'systemctl start upower'. -->
102 <title>Kernel Configuration</title>
103
104 <para>
105 Enable the following options in the kernel configuration and recompile the
106 kernel if necessary:
107 </para>
108
109 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
110 href="upower-systemd-kernel.xml"/>
111
112 <indexterm zone="upower upower-kernel">
113 <primary sortas="d-upower">upower</primary>
114 </indexterm>
115 </sect2>
116
117 <sect2 role="installation">
118 <title>Installation of UPower</title>
119
120 <para>
121 First, remove an unneeded dependency from a test:
122 </para>
123
124<screen><userinput>sed '/parse_version/d' -i src/linux/integration-test.py</userinput></screen>
125
126 <para>
127 Install <application>UPower</application> by running the following
128 commands:
129 </para>
130
131<screen revision="sysv"><userinput>mkdir build &amp;&amp;
132cd build &amp;&amp;
133
134meson setup .. \
135 --prefix=/usr \
136 --buildtype=release \
137 -Dgtk-doc=false \
138 -Dman=false \
139 -Dsystemdsystemunitdir=no \
140 -Dudevrulesdir=/usr/lib/udev/rules.d &amp;&amp;
141ninja</userinput></screen>
142
143<screen revision="systemd"><userinput>mkdir build &amp;&amp;
144cd build &amp;&amp;
145meson setup .. \
146 --prefix=/usr \
147 --buildtype=release \
148 -Dgtk-doc=false \
149 -Dman=false &amp;&amp;
150ninja</userinput></screen>
151
152 <!-- On my system with LANG=zh_CN.UTF-8, one test attempted to compare
153 Chinese error message with English references and failed.
154 LC_ALL=C fixes the problem. -->
155 <!-- Headphone hotplug (bluetooth and AUX) was tested and seems to work
156 okay even with the test faliures. Maybe it's wants headphones plugged
157 in during the test? Regardless, it can be safely ignored. -->
158 <para>
159 To test the results, issue: <command>LC_ALL=C ninja test</command>. Some
160 checks may not pass due to missing files. Test suite should be run from
161 a local GUI session started with dbus-launch. 2 tests relating to the
162 headphone hotplug feature are known to fail, these can be safely ignored
163 as the headphone functionality does still work.
164 </para>
165
166 <para>
167 Now, as the <systemitem class="username">root</systemitem> user:
168 </para>
169
170<screen role="root"><userinput>ninja install</userinput></screen>
171
172 </sect2>
173
174 <sect2 role="commands">
175 <title>Command Explanations</title>
176
177 <para>
178 <parameter>-Dgtk-doc=false</parameter>: Prevents building the
179 documentation. Remove this if you have <application>GTK-Doc</application>
180 installed and wish to build the documentation.
181 </para>
182
183 <para>
184 <parameter>-Dman=false</parameter>: Prevents building the
185 manual pages. Remove this if you have <xref linkend='libxslt'/> and
186 <xref linkend='docbook-xsl'/> installed and wish to build the manual
187 pages.
188 </para>
189
190 <para revision="sysv">
191 <parameter>-Dsystemdsystemunitdir=no</parameter>: Removes
192 the dependency on <application>systemd</application>.
193 </para>
194
195 <para revision="sysv">
196 <parameter>-Dudevrulesdir=/usr/lib/udev/rules.d</parameter>: Tells
197 the build system where to install <application>udev</application>
198 rules because the information is missing in
199 <filename>/usr/lib/pkgconfig/libudev.pc</filename>
200 </para>
201
202 </sect2>
203
204 <sect2 role="configuration" revision="systemd">
205
206 <title>Configuring UPower</title>
207<!-- timer statistics have been removed from kernel (since 4.11)
208 I do not know if there is a replacement. See
209 https://patchwork.kernel.org/patch/9561519
210 and https://bugs.freedesktop.org/show_bug.cgi?id=100626
211
212 <para>
213 To use the command <command>upower -w</command> for information about
214 processor wakeups (this command is used by <phrase revision="sysv">
215 <ulink url="&gnome-download-http;/gnome-power-manager/">gnome-power-manager</ulink></phrase><phrase revision="systemd"><xref linkend="gnome-power-manager"/></phrase>)
216 you need to enable CONFIG_TIMER_STATS. This is achieved in
217 <command>make menuconfig</command> by going to the &apos;kernel-hacking&apos;
218 menu and selecting &apos;Collect kernel timers statistics&apos;.
219 </para>
220-->
221 <sect3 id="upower-init">
222 <title>Systemd Unit</title>
223
224 <para>
225 To start the <command>UPower</command> service at boot,
226 enable the previously installed systemd unit by
227 running the following command as the
228 <systemitem class="username">root</systemitem> user:
229 </para>
230
231 <indexterm zone="upower upower-init">
232 <primary sortas="f-upower">upower</primary>
233 </indexterm>
234
235<screen role="root"><userinput>systemctl enable upower</userinput></screen>
236
237 </sect3>
238
239 </sect2>
240
241 <sect2 role="content">
242 <title>Contents</title>
243
244 <segmentedlist>
245 <segtitle>Installed Program<!--
246See below... <phrase revision="systemd">s</phrase>--></segtitle>
247 <segtitle>Installed Libraries</segtitle>
248 <segtitle>Installed Directories</segtitle>
249
250 <seglistitem>
251 <seg>
252 upower
253<!-- <phrase revision="systemd"> and upowerd</phrase>
254Upowerd should not be listed, as it is in /usr/libexec, and is not supposed
255to be run by a user. Furthermore, upowerd is also in sysv, and there is no
256reason so single out systemd here. -->
257 </seg>
258 <seg>
259 libupower-glib.so
260 </seg>
261 <seg>
262 /etc/UPower,
263 /usr/include/libupower-glib, and
264 /var/lib/upower
265 </seg>
266 </seglistitem>
267 </segmentedlist>
268
269 <variablelist>
270 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
271 <?dbfo list-presentation="list"?>
272 <?dbhtml list-presentation="table"?>
273
274 <varlistentry id="upower-prog">
275 <term><command>upower</command></term>
276 <listitem>
277 <para>
278 is the <application>UPower</application> command line tool
279 </para>
280 <indexterm zone="upower upower-prog">
281 <primary sortas="b-upower">upower</primary>
282 </indexterm>
283 </listitem>
284 </varlistentry>
285<!-- See above
286 <varlistentry id="upowerd" revision="systemd">
287 <term><command>upowerd</command></term>
288 <listitem>
289 <para>
290 is the <application>UPower</application> Daemon. It provides the
291 org.freedesktop.UPower service on the system message bus.
292 </para>
293 <indexterm zone="upower upowerd">
294 <primary sortas="b-upowerd">upowerd</primary>
295 </indexterm>
296 </listitem>
297 </varlistentry>-->
298
299 <varlistentry id="libupower-glib">
300 <term><filename class="libraryfile">libupower-glib.so</filename></term>
301 <listitem>
302 <para>
303 contains the <application>UPower</application> API functions
304 </para>
305 <indexterm zone="upower libupower-glib">
306 <primary sortas="c-libupower-glib">libupower-glib.so</primary>
307 </indexterm>
308 </listitem>
309 </varlistentry>
310
311 </variablelist>
312
313 </sect2>
314
315</sect1>
Note: See TracBrowser for help on using the repository browser.