reported by Seblu(seblu@seblu.net) in the maillist, http://marc.info/?l=linux-acpi&m=128855015826728&w=2 When starting up my laptop my AC adapter dectection was not done correctly in sysfs, but correclty via procfs. At first sight this was weird because acpitool calls ask my power adapter is online, but my kde power manager dected adapter off-line. $acpitool Battery #1 : charged, 100.0%, 00:00:00 AC adapter : on-line Thermal info : <not available> acpitool bring informations from /proc fs $ cat /proc/acpi/ac_adapter/AC/state state: on-line So my system see correctly AC plugging state, so why kde not? After some tracing, it seems that : kde power manager use powerdevi, which use solid, which use hal, which use sysfs. $ lshal -u /org/freedesktop/Hal/devices/computer_power_supply_ac_adapter_AC udi = '/org/freedesktop/Hal/devices/computer_power_supply_ac_adapter_AC' ac_adapter.present = false (bool) info.capabilities = {'ac_adapter'} (string list) info.category = 'ac_adapter' (string) info.parent = '/org/freedesktop/Hal/devices/computer' (string) info.product = 'Generic AC Adapter Device' (string) info.subsystem = 'power_supply' (string) info.udi = '/org/freedesktop/Hal/devices/computer_power_supply_ac_adapter_AC' (string) linux.hotplug_type = 2 (0x2) (int) linux.subsystem = 'power_supply' (string) linux.sysfs_path = '/sys/devices/LNXSYSTM:00/device:00/ACPI0003:00/power_supply/AC' (string) Got it, hal says adapter is offline... cat /sys/devices/LNXSYSTM:00/device:00/ACPI0003:00/power_supply/AC/online 255 watching dmesg show error about acpi ac adapter reading... (in pj) The most strange for me, is, if i call acpitool or cat /proc/acpi/ac_adapter/AC/state, value in /sys/devices/LNXSYSTM:00/device:00/ACPI0003:00/power_supply/AC/online the answer goes right become 1. And so everything become ok. if i unplug and plug again the power cord, online state is reported correctly. This issue is only when the pc start with power cord plugged. I believe, issue come from a race condition, because if in my init script i access to /proc acpi file, and after hal start, status is reported correctly. My current workaround is to load ac module in initrd, because, distro startup run udevadm trigger after and when it's done before, behaviour was like i said before. my test was done on a dell laptop e6410 under linux-next-2010-10-29 and 2.6.35.8. (2.6.36 has big drm-intel regression on my laptop and become unusable). $uname -a Linux rwolf 2.6.36-next-20101029 #1 SMP PREEMPT Sun Oct 31 17:34:37 CET 2010 x86_64 Intel(R) Core(TM) i7 CPU M 620 @ 2.67GHz GenuineIntel GNU/Linux
Created attachment 35802 [details] dmesg output, with ACPI errors when evaluating _PSR
Created attachment 35812 [details] patch: update the AC status when querying from sysfs this patch "fix" the problem for seblu. But I don't think we get the root cause yet.
Patch in comment #2 shipped in acpi test tree.
commit 3151dbb04ad5a5bd6358371c0bfb457216d00205 Author: Zhang Rui <rui.zhang@intel.com> Date: Wed Dec 8 10:40:45 2010 +0800 ACPI ac: update AC status upon sysfs query shipped in 2.6.37-rc6 closed
*** Bug 26092 has been marked as a duplicate of this bug. ***