Bug 291099 - powerdevil does not detect whether ac power cord is plugged in or not
Summary: powerdevil does not detect whether ac power cord is plugged in or not
Status: RESOLVED UPSTREAM
Alias: None
Product: solid
Classification: Frameworks and Libraries
Component: powermanagement (show other bugs)
Version: unspecified
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: Dario Freddi
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-09 22:33 UTC by Unknown
Modified: 2012-05-05 13:18 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Unknown 2012-01-09 22:33:09 UTC
Version:           unspecified (using KDE 4.7.4) 
OS:                Linux

When I unplug the ac adapter chord from my laptop, powerdevil does not detect the state change to 'unplugged'. As a result, it does not change the power profile.
However, as soon as I type "acpi -V" in a terminal, it does detect the state change and the power pofile is changed accordingly.




Reproducible: Didn't try

Steps to Reproduce:
1. Boot normally into KDE 4.7.4 with ac power chord plugged in
2. unplug the ac power chord
3. Nothing happens.
4. open a terminal and type "acpi -V"
5. Popup appears saying that the power adapter has been unplugged and power profile is changed.

Same thing reversed:
- plug in the power chord
- nothing happens.
- type acpi -V in a terminal
- no popup appears, but powerdevil does detect the change and changes the power profile.

- 


Expected Results:  
detection of ac power chord plugging / unplugging and changing power profile accordingly.

Linux dv6 3.1.8-1-ARCH #1 SMP PREEMPT Sat Jan 7 08:59:43 CET 2012 x86_64 Intel(R) Core(TM) i7-2670QM CPU @ 2.20GHz GenuineIntel GNU/Linux
KDE 4.7.4

HP Pavilion DV6-6B41ed
Hybrid GPU:  intel/ati  (i915 / radeon), but using i915 mostly.

ac adapter detection works fine on the same hardware in Windows 7, which is installed on a different partition.
Comment 1 Unknown 2012-01-09 22:36:10 UTC
should be reproducible: always. :)
also, this is a clean install of KDE.
Comment 2 Unknown 2012-01-14 15:22:34 UTC
This bug can be solved by starting the acpid daemon. Not sure if this is expected behavior though... ? I thought acpid is not necessary anymore...
Comment 3 Dario Freddi 2012-01-15 01:37:34 UTC
Powerdevil fetches information from UPower, so I'm marking this bug as upstream since the bug might lie there. However, afaik acpid shouldn't be needed by upower, but maybe it initializes something related to ACPI, like loading kernel modules, which aren't initialized by default? I suggest you to check with your distributor, and in case your setup is correct to hear from the upower guys.
Comment 4 Fabian 2012-05-05 13:18:43 UTC
I can confirm this bug my Sony Vaio VGN-CR31S laptop. The plasma applet does not recognize any ac adapter changes during runtime. So it always assumes the state at boot time. This behavior appeared in my first Kubuntu version (I think it was 9.04) and is still present in 12.04 with the latest KDE updates. I've also tried OpenSuse 11.4, but it was the same bug there. 
In older KDE versions I could manually switch power profiles, so the bug was only annoying. Now I can't do that anymore. Start with ac adapter plugged in and then remove it, leads to the situation, that KDE does not warn me about the battery state and the laptop turns off hard, when battery is empty. So for me this bug is really serious!
But it seems to depend on the hardware. I also use a different laptop with OpenSuse and similar software configuration, but there everything works fine. 
The plasma applet shows immediately the correct state for the battery (charging/discharging) but the ac adapter state doesn't change. So there are combinations like: connected and discharging or not connected and charging. Especial the last one should give the software a hint that something is monitored wrong. In /proc/acpi/ac_adapter/ACAD/state the state of the adapter is shown correctly.
Unfortunately the workaround with acpi -V or restarting acpid does not make any effect on my system.
I really would like to give more informations about this bug, but I don't familiar with all the power management infrastructure.