* Battery change in sleep mode breaks battery support
@ 2005-02-09 14:46 Lorenzo Colitti
[not found] ` <420A224B.9050308-Z4WAQ3j+MphBDgjK7y7TUQ@public.gmane.org>
0 siblings, 1 reply; 4+ messages in thread
From: Lorenzo Colitti @ 2005-02-09 14:46 UTC (permalink / raw)
To: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f
Hi,
I am having problems with battery monitoring and sleep mode: if I plug
in or unplug the battery while the machine is asleep, when it wakes up
the change has not been registered and no further changes are logged.
This means that I suspend the machine while on AC power and wake it up
on battery power, there is no way for me to keep track of how much
charge is left, which is a problem!
As an example, I started with init=/bin/sh, with no battery and AC
plugged in, and did the following:
> sh-3.00# modprobe battery
> ACPI: Battery Slot [C138] (battery absent)
> ACPI: Battery Slot [C137] (battery absent)
> sh-3.00# modprobe ac
> ACPI: AC Adapter [C135] (on-line)
> sh-3.00# echo 3 > /proc/acpi/sleep
While the machine was asleep, I plugged in the battery and removed AC
power, then turned the machine on. The kernel didn't notice that the
battery had been plugged in:
> sh-3.00# cat /proc/acpi/battery/C138/info
> present: no
> sh-3.00# cat /proc/acpi/battery/C137/info
> present: no
> sh-3.00# cat /proc/acpi/ac_adapter/C135/state
> state: off-line
Unplugging and reinserting the battery and/or reloading the battery
module didn't help. :(
The machine is an HP NC6000 on which ACPI mostly works (decompiling and
recompiling the DSDT yields only the warning "Unknown reserved name
(_WDG)"). I have ACPI debugging enabled in the kernel, but I don't know
how to use it.
Any ideas?
Thanks!
Lorenzo
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Battery change in sleep mode breaks battery support
[not found] ` <420A224B.9050308-Z4WAQ3j+MphBDgjK7y7TUQ@public.gmane.org>
@ 2005-02-09 19:15 ` Thomas Renninger
[not found] ` <420A6144.5050501-l3A5Bk7waGM@public.gmane.org>
0 siblings, 1 reply; 4+ messages in thread
From: Thomas Renninger @ 2005-02-09 19:15 UTC (permalink / raw)
To: Lorenzo Colitti; +Cc: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f
Lorenzo Colitti wrote:
> Hi,
>
> I am having problems with battery monitoring and sleep mode: if I plug
> in or unplug the battery while the machine is asleep, when it wakes up
> the change has not been registered and no further changes are logged.
>
> This means that I suspend the machine while on AC power and wake it up
> on battery power, there is no way for me to keep track of how much
> charge is left, which is a problem!
>
> As an example, I started with init=/bin/sh, with no battery and AC
> plugged in, and did the following:
>
>> sh-3.00# modprobe battery
>> ACPI: Battery Slot [C138] (battery absent)
>> ACPI: Battery Slot [C137] (battery absent)
>> sh-3.00# modprobe ac
>> ACPI: AC Adapter [C135] (on-line)
>> sh-3.00# echo 3 > /proc/acpi/sleep
>
>
> While the machine was asleep, I plugged in the battery and removed AC
> power, then turned the machine on. The kernel didn't notice that the
> battery had been plugged in:
>
>> sh-3.00# cat /proc/acpi/battery/C138/info present: no
>> sh-3.00# cat /proc/acpi/battery/C137/info
>> present: no
>> sh-3.00# cat /proc/acpi/ac_adapter/C135/state state:
>> off-line
>
>
> Unplugging and reinserting the battery and/or reloading the battery
> module didn't help. :(
>
> The machine is an HP NC6000 on which ACPI mostly works (decompiling and
> recompiling the DSDT yields only the warning "Unknown reserved name
> (_WDG)"). I have ACPI debugging enabled in the kernel, but I don't know
> how to use it.
>
> Any ideas?
>
I expect that your _WAK function does not work properly.
Does S3 invoke the _WAK function after wake up?
I remember some things like that concerning suspend to disk (no buttons,
wrong AC/battery states), that vanished when using platform mode.
The main differnce to shutdown mode is (correct me if I am wrong), that
the BIOS _WAK function is called and the devices get initialised again.
Thomas
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Battery change in sleep mode breaks battery support
[not found] ` <420A6144.5050501-l3A5Bk7waGM@public.gmane.org>
@ 2005-02-10 18:15 ` Lorenzo Colitti
[not found] ` <420BA4D5.6090107-Z4WAQ3j+MphBDgjK7y7TUQ@public.gmane.org>
0 siblings, 1 reply; 4+ messages in thread
From: Lorenzo Colitti @ 2005-02-10 18:15 UTC (permalink / raw)
To: Thomas Renninger; +Cc: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f
Thomas Renninger wrote:
>> I am having problems with battery monitoring and sleep mode: if I plug
>> in or unplug the battery while the machine is asleep, when it wakes up
>> the change has not been registered and no further changes are logged.
>> [..]
>> Any ideas?
>>
> I expect that your _WAK function does not work properly.
> Does S3 invoke the _WAK function after wake up?
I don't know, how do I find out? Do I have to (attempt to) read the
decompiled dsdt or can I just use the acpi debugging options?
Cheers,
Lorenzo
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Battery change in sleep mode breaks battery support
[not found] ` <420BA4D5.6090107-Z4WAQ3j+MphBDgjK7y7TUQ@public.gmane.org>
@ 2005-02-11 11:54 ` Thomas Renninger
0 siblings, 0 replies; 4+ messages in thread
From: Thomas Renninger @ 2005-02-11 11:54 UTC (permalink / raw)
To: Lorenzo Colitti; +Cc: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f
Lorenzo Colitti wrote:
> Thomas Renninger wrote:
>
>>> I am having problems with battery monitoring and sleep mode: if I
>>> plug in or unplug the battery while the machine is asleep, when it
>>> wakes up the change has not been registered and no further changes
>>> are logged.
>>> [..]
>>> Any ideas?
>>>
>> I expect that your _WAK function does not work properly.
>> Does S3 invoke the _WAK function after wake up?
>
>
> I don't know, how do I find out? Do I have to (attempt to) read the
> decompiled dsdt or can I just use the acpi debugging options?
>
Hmm, don't know.
Putting a:
Store ("_WAK invoked", Debug)
into the _WAK function of your DSDT.
But maybe it won't be printed because the kernel logger won't run at
this moment?
Hoped that some of the suspend guys comments on this, sorry.
You should disassemble and recompile your dsdt:
cp /proc/acpi/dsdt /tmp
iasl -d /tmp/dsdt
iasl -sa /tmp/dsdt.dsl
maybe you even find an error inside this function.
Send me your DSDT if iasl -sa /tmp/dsdt.dsl throws errors, maybe just
adjusting some lines help.
Thomas
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2005-02-11 11:54 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-02-09 14:46 Battery change in sleep mode breaks battery support Lorenzo Colitti
[not found] ` <420A224B.9050308-Z4WAQ3j+MphBDgjK7y7TUQ@public.gmane.org>
2005-02-09 19:15 ` Thomas Renninger
[not found] ` <420A6144.5050501-l3A5Bk7waGM@public.gmane.org>
2005-02-10 18:15 ` Lorenzo Colitti
[not found] ` <420BA4D5.6090107-Z4WAQ3j+MphBDgjK7y7TUQ@public.gmane.org>
2005-02-11 11:54 ` Thomas Renninger
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox