[laptop-mode] Laptop mode not working

Stian Kalstad stian.kalstad at gmail.com
Sun Dec 28 13:30:08 CET 2008


------=_Part_133741_23749302.1230467408678
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

Hi,

I see battery actions in acpi_listen when i plug/unplug the AC, but nothing
when I idle running on battery. Could this have someting to do with my
kernel config? I have got it running on Debian so I know that it works
somehow, I just dont know how...

My hardware is a Dell latitude D620 laptop running on Gentoo


2008/12/11 Bart Samwel <bart at samwel.tk>

> 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
>

------=_Part_133741_23749302.1230467408678
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

Hi, <br><br>I see battery actions in acpi_listen when i plug/unplug the AC, but nothing when I idle running on battery. Could this have someting to do with my kernel config? I have got it running on Debian so I know that it works somehow, I just dont know how...<br>
<br>My hardware is a Dell latitude D620 laptop running on Gentoo<br><br><br><div class="gmail_quote">2008/12/11 Bart Samwel <span dir="ltr">&lt;<a href="mailto:bart at samwel.tk">bart at samwel.tk</a>&gt;</span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi Stian,<br>
<div><div></div><div class="Wj3C7c"><br>
Stian Kalstad wrote:<br>
&gt; Hi! I`m trying to get laptop-mode to work on my laptop with Gentoo. I`ve<br>
&gt; set it up to auto hibernate when battery is 10%, just to test it.<br>
&gt;<br>
&gt;<br>
&gt; These are my settings in laptop-mode.conf:<br>
&gt;<br>
&gt; ENABLE_AUTO_HIBERNATION=1<br>
&gt;<br>
&gt; HIBERNATE_COMMAND=/usr/sbin/pm-hibernate<br>
&gt;<br>
&gt; AUTO_HIBERNATION_BATTERY_CHARGE_PERCENT=10<br>
&gt;<br>
&gt; I`ve started the laptop_mode<br>
&gt;<br>
&gt; /stian at D620 ~ $ /etc/init.d/laptop_mode status<br>
&gt; &nbsp;* status: started/<br>
&gt;<br>
&gt; The acpi seems to read my battery correctly:<br>
&gt;<br>
&gt; ON AC<br>
&gt; stian at D620 ~ $ acpi<br>
&gt; &nbsp; &nbsp; &nbsp;Battery 1: charging, 88%, 00:42:40 until charged<br>
&gt;<br>
&gt; ON BATTERY<br>
&gt; stian at D620 ~ $ acpi<br>
&gt; &nbsp; &nbsp; &nbsp;Battery 1: discharging, 88%, 02:12:13 remaining<br>
&gt;<br>
&gt; And running on battery, laptop_mode seems to work fine.<br>
&gt; /<br>
&gt; stian at D620 ~ $ sudo laptop_mode<br>
&gt; Laptop mode enabled, active [unchanged]<br>
&gt; /<br>
&gt; But when acpi tells me that battery capacity is 10% or less, nothing<br>
&gt; happens.<br>
&gt;<br>
&gt; But if i now run #sudo laptop_mode is starts to hibernate immediatly.<br>
&gt;<br>
&gt; anyone know whats wrong ???<br>
<br>
</div></div>The problem here is that laptop mode tools is not notified by your<br>
battery of any changes in the battery state. This can be caused by a<br>
number of things.<br>
<br>
First thing to check: does your installation have:<br>
<br>
- /etc/acpi/events/lm_battery<br>
- /etc/acpi/actions/lm_battery.sh<br>
- acpid running and functioning correctly<br>
<br>
?<br>
<br>
Second thing to check: is acpid running and functioning correctly? Can<br>
you find any log files for acpid?<br>
<br>
Third thing to check: does your battery actually send out ACPI events<br>
when it is discharging? You can check this using the &quot;acpi_listen&quot;<br>
command. Simply start &quot;acpi_listen&quot; (as root), and unplug your laptop.<br>
You should see events of type &quot;battery&quot; at regular intervals while the<br>
battery discharges. The events should be reported maybe every minute or<br>
so -- it&#39;s different for each battery.<br>
<br>
If you don&#39;t see any events, then the battery hardware does not send out<br>
events. In that case this feature is simply not supported on your<br>
hardware (unless you want to put in a cron job that does a<br>
/usr/sbin/laptop_mode auto every two minutes).<br>
<br>
If you do see regular battery events, and all the things above are OK as<br>
well, could you check the acpid logs to see what acpid does with the events?<br>
<br>
Cheers,<br>
<font color="#888888">Bart<br>
</font></blockquote></div><br>

------=_Part_133741_23749302.1230467408678--


More information about the laptop-mode mailing list