Comment 103 for bug 135548

Revision history for this message
arturj (arturj-freenet) wrote : Re: [Gutsy] Action on critical battery isn't triggered - regression

Using Inrepid I still have the problem on a Thinkpad T43 (g-p-m version is 2.24.0-0ubuntu8). I think the problem is, that g-p-m recalculates remaining time and percentage only if battery changes by 1%. Let me explain this:

- Reading /proc/acpi/battery/BAT0/state my Thinkpad T43 battery discharges very regulary (10-40 mWh / sec steps) until it reaches the alarm-capacity of 2206mWh (/proc/acpi/battery/BAT0/alarm) - from no on the state doesn't change anymore for some time and remains at about 1800 mWh. This represents about 4% remaining capacity (shown by left-click on g-p-m applet).

- Now g-p-m only recalculates if battery changes by 1% no recalculation happens for that time. As 4% is calculated to 10-15 minutes remaining time no automatic shutdown is triggered, no matter if use_time_for_policy is true or false, as both thresholds are much lower (2% or 120 seconds).

- Near complete crash of the system the battery state begins to change again, but drops from 1800 mWh to near ZERO. The remaining time is not enough to let g-p-m trigger anything and the system crashes.

Suggestions: raise all thresholds or change the way g-p-m is polling or beeing notified about battery state changes.