[Bug 682173] New: HAL does not update the AC adapter state
https://bugzilla.novell.com/show_bug.cgi?id=682173 https://bugzilla.novell.com/show_bug.cgi?id=682173#c0 Summary: HAL does not update the AC adapter state Classification: openSUSE Product: openSUSE 11.4 Version: Final Platform: x86 OS/Version: openSUSE 11.4 Status: NEW Severity: Major Priority: P5 - None Component: Basesystem AssignedTo: bnc-team-screening@forge.provo.novell.com ReportedBy: lashkevi@landau.ac.ru QAContact: qa@suse.de Found By: --- Blocker: --- Created an attachment (id=421061) --> (http://bugzilla.novell.com/attachment.cgi?id=421061) A workaround of the bug User-Agent: Mozilla/5.0 (X11; Linux i686; rv:2.0b12) Gecko/20110222 Firefox/4.0b12 The HAL does not update the AC adapter state leading to no reaction to plugging/unplugging the AC adapter, though the contents of the files "/proc/acpi/ac_adapter/ADP0/state" and "/sys/class/power_supply/ADP0" changes properly. As a workaround I start the attached script, which check the adapter state every 3 seconds and update the HAL variables, in the "boot.local" file. My computer: Toshiba Satellite L300-11E. The bug started from OpenSUSE 10.3 and still persistent in 11.4. By the way, I use KDE 3.5, though it has nothing to do with PowerDevil etc. It indeed the HAL problem, which is checked by means of "lshal". Reproducible: Always Steps to Reproduce: 1. Turn on the computer with battery inserted. 2. Plug/Unplug the AC connector and see that neither the active scheme nor the adapter state information changes. 3. Check the contents of the files "/proc/acpi/ac_adapter/ADP0/state" and "/sys/class/power_supply/ADP0" and make sure that they are updated properly. 4. Check the "udi = '/org/freedesktop/Hal/devices/computer_power_supply_ac_adapter_ADP0'" by means of "lshal" and make sure that the value of the variable " ac_adapter.present" does not change. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=682173 https://bugzilla.novell.com/show_bug.cgi?id=682173#c1 Michael Chang <mchang@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mchang@novell.com --- Comment #1 from Michael Chang <mchang@novell.com> 2011-03-28 09:48:19 UTC --- Hi Michael, I used to bumped to this issue before. Do you see any output from "acpi_listen" while plug/unplug AC adapter? If no it was due to problematic BIOS implementation indeed. If yes, check with the "lshal -m" again, it should log messages to reflect the change of AC adapter status as well. Thanks. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=682173 https://bugzilla.novell.com/show_bug.cgi?id=682173#c2 --- Comment #2 from Michael Chang <mchang@novell.com> 2011-03-28 10:14:25 UTC --- Also have a try for : $ watch -n 1 cat /sys/firmware/acpi/interrupts/gpe?? At lease a counter should increase for AC plug/unplug. This indicates that BIOS delivered SCI event to notice OSPM about certain status changed. Thanks. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=682173 https://bugzilla.novell.com/show_bug.cgi?id=682173#c3 --- Comment #3 from Michael Lashkevich <lashkevi@landau.ac.ru> 2011-03-28 15:28:00 UTC --- (In reply to comment #1 and #2) Neither "acpi_listen" nor "watch -n 1 cat /sys/firmware/acpi/interrupts/gpe??" shows any reaction to plugging/unplugging AC adapter or to changes of the battery charge level. The commands "watch -n 1 /sys/class/power_supply/ADP0/online" or "watch -n 1 cat /proc/acpi/ac_adapter/ADP0/state" can only be used to catch plugging/unplugging. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=682173 https://bugzilla.novell.com/show_bug.cgi?id=682173#c4 --- Comment #4 from Michael Chang <mchang@novell.com> 2011-03-29 04:39:48 UTC --- (In reply to comment #3)
(In reply to comment #1 and #2) Neither "acpi_listen" nor "watch -n 1 cat /sys/firmware/acpi/interrupts/gpe??" shows any reaction to plugging/unplugging AC adapter or to changes of the battery charge level.
I would conclude this as BIOS problem for now. HAL monitors on ACPI event, which never be triggered in this case, to refresh the state . In general, BIOS/EC accounts for generating such events. Some buggy BIOS implementation will emit scan code rather than ACPI event to notify OS. You can try to observe this in console by . $ showkey -s And see is there any scancode emitted when plug/unplug AC adapter. In this case You can try binding your script to this keycode to process the event . It may be helpful to avoid polling ... IMHO HAL has nothing to do with this problem but a victim for it. The BIOS has to be fixed first to solve this problem.
The commands "watch -n 1 /sys/class/power_supply/ADP0/online" or "watch -n 1 cat /proc/acpi/ac_adapter/ADP0/state" can only be used to catch plugging/unplugging.
I think your script is ideal to get around this problem by way of this fact. :) -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=682173 https://bugzilla.novell.com/show_bug.cgi?id=682173#c5 --- Comment #5 from Michael Lashkevich <lashkevi@landau.ac.ru> 2011-03-30 17:57:59 UTC --- Maybe something is wrong with acpid or with the kernel acpi support? Is it possible to check this? -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=682173 https://bugzilla.novell.com/show_bug.cgi?id=682173#c6 Joey Lee <jlee@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jlee@novell.com --- Comment #6 from Joey Lee <jlee@novell.com> 2011-04-22 07:32:55 UTC --- (In reply to comment #5)
Maybe something is wrong with acpid or with the kernel acpi support? Is it possible to check this?
If you didn't see acpi gpe, that means BIOS didn't trigger any interrupt to acpi when your unplug ac adapter. Could you please attached dmesg: dmseg > dmesg.log and DSDT? acpidump > acpidump.dat Please attached dmesg.log and acpidump.dat on this bug. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=682173 https://bugzilla.novell.com/show_bug.cgi?id=682173#c7 --- Comment #7 from Michael Lashkevich <lashkevi@landau.ac.ru> 2011-04-22 10:36:10 UTC --- Created an attachment (id=426235) --> (http://bugzilla.novell.com/attachment.cgi?id=426235) dmesg dump -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=682173 https://bugzilla.novell.com/show_bug.cgi?id=682173#c8 --- Comment #8 from Michael Lashkevich <lashkevi@landau.ac.ru> 2011-04-22 10:36:58 UTC --- Created an attachment (id=426236) --> (http://bugzilla.novell.com/attachment.cgi?id=426236) acpi dump -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=682173 https://bugzilla.novell.com/show_bug.cgi?id=682173#c9 Joey Lee <jlee@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |NEEDINFO InfoProvider| |lashkevi@landau.ac.ru Severity|Major |Critical --- Comment #9 from Joey Lee <jlee@novell.com> 2011-06-17 09:50:21 UTC --- Hi Michael, Your dmesg have too many information by S4 resume, I need a dmesg after you: + reboot system + please run the following statement by root: echo 0xFFFFFFFF >/sys/module/acpi/parameters/debug_layer; echo 0xF
/sys/module/acpi/parameters/debug_level
+ manually plug, unplug ac-adapter Please attached dmesg again. On the other hand: After traced your DSDT, EC must emit _Q13 or _Q19 event to OSPM when you unplug ac adapter, and those _Q method must notify ADP0 device. Please help to follow the above 3 steps, then attached dmesg. Thank's -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=682173 https://bugzilla.novell.com/show_bug.cgi?id=682173#c10 --- Comment #10 from Michael Lashkevich <lashkevi@landau.ac.ru> 2011-06-17 22:00:59 UTC --- Created an attachment (id=435204) --> (http://bugzilla.novell.com/attachment.cgi?id=435204) dmesg dump Here is the dmesg dump after the steps you asked to perform. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=682173 https://bugzilla.novell.com/show_bug.cgi?id=682173#c11 --- Comment #11 from Joey Lee <jlee@novell.com> 2011-06-20 09:53:58 UTC --- Per your dmesg, EC didn't emit Q event on your machine, so OSPM didn't execute _Q13 or _Q19 for notify ADP0 device (AC adapter): Method (_Q13, 0, NotSerialized) /* AC unplug? */ { Notify (ADP0, Zero) /* ACPI_NOTIFY_BUS_CHECK 0x00 */ Notify (BAT0, 0x80) Notify (BAT0, 0x81) /* ACPI_BATTERY_NOTIFY_INFO 0x81 */ } Method (_Q14, 0, NotSerialized) { Notify (LID, 0x80) } Method (_Q19, 0, NotSerialized) /* AC unplug? */ { Notify (ADP0, Zero) /* ACPI_NOTIFY_BUS_CHECK 0x00 */ Notify (BAT0, 0x80) Notify (BAT0, 0x81) /* ACPI_BATTERY_NOTIFY_INFO 0x81 */ } I have no idea why EC firmware didn't emit Q event. Did you remember the ac-adapter unplug/plug event on your machine works on Windows or any other Linux platform? -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=682173 https://bugzilla.novell.com/show_bug.cgi?id=682173#c12 zj jia <zjjia@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEEDINFO |CLOSED CC| |zjjia@novell.com InfoProvider|lashkevi@landau.ac.ru | Resolution| |NORESPONSE --- Comment #12 from zj jia <zjjia@novell.com> 2011-07-15 03:09:05 UTC --- Long time no response,so closed.Feel free to reopen it.Thanks. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=682173 https://bugzilla.novell.com/show_bug.cgi?id=682173#c13 --- Comment #13 from Michael Lashkevich <lashkevi@landau.ac.ru> 2011-07-15 08:05:25 UTC --- (In reply to comment #11)
Per your dmesg, EC didn't emit Q event on your machine, so OSPM didn't execute Did you remember the ac-adapter unplug/plug event on your machine works on Windows or any other Linux platform? It seems to me that it worked on OpenSUSE 10.2 before some update of HAL.
-- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=682173 https://bugzilla.novell.com/show_bug.cgi?id=682173#c14 Joey Lee <jlee@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|CLOSED |REOPENED Resolution|NORESPONSE | --- Comment #14 from Joey Lee <jlee@novell.com> 2011-07-15 09:48:08 UTC --- (In reply to comment #13)
(In reply to comment #11)
Per your dmesg, EC didn't emit Q event on your machine, so OSPM didn't execute Did you remember the ac-adapter unplug/plug event on your machine works on Windows or any other Linux platform? It seems to me that it worked on OpenSUSE 10.2 before some update of HAL.
That's strange, per your dmesg message, BIOS didn't emit notify event to OSPM, there will not have any event to drive userland update AC adapter status. It must be have some polling mechanism to query the AC status like your script. I know maybe it's not easy... Does it possible you help to use openSUSE 10.2 to confirm? Follow the Comment #9, dump the dmesg log on openSUSE 10.2? I will also try to check the HAL changed in RPM log. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=682173 https://bugzilla.novell.com/show_bug.cgi?id=682173#c Joey Lee <jlee@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|REOPENED |NEEDINFO InfoProvider| |lashkevi@landau.ac.ru -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=682173 https://bugzilla.novell.com/show_bug.cgi?id=682173#c15 --- Comment #15 from Joey Lee <jlee@novell.com> 2011-07-18 02:54:45 UTC --- Did not see openSUSE 10.2 and 10.3 HAL packages on OBS, where can I find them? -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=682173 https://bugzilla.novell.com/show_bug.cgi?id=682173#c16 zj jia <zjjia@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEEDINFO |CLOSED InfoProvider|lashkevi@landau.ac.ru | Resolution| |NORESPONSE --- Comment #16 from zj jia <zjjia@novell.com> 2011-08-16 06:06:00 UTC --- Long time no response,so closed.Feel free to reopen it.Thanks. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
participants (1)
-
bugzilla_noreply@novell.com