Sign up ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

I was looking at my power statistics and noticed three different colors are used: green, blue and red. What do they mean?

Power Statistics

share|improve this question

3 Answers 3

up vote 2 down vote accepted

I looked through the source code for the GNOME Power Manager which provides the Power Statistics tool. There seem to be no other documents which explain the colors.

In the answer I point to the lines of code which support the statements I make instead of pasting the code here. See the gpm-statistics.c file for the lines of code I speak of. The file can be found in the gnome-power-manager-3.16.0.tar.xz archive. At most places that I mention a color I also mention the RGB values for the color in parenthesis. The code specifies the RGB values in that order too (line 822) as opposed to BGR or some other order.

The source (lines 907-919) revealed that there are more than just the three colors of Red (255,0,0), Green (0,255,0) and Blue (0,0,255). The code makes use of two other shades of Red and Blue, these colors being RedOther (200,0,0) and BlueOther (0,0,200) and a White (255,255,255) as well, although the White shows up only when you pick the "Rate" Graph Type (lines 915-916).

The colors correspond to one of seven states (lines 352-380). These states are:

  • UP_DEVICE_STATE_CHARGING which is "Charging"
  • UP_DEVICE_STATE_DISCHARGING which is "Discharging"
  • UP_DEVICE_STATE_EMPTY which is "Empty"
  • UP_DEVICE_STATE_FULLY_CHARGED which is "Charged"
  • UP_DEVICE_STATE_PENDING_CHARGE which is "Waiting to charge"
  • UP_DEVICE_STATE_PENDING_DISCHARGE which is "Waiting to discharge"
  • UP_DEVICE_STATE_UNKNOWN which is "Unknown"

The states are assigned colors as (lines 900-919):

  • "Charging" is Red (255,0,0)
  • "Discharging" is Blue (0,0,255)
  • "Waiting to charge" is RedOther (200,0,0) (This probably explains your red-and-discharging comment)
  • "Waiting to discharge" is BlueOther (0,0,200) (In some experimentation this seemed to show up when I had my laptop plugged in and on standby, so the BlueOther line climbs up)
  • "Charged" is Green (0,255,0) (Take this with some extra skepticism since I did not understand the code entirely at this point)
  • "Unknown" has no color assigned. (This too with skepticism)

That said though, I still cannot glean from the code what the "Waiting to discharge" and "Waiting to charge" mean exactly.

share|improve this answer

Can't verify 100%, but it seems reasonable that:

green = charging, in use

blue = discharging, in use

red = charging, not in use

share|improve this answer
Maybe. But then how come it was red and still discharging (see image)? – Oct 26 '12 at 20:04
maybe red = "not in use" perhaps when it was put to sleep and was still draining the battery, then it got plugged in, and eventually turned on (turned to green) – valbaca Oct 27 '12 at 2:58
It's definitely possible, but if so I'm thinking it might just be a statistical anomaly. If it's gone to sleep it wouldn't use so much power. But the weird thing is that I think I remember when this was because the power went out. And I'm fairly certain I kept using it normally. – Oct 27 '12 at 7:16

After checking power history a few times and remembering what I did, I've concluded it's either extremely complicated and impossible to decipher, or we have to accept some statistical anomalies and it's as simple as

  • Green = charged
  • Blue = discharging
  • Red = charging

enter image description here

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.