guidance-power-manager thinks battery is low way too early

Bug #67081 reported by Duncan Sands
2
Affects Status Importance Assigned to Milestone
kde-guidance (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

When running on battery power, guidance-power-manager warns that the battery is getting
low when it is still 95% charged! Worse, it forces hibernation when the battery still has
plenty of capacity left. Maybe it is confused by the fact that the laptop reports two battery
slots, though only one is physically present, i.e. it is only possible to have one battery
plugged in. klaptop didn't have this problem. I took a snapshot of /proc/acpi after the
guidance-power-manager warning. Here's what was in /proc/acpi/battery:

BAT1

alarm: unsupported

present: yes
design capacity: 4400 mAh
last full capacity: 3211 mAh
battery technology: rechargeable
design voltage: 14800 mV
design capacity warning: 250 mAh
design capacity low: 100 mAh
capacity granularity 1: 10 mAh
capacity granularity 2: 25 mAh
model number: 01ZG
serial number:
battery type: LION
OEM info: SMP

present: yes
capacity state: ok
charging state: discharging
present rate: 0 mA
remaining capacity: 3026 mAh
present voltage: 9280 mV

BAT2

present: no (alarm)

present: no (info)

present: no (state)

Other info:

Acer travelmate 800

lspci:

00:00.0 Host bridge: Intel Corporation 82855PM Processor to I/O Controller (rev 03)
00:01.0 PCI bridge: Intel Corporation 82855PM Processor to AGP Controller (rev 03)
00:1d.0 USB Controller: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) USB UHCI Controller #1 (rev 03)
00:1d.1 USB Controller: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) USB UHCI Controller #2 (rev 03)
00:1d.2 USB Controller: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) USB UHCI Controller #3 (rev 03)
00:1d.7 USB Controller: Intel Corporation 82801DB/DBM (ICH4/ICH4-M) USB2 EHCI Controller (rev 03)
00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev 83)
00:1f.0 ISA bridge: Intel Corporation 82801DBM (ICH4-M) LPC Interface Bridge (rev 03)
00:1f.1 IDE interface: Intel Corporation 82801DBM (ICH4-M) IDE Controller (rev 03)
00:1f.3 SMBus: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) SMBus Controller (rev 03)
00:1f.5 Multimedia audio controller: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) AC'97 Audio Controller (rev 03)
00:1f.6 Modem: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) AC'97 Modem Controller (rev 03)
01:00.0 VGA compatible controller: ATI Technologies Inc Radeon R250 Lf [FireGL 9000] (rev 01)
02:02.0 Ethernet controller: Broadcom Corporation BCM4401 100Base-T (rev 01)
02:04.0 Network controller: Intel Corporation PRO/Wireless LAN 2100 3B Mini PCI Adapter (rev 04)
02:06.0 CardBus bridge: O2 Micro, Inc. OZ711M1/MC1 4-in-1 MemoryCardBus Controller (rev 20)
02:06.1 CardBus bridge: O2 Micro, Inc. OZ711M1/MC1 4-in-1 MemoryCardBus Controller (rev 20)
02:06.2 System peripheral: O2 Micro, Inc. OZ711Mx 4-in-1 MemoryCardBus Accelerator
02:07.0 FireWire (IEEE 1394): Texas Instruments TSB43AB21 IEEE-1394a-2000 Controller (PHY/Link)

Revision history for this message
Luka Renko (lure) wrote :

Can you attach "lshal" output?

powermanager uses reported "remaining time" field for battery actions and it may be that this is wrong on your HW.

Changed in kde-guidance:
status: Unconfirmed → Needs Info
Revision history for this message
Duncan Sands (baldrick-free) wrote : lshal output

Here is the output of lshal. This is at 99% battery charge. A CD was newly inserted, and I notice
that this caused guidance-power-manager to think there were only 8 minutes left (!) and issue a
warning about low power.

Revision history for this message
Luka Renko (lure) wrote :

This seems to be the issue in kernel/acpi/hal which reports strange remaining_time on some cases (in your case even insertion of CD).

> Worse, it forces hibernation when the battery still has
plenty of capacity left.

What is the level at this point in time? Is it below 50%? guidance-power-manager has CHARGE_LEVEL_THRESHOLD at 50%, which should prevent critical action if battery level is above 50%. I think this is a bit high (5-15% might be more appropriate), but I would like to confirm that you were below 50% when this happened (so that we know this threshold works).

Revision history for this message
Luka Renko (lure) wrote :

See bug 60442 for more analysis.

It probably makes sense to fix this for Edgy by changing CHARGE_LEVEL_THRESHOLD to much lower value (5-10%?).

Revision history for this message
Luka Renko (lure) wrote :

Fix to workaround this issue was committed in KDE SVN: r597776

Change CHARGE_LEVEL_THRESHOLD to 10% (was 50%) to better workaround acpi
issue when remaining_time is not reported correctly.
Also use threshold for battery low notification warning (do not issue low
warning if battery level above 10%)

Changed in kde-guidance:
importance: Undecided → Medium
status: Needs Info → Fix Committed
Luka Renko (lure)
Changed in kde-guidance:
status: Fix Committed → Fix Released
Revision history for this message
Duncan Sands (baldrick-free) wrote : Fix seems ok

> What is the level at this point in time? Is it below 50%? guidance-power-manager has
> CHARGE_LEVEL_THRESHOLD at 50%, which should prevent critical action if battery
> level is above 50%. I think this is a bit high (5-15% might be more appropriate), but I
> would like to confirm that you were below 50% when this happened (so that we know this threshold works).

Yes, it seems it was below 50% (i.e. I wasn't able to get it to hibernate when the charge
was more than 50%). Also, I tried the latest package, and it seems much better: even
though the remaining time reported is often clearly bogus, I don't see warnings anymore
with high charge levels. So thanks for fixing this!

By the way, who is responsable for calculating the (bogus) remaining time?

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.