FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.

» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Fedora Laptop

LinkBack Thread Tools
Old 04-03-2012, 09:45 AM
Alexander Mezin
Default Fwd: No ac_adapter events, upower doesn't update ac adapter state - workaround

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:
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.
laptop mailing list

Thread Tools

All times are GMT. The time now is 08:41 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org