Re: [Hampshire] Linux battery level applets

Top Page

Reply to this message
Author: Vic
Date:  
To: hampshire
Subject: Re: [Hampshire] Linux battery level applets
> I have an old Compaq Evo N160 laptop.

Aha. I've got one of those too.

> When I installed Ubuntu with Gnome
> I found that the battery applet failed to provide a figure for the
> battery charge and only ever shows 0%.


My advice: get used to it. It is fixable - but you probably don't want to...

> I can't imagine that these are doing anything other than simply
> reporting the information provided by another utility, or reading
> something from /proc, but I can't for the life of me find any
> information on how to configure them, or what files are used. Does
> anyone have any good pointers?


The info is coming out of /proc/acpi/battery. If you look in there, you'll
find that the current state of charge is known - but the "full" capacity
of the battery is not. This is why the Gnome applet shows nothing - it
can't work it out. I don't know how the KDE app decides; I didn't look
through that code.

The core problem is in the DSDT, which tells the system how to navigate
the ACPI system; a number of PCs (particularly Compaqs, apparently) used a
buggy compiler to generate this table, and as a result, ACPI is not fully
functional if you use a standards-compliant parser on the DSDT (see if you
can guess who wrote the compiler in question...).

Now it is my belief that this is a bug in Linux - these faulty tables are
in the wild, we should support them. But I doubt there's much momentum to
do so. So you're left with two options :-

- ignore the problem
- force the use of a different DSDT.

The latter option requires a patch to the kernel to read the DSDT from
disk - so you have to roll your own kernels every time your distro
releases, and you can't easily transport your system image between boxen
(e.g. when you upgrade). So I plumped for the first option - ignore the
problem. Run a terminal & use cat to find out how much juice is left...

Vic.