# Unpluging power not detected!

## psdasilva

Hi!

I have the following problem:

Summary:

When I unplug the power from my laptop kde battery monitor applet does not detect it.

Symptoms:

1. Unplugging:

    a) Not detected by the monitor;

    b) The monitor shows that battery is discharging;

    c) /proc/acpi/ac_adapter/ACAD/state shows "state: off-line".

2. Restarting kde:

    a) Nothing changes.

3. Rebooting:

    a) Everything seems fine. The kde monitor shows that battery is discharging and that ac is unplugged

4. Plugging the power:

    a) Is imediately detected: Battery charging and ac plugged.

If I unplug I get back to point 1.

History:

I detected this some months ago. However I only use my battery once every 2 months and on anual hollidays.

So I didn't care.

Fortunately, during my last hollydays (september) everything was back to work. No problems at all.

Today, when giving some use to my battery the problem was back again.

No changes to my software/hardware except for the usual upgrades!

Any help?

Thanks a lot.

----------

## waynedpj

ahoy, i have a similar problem with GNOME (i.e. gnome-power-manager 2.30.1) not detecting the battery state when unplugged from the AC when it happens while the computer is sleeping.

  did you ever find a solution?

thanks.

----------

## psdasilva

Still crazy after all these months ...

Does anybody know how to fix this thing?

----------

## waynedpj

 *psdasilva wrote:*   

> Still crazy after all these months ...
> 
> Does anybody know how to fix this thing?

 

i think i have narrowed it down to the kernel i am using:

2.6.33.9-rt31-libre1 (real-time patched and deblobbed version of 2.6.33.9)

when i try newer kernels, including 3.0.3-rt12-r1-libre1, the change in power state is noticed, even when the removal of AC happens while the computer is asleep.  thus, it seems like it is a bug in older kernels around 2.6.3x.

  however, for various other reasons (some apps do not support the newer 3.x kernel series yet), i am still using the older 2.6.33.9-rt31-libre1 and still experiencing the issue with the older kernel.

  give a more recent kernel a try and see if that helps.

peace

----------

## psdasilva

I am using gentoo-sources-3.0.6.

/proc/acpi/ac_adapter/ACAD/state correctly shows the on-line/off-line status.

Only the kde applet seems to not detected AC status. The battery indicator correctly shows its charge %.

Given this, is there any possibility I am missing some kernel configuration option?

Is this a udev problem? How can I check it?

Thanks

----------

## waynedpj

 *psdasilva wrote:*   

> I am using gentoo-sources-3.0.6.
> 
> /proc/acpi/ac_adapter/ACAD/state correctly shows the on-line/off-line status.
> 
> Only the kde applet seems to not detected AC status. The battery indicator correctly shows its charge %.
> ...

 

i am no kernel expert, but i do think that there is a new /sys based configuration system, and a deprecated /proc one, both available as ACPI kernel options.  i think i have the deprecated /proc not enabled, so perhaps there is confusion if the kernel is using /proc (as it seems by your above /proc/acpi line) but the KDE power manager is using the newer /sys, which maybe you do not have enabled?

  you could also try a recent live CD from another distro, and if it works, copy the config settings for the kernel if they are available at runtime (again, a kernel config option).

 *Quote:*   

> Is this a udev problem? How can I check it?
> 
> Thanks

 

hmm, with udev i have no idea.  have you tried another environment like GNOME or XFCE to see if the problem is just limited to the KDE power manager?

peace

----------

