XCFE clock is losing time


kc187

Still Fresh
Joined
Feb 4, 2011
Messages
75
Hey guys,


Over the last day or so my system clock has been losing time. Is there a way to have it sync to a system when connected to the internet, kind of like Windows Time?


If not, how do I set it myself? I can't find anything on it on the forums.


By the way, the Panda rocks. Yes, I said Panda. The wife called it a Panda and it stuck, haha.


My laptop has been a non use use since I got this thing. I literally type every response on the forums now on the Pandora.


Thanks again.
 
Over the last day or so my system clock has been losing time. Is there a way to have it sync to a system when connected to the internet, kind of like Windows Time?


If not, how do I set it myself? I can't find anything on it on the forums.
You could sync it to a time server, but I don't remember the command to do that. I've only done it once. Anyway, once you have the command, you could set up cron to run that command every now and then. If you decide to perform a web search, you'd want to look under Linux instead of Pandora.


Edit: Although this source says you should look into ntpd.
 
Last edited by a moderator:
To sync your time, ntpd is the way to go.

I tried the ntpd command in terminal, says command isn't found. Is this a program on XCFE somewhere? Sorry for the newbie questions.


Also, I found how to adjust the time myself so that's not a problem.


Off topic: I am writing all of this down. I plan on writing a cheat sheet for Pandora peeps who are used to other OSes.
 
If you have never applied any hotfix, this might solve your issue. I had a similar issue with the system version that I got from Craig and it's gone since I installed HF5-RC1.
 
I can confirm that the clock on the Pandora does seem to go out of sync rather frequently .. not sure why, though.
 
I´ll have to look at the ntpd idea but with manually changes be sure to reboot after you update the clock, otherwise after a lockup it reverts back again in my experience.
 
I´ll have to look at the ntpd idea but with manually changes be sure to reboot after you update the clock, otherwise after a lockup it reverts back again in my experience.

You may also run "hwclock -w" in the terminal to sync the current time to RTC directly. This saves the reboot.


When your time desyncs, it might be interesting to know if it's just the software clock or the RTC as well.


To check the time of the RTC: "hwclock -r".


If it's just software (I'd guess so), then the easiest and quickest way without NTP would be: Run "hwclock -s" from time to time. this syncs RTC to system time.


If it is just software, a wild guess of mine would be, that the clock does not really cope well with the up and downclocking in low-power-mode.


Easiest solution for that would be running "hwclock -s" everytime the system returns from standby...it doesn't at the moment (HF5-RC1).


Best if EvilDragon/notaz could comment...my knowledge is very limited and I might be far off.
 
The software clock used to get horribly out of sync when put into low power mode because it was dropping it to 14Mhz: the CPU just couldn't do everything and updated the clock once per second. That should have been fixed with HF4, I believe.


The only time I've noticed the hardware clock fall out of sync is when the battery runs dead, or I boot from my dev SD card which I never bothered to set the correct time on.
 
Latest firmware beta here, and hwclock -r returns the same value as the clock displayed on the taskbar. ie, it's now several hours out. In fact, the date is a whole day behind. Seems to lose time when I shut down the pandora (I don't use the low power mode, it uses too much battery).


D.
 
It's expected that the hardware clock and the software clock would have basically the same time if you're regularly shutting it down: it loads the software clock from the hardware clock on startup. I believe it also writes the software clock back to hardware on shutdown though I could be wrong about that.


I've just shut mine down with the time accurate. I'll start it back up again in exactly 2 hours and see if it has fallen out of sync in anyway. I can't imagine that it would, the clock is permanently connected to the battery, but it doesn't hurt to be thorough.


It's possible that not all 32khz clock crystals are created equally. The real time clock has a "compensation" for exactly this purpose, adding or subtracting ticks to adjust for a crystal that doesn't vibrate at exactly 32khz, controllable by software.
 
Thanks for the RTC hwclock commands Jottt, just re-checked the thread and after keeping perfect time on my break it now thinks its Thurs 25th at 09:23 lol
 
I've found I can go many days with no clock issue, and then suddnely it'll be out of sync.


I used to just not care about my clock, so I don't know if this is a new issue or always been like that (anyone confirm either way?)


It does seem to be an issue nowadays, for sure.


jeff
 
I've found I can go many days with no clock issue, and then suddnely it'll be out of sync.


I used to just not care about my clock, so I don't know if this is a new issue or always been like that (anyone confirm either way?)


It does seem to be an issue nowadays, for sure.


jeff

It's not a huge deal. I do like my time to be accurate though, seeing as how I have found a ton of uses for the Pandora.


None of the terminal commands I've tried from this thread work for me. Any more suggestions, guys? By the way, thanks for all the prompt support. You guys rock. Or gals. Whichever applies to you. :)
 
Oh for me, I installed ntpdate and set up a job so when the wifi comes up, it fixes the time for me, so I forgot the problem existed :)


I think ntpdate is available in Angstrom, so you could just do ..


opkg update


opkg install ntpdate


(something along those lines)


and the command line (you could put it in a job or wifi startup script):


/usr/sbin/ntpdate ca.pool.ntp.org


ca.pool.ntp.org is the Canadian time server pool, you should pick the appropriate pool for yourself.


jeff
 
Oh for me, I installed ntpdate and set up a job so when the wifi comes up, it fixes the time for me, so I forgot the problem existed :)

Can you point me to where the same tweak could be put in for wired USB Ethernet dongles? It appears that it is already there in /etc/network/if-up.d, but no dice.
 
To sync your time, ntpd is the way to go.

I tried the ntpd command in terminal, says command isn't found. Is this a program on XCFE somewhere? Sorry for the newbie questions.


Also, I found how to adjust the time myself so that's not a problem.


Off topic: I am writing all of this down. I plan on writing a cheat sheet for Pandora peeps who are used to other OSes.
great idea!!!
 
Sorry to grave-dig. I'm running Hotfix-5 (AFAIK) so this may still be an issue.


I've noticed the clock on the Pandora lose time. I've been running about 15 minutes slow for a few days. Not got any worse.


Never sure when it went out of sync. I'm hoping to use the Pandora as a PDA with an alarm clock so I'd like to have confidence that its time keeping abilities are better than mine.


I had a little play on the command line after reading this post. ((thanks jottt for the hwclock command))


Setting the system time and RTC (real time clock) require root privileges so...


# sudo bash


<your passwd>


In the shell as root (no more time consuming password prompts)...


# date 07182233.30 # format being... MMDDhhmm.ss


# hwclock -w # this writes the system time to the RTC. Other flags -r will read/display the RTC time and -s will set the system time from the RTC.


Now I know both my system and RTC are correct and in sync.


Confirm with...


# hwclock -r; date


exit root shell for your own safety...


# exit
 
Last edited by a moderator:
I've noticed the clock on the Pandora lose time. I've been running about 15 minutes slow for a few days. Not got any worse.
That's kind of weird. Did you just suddenly notice it was 15 minutes off all of the sudden, or has it gradually gotten that way? I've found mine slips a little bit over time, something around 5 minutes a month or so. It's not a perfect clock, but it shouldn't just suddenly lose 15 minutes.
 
Back
Top