[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
https://bugzilla.novell.com/show_bug.cgi?id=682173
https://bugzilla.novell.com/show_bug.cgi?id=682173#c2
--- Comment #2 from Michael Chang
https://bugzilla.novell.com/show_bug.cgi?id=682173
https://bugzilla.novell.com/show_bug.cgi?id=682173#c3
--- Comment #3 from Michael Lashkevich
https://bugzilla.novell.com/show_bug.cgi?id=682173
https://bugzilla.novell.com/show_bug.cgi?id=682173#c4
--- Comment #4 from Michael Chang
(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
https://bugzilla.novell.com/show_bug.cgi?id=682173
https://bugzilla.novell.com/show_bug.cgi?id=682173#c6
Joey Lee
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
https://bugzilla.novell.com/show_bug.cgi?id=682173
https://bugzilla.novell.com/show_bug.cgi?id=682173#c8
--- Comment #8 from Michael Lashkevich
https://bugzilla.novell.com/show_bug.cgi?id=682173
https://bugzilla.novell.com/show_bug.cgi?id=682173#c9
Joey Lee
/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
https://bugzilla.novell.com/show_bug.cgi?id=682173
https://bugzilla.novell.com/show_bug.cgi?id=682173#c11
--- Comment #11 from Joey Lee
https://bugzilla.novell.com/show_bug.cgi?id=682173
https://bugzilla.novell.com/show_bug.cgi?id=682173#c12
zj jia
https://bugzilla.novell.com/show_bug.cgi?id=682173
https://bugzilla.novell.com/show_bug.cgi?id=682173#c13
--- Comment #13 from Michael Lashkevich
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
(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
https://bugzilla.novell.com/show_bug.cgi?id=682173
https://bugzilla.novell.com/show_bug.cgi?id=682173#c15
--- Comment #15 from Joey Lee
https://bugzilla.novell.com/show_bug.cgi?id=682173
https://bugzilla.novell.com/show_bug.cgi?id=682173#c16
zj jia
participants (1)
-
bugzilla_noreply@novell.com