Total Uptime in INFO gets reseted all the time

That is something that happens after august update.

The total uptime is always reseted, no matter if i shutdown the rpi2 or reboot. So on my main rpi2 it is stucked at 12 minutes.
If i let the rpi on for 3 days it shows 3 days and 12 minutes. But after restart it reverts to 12 minutes.

Thank you in advance.

Uptime is stored in guisettings.xml.

If your total uptime keeps getting reset this indicates that guisettings.xml is not being written to or is being corrupted. (which causes kodi to make a new default guisettings.xml)

This would result in your preferences going back to defaults as well. Hard to be certain what the cause is without some sort of debug log though.

I can upload logs from 3 installations , two of them are new.
Settings do not reset except the small problem I had to turn off add-ons automatic updates, it was reverting to always after reboot.
After 6 or 7 try the setting was saved as never. That was an all 3 installations.

You need logs before and after restart? And from all 3 rpi2?

I just noticed the same issue as well. No other system issues, just that the total uptime gets reset. Does editing the config.txt or any other specific files reset this at all?

Kodi uptime is stored in guisettings.xml which is the main configuration file that holds the Kodi settings.

If this file gets corrupted (for example due to Kodi crashing on exit) it will put many of your settings back to defaults and also wipe the total uptime figure.

Do you always shut down the system cleanly ?

I shut it down either through the menu, or via SSH by running sudo reboot or poweroff. None of my settings or configurations get reset. What are some of the settings that would get reset?

This thing does not happens after a crash or a non clean shutdown.
It exists in all my installations from the start of osmc install.

I shut down my osmc every 2 to 3 weeks. Sometimes it adds up a couple of minutes to total uptime. So now I have my main installation started about 2 months ago, being restarted over this time 4 to 6 times with almost no downtime telling me that total uptime is 3 minutes.

I really have to upload some logs, and I will try to do it tomorrow.

By the way no other options get reseted, with only weird thing the hard time turning add-ons automatic updates off.

Can’t reproduce that problem here. The current “Total Uptime” of my Pi 2 install is sitting on 40 days, 18 hours, 20 minutes…

Same here. Clock resets without any crashes on a clean install.

So if you let OSMC run for an hour, note down the total system uptime, reboot, then check the total system uptime again it is less than before you rebooted ?

What happens if you run the following command via SSH and let it sit for a while ?

watch -n 1 grep systemtotaluptime /home/osmc/.kodi/userdata/guisettings.xml

This will monitor the systemtotaluptime value saved in guisettings.xml, which I believe is in minutes.

Does the number change if you use quit/exit ?

On systems with multiple cores, the uptime is actually multiplied by the number of cores on the system, with exception for active (non idle) (the second number in /proc/cmdline). This is why we calculate uptime as total divided by sysconf(_SC_NPROCESSORS_ONLN) (number of online processors)

Is the total uptime per chance a quarter of what you would expect it to be from the uptime command?


Same problem here on my Rpi2
Just made a fresh install just to test this.
After osmc had installed, the total uptime was 2 minutes, but was reset to 0 minutes after reboot. Tried several times, always reset to 0.
The <systemtotaluptime>0</systemtotaluptime> in guisettings.xml is not updated after a reboot.
Log is here :smile:
Edit. forgot to enable debug, new log uploaded, and link edited.

What are the permissions on guisettings.xml? Did you restore it from a backup or redo the system settings after the fresh install? Will other system settings that you change survive a reboot?

-rw-r–r-- 1 osmc osmc 28850 Dec 4 17:44 guisettings.xml

Clean install, no restore or other things. Changing skin survives reboot.

In the meantime we were able to reproduce the issue and we will investigate it and may have a fix in one of the next updates!


All settings survive a reboot.
The problem starts right after install.
I never backup and restore I always like clean installs.
Only setting that usually reverts is automatic addon updates. I have to disable them up to 6 times until they finally stay disabled after reboot.

I still need a week to get back home and upload logs from any one of my installations.

Thank you in advance.

OH I forgot. Some times the total uptime does get up for a couple of minutes. One of my installations is at 12 days total uptime if I remember even tho that it is up since August.

I have been running the unsupported alpha up until I posted in this forum, on the same Pi. I did not have this issue at that time, total uptime captured correctly.

Yes that’s correct, total uptime resets after a reboot.
I will do some testing to see if it makes a difference how I restart it (via command line Sudo reboot vs the GUI). I’ll also run the command above and I will report back.

Mine does not revert to a set number i don’t think. It just starts the clock back from zero.

Ok so I had a 6 day uptime (uninterrupted boot). I restarted the Pi using the OSMC gui interface and the total uptime arbitrarily reset to 30 minutes

watch -n 1 grep systemtotaluptime /home/osmc/.kodi/userdata/guisettings.xml

Nothing happens. Counter is stuck at 30 even after several minutes

Command not found