[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 |
|
---|
[3713bc71] | 7 | <!ENTITY upower-download-http "https://gitlab.freedesktop.org/upower/upower/uploads/177df5b9f9b76f25a2ad9da41aa0c1fa/upower-&upower-version;.tar.xz">
|
---|
[1a55dac4] | 8 | <!ENTITY upower-download-ftp " ">
|
---|
[3713bc71] | 9 | <!ENTITY upower-md5sum "0c945817c12a7967d2c5edf7138fcf80">
|
---|
| 10 | <!ENTITY upower-size "438 KB">
|
---|
| 11 | <!ENTITY upower-buildsize "15 MB (with tests)">
|
---|
| 12 | <!ENTITY upower-time "0.1 SBU (using parallelism=4, add 0.8 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 |
|
---|
[da54a62] | 38 | &lfs110a_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,
|
---|
| 104 | User Namespace Support is now required. Without this, you get
|
---|
| 105 | "ERROR 213/USER" out of a 'systemctl start upower'. -->
|
---|
| 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 |
|
---|
[3713bc71] | 130 | <screen><userinput>./configure --prefix=/usr \
|
---|
[e94280ea] | 131 | --sysconfdir=/etc \
|
---|
| 132 | --localstatedir=/var \
|
---|
| 133 | --enable-deprecated \
|
---|
| 134 | --disable-static &&
|
---|
[1a55dac4] | 135 | make</userinput></screen>
|
---|
| 136 |
|
---|
[b84342d6] | 137 | <para>
|
---|
[e3c48e9] | 138 | To test the results, issue: <command>make check</command>. Some
|
---|
[fd69a62] | 139 | checks may not pass due to missing files. Test suite should be run from
|
---|
| 140 | a local GUI session started with dbus-launch.
|
---|
[b84342d6] | 141 | </para>
|
---|
[1a55dac4] | 142 |
|
---|
[b84342d6] | 143 | <para>
|
---|
| 144 | Now, as the <systemitem class="username">root</systemitem> user:
|
---|
| 145 | </para>
|
---|
[1a55dac4] | 146 |
|
---|
| 147 | <screen role="root"><userinput>make install</userinput></screen>
|
---|
| 148 |
|
---|
| 149 | </sect2>
|
---|
| 150 |
|
---|
| 151 | <sect2 role="commands">
|
---|
| 152 | <title>Command Explanations</title>
|
---|
| 153 |
|
---|
[6d8f6dc] | 154 | <para>
|
---|
[14cff6d] | 155 | <parameter>--enable-deprecated</parameter>: This switch enables
|
---|
[6d8f6dc] | 156 | deprecated functionality which is still needed by some
|
---|
| 157 | applications.
|
---|
| 158 | </para>
|
---|
| 159 |
|
---|
[c341539] | 160 | <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
|
---|
[b84342d6] | 161 | href="../../xincludes/static-libraries.xml"/>
|
---|
[3990efec] | 162 |
|
---|
[1a55dac4] | 163 | <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
|
---|
[b84342d6] | 164 | href="../../xincludes/gtk-doc-rebuild.xml"/>
|
---|
[1a55dac4] | 165 |
|
---|
| 166 | </sect2>
|
---|
| 167 |
|
---|
[5d696ec2] | 168 | <sect2 role="configuration" revision="systemd">
|
---|
| 169 |
|
---|
| 170 | <title>Configuring UPower</title>
|
---|
| 171 | <!-- timer statistics have been removed from kernel (since 4.11)
|
---|
| 172 | I do not know if there is a replacement. See
|
---|
| 173 | https://patchwork.kernel.org/patch/9561519
|
---|
| 174 | and https://bugs.freedesktop.org/show_bug.cgi?id=100626
|
---|
[00c4d39] | 175 |
|
---|
[b84342d6] | 176 | <para>
|
---|
| 177 | To use the command <command>upower -w</command> for information about
|
---|
[01701da9] | 178 | processor wakeups (this command is used by <phrase revision="sysv">
|
---|
| 179 | <ulink url="&gnome-download-http;/gnome-power-manager/">gnome-power-manager</ulink></phrase><phrase revision="systemd"><xref linkend="gnome-power-manager"/></phrase>)
|
---|
[b84342d6] | 180 | you need to enable CONFIG_TIMER_STATS. This is achieved in
|
---|
| 181 | <command>make menuconfig</command> by going to the 'kernel-hacking'
|
---|
| 182 | menu and selecting 'Collect kernel timers statistics'.
|
---|
| 183 | </para>
|
---|
[5d696ec2] | 184 | -->
|
---|
[1552ac8] | 185 | <sect3 id="upower-init" revision="systemd">
|
---|
| 186 | <title>Systemd Unit</title>
|
---|
| 187 |
|
---|
| 188 | <para>
|
---|
[ddd9384] | 189 | To start the <command>UPower</command> service at boot,
|
---|
[1552ac8] | 190 | enable the previously installed systemd unit by
|
---|
| 191 | running the following command as the
|
---|
| 192 | <systemitem class="username">root</systemitem> user:
|
---|
| 193 | </para>
|
---|
| 194 |
|
---|
| 195 | <indexterm zone="upower upower-init">
|
---|
| 196 | <primary sortas="f-upower">upower</primary>
|
---|
| 197 | </indexterm>
|
---|
| 198 |
|
---|
| 199 | <screen role="root"><userinput>systemctl enable upower</userinput></screen>
|
---|
| 200 |
|
---|
| 201 | </sect3>
|
---|
[8558044] | 202 |
|
---|
[00c4d39] | 203 | </sect2>
|
---|
[1552ac8] | 204 |
|
---|
[1a55dac4] | 205 | <sect2 role="content">
|
---|
| 206 | <title>Contents</title>
|
---|
| 207 |
|
---|
| 208 | <segmentedlist>
|
---|
[ddd9384] | 209 | <segtitle>Installed Program<!--
|
---|
| 210 | See below... <phrase revision="systemd">s</phrase>--></segtitle>
|
---|
[b35ec46c] | 211 | <segtitle>Installed Libraries</segtitle>
|
---|
[1a55dac4] | 212 | <segtitle>Installed Directories</segtitle>
|
---|
| 213 |
|
---|
| 214 | <seglistitem>
|
---|
[c341539] | 215 | <seg>
|
---|
[ddd9384] | 216 | upower
|
---|
| 217 | <!-- <phrase revision="systemd"> and upowerd</phrase>
|
---|
| 218 | Upowerd should not be listed, as it is in /usr/libexec, and is not supposed
|
---|
| 219 | to be run by a user. Furthermore, upowerd is also in sysv, and there is no
|
---|
| 220 | reason so single out systemd here. -->
|
---|
[c341539] | 221 | </seg>
|
---|
| 222 | <seg>
|
---|
| 223 | libupower-glib.so
|
---|
| 224 | </seg>
|
---|
| 225 | <seg>
|
---|
[7ded7e3] | 226 | /etc/UPower,
|
---|
[df9fb20] | 227 | /usr/include/libupower-glib, and
|
---|
[7ded7e3] | 228 | /var/lib/upower
|
---|
[c341539] | 229 | </seg>
|
---|
[1a55dac4] | 230 | </seglistitem>
|
---|
| 231 | </segmentedlist>
|
---|
| 232 |
|
---|
| 233 | <variablelist>
|
---|
| 234 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 235 | <?dbfo list-presentation="list"?>
|
---|
| 236 | <?dbhtml list-presentation="table"?>
|
---|
| 237 |
|
---|
| 238 | <varlistentry id="upower-prog">
|
---|
| 239 | <term><command>upower</command></term>
|
---|
| 240 | <listitem>
|
---|
[b84342d6] | 241 | <para>
|
---|
[4c24eb0a] | 242 | is the <application>UPower</application> command line tool
|
---|
[b84342d6] | 243 | </para>
|
---|
[1a55dac4] | 244 | <indexterm zone="upower upower-prog">
|
---|
| 245 | <primary sortas="b-upower">upower</primary>
|
---|
| 246 | </indexterm>
|
---|
| 247 | </listitem>
|
---|
| 248 | </varlistentry>
|
---|
[ddd9384] | 249 | <!-- See above
|
---|
[1552ac8] | 250 | <varlistentry id="upowerd" revision="systemd">
|
---|
| 251 | <term><command>upowerd</command></term>
|
---|
| 252 | <listitem>
|
---|
| 253 | <para>
|
---|
| 254 | is the <application>UPower</application> Daemon. It provides the
|
---|
| 255 | org.freedesktop.UPower service on the system message bus.
|
---|
| 256 | </para>
|
---|
| 257 | <indexterm zone="upower upowerd">
|
---|
| 258 | <primary sortas="b-upowerd">upowerd</primary>
|
---|
| 259 | </indexterm>
|
---|
| 260 | </listitem>
|
---|
[ddd9384] | 261 | </varlistentry>-->
|
---|
[1552ac8] | 262 |
|
---|
[1a55dac4] | 263 | <varlistentry id="libupower-glib">
|
---|
[caed4c52] | 264 | <term><filename class="libraryfile">libupower-glib.so</filename></term>
|
---|
[1a55dac4] | 265 | <listitem>
|
---|
[b84342d6] | 266 | <para>
|
---|
[4c24eb0a] | 267 | contains the <application>UPower</application> API functions
|
---|
[b84342d6] | 268 | </para>
|
---|
[1a55dac4] | 269 | <indexterm zone="upower libupower-glib">
|
---|
[c341539] | 270 | <primary sortas="c-libupower-glib">libupower-glib.so</primary>
|
---|
[1a55dac4] | 271 | </indexterm>
|
---|
| 272 | </listitem>
|
---|
| 273 | </varlistentry>
|
---|
| 274 |
|
---|
| 275 | </variablelist>
|
---|
| 276 |
|
---|
| 277 | </sect2>
|
---|
| 278 |
|
---|
| 279 | </sect1>
|
---|