[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 |
|
---|
[f726d564] | 7 | <!ENTITY upower-download-http "https://gitlab.freedesktop.org/upower/upower/uploads/93cfe7c8d66ed486001c4f3f55399b7a/upower-&upower-version;.tar.xz">
|
---|
[1a55dac4] | 8 | <!ENTITY upower-download-ftp " ">
|
---|
[f726d564] | 9 | <!ENTITY upower-md5sum "abe6acb617f11f2e8dbd9846fcf86e24">
|
---|
| 10 | <!ENTITY upower-size "424 KB">
|
---|
[3201e53] | 11 | <!ENTITY upower-buildsize "11 MB (add 3MB for tssts)">
|
---|
| 12 | <!ENTITY upower-time "0.1 SBU (add 0.1 SBU for tests)">
|
---|
[1a55dac4] | 13 | ]>
|
---|
| 14 |
|
---|
| 15 | <sect1 id="upower" xreflabel="UPower-&upower-version;">
|
---|
| 16 | <?dbhtml filename="upower.html"?>
|
---|
| 17 |
|
---|
| 18 | <sect1info>
|
---|
| 19 | <othername>$LastChangedBy$</othername>
|
---|
| 20 | <date>$Date$</date>
|
---|
| 21 | </sect1info>
|
---|
| 22 |
|
---|
| 23 | <title>UPower-&upower-version;</title>
|
---|
| 24 |
|
---|
| 25 | <indexterm zone="upower">
|
---|
| 26 | <primary sortas="a-UPower">UPower</primary>
|
---|
| 27 | </indexterm>
|
---|
| 28 |
|
---|
| 29 | <sect2 role="package">
|
---|
| 30 | <title>Introduction to UPower</title>
|
---|
| 31 |
|
---|
[b84342d6] | 32 | <para>
|
---|
| 33 | The <application>UPower</application> package provides an interface to
|
---|
| 34 | enumerating power devices, listening to device events and querying history
|
---|
| 35 | and statistics. Any application or service on the system can access the
|
---|
| 36 | org.freedesktop.UPower service via the system message bus.
|
---|
| 37 | </para>
|
---|
[1a55dac4] | 38 |
|
---|
[d43c7a12] | 39 | &lfs90_checked;
|
---|
[1a55dac4] | 40 |
|
---|
| 41 | <bridgehead renderas="sect3">Package Information</bridgehead>
|
---|
| 42 | <itemizedlist spacing="compact">
|
---|
| 43 | <listitem>
|
---|
[b84342d6] | 44 | <para>
|
---|
| 45 | Download (HTTP): <ulink url="&upower-download-http;"/>
|
---|
| 46 | </para>
|
---|
[1a55dac4] | 47 | </listitem>
|
---|
| 48 | <listitem>
|
---|
[b84342d6] | 49 | <para>
|
---|
| 50 | Download (FTP): <ulink url="&upower-download-ftp;"/>
|
---|
| 51 | </para>
|
---|
[1a55dac4] | 52 | </listitem>
|
---|
| 53 | <listitem>
|
---|
[b84342d6] | 54 | <para>
|
---|
| 55 | Download MD5 sum: &upower-md5sum;
|
---|
| 56 | </para>
|
---|
[1a55dac4] | 57 | </listitem>
|
---|
| 58 | <listitem>
|
---|
[b84342d6] | 59 | <para>
|
---|
| 60 | Download size: &upower-size;
|
---|
| 61 | </para>
|
---|
[1a55dac4] | 62 | </listitem>
|
---|
| 63 | <listitem>
|
---|
[b84342d6] | 64 | <para>
|
---|
| 65 | Estimated disk space required: &upower-buildsize;
|
---|
| 66 | </para>
|
---|
[1a55dac4] | 67 | </listitem>
|
---|
| 68 | <listitem>
|
---|
[b84342d6] | 69 | <para>
|
---|
| 70 | Estimated build time: &upower-time;
|
---|
| 71 | </para>
|
---|
[1a55dac4] | 72 | </listitem>
|
---|
| 73 | </itemizedlist>
|
---|
| 74 |
|
---|
| 75 | <bridgehead renderas="sect3">UPower Dependencies</bridgehead>
|
---|
| 76 |
|
---|
| 77 | <bridgehead renderas="sect4">Required</bridgehead>
|
---|
[c341539] | 78 | <para role="required">
|
---|
| 79 | <xref linkend="dbus-glib"/>,
|
---|
[f175d6f6] | 80 | <xref linkend="libgudev"/>,
|
---|
| 81 | <xref linkend="libusb"/>, and
|
---|
| 82 | <xref linkend="polkit"/>
|
---|
[c341539] | 83 | </para>
|
---|
| 84 |
|
---|
[4c2be438] | 85 | <bridgehead renderas="sect4">Optional (Required if building GNOME)</bridgehead>
|
---|
| 86 | <para role="optional">
|
---|
[c341539] | 87 | <xref linkend="gobject-introspection"/>
|
---|
| 88 | </para>
|
---|
[1a55dac4] | 89 |
|
---|
| 90 | <bridgehead renderas="sect4">Optional</bridgehead>
|
---|
[c341539] | 91 | <para role="optional">
|
---|
[dbea07b] | 92 | <xref linkend="gtk-doc"/>,
|
---|
[3bb415b] | 93 | <xref linkend="pygobject3"/>,
|
---|
[10092cde] | 94 | <xref linkend="python-dbusmock"/>, and
|
---|
| 95 | <ulink url="https://github.com/martinpitt/umockdev">umockdev</ulink>
|
---|
[3bb415b] | 96 | (for part of the testsuite).
|
---|
[c341539] | 97 | </para>
|
---|
[1a55dac4] | 98 |
|
---|
| 99 | <para condition="html" role="usernotes">User Notes:
|
---|
[7ded7e3] | 100 | <ulink url="&blfs-wiki;/upower"/>
|
---|
| 101 | </para>
|
---|
[1a55dac4] | 102 | </sect2>
|
---|
| 103 |
|
---|
[88d8c967] | 104 | <sect2 role="kernel" id="upower-kernel" revision="systemd">
|
---|
| 105 | <!-- With UPower-0.9.11's hardening of the systemd unit file,
|
---|
| 106 | User Namespace Support is now required. Without this, you get
|
---|
| 107 | "ERROR 213/USER" out of a 'systemctl start upower'. -->
|
---|
| 108 | <title>Kernel Configuration</title>
|
---|
| 109 |
|
---|
| 110 | <para>
|
---|
| 111 | Enable the following options in the kernel configuration and recompile the
|
---|
| 112 | kernel if necessary:
|
---|
| 113 | </para>
|
---|
| 114 |
|
---|
| 115 | <screen><literal>General Setup --->
|
---|
| 116 | [*] Namespaces support ---> [CONFIG_NAMESPACES]
|
---|
| 117 | [*] User namespace [CONFIG_USER_NS]</literal></screen>
|
---|
| 118 |
|
---|
| 119 | <indexterm zone="upower upower-kernel">
|
---|
| 120 | <primary sortas="d-upower">upower</primary>
|
---|
| 121 | </indexterm>
|
---|
| 122 | </sect2>
|
---|
| 123 |
|
---|
[1a55dac4] | 124 | <sect2 role="installation">
|
---|
| 125 | <title>Installation of UPower</title>
|
---|
| 126 |
|
---|
[b84342d6] | 127 | <para>
|
---|
| 128 | Install <application>UPower</application> by running the following
|
---|
| 129 | commands:
|
---|
| 130 | </para>
|
---|
[1a55dac4] | 131 |
|
---|
[d3f03a9] | 132 | <screen><userinput>./configure --prefix=/usr \
|
---|
[dc6ba1c0] | 133 | --sysconfdir=/etc \
|
---|
[1a55dac4] | 134 | --localstatedir=/var \
|
---|
[df9fb20] | 135 | --enable-deprecated \
|
---|
[687ce4b] | 136 | --disable-static &&
|
---|
[1a55dac4] | 137 | make</userinput></screen>
|
---|
| 138 |
|
---|
[b84342d6] | 139 | <para>
|
---|
[e3c48e9] | 140 | To test the results, issue: <command>make check</command>. Some
|
---|
[fd69a62] | 141 | checks may not pass due to missing files. Test suite should be run from
|
---|
| 142 | a local GUI session started with dbus-launch.
|
---|
[b84342d6] | 143 | </para>
|
---|
[1a55dac4] | 144 |
|
---|
[b84342d6] | 145 | <para>
|
---|
| 146 | Now, as the <systemitem class="username">root</systemitem> user:
|
---|
| 147 | </para>
|
---|
[1a55dac4] | 148 |
|
---|
| 149 | <screen role="root"><userinput>make install</userinput></screen>
|
---|
| 150 |
|
---|
| 151 | </sect2>
|
---|
| 152 |
|
---|
| 153 | <sect2 role="commands">
|
---|
| 154 | <title>Command Explanations</title>
|
---|
| 155 |
|
---|
[6d8f6dc] | 156 | <para>
|
---|
[14cff6d] | 157 | <parameter>--enable-deprecated</parameter>: This switch enables
|
---|
[6d8f6dc] | 158 | deprecated functionality which is still needed by some
|
---|
| 159 | applications.
|
---|
| 160 | </para>
|
---|
| 161 |
|
---|
[c341539] | 162 | <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
|
---|
[b84342d6] | 163 | href="../../xincludes/static-libraries.xml"/>
|
---|
[3990efec] | 164 |
|
---|
[1a55dac4] | 165 | <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
|
---|
[b84342d6] | 166 | href="../../xincludes/gtk-doc-rebuild.xml"/>
|
---|
[1a55dac4] | 167 |
|
---|
| 168 | </sect2>
|
---|
| 169 |
|
---|
[5d696ec2] | 170 | <sect2 role="configuration" revision="systemd">
|
---|
| 171 |
|
---|
| 172 | <title>Configuring UPower</title>
|
---|
| 173 | <!-- timer statistics have been removed from kernel (since 4.11)
|
---|
| 174 | I do not know if there is a replacement. See
|
---|
| 175 | https://patchwork.kernel.org/patch/9561519
|
---|
| 176 | and https://bugs.freedesktop.org/show_bug.cgi?id=100626
|
---|
[00c4d39] | 177 |
|
---|
[b84342d6] | 178 | <para>
|
---|
| 179 | To use the command <command>upower -w</command> for information about
|
---|
[6d3a3af] | 180 | processor wakeups (this command is used by <phrase revision="sysv"><ulink url="http://ftp.gnome.org/pub/gnome/sources/gnome-power-manager/">gnome-power-manager</ulink></phrase><phrase revision="systemd"><xref linkend="gnome-power-manager"/></phrase>)
|
---|
[b84342d6] | 181 | you need to enable CONFIG_TIMER_STATS. This is achieved in
|
---|
| 182 | <command>make menuconfig</command> by going to the 'kernel-hacking'
|
---|
| 183 | menu and selecting 'Collect kernel timers statistics'.
|
---|
| 184 | </para>
|
---|
[5d696ec2] | 185 | -->
|
---|
[1552ac8] | 186 | <sect3 id="upower-init" revision="systemd">
|
---|
| 187 | <title>Systemd Unit</title>
|
---|
| 188 |
|
---|
| 189 | <para>
|
---|
[ddd9384] | 190 | To start the <command>UPower</command> service at boot,
|
---|
[1552ac8] | 191 | enable the previously installed systemd unit by
|
---|
| 192 | running the following command as the
|
---|
| 193 | <systemitem class="username">root</systemitem> user:
|
---|
| 194 | </para>
|
---|
| 195 |
|
---|
| 196 | <indexterm zone="upower upower-init">
|
---|
| 197 | <primary sortas="f-upower">upower</primary>
|
---|
| 198 | </indexterm>
|
---|
| 199 |
|
---|
| 200 | <screen role="root"><userinput>systemctl enable upower</userinput></screen>
|
---|
| 201 |
|
---|
| 202 | </sect3>
|
---|
| 203 |
|
---|
[00c4d39] | 204 | </sect2>
|
---|
[1552ac8] | 205 |
|
---|
[1a55dac4] | 206 | <sect2 role="content">
|
---|
| 207 | <title>Contents</title>
|
---|
| 208 |
|
---|
| 209 | <segmentedlist>
|
---|
[ddd9384] | 210 | <segtitle>Installed Program<!--
|
---|
| 211 | See below... <phrase revision="systemd">s</phrase>--></segtitle>
|
---|
[b35ec46c] | 212 | <segtitle>Installed Libraries</segtitle>
|
---|
[1a55dac4] | 213 | <segtitle>Installed Directories</segtitle>
|
---|
| 214 |
|
---|
| 215 | <seglistitem>
|
---|
[c341539] | 216 | <seg>
|
---|
[ddd9384] | 217 | upower
|
---|
| 218 | <!-- <phrase revision="systemd"> and upowerd</phrase>
|
---|
| 219 | Upowerd should not be listed, as it is in /usr/libexec, and is not supposed
|
---|
| 220 | to be run by a user. Furthermore, upowerd is also in sysv, and there is no
|
---|
| 221 | reason so single out systemd here. -->
|
---|
[c341539] | 222 | </seg>
|
---|
| 223 | <seg>
|
---|
| 224 | libupower-glib.so
|
---|
| 225 | </seg>
|
---|
| 226 | <seg>
|
---|
[7ded7e3] | 227 | /etc/UPower,
|
---|
[df9fb20] | 228 | /usr/include/libupower-glib, and
|
---|
[7ded7e3] | 229 | /var/lib/upower
|
---|
[c341539] | 230 | </seg>
|
---|
[1a55dac4] | 231 | </seglistitem>
|
---|
| 232 | </segmentedlist>
|
---|
| 233 |
|
---|
| 234 | <variablelist>
|
---|
| 235 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 236 | <?dbfo list-presentation="list"?>
|
---|
| 237 | <?dbhtml list-presentation="table"?>
|
---|
| 238 |
|
---|
| 239 | <varlistentry id="upower-prog">
|
---|
| 240 | <term><command>upower</command></term>
|
---|
| 241 | <listitem>
|
---|
[b84342d6] | 242 | <para>
|
---|
| 243 | is the <application>UPower</application> command line tool.
|
---|
| 244 | </para>
|
---|
[1a55dac4] | 245 | <indexterm zone="upower upower-prog">
|
---|
| 246 | <primary sortas="b-upower">upower</primary>
|
---|
| 247 | </indexterm>
|
---|
| 248 | </listitem>
|
---|
| 249 | </varlistentry>
|
---|
[ddd9384] | 250 | <!-- See above
|
---|
[1552ac8] | 251 | <varlistentry id="upowerd" revision="systemd">
|
---|
| 252 | <term><command>upowerd</command></term>
|
---|
| 253 | <listitem>
|
---|
| 254 | <para>
|
---|
| 255 | is the <application>UPower</application> Daemon. It provides the
|
---|
| 256 | org.freedesktop.UPower service on the system message bus.
|
---|
| 257 | </para>
|
---|
| 258 | <indexterm zone="upower upowerd">
|
---|
| 259 | <primary sortas="b-upowerd">upowerd</primary>
|
---|
| 260 | </indexterm>
|
---|
| 261 | </listitem>
|
---|
[ddd9384] | 262 | </varlistentry>-->
|
---|
[1552ac8] | 263 |
|
---|
[1a55dac4] | 264 | <varlistentry id="libupower-glib">
|
---|
[caed4c52] | 265 | <term><filename class="libraryfile">libupower-glib.so</filename></term>
|
---|
[1a55dac4] | 266 | <listitem>
|
---|
[b84342d6] | 267 | <para>
|
---|
| 268 | contains the <application>UPower</application> API functions.
|
---|
| 269 | </para>
|
---|
[1a55dac4] | 270 | <indexterm zone="upower libupower-glib">
|
---|
[c341539] | 271 | <primary sortas="c-libupower-glib">libupower-glib.so</primary>
|
---|
[1a55dac4] | 272 | </indexterm>
|
---|
| 273 | </listitem>
|
---|
| 274 | </varlistentry>
|
---|
| 275 |
|
---|
| 276 | </variablelist>
|
---|
| 277 |
|
---|
| 278 | </sect2>
|
---|
| 279 |
|
---|
| 280 | </sect1>
|
---|