Bug 5643 - ac power plug stop any acpi events
Summary: ac power plug stop any acpi events
Status: CLOSED PATCH_ALREADY_AVAILABLE
Alias: None
Product: ACPI
Classification: Unclassified
Component: Power-Other (show other bugs)
Hardware: i386 Linux
: P2 normal
Assignee: Vladimir Lebedev
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-11-23 05:55 UTC by Egon Pavlica
Modified: 2006-07-29 19:54 UTC (History)
0 users

See Also:
Kernel Version: 2.6.14-suspend2-r1
Subsystem:
Regression: ---
Bisected commit-id:


Attachments
dmesg (15.06 KB, text/plain)
2005-11-23 06:02 UTC, Egon Pavlica
Details
DSDT asl file (90.50 KB, text/plain)
2005-11-23 06:05 UTC, Egon Pavlica
Details

Description Egon Pavlica 2005-11-23 05:55:26 UTC
Most recent kernel where this bug did not occur: not found any 
Distribution: gentoo 
Hardware Environment:Pentium 4HT,Clevo D41EV SIS648FX chipset,ATI Mobility 9700
Software Environment:gcc 3.4.4-r1, glibc 2.3.5-r3
Problem Description:when i plug in the ac adapter i get no acpi event any more. 
i have pentium4 HT processor and i have tried with SMP
disabled. i have tried with preempt disabled,
i tried with CONFIG_ACPI_DEBUG=y  and
echo "0xFFFFFFFF" > /proc/acpi/debug_level and
echo "0xFFFFFFFF" > /proc/acpi/debug_layer,
but i get no response when i plug in ac adapter.
When i change the state (plugin or plugout) of the ac adapter for the first time
the counter in /proc/interrupts  
11:         12   IO-APIC-level  acpi
             ^ is increased by one, and then there is no increase anymore, no
               power buttons, lid, sleep.
i am getting events for power button and lid button before
i plug in ac adapter, so i think there is something wrong with ACPI.

i found something similar only there is no report that there is
no events after plugin of ac adapter.
(see: http://bugzilla.kernel.org/show_bug_cgi?id=2487)

then i have tried to debug DSDT.
i found and corrected two errors, the same as reported here:
http://amd.store20.com/laptop/clevo_400.php
recompiled kernel with custom DSDT tables
With no success.


Steps to reproduce:reset notebook, plug in or out ac-adapter
Comment 1 Egon Pavlica 2005-11-23 06:02:35 UTC
Created attachment 6664 [details]
dmesg
Comment 2 Egon Pavlica 2005-11-23 06:05:28 UTC
Created attachment 6665 [details]
DSDT asl file

This file is already corrected. So it compile without any errors or warnings.
See main comment about which error were found in original version.
Comment 3 Egon Pavlica 2005-12-16 06:14:50 UTC
progress with gentoo kernel 2.6.14-suspend2-r7. now i receive all events,
including battery, ac adapter plugin, until i UNPLUG the ac-adapter. I get no
event for the unplug of ac-adapter. Moreover After i unplug the ac-adapter the
IO-APIC-level  number in /proc/interrupts stop to increase.
Comment 4 Egon Pavlica 2005-12-16 08:00:13 UTC
i finally got it working. i used  <a
href='http://bugzilla.kernel.org/attachment.cgi?id=6748&action=view'>patch</a>proposed
for bug <a href='http://bugzilla.kernel.org/show_bug.cgi?id=5362'>#5362</a>:
the key to this solution i think is the added two lines
in drivers/acpi/ac.c:

@@ -246,8 +250,8 @@
 	
 	status = acpi_install_notify_handler(ac->handle,
-					     ACPI_DEVICE_NOTIFY, acpi_ac_notify,
-					     ac);
+					     ACPI_DEVICE_NOTIFY | ACPI_SYSTEM_NOTIFY,
+					     acpi_ac_notify, ac);

i get now this into kern.log:
Dec 16 16:59:30 localhost kernel: ACPI XXX acpi_battery_notify: event 0x80
Dec 16 16:59:30 localhost kernel: ACPI XXX acpi_ac_notify: event 0x80
the event is 0x80 as it should be (?correct me if i am wrong)
Comment 5 Vladimir Lebedev 2006-06-30 15:01:02 UTC
You marked status as NEEDINFO, so the engineers ignored this bug a long time. 
Patch from 5362 is a debug patch. Please look into the bug 3241.

Do you have any problems with ac adapter or bug can be closed?
Comment 6 Vladimir Lebedev 2006-07-29 19:54:31 UTC
No response from bug submitter, please reopen if problem persists. 

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