Start a new topic

Battery status display on desktop pannel

Right now you can type "pt-status" in a console window, but there is no continuous battery status display while you are on the desktop.

I have therefore created a little program to display the pi-top battery status on the desktop. It displays a small icon on the task bar.

To download, use the browser and navigate to

Then search in github for pi-top-battery-status

Installation instructions are there.

Questions and suggestions for improvement are most welcome.

But given the methodology, the Pi-Top code has not provided a solution. At least the coding standard is high enough to not crash the whole OS as I would have. I am concerned also that suddenly topics are being removed from the community forum without any prior agreement with the participants of said discussion! The battery charging topic is a prime example of a model of cooperation, mutual support and indignity by those who were injured by their experiences, but later encouraged to join in. This is as a model fit for future reference? My reference to the loss of Capsllock function during sign-in is a major disadvantage to Disabled users who will because of the restricted environment struggle to recognise the cause of their being unable to sign-in and will suffer great loss of time while they negotiate resetting their password and probably like myself suffer the indignity of being again refused access to their account with heir new password! These changes appear random and as yet I have seen no listing of the changes implemented with the new Polaris OS. I felt the mouse focus was correctly set during sign-in with the previous version, this has now gone, instead the keyboard is king. There is an international standard for both mouse and keyboard shortcuts and focus shifts agreed to enable the efficient use of both mouse and cursor and to enable keyboard operatives full navigation and control as much as GUI users. But this is not so that they are in competition with each other. I believe my declaration of the battery level error is also now gone! Overall chaos, instability and inconvenience.
Alexandra, the estimated life time is calculated by the intelligent battery controller based on the actual discharging current and the actual charge. Unfortunately the intelligent battery controller cannot provide an estimated life time if it is not discharging, because under these circumstances it is not known how much current will be drawn from the battery once discharging starts. You need therefore to pull the plug if you need an estimated life time.
I will look into this right away.

Rene I reported this issue about 2 weeks ago with a fully charged battery showing an error message until the power cord was disconnected - it appears to be a binary assumption in the code ie its either charging with time left to full or discharging with time left for use with no logical outcome provided for fully charged. I'd love to know of course...

The battery status program (link above) works well with pi-topOS Polaris.

Many thanks to all the supporters and users of the battery status indicator at and all the positive feedback. More than 1000 downloads last year!

2 people like this
I run pi-top's i2c clock at 50,000. At about that number I get the least i2c errors. 30,000 and lower, or 70,000 and higher, give me an unreliable pi-top. The window of low i2c failure rate is much wider when using bqStudio (by Texas Instruments) compared to Rpi 3. Did anyone try an i2c repeater? There's a Technical Note on TI's web site about using an i2c repeater.


Oh and could someone please tell me how to make linefeeds in this forum? Everytime im posting something it ends as a wall of text. Quite annoying :)
My Pitop has also the speaker, Richards battery gadget and a Microdot Phat display attached on one of these protoboards. So far i only get problems with the speaker them i send to much data via the I2C to the Microdot. Not surprising regarding the unstable nature of Raspberry I2C. Under normal circumstances the system runs flawless. My OS is currently a modified Rasbian on Rasp3. At the moment Im fighting a little to get a working version of the latest Release of Raspian with the Pixel Desktop and all the additions for a Pitop. That are so many keys on the keyboard are without a real function is nibbling on my nerves a bit. Lets give those lazy keys some work :) What version of Raspberry and OS you are using in your Pitop? Personally i think the problem is more something electrically inside your speaker rather then the software.
There's definitely an issue with connection of my Pi-top speaker and the battery status indicator. If the speaker is fully plugged in the indicator is not functional and the speaker only works intermittently. However if the speaker is only part-way plugged in the indicator works and the speaker works too! Is this happening to anyone else?
I think the problem is linked to the Pi-top speaker. If I unplug the speaker from the hub the battery status indicator returns to normal. Could there be a clash between the indicator software and the pt-speaker software?
Very strange! Maybe I can see what's going on if you do the following: Delete batteryLog.txt from your home directory (or rename it to something else). Reboot you pi-top. Discharge it for about 1 hour. Then charge it for about one hour. Then post the new batteryLog.txt here, which should show what happened during these two hours. It should show the actual voltages of the cells in addition to the charging and discharging current, as well as the reliability of the i2c communication.
I have installed gtk-battery but it is giving me confusing information. When the external power is connected it tells me it's discharging and when disconnected it tells me it's charging! This also happens with the status indicator on Pi-top desktop. Any idea why this is happening?

Thanks to Alexandra Crawford we have a new link for the battery firmware upgrade from pi-top. I have updated the detailed step-by-step procedure to diagnose battery problems, which can be found at

Scroll towards the bottom and look at the link found in the section "What to do if you have problems with your battery".

Suggestions for improvements of this procedure are most welcome.

The new desktop PIXEL has been released for Raspbian Jessie (not for pi-topOS), see

Upgrade instructions to PIXEL are in that blog.

The newest version 1.4 of the pi-top-battery-status is fully compatible with PIXEL, but needs to be reinstalled after upgrading to PIXEL. Instructions for upgrading of the pi-top-battery status are at

Login or Signup to post a comment