Bug 5305 - no AC events on AC plug/un-plug
Summary: no AC events on AC plug/un-plug
Status: CLOSED DUPLICATE of bug 3241
Alias: None
Product: ACPI
Classification: Unclassified
Component: Power-Battery (show other bugs)
Hardware: i386 Linux
: P2 high
Assignee: Vladimir Lebedev
URL:
Keywords:
: 5304 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-09-24 07:18 UTC by Brice MEALIER
Modified: 2006-07-22 07:14 UTC (History)
2 users (show)

See Also:
Kernel Version: 2.6.13
Subsystem:
Regression: ---
Bisected commit-id:


Attachments

Description Brice MEALIER 2005-09-24 07:18:46 UTC
Most recent kernel where this bug did not occur: kernel 2.6.13
Distribution: debian testing
Hardware Environment: sony vaio pcg-fr215e
Problem Description:


please consider also bugs http://bugzilla.kernel.org/show_bug.cgi?id=4588 and
http://bugzilla.ubuntu.com/show_bug.cgi?id=9857


When I unplug and plug the ACAD, there is no power event related to it:
[brice@TuxBox:~]$ sudo cat /proc/acpi/event
processor CPU0 00000080 00000000
processor CPU0 00000080 00000000
processor CPU0 00000080 00000000
processor CPU0 00000080 00000000
processor CPU0 00000080 00000000

the first 2 lines appear when I unplugg the ACAD, the others when I plug it 
back in.
so the system isn't sending the correct event on AC insertion/removal.


Best regards, Brice
Comment 1 Len Brown 2005-09-28 18:22:53 UTC
*** Bug 5304 has been marked as a duplicate of this bug. ***
Comment 2 Len Brown 2005-09-28 18:30:15 UTC
are you running a CONFIG_PREEMPT=y kernel?
does the patch in bug 4588 make any difference?
Comment 3 Brice MEALIER 2005-09-28 23:43:05 UTC
Hi

yes I use CONFIG_PREEMPT=y and the patch in 4588 did a big difference. It 
solves the battery recognization issue. Concerning the missing power events, I 
always had this problem with or without this patch (in fact I came to know this 
bug because laptop-mode never worked on my system with or without this patch, 
laptop-mode is only able to get the state at boot otherwise any plug/unplug of 
the ACAD doesn
Comment 4 Tarmo T 2005-12-24 10:19:33 UTC
My laptop (Elitegroup G556) I also don't get any AC events, although lid/power
button events work fine. But something seems to work because when I enable
0xFFFFFFFF acpi debug_level and grep for "notify" while plugging/unplugging AC,
I see this:
osl-0890 [0007] [131] os_signal_semaphore   : ----Exit- AE_OK
utmutex-0350 [0007] [130] ut_release_mutex      : Thread 7 released Mutex
[ACPI_MTX_Execute]
exutils-0133 [0007] [130] ex_exit_interpreter   : ----Exit-
nsxfeval-0354 [0007] [129] evaluate_object       : ----Exit- AE_OK
acpi_utils-0287 [0007] [128] evaluate_integer      : Return value [15]
acpi_utils-0289 [0007] [128] evaluate_integer      : ----Exit- AE_OK
acpi_bus-0120 [0007] [127] bus_get_status        : Device [ADP0] status [0000000f]
acpi_bus-0122 [0007] [127] bus_get_status        : ----Exit- 0000000000000000
acpi_bus-0406 [0007] [126] bus_check_device      : ----Exit- 0000000000000000
acpi_bus-0441 [0007] [125] bus_check_scope       : ----Exit- 0000000000000000
acpi_bus-0539 [0007] [124] bus_notify            : ----Exit-
utstate-0329 [0007] [124] ut_delete_generic_stat: ----Entry
utstate-0332 [0007] [124] ut_delete_generic_stat: ----Exit-
osl-0635 [0007] [123] os_execute_deferred   : ----Exit-

**** Context Switch from TID 7 to TID 0 ****

hwregs-0265 [0000] [123] get_register          : ----Entry
hwregs-0495 [0000] [124] hw_register_read      : ----Entry
hwregs-0778 [0000] [124] hw_low_level_read     : Read:  00000010 width 16 from
0000000000000400 (SystemIO)
hwregs-0587 [0000] [124] hw_register_read      : ----Exit- AE_OK



Obviously some notify event is registered, but no function inside ac module
seems to be called in response.
Comment 5 Vladimir Lebedev 2006-01-11 01:01:51 UTC
Please try this patch:
http://bugzilla.kernel.org/attachment.cgi?id=6886&action=view
This patch is implemented for both ac and battery notification issues.
Comment 6 Tarmo T 2006-01-11 01:30:11 UTC
This patch seems to fix the issues, before it, none of these events worked:

Removing the battery:
ac_adapter ADP0 00000000 00000001
battery BAT0 00000001 00000000
ac_adapter ADP0 00000000 00000001

Putting the battery back:
battery BAT0 00000000 00000001
ac_adapter ADP0 00000000 00000001

Removing AC:
ac_adapter ADP0 00000000 00000000

Putting AC back:
ac_adapter ADP0 00000000 00000001
Comment 7 Vladimir Lebedev 2006-01-11 02:21:16 UTC
OK, I am waiting an additional info from others.
Comment 8 Brice MEALIER 2006-01-16 12:57:10 UTC
The patch works for the events but I get the events twice or more, i.e. (initial
situation: adapter and battery plugged in):

Bat out:

processor CPU0 00000080 00000000
battery BAT1 00000000 00000000
battery BAT1 00000081 00000000
battery BAT1 00000080 00000000
ac_adapter ACAD 00000000 00000001


Bat in:
processor CPU0 00000080 00000000
battery BAT1 00000000 00000001
battery BAT1 00000081 00000001
battery BAT1 00000080 00000001
ac_adapter ACAD 00000000 00000001
processor CPU0 00000080 00000000
ac_adapter ACAD 00000000 00000001


Ac out:
processor CPU0 00000080 00000000
ac_adapter ACAD 00000000 00000000
ac_adapter ACAD 00000000 00000000


Ac in:
processor CPU0 00000080 00000000
processor CPU0 00000080 00000000
ac_adapter ACAD 00000000 00000001
processor CPU0 00000080 00000000
ac_adapter ACAD 00000000 00000001



However, the patch didn't solve the battery recognization issue at boot, only
the patch given in 4588 solved this but was not incorporated in the kernel (I
use 2.6.15 vanilla plus your patch).

Best regards, Brice
Comment 9 Vladimir Lebedev 2006-01-18 08:27:24 UTC
> The patch works for the events but I get the events twice or more, i.e.
(initial situation: adapter and battery plugged in):

These notification events are coded in your DSDT.
So, the main question is: does this patch work for whole system?
Comment 10 Len Brown 2006-07-05 17:35:58 UTC
http://bugzilla.kernel.org/attachment.cgi?id=6886&action=view
is in bug #3241 so i'm closing this as a duplicate.
Comment 11 Len Brown 2006-07-05 17:36:35 UTC

*** This bug has been marked as a duplicate of 3241 ***

Note You need to log in before you can comment on or make changes to this bug.