Not a long time ago I switched from STOCK firmware to OpenWRT (hnyman stable openwrt-19.07 build) on my Netgear R7800.
Unfortunately I ran into a serious bug/issue with RTC clock just from the first day with OpenWRT.
I found that time on R7800 falls out of sync (lags behind) quickly.
How to reproduce:
- Disable NTP sync or block Internet access on the router.
- Synchronize time on router with time in browser using standard LuCI feature
(System - General Settings - Sync with browser). - Wait a couple of days (1 day is enough) and check router's time.
Router's clock will a few minutes late compared to other devices (PC, phone, other router etc).
I performed steps above several times in the last 3 weeks but RTC bug consistently reproduces every time - clock falls behind about 2-3 mins a day.
The last time I synced my router time was about 7-10 days ago.
As for today clock on R7800 is 17 minutes behind.
After googling for a while I have found a very very similar issue that took place on DD-WRT project just and only for for R7800 device.
This could be the similar issue I think.
I need an assistance to diagnose and resolve this RTC issue.
I am new to OpenWRT and I am not a developer.
Note:
The purpose of this post is to resolve RTC bug/issue (there is no need to discuss NTP).
I am aware that RTC is done in software (on R7800) and inaccurate over time.
But in contrast to my case time drift caused by inaccuracy is many time slower (10 time or more)
Please refer to the following thread:
https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=324284&postdays=0&postorder=asc&start=312
time on r7800 falls out of sync, after 2 days its 3 mins behind according to router time displayed on gui. compared to any other ddwrt router, set same time zone, ntp is on etc. only the r7800 is doing this, going back it too seems to be another thing that started since the latest ipq changes, the same ones that made qos worse (setting way over what i want to get, to get it).
something is wrong with internal syncing.
https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=324284&postdays=0&postorder=asc&start=313
i can confirm..uptime 3 days, time off 5mins slow
https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=324284&postdays=0&postorder=asc&start=314
I've created an appropriate ticket for this with possible solution.
http://svn.dd-wrt.com/ticket/5629
https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=324284&postdays=0&postorder=asc&start=315
thank u, that fixed it in r30853 time is in sync so is uptime between the wds link again. hfsc qos is normal again to what i set, so is htb for upload only, but htb remains lagging behind whats set on the download as its always done do u know what would happen if the clk freq was reduced more? would it cure htb downlink or cause the router to desync again?
Also there was a rolled-back commit also:
My system information:
root@R7800:~# date -u
Sat Feb 20 14:47:29 UTC 2021
root@R7800:~# uptime
14:50:25 up 1 day, 19:04, load average: 0.00, 0.02, 0.00
root@R7800:~# hwclock
hwclock: can't open '/dev/misc/rtc': No such file or directory
root@R7800:~# uname -a
Linux R7800 4.14.218 #0 SMP Wed Feb 3 18:15:29 2021 armv7l GNU/Linux
root@R7800:~# cat /proc/version
Linux version 4.14.218 (perus@ub2010) (gcc version 7.5.0 (OpenWrt GCC 7.5.0 r11273-c9388fa986)) #0 SMP Wed Feb 3 18:15:29 2021
root@R7800:~# ubus call system board
{
"kernel": "4.14.218",
"hostname": "R7800",
"system": "ARMv7 Processor rev 0 (v7l)",
"model": "Netgear Nighthawk X4S R7800",
"board_name": "netgear,r7800",
"release": {
"distribution": "OpenWrt",
"version": "19.07-SNAPSHOT",
"revision": "r11293-312c05611b",
"target": "ipq806x/generic",
"description": "OpenWrt 19.07-SNAPSHOT r11293-312c05611b"
}
}