From campisano.org
Jump to navigation Jump to search

Reduce power consumption

What TLP basically does is tweaking kernel settings that affect power consumption.
  • Install:
apt-get install tlp
  • Configure:
cat > /etc/tlp.d/00-optimizing.conf << EOF
# Extend battery runtime
# from https://linrunner.de/tlp/support/optimizing.html#extend-battery-runtime




chmod 644 /etc/tlp.d/00-optimizing.conf
  • Start (and enable at boot)
systemctl start tlp
systemctl enable tlp

Power button management

Debian Stretch

Debian Jessie
With systemd, pm-utils and its hooks are not used any more, instead there's systemd-suspend.

Part of the official Debian documentation is outdated, still using acpi config folder:

We can cosider the follows

And edit the config file /etc/systemd/logind.conf to handle the behavior that we want

For instance, to put the PC to sleep on power button press, change the value of HandlePowerKey property unde the [Login] section from the default



  • Restart the service
systemctl restart systemd-logind.service
  • Note: pm-util is not necessary anymore and apparently can be removed:
apt-get remove --purge pm-utils

There are other packages installed but not needed to manage events with systemd, so the follow maybe can removed too (still testing that):

apt-get remove --purge upower libupower-glib3 powertop powermgmt-base

  • Note: in a Dell notebook Latitude 7480 there is something that cause an eternal sleep request loop, and lid close cause shutdown:

For sleep loop issue, I made the follow changes to grub bootstrap options (and applied with 'update-grub' command):

diff --git a/default/grub b/default/grub

For lid close shutdown issue, I made the follow changes to systemd logind configuration (and applied restarting the machine, restarting just the service does not work):

diff --git a/systemd/logind.conf b/systemd/logind.conf

Before Debian Stretch

(or before jessie, whenever /etc/acpi folder was used)

  • Edit file 'acpi/powerbtn-acpi-support.sh'
  • replace the 'shutdown' command with the 'pm-suspend' one

for example:

###     /sbin/shutdown -h -P now "Power button pressed"