HomeHome

WMACPI Patches

So, I've done plenty of fiddling with the Thinkpad, but my other laptop is an Inspiron 8500. There'll probably be more patches on the way for this, but if you are running linux on one of these machines, I'd strongly recommend looking at this page, if you haven't seen it already.

Its ACPI functionality is reasonably well-supported by kernel 2.4.22, but unlike the Thinkpad, it doesn't have a nice sensible battery gauge anywhere on the case, so I have to run a dock-app in software. I found WMACPI to be the nearest to what I needed, but, as the README says:

while it will detect and enumerate batteries, the statistics reported are for the first found battery.

With my machine, for some reason, BAT1 is found before BAT0, even though BAT0 is the always-present one while BAT1 is the docking bay option that I don't own. This causes the dock-app to always show the charging info on the absent battery, with no information about the one that's present. So here's a patch, against version 1.3.4, that checks whether a battery is present before increasing batt_count.

wmacpi.diff

Note: It doesn't add proper multi-battery support. It just chooses the first battery that is found to be present. If the docking bay battery is in, it will presumably display the status of that, ignoring the primary battery.


If you have any suggestions for this site, let me know at glyn (at) ox.compsoc.net .