My time wont sync with network time

I cant get the time to sync.
This is the output from timedatectl status

               Local time: Fri 2021-12-10 16:00:26 IST
           Universal time: Fri 2021-12-10 10:30:26 UTC
                 RTC time: Fri 2021-12-10 10:30:26
                Time zone: Asia/Kolkata (IST, +0530)
System clock synchronized: no
              NTP service: active
          RTC in local TZ: no

I think the problem is the line 5, ‘System clock synchronized: no’, but I cant figure out how to enable it.

Here is an output from timedatectl timesync-status

       Server: n/a (n/a)
Poll interval: 0 (min: 32s; max 34min 8s)
 Packet count: 0

Its alot less lines then I was expecting.

I tried using settings gui too but keeps giving error message
error
and not working.

In case you need this info:
inxi --full --verbosity=7 --filter --no-host

System:    Kernel: 5.10.79-1-MANJARO x86_64 bits: 64 compiler: gcc v: 11.1.0 Desktop: KDE Plasma 5.23.3 tk: Qt 5.15.2
           wm: kwin_x11 vt: 1 dm: SDDM Distro: Manjaro Linux base: Arch Linux
Machine:   Type: Laptop System: HP product: HP ENVY m7 Notebook v: Type1ProductConfigId serial: <superuser required> Chassis:
           type: 10 serial: <superuser required>
           Mobo: HP model: 81D4 v: KBC Version 87.21 serial: <superuser required> UEFI: Insyde v: F.56 date: 06/12/2018
Battery:   ID-1: BAT0 charge: 21.2 Wh (64.0%) condition: 33.1/33.1 Wh (100.0%) volts: 10.7 min: 11.6
           model: Hewlett-Packard Primary type: Li-ion serial: <filter> status: Discharging
Memory:    RAM: total: 15.52 GiB used: 2.19 GiB (14.1%)
           RAM Report: permissions: Unable to run dmidecode. Root privileges required.
CPU:       Info: Dual Core model: Intel Core i7-7500U bits: 64 type: MT MCP arch: Amber/Kaby Lake note: check rev: 9 cache:
           L1: 128 KiB L2: 512 KiB L3: 4 MiB bogomips: 23209
           Speed: 900 MHz min/max: 400/3500 MHz Core speeds (MHz): 1: 900 2: 899 3: 900 4: 900
           Flags: 3dnowprefetch abm acpi adx aes aperfmperf apic arat arch_perfmon art avx avx2 bmi1 bmi2 bts clflush
           clflushopt cmov constant_tsc cpuid cpuid_fault cx16 cx8 de ds_cpl dtes64 dtherm dts epb ept ept_ad erms est f16c
           flexpriority flush_l1d fma fpu fsgsbase fxsr ht hwp hwp_act_window hwp_epp hwp_notify ibpb ibrs ida intel_pt
           invpcid invpcid_single lahf_lm lm mca mce md_clear mmx monitor movbe mpx msr mtrr nonstop_tsc nopl nx pae pat pbe
           pcid pclmulqdq pdcm pdpe1gb pebs pge pln pni popcnt pse pse36 pti pts rdrand rdseed rdtscp rep_good sdbg sep smap
           smep ss ssbd sse sse2 sse4_1 sse4_2 ssse3 stibp syscall tm tm2 tpr_shadow tsc tsc_adjust tsc_deadline_timer vme vmx
           vnmi vpid x2apic xgetbv1 xsave xsavec xsaveopt xsaves xtopology xtpr
Graphics:  Device-1: Intel HD Graphics 620 vendor: Hewlett-Packard driver: i915 v: kernel bus-ID: 00:02.0 chip-ID: 8086:5916
           class-ID: 0300
           Device-2: Chicony HP IR Camera type: USB driver: uvcvideo bus-ID: 1-5:4 chip-ID: 04f2:b591 class-ID: 0e02
           serial: <filter>
           Device-3: Chicony HP TrueVision HD type: USB driver: uvcvideo bus-ID: 1-6:5 chip-ID: 04f2:b592 class-ID: 0e02
           serial: <filter>
           Display: x11 server: X.Org 1.21.1.1 compositor: kwin_x11 driver: loaded: modesetting alternate: fbdev,vesa
           resolution: 1920x1080~60Hz s-dpi: 96
           OpenGL: renderer: Mesa Intel HD Graphics 620 (KBL GT2) v: 4.6 Mesa 21.2.5 direct render: Yes
Audio:     Device-1: Intel Sunrise Point-LP HD Audio vendor: Hewlett-Packard driver: snd_hda_intel v: kernel bus-ID: 00:1f.3
           chip-ID: 8086:9d71 class-ID: 0403
           Sound Server-1: ALSA v: k5.10.79-1-MANJARO running: yes
           Sound Server-2: JACK v: 1.9.19 running: no
           Sound Server-3: PulseAudio v: 15.0 running: yes
           Sound Server-4: PipeWire v: 0.3.40 running: yes
Network:   Device-1: Intel Wireless 7265 driver: iwlwifi v: kernel bus-ID: 01:00.0 chip-ID: 8086:095a class-ID: 0280
           IF: wlp1s0 state: up mac: <filter>
           IP v4: <filter> type: dynamic noprefixroute scope: global broadcast: <filter>
           IP v6: <filter> type: noprefixroute scope: link
           Device-2: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet vendor: Hewlett-Packard driver: r8169 v: kernel
           port: 3000 bus-ID: 02:00.0 chip-ID: 10ec:8168 class-ID: 0200
           IF: enp2s0 state: down mac: <filter>
           IF-ID-1: anbox0 state: down mac: <filter>
           WAN IP: <filter>
Bluetooth: Device-1: Intel Bluetooth wireless interface type: USB driver: btusb v: 0.8 bus-ID: 1-8:6 chip-ID: 8087:0a2a
           class-ID: e001
           Report: rfkill ID: hci0 rfk-id: 11 state: up address: see --recommends
Logical:   Message: No logical block device data found.
RAID:      Message: No RAID data found.
Drives:    Local Storage: total: 931.51 GiB used: 339.07 GiB (36.4%)
           ID-1: /dev/sda vendor: Western Digital model: WD10JPVX-22JC3T0 size: 931.51 GiB speed: 6.0 Gb/s type: HDD rpm: 5400
           serial: <filter> rev: 1A01 scheme: GPT
           Optical-1: /dev/sr0 vendor: hp model: DVDRW DA8AESH rev: XH61 dev-links: cdrom
           Features: speed: 24 multisession: yes audio: yes dvd: yes rw: cd-r,cd-rw,dvd-r,dvd-ram state: running
Partition: ID-1: / size: 117.1 GiB used: 85.33 GiB (72.9%) fs: ext4 dev: /dev/sda7 label: N/A
           uuid: e27874c0-e4e6-4949-b891-e78c48885bd5
           ID-2: /boot/efi size: 96 MiB used: 28.1 MiB (29.2%) fs: vfat dev: /dev/sda1 label: N/A uuid: F64B-D25B
           ID-3: /home/<filter>/mnt/DATA size: 553.04 GiB used: 188.96 GiB (34.2%) fs: ntfs dev: /dev/sda5 label: DATA
           uuid: 01D7A52F116A15D0
           ID-4: /run/timeshift/backup size: 88.23 GiB used: 64.75 GiB (73.4%) fs: ext4 dev: /dev/sda8 label: Backup manjaro
           uuid: f561eac7-cdb5-4bbe-a206-5c6b9a0984d6
Swap:      ID-1: swap-1 type: partition size: 4.88 GiB used: 0 KiB (0.0%) priority: -2 dev: /dev/sda9 label: manjaro_KDE_swa
           uuid: 098b96ae-4d36-436c-8064-132007ee093b
Unmounted: ID-1: /dev/sda2 size: 16 MiB fs: <superuser required> label: N/A uuid: N/A
           ID-2: /dev/sda3 size: 128.44 GiB fs: ntfs label: N/A uuid: 8E224D48224D368D
           ID-3: /dev/sda4 size: 499 MiB fs: ntfs label: N/A uuid: A8462D24462CF4AA
           ID-4: /dev/sda6 size: 34 GiB fs: vfat label: PC_ANDROID uuid: 11DC-D4D0
USB:       Hub-1: 1-0:1 info: Hi-speed hub with single TT ports: 12 rev: 2.0 speed: 480 Mb/s chip-ID: 1d6b:0002 class-ID: 0900
           Device-1: 1-1:2 info: SiGma Micro Keyboard TRACER Gamma Ivory type: Keyboard,HID driver: hid-generic,usbhid
           interfaces: 2 rev: 1.1 speed: 1.5 Mb/s power: 98mA chip-ID: 1c4f:0002 class-ID: 0300
           Device-2: 1-3:3 info: Lenovo Optical Mouse type: Mouse driver: hid-generic,usbhid interfaces: 1 rev: 2.0
           speed: 1.5 Mb/s power: 100mA chip-ID: 17ef:608d class-ID: 0301
           Device-3: 1-5:4 info: Chicony HP IR Camera type: Video driver: uvcvideo interfaces: 2 rev: 2.0 speed: 480 Mb/s
           power: 500mA chip-ID: 04f2:b591 class-ID: 0e02 serial: <filter>
           Device-4: 1-6:5 info: Chicony HP TrueVision HD type: Video driver: uvcvideo interfaces: 2 rev: 2.0 speed: 480 Mb/s
           power: 500mA chip-ID: 04f2:b592 class-ID: 0e02 serial: <filter>
           Device-5: 1-8:6 info: Intel Bluetooth wireless interface type: Bluetooth driver: btusb interfaces: 2 rev: 2.0
           speed: 12 Mb/s power: 100mA chip-ID: 8087:0a2a class-ID: e001
           Hub-2: 2-0:1 info: Super-speed hub ports: 6 rev: 3.0 speed: 5 Gb/s chip-ID: 1d6b:0003 class-ID: 0900
Sensors:   System Temperatures: cpu: 43.0 C pch: 33.5 C mobo: 37.0 C
           Fan Speeds (RPM): N/A
Info:      Processes: 229 Uptime: 2d 3h 33m wakeups: 30 Init: systemd v: 249 Compilers: gcc: 11.1.0 Packages: 1499
           pacman: 1473 flatpak: 16 snap: 10 Shell: Zsh v: 5.8 default: Bash v: 5.1.8 running-in: konsole inxi: 3.3.09

Did you checked the status of the systemd-timesyncd.service Service. It needs to be running.

systemctl status systemd-timesyncd.service

Also check if there are NTP Servers in the config /etc/systemd/timesyncd.conf

If you made changes restart the systemd-timesyncd.service, if the service is not running start and enable the service.

After this, set with timedatectl the NTP option.

timedatectl set-ntp true 

Also make sure you run only one NTP daemon. Not ntpd and timesyncd at the same time.

See also the Arch Wiki

https://wiki.archlinux.org/title/Systemd-timesyncd

2 Likes

Here is the output from systemctl status systemd-timesyncd.service

● systemd-timesyncd.service - Network Time Synchronization
     Loaded: loaded (/usr/lib/systemd/system/systemd-timesyncd.service; enabled; vendor preset: enabled)
     Active: active (running) since Fri 2021-12-10 17:41:45 IST; 37s ago
       Docs: man:systemd-timesyncd.service(8)
   Main PID: 28513 (systemd-timesyn)
     Status: "Daemon is running"
      Tasks: 1 (limit: 19046)
     Memory: 984.0K
        CPU: 79ms
     CGroup: /system.slice/systemd-timesyncd.service
             └─28513 /usr/lib/systemd/systemd-timesyncd

Dec 10 17:41:45 li-hpenvy systemd[1]: Starting Network Time Synchronization...
Dec 10 17:41:45 li-hpenvy systemd[1]: Started Network Time Synchronization.

and this is whats in /etc/systemd/timesyncd.conf

[Time]
#NTP=
#FallbackNTP=0.arch.pool.ntp.org 1.arch.pool.ntp.org 2.arch.pool.ntp.org 3.arch.pool.ntp.org
#RootDistanceMaxSec=5
#PollIntervalMinSec=32
#PollIntervalMaxSec=2048

Here is the output from systemctl status ntpd.service

○ ntpd.service - Network Time Service
     Loaded: loaded (/usr/lib/systemd/system/ntpd.service; disabled; vendor preset: disabled)
     Active: inactive (dead)

And I have set ntp to true as you can see in my original post:

So the systemd-timesyncd.service is running, which is good.

The next step is to set set-ntp to true via timedatectl

sudo timedatectl set-ntp true 

You can also check up on the NTP status via

timedatectl show-timesync --all

But first set-ntp to true.

Here is the output from timedatectl show-timesync --all after I ran sudo timedatectl set-ntp true

LinkNTPServers=
SystemNTPServers=
FallbackNTPServers=0.manjaro.pool.ntp.org 1.manjaro.pool.ntp.org 2.manjaro.pool.ntp.org 3.manjaro.pool.ntp.org
ServerName=
ServerAddress=
RootDistanceMaxUSec=5s
PollIntervalMinUSec=32s
PollIntervalMaxUSec=34min 8s
PollIntervalUSec=0
Frequency=0

This is not the expected output.

After you ran sudo timedatectl set-ntp true did the output of timedatectl status changed?

Do you have any problem in resolving the FallbackNTPServers DNS Names to an IP address?

You might want to specify in /etc/systemd/timesyncd.conf NTP Servers that work in your region better than the FallbackNTPServers. It does not need to be an DNS Name, you can also use IP addresses. Don’t forget to uncomment the NTP line.

After you made changes to /etc/systemd/timesyncd.conf restart systemd-timesyncd.service

The in the status of systemd-timesyncd.service you should see a line like

systemd-timesyncd[273]: Initial synchronization to time server ...

This set things right:
~https://wiki.archlinux.org/title/Systemd-timesyncd`

No, here is what it looks like now

               Local time: Fri 2021-12-10 22:25:49 IST
           Universal time: Fri 2021-12-10 16:55:49 UTC
                 RTC time: Fri 2021-12-10 16:55:50
                Time zone: Asia/Kolkata (IST, +0530)
System clock synchronized: no
              NTP service: active
          RTC in local TZ: no

I don’t know what ‘resolving the FallbackNTPServers DNS Names to an IP address’ means.

I added a list of pools for india from this site https://www.pool.ntp.org/zone/in to /etc/systemd/timesyncd.conf and restarted systemd-timesyncd.service by running sudo systemctl restart systemd-timesyncd.
Here is what /etc/systemd/timesyncd.conf looks like now:

[Time]
NTP=server 0.in.pool.ntp.org server 1.in.pool.ntp.org server 2.in.pool.ntp.org server 3.in.pool.ntp.org
FallbackNTP=0.arch.pool.ntp.org 1.arch.pool.ntp.org 2.arch.pool.ntp.org 3.arch.pool.ntp.org
#RootDistanceMaxSec=5
#PollIntervalMinSec=32
#PollIntervalMaxSec=2048

and this is what timedatectl show-timesync --all looks like now:

LinkNTPServers=
SystemNTPServers=server 0.in.pool.ntp.org server 1.in.pool.ntp.org server 2.in.pool.ntp.org server 3.in.pool.ntp.org
FallbackNTPServers=0.arch.pool.ntp.org 1.arch.pool.ntp.org 2.arch.pool.ntp.org 3.arch.pool.ntp.org
ServerName=
ServerAddress=
RootDistanceMaxUSec=5s
PollIntervalMinUSec=32s
PollIntervalMaxUSec=34min 8s
PollIntervalUSec=0
Frequency=0

I looked at that arch wiki already before I posted here on the forum and I got the contents for /etc/systemd/timesyncd.conf from there bcause I deleted the one that was there before, after reading a post that said deleting the conf file would reset to things to default.
But besides that I didn’t find anything that has helped me.

I use to be able to correct the time by turning ‘Set date and time automatically’ off and on.
But now it gives me this error.

And also have windows on dual boot.

This is not the correct syntax. You need to remove the “server”.

NTP=0.in.pool.ntp.org 1.in.pool.ntp.org 2.in.pool.ntp.org 3.in.pool.ntp.org

It means, does your DNS Server return IP address for theses domains.

thanks but the output for timedatectl show-timesync --all seems to be the same even after I changed it.
and also the time is not right yet.
Here is what it looks like after the change and restarting systemd-timesyncd.service:

LinkNTPServers=
SystemNTPServers=0.in.pool.ntp.org 1.in.pool.ntp.org 2.in.pool.ntp.org 3.in.pool.ntp.org
FallbackNTPServers=0.arch.pool.ntp.org 1.arch.pool.ntp.org 2.arch.pool.ntp.org 3.arch.pool.ntp.org
ServerName=
ServerAddress=
RootDistanceMaxUSec=5s
PollIntervalMinUSec=32s
PollIntervalMaxUSec=34min 8s
PollIntervalUSec=0
Frequency=0

lets fix something else first.
If your run timedatectl status is the Universal time correct or is it your local time?

If you have a dual boot, you probably want this to be true.
https://wiki.archlinux.org/title/System_time#Time_standard

timedatectl set-local-rtc 1

and is the local time correctly linked in /etc

ls -l /etc/localtime

Universal time and RTC time have the correct time. but not local time.

So the timezone is not correct? Switch with timedatectl to your correct timezone.

I have tried this before and it didn’t work.
But here is what timedatectl status outputs after running timedatectl set-local-rtc 1:

               Local time: Fri 2021-12-10 22:54:43 IST
           Universal time: Fri 2021-12-10 17:24:43 UTC
                 RTC time: Fri 2021-12-10 22:54:42
                Time zone: Asia/Kolkata (IST, +0530)
System clock synchronized: no
              NTP service: active
          RTC in local TZ: yes

Warning: The system is configured to read the RTC time in the local time zone.
         This mode cannot be fully supported. It will create various problems
         with time zone changes and daylight saving time adjustments. The RTC
         time is never updated, it relies on external facilities to maintain it.
         If at all possible, use RTC in UTC by calling
         'timedatectl set-local-rtc 0'.

Notice how rtc time changed to the wrong time after running timedatectl set-local-rtc 1. :roll_eyes:

Running ls -l /etc/localtime outputs this:

lrwxrwxrwx 1 root root 34 Aug  6 16:00 /etc/localtime -> ../usr/share/zoneinfo/Asia/Kolkata

running this code outputs:

lrwxrwxrwx 1 root root 34 Aug  6 16:00 /etc/localtime -> ../usr/share/zoneinfo/Asia/Kolkata

What did not work. The warning in timedatectl status is completely normal. It is not really supported, you can also make the switch in Windows. The Arch Wiki page also describes a way to change this in Windows.
But you need to make sure the RTC setting is the same in both Windows and Manjaro.

This is the same timezone as in timedatectl. If this is not your timezone, change it with timedatectl.

Do I have to reinstall manjaro again? I feel like its been falling apart for a while now on my computer cause I get lots of error message when shutting down and starting up.

If you want why not. Personally this is always the wrong decision. Better find out why it happens. Check the logs and journal, look up the errors and fix them.

1 Like