Power-profiles-daemon-0.20

Introduction to Power-profiles-daemon

The Power-profiles-daemon 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.

This package is known to build and work properly using an LFS 12.1 platform.

Package Information

Power-profiles-daemon Dependencies

Required

gobject-introspection-1.78.1, libgudev-238, Polkit-124, and PyGObject-3.46.0

Optional

GTK-Doc-1.33.2, The rest are for the tests, dbusmock-0.30.2, umockdev-0.17.18, isort, and mccabe

Kernel Configuration

Enable the following options in the kernel configuration and recompile the kernel if necessary:

Power management and ACPI options --->
  CPU Frequency scaling --->
    -*-   CPU Frequency scaling                                       [CPU_FREQ]
    -*-     'performance' governor                    [CPU_FREQ_GOV_PERFORMANCE]
    <*/M>   'powersave' governor                        [CPU_FREQ_GOV_POWERSAVE]
    # Select if CPU is Intel:
    [ /*]   Intel P state control                             [X86_INTEL_PSTATE]
    # Select if CPU is AMD:
    [ /*]   AMD Processor P-State driver                        [X86_AMD_PSTATE]

Device Drivers --->
  # Some drivers under this submenu provide "platform profile" support
  # and power-profiles-daemon can take advantage from platform profiles;
  # select a driver if suitable for your platform:
  [ /*] X86 Platform Specific Device Drivers --->         [X86_PLATFORM_DEVICES]

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.

Installation of Power-profiles-daemon

Install Power-profiles-daemon by running the following commands:

mkdir build &&
cd build &&

meson setup                       \
      --prefix=/usr               \
      --buildtype=release         \
      -Dgtk_doc=false             \
      -Dtests=false               \
      -Dsystemdsystemunitdir=/tmp \
      .. &&
ninja

If you have installed the external dependencies, to test the results issue: ninja test.

Now, as the root user:

ninja install

Now, clean up an unneeded systemd unit installed into /tmp:

rm -fv /tmp/power-profiles-daemon.service

Command Explanations

-Dgtk_doc=false: Prevents building the documentation. Remove this if you have GTK-Doc installed and wish to build the documentation.

-Dtests=false: 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.

-Dsystemdsystemunitdir=/tmp: Removes the dependency on systemd.

Configuring Power-profiles-daemon

Boot Script

To automatically start the power-profiles-daemon when the system is rebooted, install the /etc/rc.d/init.d/power-profiles-daemon bootscript from the blfs-bootscripts-20240209 as the root user:

make install-power-profiles-daemon

Contents

Installed Program: powerprofilesctl
Installed Libraries: None
Installed Directories: None

Short Descriptions

powerprofilesctl

This allows the user to set the power governor of the CPU.