Re: Fwd: No ac_adapter events, upower doesn't update ac adapter state - workaround

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 2012-04-03 at 16:45 +0700, Alexander Mezin wrote:
> When I plug/unplug ac adapter, upower doesn't report that it's state
> changed, kde's power manager doesn't switch profiles. If I start with
> ac adapter plugged in and then unplug it, battery indicator shows that
> battery is discharging, but ac adapter is plugged in. Battery state is
> reported correctly. This problem exists in every linux distribution I
> tried for every kernel version from 2.6 to 3.4. Also it seems that
> this bug affects many people (open bugs in kde, upower bugtrackers).
> 
> I found a workaround and I think I must share it. I rebuilt kernel
> with ACPI_PROCFS_POWER=y ("Deprecated power /proc/acpi directories")
> and noticed that if I do "cat /proc/acpi/ac_adapter/AC/state" then
> state of the adapter becomes correct in kde, upower's output, etc.
> 
> I added a file to /etc/acpi/events/ with following contents:
> event=battery
> action=cat /proc/acpi/ac_adapter/AC/state > /dev/null
> 
> After restarting acpid everything works. The only problem is that
> ACPI_PROCFS_POWER is deprecated. I hope this bug will be fixed before
> the option will be removed. And I think this workaround must be
> described somewhere in documentation/FAQ/wiki.

Dear Alexander, 

Thank you for sharing this with us. Could you also add this fix as a
comment on the bugs you're referring to, so that the maintainers may be
made aware of it? A bug on redhat.bugzilla.com against the "kernel"
component would also be good.

-- 
Thanks, 
Regards,
Ankur: "FranciscoD"

http://fedoraproject.org/wiki/User:Ankursinha
http://dodoincfedora.wordpress.com/

Attachment: signature.asc
Description: This is a digitally signed message part

_______________________________________________
laptop mailing list
laptop@xxxxxxxxxxxxxxxxxxxxxxx
https://admin.fedoraproject.org/mailman/listinfo/laptop

[Index of Archives]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux