Bug 9945 - No AC-adapter-specific events + no events when opening lid - Sony VGN-N130G
Summary: No AC-adapter-specific events + no events when opening lid - Sony VGN-N130G
Status: CLOSED PATCH_ALREADY_AVAILABLE
Alias: None
Product: ACPI
Classification: Unclassified
Component: Config-Interrupts (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: acpi_other
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-02-12 16:03 UTC by Waldemar Szostak
Modified: 2008-05-12 09:55 UTC (History)
2 users (show)

See Also:
Kernel Version: 2.6.25-rc2
Subsystem:
Regression: ---
Bisected commit-id:


Attachments
kernel config file (43.96 KB, text/plain)
2008-02-12 16:08 UTC, Waldemar Szostak
Details
dmesg (23.00 KB, text/plain)
2008-02-12 16:09 UTC, Waldemar Szostak
Details
hardware list from lshw (13.64 KB, application/octet-stream)
2008-02-12 16:11 UTC, Waldemar Szostak
Details
dmesg and acpidump outputs (237.96 KB, application/x-zip-compressed)
2008-02-20 16:20 UTC, Waldemar Szostak
Details
dmesg and event_log after installing the debug patch (3.89 KB, application/x-zip-compressed)
2008-02-21 09:33 UTC, Waldemar Szostak
Details
debug patch (929 bytes, patch)
2008-02-21 22:54 UTC, Zhang Rui
Details | Diff
dmesg after the patching (2.99 KB, application/x-zip-compressed)
2008-02-22 06:46 UTC, Waldemar Szostak
Details
dmesg output (25.37 KB, text/plain)
2008-02-25 22:35 UTC, Waldemar Szostak
Details
with modified debug settings (68 bytes, application/octet-stream)
2008-02-28 01:32 UTC, Waldemar Szostak
Details
dmesg (1.34 KB, application/octet-stream)
2008-02-28 09:27 UTC, Waldemar Szostak
Details

Description Waldemar Szostak 2008-02-12 16:03:15 UTC
Hardware Environment: Sony VGN-N130G

Problem Description:
1. When unplugging the AC adapter cable there is no AC event generated; instead there is one BAT event, CPU0 and CPU1 events and further BAT events (appearing periodically).
When re-plugging the cable, the same events are fired.
I can read the current status from /proc/acpi/ac_adapter/ADP1/state correctly.

2. When closing the laptop lid, there is a LID event, but it's missing when the lid is re-opened.
In this case I'm again able to read the right current status from /proc/acpi/button/lid/LID0/state .

I receive right events related with the battery, power button, or special (Fn) keys. I have the latest BIOS installed, and here's the ACPI section from my config file:

#
# Power management options
#
CONFIG_PM=y
# CONFIG_PM_LEGACY is not set
# CONFIG_PM_DEBUG is not set
CONFIG_PM_SLEEP_SMP=y
CONFIG_PM_SLEEP=y
CONFIG_SUSPEND_SMP_POSSIBLE=y
CONFIG_SUSPEND=y
CONFIG_HIBERNATION_SMP_POSSIBLE=y
CONFIG_HIBERNATION=y
CONFIG_PM_STD_PARTITION="/dev/sda6"
CONFIG_ACPI=y
CONFIG_ACPI_SLEEP=y
CONFIG_ACPI_PROCFS=y
CONFIG_ACPI_PROCFS_POWER=y
CONFIG_ACPI_SYSFS_POWER=y
CONFIG_ACPI_PROC_EVENT=y
CONFIG_ACPI_AC=y
CONFIG_ACPI_BATTERY=y
CONFIG_ACPI_BUTTON=y
# CONFIG_ACPI_FAN is not set
# CONFIG_ACPI_DOCK is not set
CONFIG_ACPI_PROCESSOR=y
CONFIG_ACPI_HOTPLUG_CPU=y
CONFIG_ACPI_THERMAL=y
# CONFIG_ACPI_ASUS is not set
# CONFIG_ACPI_TOSHIBA is not set
CONFIG_ACPI_BLACKLIST_YEAR=2001
CONFIG_ACPI_DEBUG=y
CONFIG_ACPI_DEBUG_FUNC_TRACE=y
CONFIG_ACPI_EC=y
CONFIG_ACPI_POWER=y
CONFIG_ACPI_SYSTEM=y
CONFIG_X86_PM_TIMER=y
CONFIG_ACPI_CONTAINER=y
# CONFIG_ACPI_SBS is not set
# CONFIG_APM is not set


Please tell me of any further information you'd need to help. Thank you.
Comment 1 Waldemar Szostak 2008-02-12 16:08:02 UTC
Created attachment 14790 [details]
kernel config file
Comment 2 Waldemar Szostak 2008-02-12 16:09:35 UTC
Created attachment 14791 [details]
dmesg
Comment 3 Waldemar Szostak 2008-02-12 16:11:01 UTC
Created attachment 14792 [details]
hardware list from lshw
Comment 4 Waldemar Szostak 2008-02-12 18:19:52 UTC
UPDATE: 
Comment 5 Waldemar Szostak 2008-02-12 18:22:37 UTC
UPDATE: In 2.6.24.2 the special Fn keys aren't working as well.
Comment 6 Waldemar Szostak 2008-02-13 11:09:08 UTC
To make things worse, the laptop doesn't power off (although it used to work).
Comment 7 Zhang Rui 2008-02-17 19:59:37 UTC
is this a regression? is there any previous kernel release that your laptop work well with?

please try boot parameter "acpi_apic_instance=2" and see if anything changes.(In reply to comment #0)
> Problem Description:
> 1. When unplugging the AC adapter cable there is no AC event generated;
> instead
> there is one BAT event, CPU0 and CPU1 events and further BAT events
> (appearing
> periodically).
> When re-plugging the cable, the same events are fired.
> I can read the current status from /proc/acpi/ac_adapter/ADP1/state
> correctly.
does this bring you some trouble?

> 2. When closing the laptop lid, there is a LID event, but it's missing when
> the
> lid is re-opened.
> In this case I'm again able to read the right current status from
> /proc/acpi/button/lid/LID0/state .

hmm, so what's the problem?

(In reply to comment #5)
> UPDATE: In 2.6.24.2 the special Fn keys aren't working as well.
For the fn keys and power off problem, they are all regressions in 2.6.24.2, right?
Please open another bug report and attach the dmesg/acpidump output.
Comment 8 Waldemar Szostak 2008-02-20 16:19:31 UTC
In order to answer your questions accurately and order the information I had provided thus far, I decided to compile 2.6.23, 2.6.24 and 2.6.25-rc2 and try them both with and without acpi_apic_instance=2.

The AC events aren't generated on any of the listed kernels. Instead a combinations of battery and processor events are generated. Also the lid events always occur merely when closing the lid (no event at all when opening the lid).

Powering off (halting), CPU frequency scaling, disk/RAM hibernation doesn't work in the most recent version, although all of these did work in 2.6.23 and 2.6.24. However, the RAM hibernation worked only partially (the machine awakes but the display remains off).

As for the Fn keys, they actually are handled ok in 2.6.25-rc2 (I can receive ACPI events for them).

I attached a ZIP with outputs from acpidump and dmesg for 2.6.23, 2.6.24 and 2.6.25-rc2 (and different acpi_apic_instance setting for each of these - the digit at the end of the filename indicates the acpi_apic_instance setting used).

I'm not sure if I should post new separate reports for some of the mentioned problems, so I'd appreciate if somebody could advise me on this :)
Comment 9 Waldemar Szostak 2008-02-20 16:20:59 UTC
Created attachment 14920 [details]
dmesg and acpidump outputs

dmesg and acpidump outputs for 2.6.23, 2.6.24, 2.6.25-rc2
Comment 10 Waldemar Szostak 2008-02-20 19:12:44 UTC
The hibernation problems seem to be related with my distro, so please ignore them.
Comment 11 ykzhao 2008-02-20 23:21:24 UTC
Hi, Waldemar
    Will you try the debug patch in comment #28 of bug 9642 and do the following tests? ( It is noted that the ACPI debug function should be enabled).
   a. echo 0x02290004 > /sys/module/acpi/parameters/debug_layer && echo 0x08000017 >/sys/module/acpi/parameters/debug_level
   b. kill the process who is using the /proc/acpi/event ( the process can be obtained by using "lsof /proc/acpi/event" ).
   c. cat /proc/acpi/event > event_log ( Not press Ctrl+C until the following is done).  
   d. unplug and AC adapter twice; Close and reopen lid  twice.
   
   After it is finished, please attach the output of event_log and dmesg.
   Thanks.
Comment 12 Waldemar Szostak 2008-02-21 09:33:19 UTC
Created attachment 14936 [details]
dmesg and event_log after installing the debug patch

Hello,

Thank you for the quick reply! I installed the patch, enabled CONFIG_ACPI_DEBUG and CONFIG_ACPI_DEBUG_FUNC_TRACE, and the tests.
Comment 13 Zhang Rui 2008-02-21 22:54:03 UTC
Created attachment 14948 [details]
debug patch

there is only invalid notify 0x81 for AC on this laptop.
For the lid problem, it seems to be EC related.
please apply this patch and attach the dmesg output after the same test.
Comment 14 Waldemar Szostak 2008-02-22 06:46:54 UTC
Created attachment 14950 [details]
dmesg after the patching
Comment 15 ykzhao 2008-02-24 19:02:44 UTC
Hi, Waldemar
    Thanks for the info.
    What Rui said in comment #13 is right. There is no 0x80 notify event for AC adapter. So when AC adapter is unplugged/plugged, the method of _Q21/_Q22 will be executed and generate BAT0,CPU event.
    
    The remaing is the lid problem. Maybe it is related to EC. Will you unset CONFIG_SONYPI in kernel configuration and do the following test? (Of course the patch in comment #13 should be applied . The CONFIG_SONY_LAPTOP should be set).
    a. echo 0x00090000 > /sys/module/acpi/parameters/debug_layer && echo
0x00000017 >/sys/module/acpi/parameters/debug_level
   d. Close and reopen lid  twice. 
   
   After it is finished, please attach the full dmesg output.
   Thanks.
Comment 16 Waldemar Szostak 2008-02-25 22:35:20 UTC
Created attachment 14998 [details]
dmesg output

Hello,

> What Rui said in comment #13 is right. There is no 0x80 notify event for AC
> adapter. So when AC adapter is unplugged/plugged, the method of _Q21/_Q22
> will
> be executed and generate BAT0,CPU event.

I'm sorry, but what does it actually mean for a regular user like myself? :) Does it mean that it's impossible to get the AC events on this laptop?


> The remaing is the lid problem. Maybe it is related to EC. Will you unset
> CONFIG_SONYPI in kernel configuration and do the following test? (Of course 
> the patch in comment #13 should be applied . The CONFIG_SONY_LAPTOP should be 
> set).

As the kernel was already configured like this, I only echoed the settings as asked. The dmesg output attached.


Greetings,
W. Szostak
Comment 17 ykzhao 2008-02-27 07:06:57 UTC
Hi, Waldemar
    Thanks for the info.
    Will you please do the following test after the system is booted? (Please use the kernel as described in comment #16).
     a. echo 0x090004 > /sys/module/acpi/parameters/debug_layer && echo
0x0000017 >/sys/module/acpi/parameters/debug_level
   b. kill the process who is using the /proc/acpi/event ( the process can be
obtained by using "lsof /proc/acpi/event" ).
   c. cat /proc/acpi/event > event_log ( Not press Ctrl+C until the following
is done).  
   d. Close and reopen lid  twice.
   
   Please attach the outpuf of demsg and event_log after the test.
   thanks.
Comment 18 Waldemar Szostak 2008-02-28 01:32:47 UTC
Created attachment 15053 [details]
with modified debug settings

Hello,

I think you overlooked my question from comment #16 - could you please answer it now? :)


Greetings.
Comment 19 ykzhao 2008-02-28 06:03:28 UTC
HI, Waldemar
   For you laptop it is impossible to get the AC event. It is very pity. Maybe the problem can be fixed by upgrading BIOS.
   Please attach the output of dmesg.
   Thanks.
Comment 20 Waldemar Szostak 2008-02-28 09:27:01 UTC
Created attachment 15063 [details]
dmesg
Comment 21 Zhang Rui 2008-05-06 00:02:53 UTC
this seems to be a duplicate of bug #10511 and but #10478.
waldemar, will you please confirm it?
Comment 22 Waldemar Szostak 2008-05-06 05:49:10 UTC
Hi Zhang!

(In reply to comment #21)
> this seems to be a duplicate of bug #10511 and but #10478.
> waldemar, will you please confirm it?
> 

Yes, those two do seem to be duplicates.
Comment 23 Zhang Rui 2008-05-11 23:26:21 UTC
the ac event issue can be fixed by the patch here:
http://bugzilla.kernel.org/show_bug.cgi?id=10511#c19
and let's work on the lid event issue at bug #10478.

Please close this bug, or you can re-assign this bug to me so that I can update the bug status in time. :)
Comment 24 Waldemar Szostak 2008-05-12 09:55:07 UTC
I tested the aforementioned patch and it does work for my VGN-N130G under 2.6.26-rc2.

> Please close this bug, or you can re-assign this bug to me so that I can
> update
> the bug status in time. :)
Ok, I'm closing it then ;0

Hope there'll be just as simple fix for the lid problem ;)

Anyway - thanks!

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