Configurer le comportement en fin de batterie

Bonjour,
je suis sous debian lenny + fluxbox,
Je me demande comment configurer mon ordinateur pour qu’il se mette automatiquement en veille quand j’atteint 5% de charge batterie.

Je croyais que laptop-mode pouvait faire cela mais après un coup d’oeil dans le fichier de conf, il semble que non.

:slightly_smiling:

Trouvé dans /etc/laptop-mode/laptop-mode.conf

[code]###############################################################################

Auto-hibernation settings

-------------------------

Using these settings, you can make laptop mode tools automatically put your

computer into hibernation when the battery level goes critically low.

This feature only works on ACPI, and only works on computers whose batteries

give off battery events often enough.

###############################################################################

Should laptop mode tools perform auto-hibernation?

ENABLE_AUTO_HIBERNATION=0

The hibernation command that is to be executed when auto-hibernation

is triggered.

HIBERNATE_COMMAND=/usr/sbin/hibernate

Auto-hibernation battery level threshold, in percentage of the battery’s

total capacity.

AUTO_HIBERNATION_BATTERY_CHARGE_PERCENT=2

Enable this to auto-hibernate if the battery reports that its level is

“critical”.

AUTO_HIBERNATION_ON_CRITICAL_BATTERY_LEVEL=1
[/code]