source: general/sysutils/power-profiles-daemon.xml@ dff3997d

lazarus trunk
Last change on this file since dff3997d was e8b98762, checked in by Xi Ruoyao <xry111@…>, 8 weeks ago

power-profiles-daemon: Mention how to activate a profile via command line

Since it's also useful for workstation, provide a command line so we can
run it in SSH.

  • Property mode set to 100644
File size: 9.6 KB
Line 
1<?xml version="1.0" encoding="UTF-8"?>
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 <!-- Place this in the packages.ent file
8 <!ENTITY power-profiles-daemon-version "">
9 -->
10
11 <!ENTITY power-profiles-daemon-download-http "https://gitlab.freedesktop.org/upower/power-profiles-daemon/-/archive/&power-profiles-daemon-version;/power-profiles-daemon-&power-profiles-daemon-version;.tar.gz">
12 <!ENTITY power-profiles-daemon-download-ftp " ">
13 <!ENTITY power-profiles-daemon-md5sum "92df21de1148ef6e7c30e4a0829e02b1">
14 <!ENTITY power-profiles-daemon-size "68 KB">
15 <!ENTITY power-profiles-daemon-buildsize "1.4 MB">
16 <!ENTITY power-profiles-daemon-time "less than 0.1 SBU (with tests)">
17]>
18
19<sect1 id="power-profiles-daemon" xreflabel="power-profiles-daemon-&power-profiles-daemon-version;">
20 <?dbhtml filename="power-profiles-daemon.html"?>
21
22
23 <title>Power-profiles-daemon-&power-profiles-daemon-version;</title>
24
25 <indexterm zone="power-profiles-daemon">
26 <primary sortas="a-Power-profiles-daemon">power-profiles-daemon</primary>
27 </indexterm>
28
29 <sect2 role="package">
30 <title>Introduction to Power-profiles-daemon</title>
31
32 <para>
33 The <application>Power-profiles-daemon</application> package provides a program
34 that allows modification of the system power/behavior state. This is used on
35 many laptops and can be used by a Desktop Environment to activate power saving
36 or performance CPU governors through dbus. On other systems, Power-profiles-daemon
37 can be used as a streamlined way to set the CPU governor in order to increase system
38 performance at the cost of energy usage.
39 </para>
40
41 &lfs121_checked;
42
43 <bridgehead renderas="sect3">Package Information</bridgehead>
44 <itemizedlist spacing="compact">
45 <listitem>
46 <para>
47 Download (HTTP): <ulink url="&power-profiles-daemon-download-http;"/>
48 </para>
49 </listitem>
50 <listitem>
51 <para>
52 Download (FTP): <ulink url="&power-profiles-daemon-download-ftp;"/>
53 </para>
54 </listitem>
55 <listitem>
56 <para>
57 Download MD5 sum: &power-profiles-daemon-md5sum;
58 </para>
59 </listitem>
60 <listitem>
61 <para>
62 Download size: &power-profiles-daemon-size;
63 </para>
64 </listitem>
65 <listitem>
66 <para>
67 Estimated disk space required: &power-profiles-daemon-buildsize;
68 </para>
69 </listitem>
70 <listitem>
71 <para>
72 Estimated build time: &power-profiles-daemon-time;
73 </para>
74 </listitem>
75 </itemizedlist>
76
77 <bridgehead renderas="sect3">Power-profiles-daemon Dependencies</bridgehead>
78
79 <bridgehead renderas="sect4">Required</bridgehead>
80 <para role="required">
81 <xref linkend="polkit"/>,
82 <xref linkend="pygobject3"/>, and
83 <xref linkend="upower"/>,
84 </para>
85
86 <bridgehead renderas="sect4">Optional</bridgehead>
87 <para role="optional">
88 <xref linkend="gtk-doc"/>,
89 The rest are for the tests,
90 <xref linkend="python-dbusmock"/>,
91 <xref linkend="umockdev"/>,
92 <ulink url="https://github.com/PyCQA/isort">isort</ulink>, and
93 <ulink url="https://github.com/PyCQA/mccabe">mccabe</ulink>
94 </para>
95 </sect2>
96
97 <sect2 role="kernel" id="power-profiles-daemon-kernel">
98 <title>Kernel Configuration</title>
99
100 <para>
101 Enable the following options in the kernel configuration and recompile the
102 kernel if necessary:
103 </para>
104
105 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
106 href="power-profiles-daemon-kernel.xml"/>
107
108 <para>
109 Select the appropriate sub-options that appear when the above options are
110 selected. As much as possible, the layout should be the same as in
111 kernel configuration menus.
112 </para>
113
114 <indexterm zone="power-profiles-daemon power-profiles-daemon-kernel">
115 <primary sortas="d-Power-profiles-daemon">Power-profiles-daemon</primary>
116 </indexterm>
117 </sect2>
118
119 <sect2 role="installation">
120 <title>Installation of Power-profiles-daemon</title>
121
122 <para>
123 Install <application>Power-profiles-daemon</application> by
124 running the following commands:
125 </para>
126<screen revision="sysv"><userinput>mkdir build &amp;&amp;
127cd build &amp;&amp;
128
129meson setup \
130 --prefix=/usr \
131 --buildtype=release \
132 -Dgtk_doc=false \
133 -Dtests=false \
134 -Dsystemdsystemunitdir=/tmp \
135 .. &amp;&amp;
136ninja</userinput></screen>
137
138
139<screen revision="systemd"><userinput>mkdir build &amp;&amp;
140cd build &amp;&amp;
141
142meson setup \
143 --prefix=/usr \
144 --buildtype=release \
145 -Dgtk_doc=false \
146 -Dtests=false \
147 .. &amp;&amp;
148ninja</userinput></screen>
149
150 <para>
151 If you have installed the external dependencies, to test the results issue: <command>
152 ninja test</command>.
153 </para>
154
155 <para>
156 Now, as the <systemitem class="username">root</systemitem> user:
157 </para>
158
159<screen role="root"><userinput>ninja install</userinput></screen>
160
161 <para revision="sysv">
162 Now, clean up an unneeded systemd unit installed into /tmp:
163 </para>
164
165<screen revision="sysv" role="root">
166<userinput>rm -fv /tmp/power-profiles-daemon.service</userinput>
167</screen>
168
169 </sect2>
170
171
172 <sect2 role="commands">
173 <title>Command Explanations</title>
174
175 <para>
176 <parameter>-Dgtk_doc=false</parameter>: Prevents building the
177 documentation. Remove this if you have <application>GTK-Doc</application>
178 installed and wish to build the documentation.
179 </para>
180
181 <para>
182 <parameter>-Dtests=false</parameter>: Prevents building the
183 tests because they cannot be run within the boundaries of
184 BLFS. Remove this if you have installed the external dependencies
185 and wish to run the tests.
186 </para>
187
188 <para revision="sysv">
189 <parameter>-Dsystemdsystemunitdir=/tmp</parameter>: Removes
190 the dependency on <application>systemd</application>.
191 </para>
192
193 </sect2>
194
195 <sect2 role="configuration">
196 <title>Configuring Power-profiles-daemon</title>
197
198 <sect3 id="power-profiles-daemon-init" revision="sysv">
199 <title>Boot Script</title>
200
201 <para>
202 To automatically start the <command>power-profiles-daemon</command> when the
203 system is rebooted, install the
204 <filename>/etc/rc.d/init.d/power-profiles-daemon</filename> bootscript from the
205 <xref linkend="bootscripts" revision="sysv"/> as the
206 <systemitem class="username">root</systemitem> user:
207 </para>
208
209 <indexterm zone="power-profiles-daemon power-profiles-daemon-init">
210 <primary sortas="f-Power-profiles-daemon">power-profiles-daemon</primary>
211 </indexterm>
212
213<screen role="root"><userinput>make install-power-profiles-daemon</userinput></screen>
214 </sect3>
215
216
217 <sect3 id="power-profiles-daemon-systemd" revision="systemd">
218 <title>Systemd Unit</title>
219
220 <para>
221 To start the power-profiles-daemon on boot, enable the systemd
222 service that was installed by running the following command as the
223 <systemitem class="username">root</systemitem> user:
224 </para>
225
226 <screen role="root"><userinput>systemctl enable power-profiles-daemon</userinput></screen>
227 </sect3>
228
229 <sect3>
230 <title>Select a Power Profile</title>
231
232 <para>
233 To list all supported power profiles, issue:
234 </para>
235
236 <screen role="nodump"><userinput>powerprofilesctl</userinput></screen>
237
238 <para>
239 To activate a power profile (for example
240 <replaceable>performance</replaceable>), issue:
241 </para>
242
243 <screen role="nodump"><userinput>powerprofilesctl set <replaceable>performance</replaceable></userinput></screen>
244
245 <para>
246 Some desktop environments (for example GNOME and KDE) also provide
247 a graphical interface to interact with
248 <command>power-profiles-daemon</command> and activate a power
249 profile.
250 </para>
251
252 <para>
253 The activated power profile is automatically stored in
254 <filename>/var/lib/power-profiles-daemon/state.ini</filename> and
255 <command>power-profiles-daemon</command> will read it out and
256 activate it again on the next boot if the
257 <phrase revision='sysv'>bootscript is
258 installed</phrase><phrase revision='systemd'>Systemd
259 unit is enabled</phrase> as above.
260 </para>
261 </sect3>
262
263 </sect2>
264
265
266
267 <sect2 role="content">
268 <title>Contents</title>
269
270 <segmentedlist>
271 <segtitle>Installed Program</segtitle>
272 <segtitle>Installed Libraries</segtitle>
273 <segtitle>Installed Directories</segtitle>
274
275 <seglistitem>
276 <seg>
277 powerprofilesctl
278 </seg>
279 <seg>
280 None
281 </seg>
282 <seg>
283 None
284 </seg>
285 </seglistitem>
286 </segmentedlist>
287
288 <variablelist>
289 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
290 <?dbfo list-presentation="list"?>
291 <?dbhtml list-presentation="table"?>
292
293 <varlistentry id="powerprofilesctl">
294 <term><command>powerprofilesctl</command></term>
295 <listitem>
296 <para>
297 This allows the user to set the power governor of the
298 CPU.
299 </para>
300 <indexterm zone="powerprofilesctl">
301 <primary sortas="b-powerprofilesctl">powerprofilesctl</primary>
302 </indexterm>
303 </listitem>
304 </varlistentry>
305
306 </variablelist>
307 </sect2>
308</sect1>
Note: See TracBrowser for help on using the repository browser.