What do the power management tools in Linux do? (acpi, pm-utils, etc...)

I am really really confused about the power management tools available for Linux: I have Arch Linux with XFCE on my laptop.

The guides on the the Arch Linux wiki list

  • acpi
  • acpid
  • pm-utils
  • cpufreq
  • laptop-mode-tools

to manage power, suspension, disks and CPU, WiFi, etc.

But I can't understand what the relationships between them are. Apparently they don't require each other (dependencies are listed as optional) but it's not clear to me what this implies: do they work together doing different things or are they alternative to each others or conflict with each other or what?


At the moment I only have pm-utils (+upower) installed. Do I also need acpi and/or acpid? And what about laptop-mode-tools: is this kind of supervisor of all the other tools? If so, should I configure only laptop-mode-tools or also each of the other tools separately? How do they interact with lm-sensors and cpufreq?

In addition to this, there is XFCE Power Manager, which seems to be unrelated to any of the above tools, as it works even if they are not installed. So my question is again, if I install the others will they conflict with XFCE Power Manager? And what about the power management options included in Xscreensaver? Do they conflict or do they override the settings in XFCE Power Manager (or acpi or pm-utils)?

All I want to do really is to have an efficient use of energy:

  • be able to go to standby/suspension
  • don't have the fan running all the time
  • don't overheat/damage the CPU and the hard drive
  • turn off WiFi when in standby/suspension
  • et cetera

Solution 1:

  • acpi is just a small program that displays basic ACPI information.

  • acpid is a daemon that handles ACPI events - mostly power button, lid, battery and related stuff. For example, if the power button was pressed, acpid runs shutdown. When AC power is connected, acpid can run the apropriate laptop-mode-tools command. If you use systemd, then it replaces most of acpid's functionality.

  • cpufreq (now obsolete) is a set of tools for adjusting CPU frequency. The core functionality is part of the kernel and accessible through /sys, and cpufreq commands are just for convenience, but some scripts may require them.

  • cpufreqd (with the d) is an user-space daemon that can be used as a replacement for the default kernel-space governors (powersave, ondemand, performance). It is not necessary – for most uses, the standard governors are enough.

  • cpupower is a replacement for cpufreq – it allows setting CPU frequency settings from command line.

  • laptop-mode-tools does various system adjustments whenever you plug or unplug AC power to your laptop – for example, disk spin-down times or switching cpufreq governors. It is triggered by acpid on AC events, and is inactive the rest of the time.

    (Note: Some of the settings in laptop-mode-tools may actually hurt performance and/or sanity; for example, it disables Ethernet autonegotiation, which IMHO is just silly.)

  • pm-utils handle the preparations of suspending to memory and/or disk (running pre-suspend hooks, choosing the best method). They are inactive the rest of the time.

    You used to need pm-utils to cleanly suspend the machine, but on modern machines, pm-utils does very little as it can just tell the kernel to suspend. If you use systemd, then it replaces pm-utils.

  • Additionally, pm-utils comes with a pm-powersave command that performs most of the same functions as laptop-mode-tools. pm-powersave is triggered by upower when you plug/unplug AC power, and performs various adjustments.

  • systemd-logind has functions for suspending/hibernating, and handles the most common ACPI events (lid switch, power button, etc.) It replaces acpid and pm-utils on most systems.

    (Unlike pm-utils, however, systemd-logind does not come with any pre-suspend hooks or other workarounds by default, and only uses the default kernel suspend method. It expects driver bugs to be fixed in the drivers.)

  • upower is an abstraction layer for desktop applications to various power parameters. Programs can use it to check battery status, adjust backlight, or suspend the system without having to care about the specific platform. upower also uses PolicyKit to allow various actions (suspend, etc) without giving away full root privileges. It relies on pm-utils and acpid. GNOME and Xfce require upower for their "power management" settings.

  • Xfce Power Manager controls such parameters as display poweroff time, CPU scaling, LCD brightness, ACPI events... (The function are similar to acpid and laptop-mode-tools, which both only have one system-wide configuration, while XfPM allows per-user settings.) XfPM only manages the policy, but relies on upower for the actual mechanisms. Also, XfPM sends out[citation needed] such notifications as "Low battery".

Note: I'm not entirely sure what is the relation between XfPM, acpid, laptop-mode-tools, and upower. It seems to me that XfPM replaces most of acpid/l-m-t functions, but not all of them.