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.
Created attachment 14790 [details] kernel config file
Created attachment 14791 [details] dmesg
Created attachment 14792 [details] hardware list from lshw
UPDATE:
UPDATE: In 2.6.24.2 the special Fn keys aren't working as well.
To make things worse, the laptop doesn't power off (although it used to work).
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.
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 :)
Created attachment 14920 [details] dmesg and acpidump outputs dmesg and acpidump outputs for 2.6.23, 2.6.24, 2.6.25-rc2
The hibernation problems seem to be related with my distro, so please ignore them.
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.
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.
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.
Created attachment 14950 [details] dmesg after the patching
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.
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
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.
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.
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.
Created attachment 15063 [details] dmesg
this seems to be a duplicate of bug #10511 and but #10478. waldemar, will you please confirm it?
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.
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. :)
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!