glfs/general/sysutils/power-profiles-daemon.xml
Xi Ruoyao c0bc0a9eac
Update to glib-2.80.0 and gobject-introspection-1.80.0
Merge gobject-introspection into glib page to better handle a circular
dependency between these two packages.
2024-03-10 23:41:04 +08:00

274 lines
8.3 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
<!ENTITY % general-entities SYSTEM "../../general.ent">
%general-entities;
<!-- Place this in the packages.ent file
<!ENTITY power-profiles-daemon-version "">
-->
<!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">
<!ENTITY power-profiles-daemon-download-ftp " ">
<!ENTITY power-profiles-daemon-md5sum "92df21de1148ef6e7c30e4a0829e02b1">
<!ENTITY power-profiles-daemon-size "68 KB">
<!ENTITY power-profiles-daemon-buildsize "1.4 MB">
<!ENTITY power-profiles-daemon-time "less than 0.1 SBU (with tests)">
]>
<sect1 id="power-profiles-daemon" xreflabel="power-profiles-daemon-&power-profiles-daemon-version;">
<?dbhtml filename="power-profiles-daemon.html"?>
<title>Power-profiles-daemon-&power-profiles-daemon-version;</title>
<indexterm zone="power-profiles-daemon">
<primary sortas="a-Power-profiles-daemon">power-profiles-daemon</primary>
</indexterm>
<sect2 role="package">
<title>Introduction to Power-profiles-daemon</title>
<para>
The <application>Power-profiles-daemon</application> package provides a program
that allows modification of the system power/behavior state. This is used on
many laptops and can be used by a Desktop Environment to activate power saving
or performance CPU governors through dbus.
</para>
&lfs121_checked;
<bridgehead renderas="sect3">Package Information</bridgehead>
<itemizedlist spacing="compact">
<listitem>
<para>
Download (HTTP): <ulink url="&power-profiles-daemon-download-http;"/>
</para>
</listitem>
<listitem>
<para>
Download (FTP): <ulink url="&power-profiles-daemon-download-ftp;"/>
</para>
</listitem>
<listitem>
<para>
Download MD5 sum: &power-profiles-daemon-md5sum;
</para>
</listitem>
<listitem>
<para>
Download size: &power-profiles-daemon-size;
</para>
</listitem>
<listitem>
<para>
Estimated disk space required: &power-profiles-daemon-buildsize;
</para>
</listitem>
<listitem>
<para>
Estimated build time: &power-profiles-daemon-time;
</para>
</listitem>
</itemizedlist>
<bridgehead renderas="sect3">Power-profiles-daemon Dependencies</bridgehead>
<bridgehead renderas="sect4">Required</bridgehead>
<para role="required">
&gobject-introspection;,
<xref linkend="libgudev"/>,
<xref linkend="polkit"/>, and
<xref linkend="pygobject3"/>
</para>
<bridgehead renderas="sect4">Optional</bridgehead>
<para role="optional">
<xref linkend="gtk-doc"/>,
The rest are for the tests,
<xref linkend="python-dbusmock"/>,
<xref linkend="umockdev"/>,
<ulink url="https://github.com/PyCQA/isort">isort</ulink>, and
<ulink url="https://github.com/PyCQA/mccabe">mccabe</ulink>
</para>
</sect2>
<sect2 role="kernel" id="power-profiles-daemon-kernel">
<title>Kernel Configuration</title>
<para>
Enable the following options in the kernel configuration and recompile the
kernel if necessary:
</para>
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
href="power-profiles-daemon-kernel.xml"/>
<para>
Select the appropriate sub-options that appear when the above options are
selected. As much as possible, the layout should be the same as in
kernel configuration menus.
</para>
<indexterm zone="power-profiles-daemon power-profiles-daemon-kernel">
<primary sortas="d-Power-profiles-daemon">Power-profiles-daemon</primary>
</indexterm>
</sect2>
<sect2 role="installation">
<title>Installation of Power-profiles-daemon</title>
<para>
Install <application>Power-profiles-daemon</application> by
running the following commands:
</para>
<screen revision="sysv"><userinput>mkdir build &amp;&amp;
cd build &amp;&amp;
meson setup \
--prefix=/usr \
--buildtype=release \
-Dgtk_doc=false \
-Dtests=false \
-Dsystemdsystemunitdir=/tmp \
.. &amp;&amp;
ninja</userinput></screen>
<screen revision="systemd"><userinput>mkdir build &amp;&amp;
cd build &amp;&amp;
meson setup \
--prefix=/usr \
--buildtype=release \
-Dgtk_doc=false \
-Dtests=false \
.. &amp;&amp;
ninja</userinput></screen>
<para>
If you have installed the external dependencies, to test the results issue: <command>
ninja test</command>.
</para>
<para>
Now, as the <systemitem class="username">root</systemitem> user:
</para>
<screen role="root"><userinput>ninja install</userinput></screen>
<para>
Now, clean up an unneeded systemd unit installed into /tmp:
</para>
<screen revision="sysv" role="root">
<userinput>rm -fv /tmp/power-profiles-daemon.service</userinput>
</screen>
</sect2>
<sect2 role="commands">
<title>Command Explanations</title>
<para>
<parameter>-Dgtk_doc=false</parameter>: Prevents building the
documentation. Remove this if you have <application>GTK-Doc</application>
installed and wish to build the documentation.
</para>
<para>
<parameter>-Dtests=false</parameter>: Prevents building the
tests because they cannot be run within the boundaries of
BLFS. Remove this if you have installed the external dependencies
and wish to run the tests.
</para>
<para revision="sysv">
<parameter>-Dsystemdsystemunitdir=/tmp</parameter>: Removes
the dependency on <application>systemd</application>.
</para>
</sect2>
<sect2 role="configuration">
<title>Configuring Power-profiles-daemon</title>
<sect3 id="power-profiles-daemon-init" revision="sysv">
<title>Boot Script</title>
<para>
To automatically start the <command>power-profiles-daemon</command> when the
system is rebooted, install the
<filename>/etc/rc.d/init.d/power-profiles-daemon</filename> bootscript from the
<xref linkend="bootscripts" revision="sysv"/> as the
<systemitem class="username">root</systemitem> user:
</para>
<indexterm zone="power-profiles-daemon power-profiles-daemon-init">
<primary sortas="f-Power-profiles-daemon">power-profiles-daemon</primary>
</indexterm>
<screen role="root"><userinput>make install-power-profiles-daemon</userinput></screen>
</sect3>
<sect3 id="power-profiles-daemon-systemd" revision="systemd">
<title>Systemd Unit</title>
<para>
To start the power-profiles-daemon on boot, enable the systemd
service that was installed by running the following command as the
<systemitem class="username">root</systemitem> user:
</para>
<screen role="root"><userinput>systemctl enable power-profiles-daemon</userinput></screen>
</sect3>
</sect2>
<sect2 role="content">
<title>Contents</title>
<segmentedlist>
<segtitle>Installed Program</segtitle>
<segtitle>Installed Libraries</segtitle>
<segtitle>Installed Directories</segtitle>
<seglistitem>
<seg>
powerprofilesctl
</seg>
<seg>
None
</seg>
<seg>
None
</seg>
</seglistitem>
</segmentedlist>
<variablelist>
<bridgehead renderas="sect3">Short Descriptions</bridgehead>
<?dbfo list-presentation="list"?>
<?dbhtml list-presentation="table"?>
<varlistentry id="powerprofilesctl">
<term><command>powerprofilesctl</command></term>
<listitem>
<para>
This allows the user to set the power governor of the
CPU.
</para>
<indexterm zone="powerprofilesctl">
<primary sortas="b-powerprofilesctl">powerprofilesctl</primary>
</indexterm>
</listitem>
</varlistentry>
</variablelist>
</sect2>
</sect1>