Configuration

If you would like to create your own scripts and power saving settings such as by udev rules you can take the following settings as a reference.

Audio

By default, audio power saving is turned off by most drivers. It can be enabled by setting the power_save parameter; a time (in seconds) to go into idle mode. To idle the audio card after one second, create

/etc/modprobe.d/audio_powersave.conf

options snd_hda_intel power_save=1

for Intel, or use

options snd_ac97_codec power_save=1

for ac97.

Note: Toggling the audio card's power state can cause a popping sound or noticeable latency on some broken hardware.

In these examples, %k is a specifier for the kernel name of the matched device. For example, if it finds that the rule is applicable to wlan0, the %k specifier will be replaced with wlan0. To apply the rules to only a particular interface, just replace the pattern eth* and specifier %k with the desired interface name. For more information, see Writing udev rules.

In this case, the name of the configuration file is important. Due to the introduction of persistent device names via 80-net-name-slot.rules in systemd v197, it is important that the network powersave rules are named lexicographically before 80-net-name-slot.rules, so that they are applied before the devices are named e.g. enp2s0.

PCI Runtime Power Management

/etc/udev/rules.d/pci_pm.rules

ACTION=="add", SUBSYSTEM=="pci", ATTR{power/control}="auto"

SATA Active Link Power Management

Note: This adds latency when accessing a drive that has been idle, so it's one of the few settings that may be worth toggling based on whether you're on AC power.

Tools and scripts

Packages

If you do not want to take care of the settings by yourself it is recommended to use these tools. But be aware of running only one of these tools to avoid possible conflicts as they all work more or less similar.

Using a script and an udev rule

Since systemd users can suspend and hibernate through systemctl suspend or systemctl hibernate and handle acpi events with /etc/systemd/logind.conf, it might be interesting to remove pm-utils and acpid. Now, there's just one thing systemd can't do (at this time of writing): powermanagement, depending on whether the system is running on AC or battery. To fill this gap, one can create a single udev rule that launches a script when the laptop is unplugged and plugged:

The above udev rule should work as expected, but if your power settings aren't updated after a suspend or hibernate cycle, you should add a script in /usr/lib/systemd/system-sleep/ with the following contents: