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