Power saver - power management - ACPI

Voir :

Mise en veille

https://wiki.archlinux.org/index.php/Power_management

https://wiki.debian.org/Suspend

https://doc.ubuntu-fr.org/veille_et_hibernation

Diag

ps -ef lsmof

SystemD

/etc/systemd/logind.conf

HandleLidSwitch=ignore
systemctl restart systemd-logind busctl get-property org.freedesktop.login1 /org/freedesktop/login1 org.freedesktop.login1.Manager HandleLidSwitch busctl get-property org.freedesktop.login1 /org/freedesktop/login1 org.freedesktop.login1.Manager HandleLidSwitchDocked

You can use this to temporarily disable lid-switch events:

systemd-inhibit --what=handle-lid-switch sleep 1d
systemctl suspend systemctl hibernate systemctl hybrid-sleep

Disable

sudo systemctl unmask sleep.target suspend.target hibernate.target hybrid-sleep.target

Pour les portables/etc/systemd/logind.conf

[Login] HandleLidSwitch=ignore HandleLidSwitchDocked=ignore

Notes

apt-get install pm-utils laptop-mode-tools

Console

/etc/console-tools/config

BLANK_TIME=0 POWERDOWN_TIME=0

source : https://wiki.deimos.fr/D%C3%A9sactiver_la_mise_en_veille_de_l%27%C3%A9cran_sur_Debian.html

Battery

cat /sys/class/power_supply/BAT0/charge_full cat /sys/class/power_supply/BAT0/charge_full_design lspower
sudo apt install powertop sudo powertop --calibrate apt-get install tlp sudo vim /etc/default/tlp sudo tlp start

Voir https://linrunner.de/en/tlp/docs/tlp-configuration.html

Source : https://www.howtogeek.com/55185/how-to-maximize-the-battery-life-on-your-linux-laptop/

ACPI

apt-get install acpid acpi_listen

cat /proc/acpi/wakeup
Device S-state Status Sysfs node

acpi/interrupts

AE_NOT_FOUND infinitely on startup

Source : https://unix.stackexchange.com/questions/348806/acpi-exception-ae-not-found-infinitely-on-startup

If using sysdemd with rc.local disabled:

systemctl enable rc-local.service

Edit

sudo systemctl edit --full rc-local

Add to rc.local

echo "disable" > /sys/firmware/acpi/interrupts/gpe6F

C-STATE

https://www.golinuxhub.com/2018/06/what-cpu-c-states-check-cpu-core-linux.html

cat /proc/acpi/processor/CPU0/power

Port USB

Le port USB se met en économie d’énergie. Par exemple la souris ne fonctionne plus après la sortie de la veille.

Voir https://logfile.ch/linux/2017/06/15/disable-usb-autosuspend-linux/

cat /sys/bus/usb/devices/<your device>/power/control echo on > /sys/bus/usb/devices/<your device>/power/control

Autres

Voir https://www.geeks3d.com/hacklab/20160108/how-to-disable-the-blank-screen-on-raspberry-pi-raspbian/

sudo apt-get install x11-xserver-utils

~/.config/lxsession/LXDE/autostart

@xset s off @xset -dpms @xset s noblank

/etc/xdg/lxsession/LXDE/autostart !?

Ou

/etc/lightdm/lightdm.conf

[SeatDefaults] xserver-command=X -s 0 -dpms

Exécution à l'entrée en veille / Exécution à la sortie de la mise en veille

Exemple

/lib/systemd/system-sleep/atop-pm

#!/bin/bash PATH=/sbin:/usr/sbin:/bin:/usr/bin case "$1" in pre) systemctl stop atop exit 0 ;; post) systemctl start atop exit 0 ;; *) exit 1 ;; esac