[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 |
|
---|
[b5cd92fc] | 7 | <!ENTITY upower-download-http "http://upower.freedesktop.org/releases/upower-&upower-version;.tar.xz">
|
---|
[1a55dac4] | 8 | <!ENTITY upower-download-ftp " ">
|
---|
[14cff6d] | 9 | <!ENTITY upower-md5sum "78800e1ac7f92b24aabdf433e38f75d2">
|
---|
[e3c48e9] | 10 | <!ENTITY upower-size "416 KB">
|
---|
[14cff6d] | 11 | <!ENTITY upower-buildsize "13 MB (add 2 MB for tests)">
|
---|
[b5cd92fc] | 12 | <!ENTITY upower-time "0.2 SBU">
|
---|
[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 |
|
---|
[671d62c] | 39 | &lfs7a_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">
|
---|
[3bbf74c5] | 92 | <xref linkend="gtk-doc"/> and
|
---|
| 93 | <xref linkend="python3"/> (used only in the testsuite).
|
---|
[c341539] | 94 | </para>
|
---|
[1a55dac4] | 95 |
|
---|
| 96 | <para condition="html" role="usernotes">User Notes:
|
---|
[7ded7e3] | 97 | <ulink url="&blfs-wiki;/upower"/>
|
---|
| 98 | </para>
|
---|
[1a55dac4] | 99 | </sect2>
|
---|
| 100 |
|
---|
| 101 | <sect2 role="installation">
|
---|
| 102 | <title>Installation of UPower</title>
|
---|
| 103 |
|
---|
[b84342d6] | 104 | <para>
|
---|
| 105 | Install <application>UPower</application> by running the following
|
---|
| 106 | commands:
|
---|
| 107 | </para>
|
---|
[1a55dac4] | 108 |
|
---|
[d3f03a9] | 109 | <screen><userinput>./configure --prefix=/usr \
|
---|
[dc6ba1c0] | 110 | --sysconfdir=/etc \
|
---|
[1a55dac4] | 111 | --localstatedir=/var \
|
---|
[df9fb20] | 112 | --enable-deprecated \
|
---|
[687ce4b] | 113 | --disable-static &&
|
---|
[1a55dac4] | 114 | make</userinput></screen>
|
---|
| 115 |
|
---|
[b84342d6] | 116 | <para>
|
---|
[e3c48e9] | 117 | To test the results, issue: <command>make check</command>. Some
|
---|
[fd69a62] | 118 | checks may not pass due to missing files. Test suite should be run from
|
---|
| 119 | a local GUI session started with dbus-launch.
|
---|
[b84342d6] | 120 | </para>
|
---|
[1a55dac4] | 121 |
|
---|
[b84342d6] | 122 | <para>
|
---|
| 123 | Now, as the <systemitem class="username">root</systemitem> user:
|
---|
| 124 | </para>
|
---|
[1a55dac4] | 125 |
|
---|
| 126 | <screen role="root"><userinput>make install</userinput></screen>
|
---|
| 127 |
|
---|
| 128 | </sect2>
|
---|
| 129 |
|
---|
| 130 | <sect2 role="commands">
|
---|
| 131 | <title>Command Explanations</title>
|
---|
| 132 |
|
---|
[6d8f6dc] | 133 | <para>
|
---|
[14cff6d] | 134 | <parameter>--enable-deprecated</parameter>: This switch enables
|
---|
[6d8f6dc] | 135 | deprecated functionality which is still needed by some
|
---|
| 136 | applications.
|
---|
| 137 | </para>
|
---|
| 138 |
|
---|
[c341539] | 139 | <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
|
---|
[b84342d6] | 140 | href="../../xincludes/static-libraries.xml"/>
|
---|
[3990efec] | 141 |
|
---|
[1a55dac4] | 142 | <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
|
---|
[b84342d6] | 143 | href="../../xincludes/gtk-doc-rebuild.xml"/>
|
---|
[1a55dac4] | 144 |
|
---|
| 145 | </sect2>
|
---|
| 146 |
|
---|
[00c4d39] | 147 | <sect2 role="configuration">
|
---|
| 148 | <title>Configuring your kernel for UPower</title>
|
---|
| 149 |
|
---|
[b84342d6] | 150 | <para>
|
---|
| 151 | To use the command <command>upower -w</command> for information about
|
---|
[6d3a3af] | 152 | 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] | 153 | you need to enable CONFIG_TIMER_STATS. This is achieved in
|
---|
| 154 | <command>make menuconfig</command> by going to the 'kernel-hacking'
|
---|
| 155 | menu and selecting 'Collect kernel timers statistics'.
|
---|
| 156 | </para>
|
---|
[00c4d39] | 157 |
|
---|
[1552ac8] | 158 | <sect3 id="upower-init" revision="systemd">
|
---|
| 159 | <title>Systemd Unit</title>
|
---|
| 160 |
|
---|
| 161 | <para>
|
---|
| 162 | To start the <command>upowerd</command> daemon at boot,
|
---|
| 163 | enable the previously installed systemd unit by
|
---|
| 164 | running the following command as the
|
---|
| 165 | <systemitem class="username">root</systemitem> user:
|
---|
| 166 | </para>
|
---|
| 167 |
|
---|
| 168 | <indexterm zone="upower upower-init">
|
---|
| 169 | <primary sortas="f-upower">upower</primary>
|
---|
| 170 | </indexterm>
|
---|
| 171 |
|
---|
| 172 | <screen role="root"><userinput>systemctl enable upower</userinput></screen>
|
---|
| 173 |
|
---|
| 174 | </sect3>
|
---|
| 175 |
|
---|
[00c4d39] | 176 | </sect2>
|
---|
[1552ac8] | 177 |
|
---|
[1a55dac4] | 178 | <sect2 role="content">
|
---|
| 179 | <title>Contents</title>
|
---|
| 180 |
|
---|
| 181 | <segmentedlist>
|
---|
[1552ac8] | 182 | <segtitle>Installed Program<phrase revision="systemd">s</phrase></segtitle>
|
---|
[b35ec46c] | 183 | <segtitle>Installed Libraries</segtitle>
|
---|
[1a55dac4] | 184 | <segtitle>Installed Directories</segtitle>
|
---|
| 185 |
|
---|
| 186 | <seglistitem>
|
---|
[c341539] | 187 | <seg>
|
---|
[1552ac8] | 188 | upower<phrase revision="systemd"> and upowerd</phrase>
|
---|
[c341539] | 189 | </seg>
|
---|
| 190 | <seg>
|
---|
| 191 | libupower-glib.so
|
---|
| 192 | </seg>
|
---|
| 193 | <seg>
|
---|
[7ded7e3] | 194 | /etc/UPower,
|
---|
[df9fb20] | 195 | /usr/include/libupower-glib, and
|
---|
[7ded7e3] | 196 | /var/lib/upower
|
---|
[c341539] | 197 | </seg>
|
---|
[1a55dac4] | 198 | </seglistitem>
|
---|
| 199 | </segmentedlist>
|
---|
| 200 |
|
---|
| 201 | <variablelist>
|
---|
| 202 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 203 | <?dbfo list-presentation="list"?>
|
---|
| 204 | <?dbhtml list-presentation="table"?>
|
---|
| 205 |
|
---|
| 206 | <varlistentry id="upower-prog">
|
---|
| 207 | <term><command>upower</command></term>
|
---|
| 208 | <listitem>
|
---|
[b84342d6] | 209 | <para>
|
---|
| 210 | is the <application>UPower</application> command line tool.
|
---|
| 211 | </para>
|
---|
[1a55dac4] | 212 | <indexterm zone="upower upower-prog">
|
---|
| 213 | <primary sortas="b-upower">upower</primary>
|
---|
| 214 | </indexterm>
|
---|
| 215 | </listitem>
|
---|
| 216 | </varlistentry>
|
---|
| 217 |
|
---|
[1552ac8] | 218 | <varlistentry id="upowerd" revision="systemd">
|
---|
| 219 | <term><command>upowerd</command></term>
|
---|
| 220 | <listitem>
|
---|
| 221 | <para>
|
---|
| 222 | is the <application>UPower</application> Daemon. It provides the
|
---|
| 223 | org.freedesktop.UPower service on the system message bus.
|
---|
| 224 | </para>
|
---|
| 225 | <indexterm zone="upower upowerd">
|
---|
| 226 | <primary sortas="b-upowerd">upowerd</primary>
|
---|
| 227 | </indexterm>
|
---|
| 228 | </listitem>
|
---|
| 229 | </varlistentry>
|
---|
| 230 |
|
---|
[1a55dac4] | 231 | <varlistentry id="libupower-glib">
|
---|
[caed4c52] | 232 | <term><filename class="libraryfile">libupower-glib.so</filename></term>
|
---|
[1a55dac4] | 233 | <listitem>
|
---|
[b84342d6] | 234 | <para>
|
---|
| 235 | contains the <application>UPower</application> API functions.
|
---|
| 236 | </para>
|
---|
[1a55dac4] | 237 | <indexterm zone="upower libupower-glib">
|
---|
[c341539] | 238 | <primary sortas="c-libupower-glib">libupower-glib.so</primary>
|
---|
[1a55dac4] | 239 | </indexterm>
|
---|
| 240 | </listitem>
|
---|
| 241 | </varlistentry>
|
---|
| 242 |
|
---|
| 243 | </variablelist>
|
---|
| 244 |
|
---|
| 245 | </sect2>
|
---|
| 246 |
|
---|
| 247 | </sect1>
|
---|