[laptop-mode] Laptop mode not working

Bart Samwel bart at samwel.tk
Thu Dec 11 05:17:19 CET 2008


Hi Stian,

Stian Kalstad wrote:
> Hi! I`m trying to get laptop-mode to work on my laptop with Gentoo. I`ve
> set it up to auto hibernate when battery is 10%, just to test it.
> 
> 
> These are my settings in laptop-mode.conf:
> 
> ENABLE_AUTO_HIBERNATION=1
> 
> HIBERNATE_COMMAND=/usr/sbin/pm-hibernate
> 
> AUTO_HIBERNATION_BATTERY_CHARGE_PERCENT=10
> 
> I`ve started the laptop_mode
> 
> /stian at D620 ~ $ /etc/init.d/laptop_mode status
>  * status: started/
> 
> The acpi seems to read my battery correctly:
> 
> ON AC
> stian at D620 ~ $ acpi
>      Battery 1: charging, 88%, 00:42:40 until charged
> 
> ON BATTERY
> stian at D620 ~ $ acpi
>      Battery 1: discharging, 88%, 02:12:13 remaining
> 
> And running on battery, laptop_mode seems to work fine.
> /
> stian at D620 ~ $ sudo laptop_mode
> Laptop mode enabled, active [unchanged]
> /
> But when acpi tells me that battery capacity is 10% or less, nothing
> happens.
> 
> But if i now run #sudo laptop_mode is starts to hibernate immediatly.
> 
> anyone know whats wrong ???

The problem here is that laptop mode tools is not notified by your
battery of any changes in the battery state. This can be caused by a
number of things.

First thing to check: does your installation have:

- /etc/acpi/events/lm_battery
- /etc/acpi/actions/lm_battery.sh
- acpid running and functioning correctly

?

Second thing to check: is acpid running and functioning correctly? Can
you find any log files for acpid?

Third thing to check: does your battery actually send out ACPI events
when it is discharging? You can check this using the "acpi_listen"
command. Simply start "acpi_listen" (as root), and unplug your laptop.
You should see events of type "battery" at regular intervals while the
battery discharges. The events should be reported maybe every minute or
so -- it's different for each battery.

If you don't see any events, then the battery hardware does not send out
events. In that case this feature is simply not supported on your
hardware (unless you want to put in a cron job that does a
/usr/sbin/laptop_mode auto every two minutes).

If you do see regular battery events, and all the things above are OK as
well, could you check the acpid logs to see what acpid does with the events?

Cheers,
Bart


More information about the laptop-mode mailing list