GNOME Bugzilla – Bug 566831
[PATCH] g-p-m doesn't notice new charge if done while hibernated
Last modified: 2009-03-04 15:23:59 UTC
Here's the sequence of events: 1) Drain battery until g-p-m hibernates for you 2) While laptop is off, plug it in, giving it some juice (maybe for about 5 mins) 3) Unplug laptop 4) Turn it back on 5) Let it drain again, note g-p-m never re-hibernates Looking at logs, it seems that g-p-m thinks it already warned the user about critical battery level and so never issues the warning or triggers the system action again. Looking at the code, this seems to be because while g-p-m resets the warning state when it notices the AC being plugged or unplugged, it never notices a new AC level. I'm attaching a patch that seems to fix it for me. But it involves doing something (resetting the state for any warning level change) that has previously explicitly not been done (explicitly mentioned via comments). Why is resetting the state there bad? (i.e. Comments on the patch?)
Created attachment 125884 [details] [review] Proposed patch
This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report.