CLock not working Topic is solved

Having issues with your DietPi installation, or, found a bug? Post it here.
skippy2235
Posts: 9
Joined: Fri Sep 11, 2020 5:27 pm

Re: CLock not working

Post by skippy2235 »

Got it. I took me some thinking but here. WOW. see how new I am.
Attachments
log.txt
(60.05 KiB) Downloaded 20 times
User avatar
Joulinar
Posts: 2597
Joined: Sat Nov 16, 2019 12:49 am

Re: CLock not working

Post by Joulinar »

well your log seems pretty fine.

Most of the time your system is waiting on network. It takes around 20-25 secounds to get WiFi up and running

Code: Select all

Sep 11 16:08:30 DietPi dhclient[657]: Listening on LPF/wlan0/dc:a6:32:72:f8:e7
Sep 11 16:08:30 DietPi dhclient[657]: Sending on   LPF/wlan0/dc:a6:32:72:f8:e7
Sep 11 16:08:30 DietPi dhclient[657]: Sending on   Socket/fallback
Sep 11 16:08:30 DietPi dhclient[657]: DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 5
Sep 11 16:08:30 DietPi dhclient[657]: DHCPOFFER of 192.168.2.146 from 192.168.2.1
Sep 11 16:08:30 DietPi dhclient[657]: DHCPREQUEST for 192.168.2.146 on wlan0 to 255.255.255.255 port 67
Sep 11 16:08:30 DietPi dhclient[657]: DHCPACK of 192.168.2.146 from 192.168.2.1
Sep 11 16:08:31 DietPi dhclient[657]: bound to 192.168.2.146 -- renewal in 33883 seconds.
once WiFi connection established, time sync succeeded without issues.

Code: Select all

Sep 11 16:08:39 DietPi DietPi-Boot[463]: [ INFO ] DietPi-Run_NTPD | Waiting for completion of systemd-timesyncd (29/60)
Sep 11 16:08:55 DietPi systemd-timesyncd[478]: Synchronized to time server for the first time 163.237.218.19:123 (2.north-america.pool.ntp.org).
Sep 11 16:08:55 DietPi DietPi-Boot[463]: [ INFO ] DietPi-Run_NTPD | Waiting for completion of systemd-timesyncd (30/60)
Sep 11 16:08:56 DietPi DietPi-Boot[463]: [  OK  ] DietPi-Run_NTPD | systemd-timesyncd synced
Sep 11 16:08:56 DietPi systemd[1]: Stopping Network Time Synchronization...
Sep 11 16:08:56 DietPi systemd[1]: systemd-timesyncd.service: Succeeded.
Sep 11 16:08:56 DietPi systemd[1]: Stopped Network Time Synchronization.
Sep 11 16:08:56 DietPi DietPi-Boot[463]: [  OK  ] Network time sync | Completed
as you can see, time is jumping from Sep 11 16:08:39 to Sep 11 16:08:55.

I can't see issues on time syncronization.
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
skippy2235
Posts: 9
Joined: Fri Sep 11, 2020 5:27 pm

Re: CLock not working

Post by skippy2235 »

So I have tried this with wire also.
Same results.
Is there a away to change when it query.
Like add a command to autostart file?
User avatar
Joulinar
Posts: 2597
Joined: Sat Nov 16, 2019 12:49 am

Re: CLock not working

Post by Joulinar »

Not sure what you mean. As I said, the log you posted was quite ok and time synchronization was working.
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
skippy2235
Posts: 9
Joined: Fri Sep 11, 2020 5:27 pm

Re: CLock not working

Post by skippy2235 »

I would like to get rid of those 60 attempts.
It slows boot time 20 seconds..
I am using this as a digital dashboard.
And 20 seconds every boot is not going to work.
User avatar
trendy
Posts: 156
Joined: Tue Feb 25, 2020 2:54 pm

Re: CLock not working

Post by trendy »

The boot is not exactly waiting for ntp.
If however you feel that this is slowing you down you can go to dietpi-config - Advanced Options - Time sync mode and select Mode 0 to deal yourself how the time will be synchronized.
skippy2235
Posts: 9
Joined: Fri Sep 11, 2020 5:27 pm

Re: CLock not working

Post by skippy2235 »

I have done that, that is how I get 28 seconds of bootup time. But when after boot up time is FEB 14 2019 1400 hrs.
What other options do I have to get time updated? So I just found a few threads down /DietPi/dietpi/func/run_ntpd 1
I just did that command and my clock is updated.
Now how to I get this command to autorun after bootup is completed?

SOLVED
Here is what I did

Using the file manager on taskbar near start menu.
open that. Goto / dir then make your way to
/var/lib/dietpi-autostart/custom.sh
open custom.sh with leafpad.
add to the bottom line
startx /DietPi/dietpi/func/run_ntpd 1

save and then reboot. in less then 5 min time will correct itself
User avatar
Joulinar
Posts: 2597
Joined: Sat Nov 16, 2019 12:49 am

Re: CLock not working

Post by Joulinar »

there are a couple of thinks your can do to increase boot time
  1. use a wired connection
  2. use static IP instead of DHCP
  3. sync time with a local gateway. Usually internet routers are capable to provide NTP server functionality
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
Post Reply