Fixing battery/CPU waste with pi-topOS Sirius

Hi, wanted to document a pi-top[3] workaround for an issue in the only officially available pi-topOS build (pi-topOS-sirius_C781_2020-12-22_04-11-42):

I noticed that my laptop was running very warm all the time and upon investigation found there was continually a new Python process being started. Turns out the process was pt-firmware-updater which on the pi-top [3] simply logs “This program only runs on a pi-top [4]” and exits. But there is a systemd entry that wants it to be running! So it just relaunches and relaunches and relaunches and relaunches…

The workaround I found was to do this:

# at your own risk!
sudo rm /etc/systemd/system/graphical.target.wants/pt-firmware-updater.service
sudo reboot

If you’re more cautious and/or know more about systemd than I do you might make a backup first or disable it in a more proper fashion but I just wanted it to stop using up all my battery and this seemed to fix the main issue :slight_smile:

Hey @natevw !

Thanks for posting this! We have just released an update to the pt-firmware-updater package that prevents this behavior.

Just in case, if you want to stop the firmware updater service and keep it from starting on boot in a “safe way”, you can run sudo systemctl stop pt-firmware updater && sudo systemctl disable pt-firmware-updater, since with the update, it’s likely that the systemd service will reappear.

1 Like

Quick fix, thanks! I’ll check it out.

BTW after I posted this I also noticed the pt-device-manager can also be quite noisy in both the /var/log/syslog and var/log/daemon files. It goes in bursts it looks like but sometimes several PUB_BATTERY_STATE_CHANGED logs per second:

pitop-battlogs

So it looks like nothing’s exactly “broken” but this might lead to quite a bit of SD card wear for data that’s not really needed to be continually logged by default? (I can file a new forum topic with a bit more details if you’d like.)

that’s a fair point @natevw … we have just released an update to the device manager package that will prevent those battery state logs from being written to the journal; that should reduce A LOT the amount of messages you’ll see in the journal :grinning: