A while back I was having trouble because my power indicator for my laptop running Ubuntu never warned me when the power was about to go off. That was when using Ubuntu 14.04, and to be honest, I can't be sure if the answer provided led to a solution or if the problem just went away on its own. I'm now on Ubuntu 14.10 (Gnome Flashback with Compiz), and the problem has returned, although I can't be sure if it's directly correlated with the upgrade or if it's something else.
The current situation is that when I'm using my power, most of the time the power will shut off abruptly, without warning, and when, as far as I can tell, I should have at least an hour of power remaining, according to the power indicator. Sometimes the battery icon indicator goes red, but in my estimation that only happens about a quarter of the time. I never get any pop up messages, ever.
It could be that my computer is crashing sometimes because of some other issue not related to power, though it seems fairly consistent that when it happens, it's around when the battery has about an hour left. It might be that my my power reading is off, and it thinks I have more power than I do. Or maybe it's just that the power warning settings are simply not doing anything most of the time. Or something else.
In any case, how do I get my power warnings to be consistent about giving me a heads up before my laptop suddenly shuts off right in the middle of when I'm working?
These settings may be relevant:
$ gsettings get org.gnome.settings-daemon.plugins.power percentage-low
10
$ gsettings get org.gnome.settings-daemon.plugins.power percentage-critical
3
$ gsettings get org.gnome.settings-daemon.plugins.power percentage-action
2
$ gsettings get org.gnome.settings-daemon.plugins.power use-time-for-policy
true